⇐ ⇒

[CF-metadata] On scalar coordinate variables

From: Seth McGinnis <mcginnis>
Date: Thu, 17 Dec 2015 06:47:45 -0800

Hi Dan,

Your example looks correct to me. Not that I'm an expert or anything,
but if you *are* confused, at least you're not alone. :)

Cheers,

--Seth


On 12/17/2015 4:35 AM, Hollis, Dan wrote:
> Hi all,
>
> I thought I understood coordinates until I read this post :-)
>
> I've waded through much of #104 and re-read some bits of the CF convention and NUG. As far as I can tell both 'auxiliary coordinate variable' and 'scalar coordinate variable' are concepts introduced by CF i.e. they don't exist in the NUG. Is that correct?
>
> In an attempt to help myself understand all the different flavours of coordinate I've put together the following simple example that I think demonstrates all the possibilities.
>
>
> dimensions:
> x = 180;
> y = 290;
> p = 1;
> n = 5;
>
> variables:
> float d(y, x, p, n);
> d: coordinates = "lat lon h s a z t";
>
> float x(x); # coordinate variable
> float y(y); # coordinate variable
> float p(p); # size 1 coordinate variable
>
> float lat(y, x); # auxiliary coordinate variable
> float lon(y, x); # auxiliary coordinate variable
> float h(p); # size 1 auxiliary coordinate variable
> char s(n); # string-valued auxiliary coordinate variable
> char a(p); # size 1 string-valued auxiliary coordinate variable
>
> float z; # numeric scalar coordinate variable
> char t; # string-valued scalar coordinate variable
>
>
> Is this a valid example? Have I missed anything out, or completely misunderstood some aspect? I hope I'm not creating further confusion...
>
> Regards,
>
> Dan
>
>
>
> -----Original Message-----
> From: CF-metadata [mailto:cf-metadata-bounces at cgd.ucar.edu] On Behalf Of martin.juckes at stfc.ac.uk
> Sent: 17 December 2015 09:04
> To: d.c.hassell at reading.ac.uk
> Cc: cf-metadata at cgd.ucar.edu
> Subject: Re: [CF-metadata] On scalar coordinate variables
>
> Hi David,
>
> In case (1) "double dim1" is a an NUG scalar coordinate variable. My point is that the #104 text appears ambiguous to me, because it is using the term "scalar coordinate variable" in a way which is different from the NUG usage, but at the same time relies on reference to the NUG text for definitions of coordinate variables,
>
> regards,
> Martin
> ________________________________________
> From: David Hassell [d.c.hassell at reading.ac.uk]
> Sent: 16 December 2015 23:38
> To: Juckes, Martin (STFC,RAL,RALSP)
> Cc: cf-metadata at cgd.ucar.edu
> Subject: Re: [CF-metadata] On scalar coordinate variables
>
> Hi Martin,
>
> I've just come back to this. I think you're right that #104 refers to your case (2), but is that because in case (1), "double dim1" is a CF data variable and not a CF scalar coordinate variable?
>
> Thanks,
>
> David
>
> ---- Original message from martin.juckes at stfc.ac.uk (09AM 09 Dec 15)
>
>> Date: Wed, 9 Dec 2015 09:07:22 +0000
>> From: martin.juckes at stfc.ac.uk
>> To: d.c.hassell at reading.ac.uk
>> CC: cf-metadata at cgd.ucar.edu
>> Subject: RE: [CF-metadata] On scalar coordinate variables
>>
>> 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
>
>
> --
> 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
> _______________________________________________
> CF-metadata mailing list
> CF-metadata at cgd.ucar.edu
> http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
>
Received on Thu Dec 17 2015 - 07:47:45 GMT

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

⇐ ⇒