title: Fortran runtime error: Bad value during floating point read
body: <p>I am trying to read a Tab-delimited text file, using "gfortran" in Ubuntu-13. I get following error
  "Fortran runtime error: Bad value during floating point read"</p>
  
  <p>Program is given below;</p>
  
  <pre><code>    CHARACTER*8 STID
         OPEN (8,FILE='station.txt', STATUS='OLD',FORM='FORMATTED')
         OPEN (10,FILE='stn.dat',FORM='UNFORMATTED')
         IFLAG = 0
  C  Read and Write
  10     READ (8,9000,END=90) IYEAR,IMONTH,STID,RLAT,RLON,RVAL
  9000   FORMAT (I4,T1,I2,T1,A8,3F5.1)
         IF (IFLAG.EQ.0) THEN
            IFLAG = 1
            IYROLD = IYEAR
            IMNOLD = IMONTH
         ENDIF
  C  If new time group, write time group terminator.
  C  Assuming no empty time groups.
         IF (IYROLD.NE.IYEAR.OR.IMNOLD.NE.IMONTH) THEN
            NLEV = 0
            WRITE (10) STID,RLAT,RLON,TIM,NLEV,NFLAG
            ENDIF
            IYROLD = IYEAR
            IMNOLD = IMONTH
  C  Write this report
         TIM = 0.0
         NLEV = 1
         NFLAG = 1
         WRITE (10) STID,RLAT,RLON,TIM,NLEV,NFLAG
         WRITE (10) RVAL
         GO TO 10
  C  On end of file write last time group terminator.
  90     CONTINUE
         NLEV = 0
         WRITE (10) STID,RLAT,RLON,TIM,NLEV,NFLAG
         PRINT *, STID,RLAT,RLON,TIM,NLEV,NFLAG
         STOP
         END
  </code></pre>
  
  <p>The input text file looks like</p>
  
  <pre><code>1985    11      AAAA    18.2    42.7    9.2
  1985    11      BBBB    25.3    49.5    0.0
  1985    11      cccc    21.5    41.6    22.6
  1985    11      ddddd   29.8    40.1    3.6
  ....    ..      .....   ....    ....    ...
  </code></pre>