<div>Hi all,</div>
<div> </div>
<div>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.</div>

<div> </div>
<div>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: </div>

<div> </div>
<div>==================================</div>
<div>Name of binary data set: MAP_RUTGERS_200908_surface.dat</div>
<div>Number of times in the data set: 2</div>
<div>Number of surface variables: 0</div>
<div>Number of level dependent variables: 2</div>
<div> </div>
<div>Starting scan of station data binary file.</div>
<div>Binary data file open: MAP_RUTGERS_200908.dat</div>
<div>Processing time = 1</div>
<div>  Invalid station hdr found in station binary file</div>
<div>  Possible causes:  Invalid level count in hdr</div>
<div>                             Descriptor file mismatch</div>
<div>                             File not station data</div>
<div>                             Invalid relative time</div>
<div> levs = 8266 flag = 1109524480 time = 8.9059e+08</div>
<div> </div>
<div>===================================</div>
<div> </div>
<div>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, &quot;invalid level count in hdr&quot; and &quot;descriptor file mismatch.&quot;  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 &#39;winddir 0 99&#39; and &#39;windspd 0 99&#39; 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:</div>

<div> </div>
<div>===================================</div>
<div>Starting scan of station data binary file.</div>
<div>Binary data file open: MAP_RUTGERS_200908.dat</div>
<div>Processing time = 1</div>
<div>    Time = 1 has stn count = 6</div>
<div>Processing time = 2</div>
<div>    Time = 2 has stn count = 6</div>
<div>Max reports per time: 6 reports at t = 1</div>
<div>Max data elements in largest report: 3</div>
<div> </div>
<div>Version 2 Station map file created: MAP_RUTGERS_200908.map</div>
<div> </div>
<div>stnmap: WARNING!! This stnmap file can only be accessed by GrADS Version 1.9b4</div>
<div>stnmap: WARNING!! However, GrADS Version 1.9b4 can read both versions</div>
<div> </div>
<div>stnmap: COMMENT -- use the -1 command line option to create a map for older GrADS versions</div>
<div> </div>
<div>
<div>===================================</div></div>
<div> </div>
<div>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.</div>
<div> </div>
<div>My best,</div>
<div>June</div>
<div> </div>
<div> </div>
<div>===============</div>
<div>June K. Yeung</div>
<div>Ph.D. Student</div>
<div>Department of Civil &amp; Environmental Engineering</div>
<div>Princeton University</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div>    </div>