Strange output from station data

Ryo Furue furue at HAWAII.EDU
Thu Mar 19 20:22:18 EDT 2009


Hi Arlindo,

I guess this "rec+20" in this line

  sscanf (rec+20," %g %g %g",&hdr.lat,&hdr.lon,&val);

is the culprit.  You are missing the first two characters
of the latitude.  Your latitude starts from the 18th column
counting from 0th (see below), so that the code should read

  sscanf (rec+18," %g %g %g",&hdr.lat,&hdr.lon,&val);

Hope this helps,
Ryo
------------------------------------------------
012345678901234567890
1979  1  mapt     -25.18  32.36    10
1979  1  chang    -26.18  32.11   10
1979  1  xai      -25.03  33.38   11
1979  1  namp     -15.06  39.17   15
1979  1  lich     -13.18  35.14   12
1979  1  cuamba   -14.49  36.32   10
1979  1  pemba    -12.59  40.32   14
1979  1  qlm      -17.53  36.53   11
1979  1  Tete     -16.11  33.53   11
1979  1  chimo    -19.07  32.28   10
1979  1  Ibn      -23.52  35.23   12
1979  1  vlk      -22.00  35.19   11
1979  1  beira    -19.48  34.54   14



More information about the gradsusr mailing list