我正在尝试使用下面显示的代码读取以下输入数据文件。然而,我收到了一个错误。我已多次查看代码,但似乎无法找到问题所在,因为我认为阅读第2行的格式规范是正常的。
ERROR:
Fortran runtime error: Expected INTEGER for item 5 in formatted transfer, got REAL
(a3,2(4x,i2,i3,i4),4x,f6.1,f4.1,f7.2,f5.2,f8.
^
INPUT FILE(4行):
C022980A 02/29/80 11:13:26.7 6.30 126.88 104.06.10.0PHILIPPINE ISLANDS
MLI BW:12 36 45 MW: 7 14 135 DT= 3.9 0.2 6.13 0.02 127.17 0.02 79.3 1.6
DUR 4.0 EX 25 3.01 0.07 -0.78 0.06 -2.23 0.06 1.52 0.07 2.14 0.07 1.00 0.07
4.38 62 314 -1.29 22 173 -3.09 16 77 3.74 138 35 49 5 64 115
CODE:
inut = 1
OPEN(inut,file=cevent,iostat=ios,status='old',err=999)
read(inut,1001)code,month,day,year,hour,min,sec,lat,lon,depth,
1 mb,ms,region
1001 format(a8,5(1x,a2),1x,f4.1,f7.2,f8.2,f6.1,2f3.1,a24)
read(inut,1002)epsrc,bwst,bwrec,bwcoff,mwst,mwrec,mwcoff,
1 dt,edt,clat,eclat,clon,eclon,cdepth,ecdepth
1002 format(a3,2(4x,i2,i3,i4),4x,f6.1,f4.1,
1 f7.2,f5.2,f8.2,f5.2,f6.1,f5.1)
read(inut,1003)ahdur,expo,rmom(1),emrr,rmom(2),emss,rmom(3),emee,
1 rmom(4),emrs,rmom(5),emre,rmom(6),emse
1003 format(4x,f4.1,4x,i2,6(f6.2,f5.2))
read(inut,1004)ev(1),evpl(1),evaz(1),ev(2),evpl(2),evaz(2),
2 ev(3),evpl(3),evaz(3),smo,strike(1),dip(1),rake(1),
4 strike(2),dip(2),rake(2)
1004 format(3(f7.2,i3,i4),f7.2,2(i4,i3,i5))