- #1
Novia Lusiana
- 6
- 0
- TL;DR Summary
- I am a new user in fortran language programming, I would calculate the rainfall data (.csv) using the script in Fortran. The script is attached on below.
However, after i executed the script there is an error especially in line this one --> read (51, '()').
I want the software read all data in 51 files. But i do not have any idea what the mistake is and how to fix it.
Please give me suggestion. Thank you in advance.
Fortran:
implicit none!do not use an undetermined constant
character(len=18)::fname
character(len=22)::fname_2
character(len=19)::fname_3
character(len=7)::yyyymmd
character(len=1)::dash
character(len=1)::d
character(len=1)::f1
character(len=1)::f2
character(len=1)::f3
character(len=1)::f4
character(len=2)::f5
character(len=1)::zero
character(len=4)::last
character(len=4)::last_2
integer i,j,count_num,k
real x(1495,1002,300),lat(1495), longt(1002),x_sum(1495, 1002)
integer flag_d(300),flag_1(300),flag_2(300),flag_3(300)
integer flag_11(0:1495)!only one day data can be inputed!
real x_sumh(1495,1002,0:23)
101 format(5(f7.2,","),f6.2)
!*********reading file***********
open(51,file="input.csv",status="old")
count_num=0
read (51,'()')!skip the header rows
do
read (51,*,end =100)
end do
100 continue
rewind(51)!return to previous files
Last edited by a moderator: