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

Re: 20011009: COARDS and/or CF-1.0



>From: Cristina Kaufman <address@hidden>
>Subject: COARDS and/or CF-1.0
>Organization: NCAR
>Keywords: 200110091632.f99GWH124624 netCDF global attribute COARDS

Hi Cristina,

> I am preparing the metadata for the VEMAP 2 dataset and am wondering what
> convention to list.  The files are both COARDS and CF-1.0 compliant.
> 
> Do we list one or both?  Are there advantages one way or another for
> present software and future software trends?
> 
> If we list both, would the form be?
> 
>  :Conventions = "COARDS","CF-1.0" ;  or
>  :Conventions = "COARDS, CF-1.0" ;

Good questions.

You can eliminate

>  :Conventions = "COARDS","CF-1.0" ;

from consideration because a netCDF text attribute is really only one
string, so the above is exactly equivalent to

   :Conventions = "COARDSCF-1.0" ;

(as you can see by running "ncgen -b foo.cdl" to generate the netcdf
file foo.nc, then running "ncdump foo.nc" to see how your attribute
strings got smashed together).

I think you have these alternatives:

 1.  :Conventions = "CF-1.0" ;
 2.  :Conventions = "COARDS/CF-1.0" ;
 3.  :Conventions = "COARDS, CF-1.0" ;

The CF conventions document at

   http://www.cgd.ucar.edu/cms/eaton/netcdf/CF-current.htm#conv

says

   We recommend that netCDF files that follow these conventions
   indicate this by setting the NUG defined global attribute
   Conventions to the string value "CF-1.0".

which would argue for alternative 1.  This would work fine if
applications that now understand the COARDS conventions are modified
to interpret "CF-1.0" as also implying the COARDS conventions.
Applications are easier to modify then data archives, so I think this
is the best choice in the long run.

The description of the "Conventions" global attribute in the netCDF
User's Guide (and on the netCDF Conventions web page) recommends using
alternative 2:

   :Conventions = "COARDS/CF-1.0"

in the case that CF-1.0 is considered to be a pure extension to the
COARDS conventions, that specializes it by adding some additional
conventions.  This would indicate a dataset that followed the COARDS
conventions but in addition also followed the CF-1.0 conventions.
This notation has the dubious advantage of permitting "CF-1.0" to mean
something else when extending a different set of conventions, just as
you can have two files with the same name in different directories.

(But CF-1.0 is not, strictly speaking, a pure extension to COARDS,
because CF permits dimensions to be in a different order than is
required by COARDS, for example.  For such datasets, using only
"CF-1.0" would be appropriate.)

I think the alternative 3 notation

   :Conventions = "COARDS, CF-1.0";

should be reserved to describe datasets that adhere to both the
"COARDS" and "CF-1.0" conventions independently, even when there is no
inheritance relationship between the conventions.  Unfortunately, we
didn't consider this possibility, analogous to multiple inheritance,
when we defined the "Conventions" attribute, but we may add it to
future revisions of the User's Guide.

Ultimately, which choice is best depends on how applications interpret
the "Conventions" attribute.  If I were writing an application, I
would interpret it liberally by looking for a substring match in the
conventions string for any supported convention, and I would also
honor implied conventions relationships, such as CF-1.0 -> COARDS.
Such an application would work for any of the alternatives.

I'm CC:ing a couple of the authors of CF-1.0, in case I'm
misinterpreting what they wrote, but I think they would also recommend
alternative 1.

--Russ