⇐ ⇒

[CF-metadata] string valued coordinates

From: Jonathan Gregory <j.m.gregory>
Date: Thu, 30 Oct 2014 16:34:24 +0000

Dear Mark

area_type is given in the standard_name table as having a unit of 1. It is
a categorical string-valued quantity.

Sect 3.1 of CF 1.6 says

"Units are not required for dimensionless quantities. A variable with no units
attribute is assumed to be dimensionless. However, a units attribute specifying
a dimensionless unit may optionally be included."

So, putting units="1" or omitting the units both mean the quantity is
dimensionless.

Best wishes

Jonathan

----- Forwarded message from "Hedley, Mark" <mark.hedley at metoffice.gov.uk> -----

> Date: Thu, 30 Oct 2014 08:37:14 +0000
> From: "Hedley, Mark" <mark.hedley at metoffice.gov.uk>
> To: "cf-metadata at cgd.ucar.edu" <cf-metadata at cgd.ucar.edu>
> Subject: Re: [CF-metadata] string valued coordinates
>
> Hello CF
>
> > From: CF-metadata [cf-metadata-bounces at cgd.ucar.edu] on behalf of Jonathan Gregory [j.m.gregory at reading.ac.uk]
>
> > Yes, there are some standard names which imply string values, as Karl says. If the standard_name table says 1, that means the quantity is dimensionless, so it's also fine to omit the units, as Jim says.
>
> I would like to raise question about this statement. Omitting the units and stating that the units are '1' are two very different things;
> dimensionless != no_unit
> is an important statement which should be clear to data consumers and producers.
>
> If the standard name table defines a canonical unit for a standard_name of '1' then I expect this quantity to be dimensionless, with a unit of '1' or some multiple there of.
> If the standard name states that the canonical unit for a standard_name is '' then I expect that quantity to have no unit stated.
> Any deviation from this behaviour is a break with the conventions. I have code which explicitly checks this for data sets.
>
> Are people aware of examples of the pattern of use described by Jonathan, such as a categorical quantities identified by a standard_name with a canonical unit of '1'?
>
> thank you
> mark

> _______________________________________________
> CF-metadata mailing list
> CF-metadata at cgd.ucar.edu
> http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata


----- End forwarded message -----
Received on Thu Oct 30 2014 - 10:34:24 GMT

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

⇐ ⇒