[gradsusr] stnmap error

Andre Pattantyus apattantyus2008 at my.fit.edu
Sun Jun 19 11:38:42 EDT 2011


Attached is the station data I am trying to use to convert to grads format.
It looks like the script to turn into grads binary is a problem or the
options sequential needs to be something else in the .ctl file, but what
should it be?

This is the fortran script to convert data:

   CHARACTER*8 STID
    REAL  TD, TT,RH,WSP,WDIR,PP
       OPEN (8,file='stns_new.txt')
      OPEN (10,file='stn.dat',FORM='UNFORMATTED'
     + ,status='unknown')

       IFLAG = 0

10     READ (8,9000,END=90) ITIME, STID, RLAT, RLON, TT,Td,rh,WSP,
     +   wdir, pp

9000   FORMAT( I2, 1X, A4, 1X, F7.4,1X,F8.3,1X,
     + F4.1,1X,F5.1,1X,F3.0,1x,F4.1,1X,F3.0,1X,F4.1)
!
       IF (IFLAG.EQ.0) THEN
          IFLAG = 1
!         IYROLD = IYEAR
          ITIMEOLD = ITIME
       ENDIF

!    print*,IYEAR,IMONTH,STID,RLAT,RLON,RVAL,TD,UU,VV
!  If new time group, write time group terminator.
!  Assuming no empty time groups.
!
       IF (ITIMEOLD.NE.ITIME) THEN
          NLEV = 0
          WRITE (10) STID,RLAT,RLON,TIM,NLEV,NFLAG
          ENDIF
!         IYROLD = IYEAR
          ITIMEOLD = ITIME
!  Write this report
       TIM = 0.0
       NLEV = 1
       NFLAG = 1
       WRITE (10) STID,RLAT,RLON,TIM,NLEV,NFLAG

!print*,ITIME,STID,RLAT,RLON,TT,TD,UU,VV
!      print*,STID,RLAT,RLON,TIM,NLEV,NFLAG
       WRITE (10) TT,TD,RH,WSP,WDIR,PP
       print*, TT ,TD, RH,WSP, WDIR, PP
       GO TO 10
!  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

Here is the .ctl file:

DSET   ^stn.dat
DTYPE  station
STNMAP station.map
OPTIONS sequential
UNDEF  -999.00
TITLE  Station Data Sample
TDEF  24 linear 07Z30Nov2007 60mn
VARS 6
ts    0 99  Surface Temperature
td    0 99  Surface Dewpoint Temperature
rh    0 99  Relative Humidity
wsp   0 99  Wind speed
wdir  0 99  wind dir
pp    0 99  accumulated precipitation
ENDVARS


-- 
Andre Pattantyus, Graduate Student Research Assistant
Marine and Environmental Systems, Florida Institute of Technology
150 W. University Blvd, Melbourne, FL 32901

