Re: NJ22 and WRF data



Robert B. Schmunk wrote:

On Jun 1, 2007, at 17:53, John Caron wrote:

John, Thanks for the info.

If you read through NetcdfFile class, you get the raw data.

If you read through NetcdfDataset(enhance=true), you get the extra stuff. The "scientifiic data types" like Grid always use this mode.

Checking back into my own library, I see that I'm always using NetcdfDataset.acquireFile (String,CancelTask).

The API for that method doesn't say whether the result is always
enhanced, as does acquireDataset(String,CancelTask), but since
I'm getting the extra stuff, it mus be.

yes, thats the default


NetcdfDataset looks for a "CoordinateSystemBuilder" that recognizes that dataset, eg ucar.nc2.dataset.conv.WRFConvention class. This is the class that adds the coordinate variables, etc, by understanding that particular files' metadata, in WRF case, I think its all in the global attributes.

Despite the lack of a global "Conventions" attribute, I
figured that it must be something in the global attributes.
The variables in the sample dataset didn't seem to have any of
the usual dimensions or attributes that I am used to seeing
(see below), which usually make it self-evident what to do
even if there is no convention tag.

WRF continues to be a hard one to get right, there's a few flavors of it, the projection info is fishy, etc. If you send me a sample file I might be able to figure out why things aren't working out.

The file's really big, so I would have to e-mail you directions
on how to download it. But belatedly I have found the webpage at
http://www.unidata.ucar.edu/software/netcdf/examples/files.html

The sample file I have received includes metadata that looks
substantially like (if not the same as) the sample WRF output
that is the 5th item from the bottom of that webpage.

I have also added some diagnostic output to my code to check for
coordinate information which I have never tested for before.
Previously, I merely queried the CoordinateSystem if there was a
lon axis and a lat axis. To deal with WRF data, it looks like
I need to start querying for the existence of geoX and geoY
axes and a CoordinateTransform.

that's it!

let me know if you have any problems....


rbs


--
Robert B. Schmunk, rschmunk@xxxxxxxxxxxxx
NASA Goddard Institute for Space Studies, 2880 Broadway, New York, NY 10025