⇐ ⇒

[CF-metadata] On scalar coordinate variables

From: Brian Eaton <eaton>
Date: Wed, 9 Dec 2015 07:40:11 -0700

Hi Martin and David,

When I was writing about scalar coordinate variables in the CF convention,
I considered a scalar to be a zero dimensional object. That is distinct
from a 1 dimensional array which happens to only have 1 component. A
coordinate array in the NUG sense is a one dimensional array. When a 1D
array has just one component then the information content is like a
scalar. But the terminology in the convention really refers to the data
structure in the netcdf file.

Hope that helps,
Brian


On Wed, Dec 9, 2015 at 2:07 AM, <martin.juckes at stfc.ac.uk> wrote:

> Hi David,
>
> Aren't there two cases here, one in which the scalar coordinate does have
> the same name as a dimension and one in which it doesn't? i.e.
>
> (1) scalar NUG coordinate variable
> Dimensions:
> dim1 = 1 ;
> variables:
> float myvar(dim1);
> double dim1;
>
> (2) Scalar CF coordinate variable
> variables:
> float myvar;
> myvar: coordinates= "dim1" ;
> double dim1;
>
> I see that ticket 104 assumes that the term "scalar coordinate variable"
> only refers to the 2nd example, but example (1) is declares a valid
> coordinate variable in the NUG sense which is also a scalar. If CF wants to
> exclude this, it needs to be explicitly stated that it is not allowed (or,
> if it is already excluded by the convention somehow, this restriction
> relative to the NUG convention should be clarified).
>
> I'm not sure that the reference to NUG is incorrect .. I certainly didn't
> mean to assert that. I have the impression the NUG usage here is what
> users expect and so it should be in the CF convention and the other parts
> of the convention should be consistent. In what sense do you think it is
> incorrect?
>
> Regards,
> Martin
>
> -----Original Message-----
> From: David Hassell [mailto:d.c.hassell at reading.ac.uk]
> Sent: 08 December 2015 14:19
> To: Juckes, Martin (STFC,RAL,RALSP)
> Cc: cf-metadata at cgd.ucar.edu
> Subject: Re: [CF-metadata] On scalar coordinate variables
>
> Hello Martin,
>
> I think that a CF scalar coordinate variable is not a NUG-defined
> coordinate variable because it does not have the same name as a dimension.
>
> Nor is it a special type of CF coordinate variable, as was discussed in
> ticket #104 http://cf-trac.llnl.gov/trac/ticket/104 - it could be
> functionally equivalent to an auxiliary coordinate variable.
>
> However, section 1.3 makes it clear (in italics, no less) that
>
> "The use of [NUG-defined] coordinate variables is required for all
> dimensions that correspond to one dimensional space or time
> coordinates"
>
> which as you point out is incorrect. Perhaps that is where a clarification
> should go, i.e.:
>
> "The use of coordinate variables or scalar coordinate variables (as
> defined in section 5.7) is required for all dimensions that
> correspond to one dimensional space or time coordinates"
>
> What do you think?
>
> All the best,
>
> David
>
> ---- Original message from martin.juckes at stfc.ac.uk (09AM 08 Dec 15)
>
> > Date: Tue, 8 Dec 2015 09:58:29 +0000
> > From: martin.juckes at stfc.ac.uk
> > To: cf-metadata at cgd.ucar.edu
> > Subject: [CF-metadata] On scalar coordinate variables
> >
> > Hello,
> >
> > The CF Convention 1.6 and draft 1.7 both include, in the discussion of
> dimensions in Section 2.4, the statement that:
> > "It is also acceptable to use a scalar coordinate variable which
> eliminates the need for an associated size one dimension in the data
> variable."
> >
> > However, the convention states that coordinate variables should be
> interpreted as 'NUG-defined "coordinate variables."'. The NUG is vague
> about the definition (
> https://www.unidata.ucar.edu/software/netcdf/docs/coordinate_variables.html
> ), but it does say "Current application packages that make use of
> coordinate variables commonly assume they are numeric vectors and strictly
> monotonic". It also states that "A position along a dimension can be
> specified using an index", which is not consistent with the use of a scalar
> coordinate variable.
> >
> > One application which appears to assume that coordinate variables are
> vectors is the CF Checker, so we need some clarification. I'm not sure how
> other applications deal with it.
> >
> > The problem with the current phrasing in the CF Conventions document is
> that it suggests the NUG approach is being followed and then introduces a
> departure from the NUG approach in a separate part of the text.
> >
> > I would recommend either adding after 'NUG-defined "coordinate
> variables"' a clarification '(that is a scalar or vector variable with the
> same name as a dimension)', or changing the statement about use of scalar
> coordinate variables.
> >
> > regards,
> > Martin
> > _______________________________________________
> > CF-metadata mailing list
> > CF-metadata at cgd.ucar.edu
> > http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
>
>
> --
> David Hassell
> National Centre for Atmospheric Science (NCAS) Department of Meteorology,
> University of Reading, Earley Gate, PO Box 243, Reading RG6 6BB, U.K.
>
> Tel : +44 118 3785613
> E-mail: d.c.hassell at reading.ac.uk
> _______________________________________________
> CF-metadata mailing list
> CF-metadata at cgd.ucar.edu
> http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cgd.ucar.edu/pipermail/cf-metadata/attachments/20151209/31c93dd0/attachment.html>
Received on Wed Dec 09 2015 - 07:40:11 GMT

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

⇐ ⇒