Phone: (321) 674-8330 | Fax: (321) 674-7212 | Email: apattantyus2008 at fit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110619/656162e6/attachment-0003.html 
-------------- next part --------------
 1 knyl 32.6572 -114.592 14.4   0.0  37  0.0      0.0
 1 kblh 33.6211 -114.718 10.6 -10.6  21  2.1  10  0.0
 1 swlc 32.9049 -114.475 15.6  -6.7  21  1.8  11  0.0
 1 kphx 33.4310 -112.050 18.9  12.8  68  4.1  50  0.0
 1 knjk 32.8229 -115.658 13.3  -2.2  34  0.0      0.0
 2 knyl 32.6572 -114.592 12.8   0.6  43  0.0      0.0
 2 kblh 33.6211 -114.718 11.1 -12.2  18  2.1 330  0.0
 2 swlc 32.9049 -114.475 15.0  -5.4  24  0.0 287  0.0
 2 kphx 33.4310 -112.050 18.3  13.3  73  3.1  80  0.0
 2 knjk 32.8229 -115.658 13.9  -1.7  34  2.1 180  0.0
 3 knyl 32.6572 -114.592 13.9  -2.2  33  0.0      0.0
 3 kblh 33.6211 -114.718 12.2 -11.7  18  0.0      0.0
 3 swlc 32.9049 -114.475 13.9  -1.3  35  0.0  83  0.0
 3 kphx 33.4310 -112.050 18.3  12.2  68  0.0      0.0
 3 knjk 32.8229 -115.658 12.8   0.6  43  0.0      0.0
 4 knyl 32.6572 -114.592 14.4  -5.6  25  1.5  70  0.0
 4 kblh 33.6211 -114.718 10.6 -10.0  22  3.1  10  0.0
 4 swlc 32.9049 -114.475 13.3  -2.2  34  0.0  41  0.0
 4 kphx 33.4310 -112.050 18.3  12.2  68  3.1  80  0.0
 4 knjk 32.8229 -115.658 12.2  -1.7  38  2.1 340  0.0
 5 knyl 32.6572 -114.592 14.4  -2.8  30  0.0      0.0
 5 kblh 33.6211 -114.718 11.7 -12.2  17  1.5  30  0.0
 5 swlc 32.9049 -114.475 12.8  -4.4  30  0.0  63  0.0
 5 kphx 33.4310 -112.050 17.8  13.3  75  1.5 110  0.3
 5 knjk 32.8229 -115.658 13.3  -1.7  35  0.0      0.0
 6 knyl 32.6572 -114.592 13.9  -1.1  36  0.0      0.0
 6 kblh 33.6211 -114.718 13.3 -10.0  19  0.0   0  0.0
 6 swlc 32.9049 -114.475 12.8  -3.1  33  0.9  25  0.0
 6 kphx 33.4310 -112.050 18.3  11.7  65  2.6 110  0.3
 6 knjk 32.8229 -115.658 13.3  -1.7  35  0.0      0.0
 7 knyl 32.6572 -114.592 15.6  -2.8  28  2.1 110  0.0 
 7 kblh 33.6211 -114.718 13.3 -10.0  19  0.0      0.0
 7 swlc 32.9049 -114.475 13.3  -4.8  28  0.0 112  0.0
 7 kphx 33.4310 -112.050 17.8  12.2  70  3.6 130  0.3
 7 knjk 32.8229 -115.658 13.9   1.1  42  1.5 350  0.0
 8 knyl 32.6572 -114.592 15.0  -1.1  33  1.5      0.0
 8 kblh 33.6211 -114.718 13.3 -11.1  17  2.1  10  0.0
 8 swlc 32.9049 -114.475 13.9  -1.3  35  0.0  16  0.0
 8 kphx 33.4310 -112.050 17.2  13.9  81  2.6 110  0.6
 8 knjk 32.8229 -115.658 14.4   0.6  39  2.1  60  0.0
 9 knyl 32.6572 -114.592 14.4   0.0  37  2.1  40  0.0
 9 kblh 33.6211 -114.718 13.3 -11.1  17  0.0      0.0
 9 swlc 32.9049 -114.475 12.8  -3.5  32  0.0  52  0.0
 9 kphx 33.4310 -112.050 17.2  14.4  84  2.1 110  0.6
 9 knjk 32.8229 -115.658 14.4   0.6  39  0.0      0.0
