[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grid_number in netCDF file



On Mon, 5 Apr 1999, Tom Whittaker wrote:

> Robb:
> 
> > ngrids is a dimension only, the grid_number should be at the bottom of the
> > cdl file:
> > 
> > grid_number = 236, 255 ;
> 
> Thanks for your note.  I did locate the grid number, as you say.  My
> problem was that the variable "grid_number" is specified as having
> dimensions (nav, ngrids) and my software was not expecting this, since
> my only other examples (eta and ruc) had only one dimension (nav) for
> this variable; therefore, when I tried to do a 'getInt()' on it with
> only one index array value, I got an exception.
> 
> I will change the software so that it correctly detects the number of
> dimensions of this variable...will it always be the case that if the
> dimension 'ngrids' does not show up in some variable that the implied
> values for the grid number is given by "grid_number(0,0)"?

Tom,

Yep.  The decoders, I have written always reads a cdl file first to get
the dimensions and  variables before trying to read the netCDF file. This
works well as long as the cdl matches the netCDF file. 

Robb...

> 
> Thanks for your patience...this is my "first time" with the
> NetCDF APIs in Java...
> 
> > 
> > I  attached  ruc2.cdl in case your copy was somehow corrupted.  I used
> > ncdump on a ruc2.nc file today and located grid_number ok, maybe the file
> > Don sent was corrupted.  This happens once in a while when there is no
> > disk space to write the ruc2.nc file.  These files are large:
> > 48478444 Apr  5 12:42 99040518_ruc2.nc
> > 
> 
> I'll say -- the one Don sent was like 190MBs...
> 
> Thanks again.
> 
> tom
> 
> --
> Tom Whittaker  (address@hidden)
> University of Wisconsin-Madison
> Space Science and Engineering Center
> Phone/Voicemail: 608/262-2759  
> Fax: 608/263-6738
> 
> 

===============================================================================
Robb Kambic                                Unidata Program Center
Software Engineer III                      Univ. Corp for Atmospheric Research
address@hidden             WWW: http://www.unidata.ucar.edu/
===============================================================================