- #1
bou
- 3
- 0
Hi everyone I need help for reading file that contain float number, I don't understand the problem or what should I have to fix; the code seem to be fine if the read file is integer number but if the number is real number the FORTRAN give me error Runtime Error: debug_input.f(12): Invalid character in real input field
the code can read file if i change from format(928f7.4) to default (*) but i need to use format to read file for calculate, sorry for my poor explanation.
thank in advance
Fortran:
PROGRAM test
PARAMETER (NX=928,NY=775)
REAL IFDY (NX,NY)
DO J=1,NY
DO I=1,NX
IFDY(I,J)=0
ENDDO
ENDDO
open(100, FILE="100y_dem2.txt",
& STATUS='OLD', ACTION='READ',RECL=25000)
read(100,'(928f7.4)')((IFDY(I,J),I=1,NX),J=1,NY)
close(100)
PRINT *, ifdy
END PROGRAM
thank in advance