10 knyl 32.6572 -114.592 16.7  -0.6  31  1.5 110  0.0
10 kblh 33.6211 -114.718 13.3  -3.9  30  0.0      0.0
10 swlc 32.9049 -114.475 14.4   0.3  38  0.0  99  0.0
10 kphx 33.4310 -112.050 18.3  14.4  78  3.6 120  0.6
10 knjk 32.8229 -115.658 14.4   1.1  40  0.0      0.0
11 knyl 32.6572 -114.592 17.8   2.8  37  4.6 130  0.0
11 kblh 33.6211 -114.718 14.4  -6.1  24  1.5 260  0.0
11 swlc 32.9049 -114.475 15.6  -2.4  29  1.3 267  0.0
11 kphx 33.4310 -112.050 19.4  15.6  79  4.1 120  0.6
11 knjk 32.8229 -115.658 15.0   1.1  39  0.0      0.0
12 knyl 32.6572 -114.592 19.4   5.6  40  5.1 160  0.0
12 kblh 33.6211 -114.718 16.7  -8.9  16  0.0      0.0
12 swlc 32.9049 -114.475 17.2  -6.6  19  1.8 159  0.0
12 kphx 33.4310 -112.050 20.0  15.0  73  2.6 120  0.6
12 knjk 32.8229 -115.658 16.1   0.0  33  1.5  30  0.0
13 knyl 32.6572 -114.592 19.4  10.6  57  6.2 170  0.0
13 kblh 33.6211 -114.718 17.2 -10.0  15  3.1 240  0.0
13 swlc 32.9049 -114.475 18.3  -4.4  21  0.9 195  0.0
13 kphx 33.4310 -112.050 20.0  15.0  73  2.6 110  0.6
13 knjk 32.8229 -115.658 16.7  -0.6  31  3.1 360  0.0
14 knyl 32.6572 -114.592 17.0  12.0  72  3.1 150  0.0
14 kblh 33.6211 -114.718 18.3  -7.8  16  3.6 180  0.0
14 swlc 32.9049 -114.475 18.9  -2.7  23  0.9 166  0.0
14 kphx 33.4310 -112.050 18.3  16.1  87  3.6 160  2.6
14 knjk 32.8229 -115.658 17.2   3.9  41  4.1 350  0.0
15 knyl 32.6572 -114.592 16.1  14.4  90  5.7 180  0.0
15 kblh 33.6211 -114.718 18.9  -3.9  21  4.6 190  0.0
15 swlc 32.9049 -114.475 18.9   4.3  38  2.2 152  0.0
15 kphx 33.4310 -112.050 17.8  16.7  93  3.1 160  3.4
15 knjk 32.8229 -115.658 16.7   5.6  48  6.2 350  0.0
16 knyl 32.6572 -114.592 16.7  15.6  93  5.1 140  0.0
16 kblh 33.6211 -114.718 17.2   1.1  34  5.7 130  0.0
16 swlc 32.9049 -114.475 17.8   7.5  51  2.2 161  0.0
16 kphx 33.4310 -112.050 17.8  16.7  93  2.1 160  5.7
16 knjk 32.8229 -115.658 16.1   5.6  50  4.6  10  0.0
17 knyl 32.6572 -114.592 17.2  16.7  97  7.2 140  1.3
17 kblh 33.6211 -114.718 15.0  11.1  78  2.1 180  0.0
17 swlc 32.9049 -114.475 16.7  13.4  81  0.4 128  0.0
17 kphx 33.4310 -112.050 17.2  16.7  97  3.1 150  9.3
17 knjk 32.8229 -115.658 13.9  10.0  77  2.6  30  0.8
18 knyl 32.6572 -114.592 17.2  16.1  93  4.1 170  1.3
18 kblh 33.6211 -114.718 14.0  12.0  88  0.0      0.3
18 swlc 32.9049 -114.475 16.1  14.6  91  0.9   5  0.0
18 kphx 33.4310 -112.050 17.0  17.0 100  2.1 130  9.3
18 knjk 32.8229 -115.658 12.8   8.9  77  3.6 330  3.8
19 knyl 32.6572 -114.592 17.2  16.1  93  5.7 150  1.6
19 kblh 33.6211 -114.718 13.9  12.8  93  1.5  30  3.6
19 swlc 32.9049 -114.475 16.7  15.4  92  0.0  73  0.2
19 kphx 33.4310 -112.050 17.2  16.7  97  2.6 140 11.1
19 knjk 32.8229 -115.658  9.0   9.0 100  2.6 340  9.4
20 knyl 32.6572 -114.592 17.8  16.7  93  9.3 150  2.9
20 kblh 33.6211 -114.718 13.3  12.8  97  3.1 350  5.9
20 swlc 32.9049 -114.475 17.2  16.2  94  0.4  85  0.5
20 kphx 33.4310 -112.050 17.2  16.7  97  1.5 150 14.1
20 knjk 32.8229 -115.658 10.6   9.4  92  2.6 330 20.1
21 knyl 32.6572 -114.592 11.7  11.1  96 10.3 290  5.7
21 kblh 33.6211 -114.718 11.7  11.1  96  6.2 290 12.5
21 swlc 32.9049 -114.475 16.1  15.3  95  1.8 128  2.8
21 kphx 33.4310 -112.050 17.0  17.0 100  3.1 120 14.4
21 knjk 32.8229 -115.658 10.0   9.4  96  4.6 350 24.7
22 knyl 32.6572 -114.592 13.3  13.3 100  3.1  50 16.6
22 kblh 33.6211 -114.718 11.1  10.0  93  4.6 350 21.6
22 swlc 32.9049 -114.475 14.4  12.5  88 10.3 279  4.3
22 kphx 33.4310 -112.050 17.2  16.7  97  3.6 150 15.4
22 knjk 32.8229 -115.658 10.6   9.4  92  1.5 310 24.7
23 knyl 32.6572 -114.592 13.9  13.9 100  4.1  70 16.6
23 kblh 33.6211 -114.718 11.0  10.0  94  0.0     21.9
23 swlc 32.9049 -114.475 13.9  13.1  95  2.7  33 14.5
23 kphx 33.4310 -112.050 17.2  16.7  97  2.6 140 16.9
23 knjk 32.8229 -115.658 10.6   9.4  92  2.6 170 24.7
24 knyl 32.6572 -114.592 14.4  14.4 100  2.6 130 16.6
24 kblh 33.6211 -114.718 11.1  10.0  93  2.6 130 22.4
24 swlc 32.9049 -114.475 13.3  12.4  94  1.8 346 16.5
24 kphx 33.4310 -112.050 17.2  16.1  93  2.6 160 21.2
24 knjk 32.8229 -115.658 10.0   9.4  96  5.1 190 24.7

-------------- next part --------------
A non-text attachment was scrubbed...
Name: stn.dat
Type: application/octet-stream
Size: 11264 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20110619/656162e6/attachment-0003.obj 


More information about the gradsusr mailing list