I have a file that looks like that:
Data from X04 2000
Time: GMT + 0
Date Hour Value
01.01.2003 00:00 60.0
01.01.2003 01:00 63.0
in gfortran on cygwin i use to read the header like that:
CHARACTER(LEN=18)
READ(17,'(A)') header
with no problem
On INTEL...
What is the best way of reading a line like that:
02.01.2003 00:00 35.0
The following format doesnt work:
FORMAT(I2, '.', I2, '.', I4, I2, ':', '00', F7.1)
It gives a runtime error:
Constant string in input format
for the '.'
What is the problem with this?
Which is the easiest way of measuring the execution time of a fortran program?
Is there a fortran command that gives that time in seconds for example?
Thanx
I would like to read separate each number from a file that looks like this:
100. .0000 2 565.4 328.65 35.97 30.71 NO
200. .7663E-03 2 565.4 328.65 67.62 59.54 NO
1000. 93.37 2 565.4 328.65 278.23 345.64 NO
I use:
myfmt =...
I tried this but the file i created was:
U
N
N
Y
3
*
0.000 0.000 0.000
N
N
and i also tried using 2(I1,/) and 2(I2,/) and 2(I5,/)
if that integer is anything but 1 it works.
?
Im trying to write a file as follows:
! create file IN.DAT
OPEN(UNIT=99,FILE='IN.DAT',STATUS='REPLACE')
WRITE(UNIT=99,'(/,4(/,A),/,2(I,/),f10.3,2f10.3,2(/,A))')&
'U','N','N','Y',&
3,1,uw,&
0.0,0.0,&
'N','N'
CLOSE(UNIT=99)
however the 1 after...
I want to use an external file functions.f that has a number of routines/functions into my code maincode.f90 (without copying it under my code with the command "contains").
I have used the following code but it doesnt seem to work.
Which is the appropriate syntax?
program maincode
EXTERNAL...
Im trying to call a sequence of random numbers created by a function called RANF() as seen below.
The problem is that I get the same number (1.0) when using the code below and im wondering why:
program LOOP
INTEGER(KIND=8) :: i
REAL(KIND=8) :: RANF
do i=1,20
number = RANF()...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.