在AIX上运行Fortran 90。我已经问了一个类似的问题,但这是一个不同的错误。在编译时,出现此错误:
The unformatted I/O statement on the file /filepath/TB_20160610005713bufr_v620.dat cannot be completed because the end of the record was reached.
我认为它与记录长度有关,但我不完全理解错误。 I / O声明究竟是什么?
TYPE :: NR_record
INTEGER ( Short ) :: row
INTEGER ( Short ) :: col
REAL ( Single ) :: time
REAL ( Single ) :: tbh425
END TYPE NR_record
TYPE (NR_record) :: TB_RECORD
INTEGER,PARAMETER :: GRID_TB_UNIT = 200
INTEGER ( Short ), PARAMETER :: TB_REC_LEN = 22
tbhmap=0
OPEN(UNIT=GRID_TB_UNIT,file=TRIM(TB_binary_filename),STATUS='REPLACE',ACCESS='DIRECT',FORM='UNFORMATTED',RECL=TB_REC_LEN)
nrecg = 0
DO rr=1,720
IF(countgrid(cc,rr) < 1)CYCLE
nrecg = nrecg+1
tbhmap(cc,rr) = tbhgrid(cc,rr)/countgrid(cc,rr)
timemap(cc,rr) = timegrid(cc,rr)/countgrid(cc,rr)
GRID_TB_record%row = rr
GRID_TB_record%col = cc
GRID_TB_record%time = timemap(cc,rr)
GRID_TB_record%tbh425 = tbhmap(cc,rr)
WRITE(GRID_TB_UNIT,REC=nrecg)GRID_TB_record
END DO
CLOSE(GRID_TB_UNIT)