⇐ ⇒

[CF-metadata] size-one axes

From: Stephens, A <A.Stephens>
Date: Tue, 8 Jul 2003 10:30:10 +0100

Dear Jonathan,

I think it is very important that some size-one coordinate variables are
included as in future they will allow data comparison in 4-D when one
dataset might be a fixed location instrument (with 3 size-one axes) and the
other is a model.

Most of the NetCDF files that I have so far come across ignore any size-one
axes and tend to put this info into attributes and comments. This is clearly
not useful in the above context.

I also know of people that put in size-one axes for things like lat and long
when referring to a fixed location instrument. In such cases they have not
necessarily defined the actual data variable as varying with the lat and
long coordinate variables but they are in the file nevertheless. I think
that this latter method is still lacking in that the explicit relationship
between the variable and the size-one coordinate variable is not stated.

I therefore agree that CF needs a method of formalising the use of size-one
coordinate variables.

My initial response is to prefer the first version when everything is very
explicit but I can see your reasoning that defining a variable with the
following dimensionality would not be a useful notation:

my_var(1,1,1,20)

It would be better to say my_var(20) and 'by the way, there are also some
size-one dimensions'.

So, I would agree with your suggestion but I think you should call the
attribute "size-1-coordinates" or "size-one-coordinates". Do you still
define size-one coordinate variables as "type name(name);" or just as "type
name;". If the former is true then your example would be:

dimensions:
   lon=96;
   lat=73;
   forecast_time=3;
   analysis_time=1;
   wavelength=1;
variables:
   float lon(lon);
   float lat(lat);
   double forecast_time(forecast_time);
   double analysis_time(analysis_time);
   float wavelength(wavelength);
   float LWflux(forecast_time,lat,lon);
     LWflux:size-1-coordinates="wavelength analysis_time";

Kind regards,

Ag
-------------------------------------------------------------
Ag Stephens Ph : +44 (0)1235 446220
Data Scientist, Fax: +44 (0)1235 446314
British Atmospheric Data Centre,
Rutherford Appleton Laboratory,
Chilton, Didcot, OX11 0QX, U.K.
Email: A.Stephens at rl.ac.uk Web: http://badc.nerc.ac.uk
-------------------------------------------------------------




> -----Original Message-----
> From: Jonathan Gregory [mailto:j.m.gregory at reading.ac.uk]
> Sent: 04 July 2003 17:36
> To: cf-metadata at cgd.ucar.edu
> Subject: [CF-metadata] size-one axes
>
>
> Dear All
>
> I have a proposal regarding axes (dimensions) of size one. We
> propose the use
> of such axes for attaching metadata that can be regarded as a
> single-level
> coordinate. Temperature at 1.5 m has such a vertical
> coordinate, for instance.
> Other examples could be: radiation wavelength band, analysis
> time for a set of
> forecasts (discussed in the other thread), reference pressure
> (for potential
> temperature, exner function, etc.). It is convenient to use
> coordinate vars
> for such things because they may need units, standard names,
> bounds, etc., which
> can be stored on coordinate variables.
>
> My proposal is that, for coordinate variables having a
> dimension of one,
> except for the basic xyzt (the ones which might have an axis
> attribute), it
> should be permissible to name the coordinate variable in the
> coordinates
> attribute *without* the dimension being a dimension of the
> data variable.
> That would allow many of such size-one coordinate variables
> to be associated
> with a data variable without insisting that it has many
> dimensions of size
> one. Since such dimensions do not affect the ordering of the
> elements of the
> array, they are not really needed as dimensions.
>
> The reason for excluding xyzt is that COARDS applications
> would expect the
> data variable to have these dimensions, even if they do have size one.
>
> So, for example, instead of
>
> dimensions:
> lon=96;
> lat=73;
> forecast_time=3;
> analysis_time=1;
> wavelength=1;
> variables:
> float LWflux(wavelength,analysis_time,forecast_time,lat,lon);
> float lon(lon);
> float lat(lat);
> double forecast_time(forecast_time);
> double analysis_time(analysis_time);
> float wavelength(wavelength);
>
> where the LWflux array is dimensioned (1,1,3,73,96), we would have
>
> float LWflux(forecast_time,lat,lon);
> LWflux:coordinates="wavelength analysis_time";
>
> where it is dimensioned (3,73,96). All the other variables
> remain the same.
>
> Any views?
>
> Best wishes
>
> Jonathan
> _______________________________________________
> CF-metadata mailing list
> CF-metadata at cgd.ucar.edu
> http://www.cgd.ucar.edu/mailman/listinfo/cf-metadata
>
Received on Tue Jul 08 2003 - 03:30:10 BST

This archive was generated by hypermail 2.3.0 : Tue Sep 13 2022 - 23:02:40 BST

⇐ ⇒