station data: AGAIN about plotting rain.ctl example (timesteps are read incorrectly)

Ileana Blad é ileanablade at UB.EDU
Wed Mar 3 04:52:41 EST 2010


I am new to station data plotting. I have tried to test the example provided
in the GRADS users guide, but I have the same problem as someone did a
couple of years ago (and have tried to find the solution in the listserver
but have failed).

Even though my rain.ch file is

Year   Month  Stid    Lat    Lon    Rainfall
1980     1     QQQ    34.3  -85.5    123.3
1980     1     RRR    44.2  -84.5     87.1
1980     1     SSS    22.4  -83.5    412.8
1980     1     TTT    33.4  -82.5     23.3
1980     1     XXX    35    -90.0    724.1

And my ctl file is: 
DSET rain.dat
DTYPE station
STNMAP rain.map
UNDEF -999.9
TITLE Rainfall
TDEF 1 linear 01jan1980 1mo
VARS 1
rr  0 99 Rainfall
ENDVARS

stnmap "sees" an inexistent time step 1 with 1 station count and doesn't see
my real time step 1 (jan1980) with 5 station counts.

stnmap -i rain.ctl
  Name of binary data set: rain.dat
  Number of times in the data set: 1
  Number of surface variables: 1
  Number of level dependent variables: 0

Starting scan of station data binary file.
Binary data file open: rain.dat

Processing time step 1
     Time = 1 has stn count = 1 
  Max reports per time:  1 reports at t = 1
  Max data elements in largest report: 1

I can "fix" this by changing TDEF to 2 in the ctl file. Then stnmaps reads
two time steps (one nonexistent, one real) and then I set t=2 in grads
(instead of the true t=1), but I would like to understand why there is an
offset and a "fake" time time step 1.

I use the "c" program provided in the GRADS webpage to create the binary
file rain.dat

Thanks 

Ileana



More information about the gradsusr mailing list