Running Fortran 90 on AIX. I've asked a similar question that was answered, however this is a different error. On compiling, getting this error:
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 believe it has something to do with the record length, but I don't fully understand the error. What exactly is the I/O statement?
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)