[gradsusr] multi-level station data

June Yeung jyeung at princeton.edu
Tue Jan 11 16:18:16 EST 2011


Hi all,

I am trying to work with multi-level station data in GrADS (version
1.9b4).  Looking in the archive, a number of people have had trouble with
this over the years, and I am unable to find any sort of centralized source
of information on how to go about this.

I took the sample C code (for monthly surface observations) from the GrADS
documentation index entry for station data and modified it to fit my own
data set (multi-level, hourly).  My C code, a snippet of my data set, and my
descriptor file are attached.  The C script runs fine and creates the binary
file.  When I try to create a station map file, however, I get the following
message:

==================================
Name of binary data set: MAP_RUTGERS_200908_surface.dat
Number of times in the data set: 2
Number of surface variables: 0
Number of level dependent variables: 2

Starting scan of station data binary file.
Binary data file open: MAP_RUTGERS_200908.dat
Processing time = 1
  Invalid station hdr found in station binary file
  Possible causes:  Invalid level count in hdr
                             Descriptor file mismatch
                             File not station data
                             Invalid relative time
 levs = 8266 flag = 1109524480 time = 8.9059e+08

===================================

Going through the list of four possible causes for the invalid station hdr
found in the station binary file above, I think the only reasonable causes
are the first two, "invalid level count in hdr" and "descriptor file
mismatch."  I have checked my descriptor file to make sure it conforms with
the required format, and so perhaps the probem is with the level count.  I
tried to see whether the problem is with the level count by pretending that
the 2 variables are actually surface variables instead of multi-level
data (by specifying 'winddir 0 99' and 'windspd 0 99' in the control file
instead of what it currently says), and there are no error messages when I
run stnmap.   Nevertheless, when I try to open the control file in this
case, there are no data displayed (only the world map is displayed).  The
corresponding displayed text on the command line when running stnmap for
this case are as follows:

===================================
Starting scan of station data binary file.
Binary data file open: MAP_RUTGERS_200908.dat
Processing time = 1
    Time = 1 has stn count = 6
Processing time = 2
    Time = 2 has stn count = 6
Max reports per time: 6 reports at t = 1
Max data elements in largest report: 3

Version 2 Station map file created: MAP_RUTGERS_200908.map

stnmap: WARNING!! This stnmap file can only be accessed by GrADS Version
1.9b4
stnmap: WARNING!! However, GrADS Version 1.9b4 can read both versions

stnmap: COMMENT -- use the -1 command line option to create a map for older
GrADS versions

 ===================================

Does anyone have experience with this and can provide guidance on how I can
go about debugging this?  Any help would be greatly appreciated.  I have
been stumped for a while.

My best,
June


===============
June K. Yeung
Ph.D. Student
Department of Civil & Environmental Engineering
Princeton University
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110111/80ea7649/attachment-0003.html 
-------------- next part --------------
 RUTNJ      20090801_0000    1000.00000     22.000000      9.000000
 RUTNJ      20090801_0000    900.000000     99.000000      99.000000
 RUTNJ      20090801_0000    700.000000     54.000000      2.500000
 DUTNJ      20090801_0000    1000.00000     50.000000      1.500008
 DUTNJ      20090801_0000    900.000000     99.000000      99.000000
 DUTNJ      20090801_0000    700.000000    130.000000      9.000000
 RUTNJ      20090801_0100    1000.00000     22.000000      9.000000
 RUTNJ      20090801_0100    900.000000     99.000000      99.000000
 RUTNJ      20090801_0100    700.000000     54.000000      2.500000
 DUTNJ      20090801_0100    1000.00000     50.000000      1.500008
 DUTNJ      20090801_0100    900.000000     99.000000      99.000000
 DUTNJ      20090801_0100    700.000000    130.000000      9.000000
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plotstndata_forMAP_JYEUNG.c
Type: text/x-csrc
Size: 3419 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20110111/80ea7649/attachment-0003.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MAP_RUTGERS_200908.ctl
Type: application/octet-stream
Size: 255 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20110111/80ea7649/attachment-0003.obj 


More information about the gradsusr mailing list