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

Re: WDSSII Files



Hi Kevin:

Kevin L. Manross wrote:

Hmmmm. I've discovered that we're using the netCDF C++ Interface (which makes sense since WDSSII is an API built on C++ - though we've been slowly porting to Java as well). Unfortunately, it appears that the official netCDF C++ Interface is supporting only the nteCDF-3 model. Can you tell me how close you might be to upgrading the C++ I'face to support netCDF-4? I'm guessing that until either the C++ I'face or the Java implementation are ready to write netCDF-4 files, we may not be able to implement netCDF-4 for WDSSII, mainly for our compression needs. Note: I just discovered something rather interesting. The size of the sparse grid vs the non-sparse grid binary netCDF-3 file, after gzipping them, was about 140 Kb. So we may be able to get away with netCDF-3 for now.
Yes, you have some pretty sparse data there. Im quite sure that a tiled netcdf-4 file is what you want as soon as you can do it.

BTW - the grid is indeed uniform. When you suggest that "one sets 1D lat and 1D lon", can you give me an example of what you mean?
When the grid is uniform, one uses 1D lat and lon coordinate variables. So the coordinate at (i,j) is lat(i) and lon(j). This is in contrast to needing 2D coordinates, ie lat(i,j) and lon(i,j). See below for example.

I am still going to try and see what is required to get our existing data model to fit the CDM by using an existing non-sparse grid and playing with the toolsUI. The tab I was using with toolsUI that gave me the error (in 4.x, but not 2.2x) was the "Viewer" tab. I've attached the file.
Yes, i see. we are adding the coordinate systems for you, since they are missing, and there were some assumptions that we were making that arent true in this file. I have corrected this and will put out a new release at the end of today.

I would recommend that you add the "Lat", "Lon" and "Time" variables to the file (see below). Also add the "Conventions" global attribute. If you do the changes below, you could use Conventions = "CF-1.0" which would score you points in many places.

The data variable MergedReflectivityQCComposite could probably be of type byte, saving you 4X, or at worse a short, depending on the number of significant bits. You should set a missing_value attribute, and use 0 (im guessing) for 0 reflectivity. Currently im seeing -99903 and -99900 for those, respectively. You should also add a "long_name" attribute, with a "human readable" name, like to display on plots and so on.

Also see http://www.unidata.ucar.edu/software/netcdf/docs/BestPractices.html

netcdf D:/work/20100217-170119.netcdf {
dimensions:
  Lat = 3000;
  Lon = 6200;
  Time = 1;
variables:
  float MergedReflectivityQCComposite(Lat=3000, Lon=6200);
    :Units = "dBZ";
    :NumValidRuns = -1; // int
  float Lat(Lat=3000);
    :units = "degrees_north";
    :long_name = "latitude coordinate";
    :_CoordinateAxisType = "Lat";
  float Lon(Lon=6200);
    :units = "degrees_east";
    :long_name = "longitude coordinate";
    :_CoordinateAxisType = "Lon";
  int Time(Time=1);
    :units = "seconds since 1970-1-1 00:00:00";
    :long_name = "time coordinate";
    :_CoordinateAxisType = "Time";

:TypeName = "MergedReflectivityQCComposite";
:DataType = "LatLonGrid";
:Latitude = 51.0; // double
:Longitude = -127.0; // double
:Height = 0.0; // double
:Time = 1266426079; // int
:FractionalTime = 0.06400000303983688; // double
:attributes = " HeightSpacing SubType Unit";
:HeightSpacing-unit = "dimensionless";
:HeightSpacing-value = "WISH";
:SubType-unit = "dimensionless";
:SubType-value = "00.00";
:Unit-unit = "dimensionless";
:Unit-value = "dBZ";
:LatGridSpacing = 0.009999999776482582; // double
:LonGridSpacing = 0.009999999776482582; // double
:MissingData = -99900.0f; // float
:RangeFolded = -99901.0f; // float
:Conventions = "NSSL National Reflectivity Mosaic";
}

Thanks again for your help! Please let me know if you would prefer me to get on the netCDF mailing lists to have these discussions.

-kevin.