Re: NJ22 and WRF data

Hi Robert:

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.

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.
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.

John


Robert B. Schmunk wrote:

John,

A user of the Weather Research & Forecast model at UCAR asked me
for some help viewing a netCDF dataset in Panoply. In taking a
closer look at the metadata I have been rather startled to find
that the NJ22 libraries report some information present in the file
that the simple CDL output of ncdump does not reveal at all.

Although I have been used to seeing this in the past for variable
attributes, which NJ22 would prefix with an underscore (e.g.,
":_CoordinateAxisType"), NJ22 is reporting entire variables for a
sample WRF dataset which ncdump does not show. Most if not all of
these seem related to defining the coordinate system, e.g.,

   double x(west_east=93);
     :units = "km";
     :long_name = "synthesized GeoX coordinate from DX attribute";
     :_CoordinateAxisType = "GeoX";
     :_CoordinateAliasForDimension = "west_east";
   double x_stag(west_east_stag=94);
     :units = "km";
     :long_name = "synthesized GeoX coordinate from DX attribute";
     :_CoordinateAxisType = "GeoX";
     :_CoordinateAliasForDimension = "west_east_stag";

   char Lambert;
     :Projection_Name = "lambert_conformal_conic";
     :latitude_of_projection_origin = 27.070636749267578; // double
     :longitude_of_central_meridian = 120.0; // double
     :standard_parallel = 10.0, 40.0; // double
     :_CoordinateTransformType = "Projection";
     :_CoordinateAxisTypes = "GeoX GeoY";

As there is not even a "Conventions" tag in the global attributes,
I am highly curious as to exactly how NJ22 is recognizing this
dataset and how it goes about filling in this "extra" information.
There do seem to be some WRF classes in the API, but only WRFEta
is in the public API.

Oddly enough, none of the quantity variables in the sample file I
have been given are reported as being on the Lambert conformal
conic grid, despite the Lambert information mysteriously reported.
It's possible, of course, that the dataset's creator has omitted
some necessary attributes.

rbs




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


  • 2007 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: