Error is:
At line 124 of file calib3.f (unit = 17, file = './temp.clean')
Fortran runtime error: Bad value during integer read
Error termination. Backtrace:
Could not print backtrace: libbacktrace could not find executable to open
#0 0x6f8aecb4
#1 0x6f8a11ce
#2 0x6f81fac4
#3 0x6f8ad971
#4 0x6f8c404f
#5 0x6f89b375
#6 0x4030cf
#7 0x405a50
#8 0x401287
Code is:
open(unit=obslun,status='old',file=obsf,access='sequential')
do 1001 i=1,8
extraf(i) = 0
extraa(i) = 0
extrat(i) = ' '
1001 continue
read(unit=obslun,fmt=60,end=2000) regno,
1 (amnt(i),time(i),i=1,21),
2 (extraf(i),extraa(i),extrat(i),i=1,2)
read(unit=obslun,fmt=61,end=2000)
1 (amnt(i),time(i),i=22,41),
2 (extraf(i),extraa(i),extrat(i),i=3,4),
etc
Format 60 is:
60 format(1x,a4,1x,21(i1,a1),2(i4,i1,a1))
The data is:
G001 3M3M3M3M N3W N3W2D2D N N N N N N N2W N N N10011W10021W
1W2W1W1W2W N1W N2W2D N N5W N N N5W N N N 2131 1 0 0 0 0
2M2M N2M4M N1M2M2M2M2M3M1M1M1M3M3M N2M3M N N N N1W2W N N N N
1222224422222222
1W1W1W1W1W1W1W1W1W1W1W1W2W3W N1W1W1W1W1W3M1M1M1W1M N2W N
114212W N N2W3W N N1W1W2M2W1W3M4M3M1W1W2M2M1W N N N N
16 0 14 0 0 02 0 00 902W2W2W2W2W2D7W1W1M3W3W N N2W N R N1W1W1W
I have tried commenting out the next 6 lines of input. I have tried the following format statements:
60 format(1x,a5,21(i1,a1),2(i4,i1,a1))
60 format(1x,a4,2x,21(i1,a1),2(i4,i1,a1))
I have tried some print statements
print *,'Line 0'
read(unit=obslun,fmt=60,end=2000) regno,
1 (amnt(i),time(i),i=1,21),
2 (extraf(i),extraa(i),extrat(i),i=1,2)
print *, regno, (amnt(i),time(i),i=1,21),(extraf(i),extraa(i),extrat(i),i=1,2)
print *, 'Line 2'
read(unit=obslun,fmt=61,end=2000)
1 (amnt(i),time(i),i=22,41),
2 (extraf(i),extraa(i),extrat(i),i=3,4),
3 mlktea,mlkcof,mlksub,makdrk,
4 mlktyp,sugtea,sugcof,sugsub,sugcoc
print *,(amnt(i),time(i),i=22,41),(extraf(i),extraa(i),extrat(i),i=3,4)
print *,'Line 3' etc
and got
G001 3 M 3 M 3 M 3 M 0 N 3 W 0
N 3 W 2 D 2 D 0 N 0 N 0 N 0 N
0 N 0 N 0 N 2 W 0 N 0 N 0 N
1 W 2 W 1 W 1 W 2 W 0 N 1 W
0 N 2 W 2 D 0 N 0 N 5 W 0 N 0 N
0 N 5 W 0 N 0 N 0 N 0
At line 124 of file calib3.f (unit = 17, file = ‘./temp.clean’)
Fortran runtime error: Bad value during integer read
I hoped that the data would be read in and it wasn't. I have indented every line by 4 as I have code
that is not properly formatted and I cannot post this question.
Thanks for your help in advance.
Trisha