Re: [netcdf-java] netCDF CDM grid with ensemble axis

Hi Roland-

On 11/5/13 8:45 AM, Roland Schweitzer - NOAA Affiliate wrote:
I see hints in the Java netCDF API that it can understand a grid that
has an ensemble axis.  What's not clear to me is how one constructs a
netCDF data source (either in the file or via some sort of TDS
aggregation) that represents the ensemble.

It's documented if you read the code. ;-)  In the CF1Convention parser:

        if (sname.equalsIgnoreCase("ensemble")) {  // experimental
v.addAttribute(new Attribute(_Coordinate.AxisType, AxisType.Ensemble.toString()));
          continue;
        }

where sname is the standard name. So, if you add a standard name of "ensemble" to your coordinate axis with a CF-1.X Conventions, that will be picked up as an ensemble dimension by the netCDF-Java library (and hence TDS).

I generally set the following attributes:

long_name: "ensemble";
standard_name: "ensemble";
axis: "E";

(I guess with the above code the latter should bet axis: "Ensemble", but it's not really used as far as I know).

You can also have this as a char variable using the names of the perturbations (e.g. E1,E2,E3,E4). I mostly use ints.

The CF conventions document
doesn't seem say anything about ensembles.

There was a discussion a while back about having a CF convention for the ensemble dimension, but there was never any consensus. I think people got bogged down in the difficult cases instead of implementing something that worked most of the time (like what John did) and iterate from there. I've been using John's stuff for several years either directly in a netCDF file or through NcML aggregation.

Google is failing me, can anybody offer some examples or documentation
links for data sources with an ensemble axis?

I figured this out from private conversations with John instead of going through support so those didn't end up in the Google-verse.

Hope this helps.

Don
--
Don Murray
NOAA/ESRL/PSD and CU-CIRES
303-497-3596
http://www.esrl.noaa.gov/psd/people/don.murray/



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