CF says that if the units attribute is missing, then the quantity has no
units.
The Conventions document, section 3.1 says:
The|units|attribute is required for all variables that represent
dimensional quantities (except for boundary variables defined
inSection 7.1, "Cell
Boundaries"<http://cfconventions.org/Data/cf-conventions/cf-conventions-1.6/build/cf-conventions.html#cell-boundaries>and
climatology variables defined inSection 7.4, "Climatological
Statistics"<http://cfconventions.org/Data/cf-conventions/cf-conventions-1.6/build/cf-conventions.html#climatological-statistics>).
and
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.
The Udunits package defines a few dimensionless units, such as|percent|,
but is lacking commonly used units such as ppm (parts per million). This
convention does not support the addition of new dimensionless units that
are not udunits compatible. The conforming unit for quantities that
represent fractions, or parts of a whole, is "1". The conforming unit
for parts per million is "1e-6". Descriptive information about
dimensionless quantities, such as sea-ice concentration, cloud fraction,
probability, etc., should be given in
the|long_name|or|standard_name|attributes (see below) rather than
the|units|.
The unit of '1' is generally used to indicate fractions and the like. In
cases where I am storing a raw binary value, I leave off the units
attribute, as the 'number' isn't something that should be treated as a
decimal quantity.
Grace and peace,
Jim
On 10/30/14, 11:35 AM, John Caron wrote:
My preference is that one explicitly puts in the units. For
dimensionless, "1" or "" is ok for udunits. If the units attribute
isnt there, I assume that the user forgot to specify it, so the units
are unknown.
Im not sure what CF actually says, but it would be good to clarify.
John
On Thu, Oct 30, 2014 at 2:37 AM, Hedley, Mark
<[email protected] <mailto:[email protected]>>
wrote:
Hello CF
> From: CF-metadata [[email protected]
<mailto:[email protected]>] on behalf of Jonathan
Gregory [[email protected] <mailto:[email protected]>]
> 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
[email protected] <mailto:[email protected]>
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
_______________________________________________
CF-metadata mailing list
[email protected]
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
--
CICS-NC <http://www.cicsnc.org/> Visit us on
Facebook <http://www.facebook.com/cicsnc> *Jim Biard*
*Research Scholar*
Cooperative Institute for Climate and Satellites NC <http://cicsnc.org/>
North Carolina State University <http://ncsu.edu/>
NOAA's National Climatic Data Center <http://ncdc.noaa.gov/>
151 Patton Ave, Asheville, NC 28801
e: [email protected]
o: +1 828 271 4900
_______________________________________________
CF-metadata mailing list
[email protected]
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata