We recommend adhering to the CF convention's guidance on the use of the units attribute with the following clarifications:

  • Unitless (dimensionless in the physical sense) property of the data in a variable is indicated by the lack of a units attribute, unless:
    • appropriate physical units do exist;
    • use of dimensionless units identifiers is common practice in the target user community.
  • Values of the units attribute should be supported by the UDUNITS-2 library.
  • A variable used in any context other than data storage should never have the units attribute.

Recommendation Details: The units attribute is part of the CF metadata convention and is one of the recommended variable attributes in the DIWG-R2 recommendation. The application of this attribute was ambiguous in the past, particularly in the case of unitless (dimensionless) data or in the choice of appropriate attribute values.

This recommendation standardizes on both of these issues. Values of the attribute should be supported by the UDUNITS-2 library. For example: "km^2" or "km2" are valid; "square km" is invalid. For dimensionless data, the use of the units attribute is allowed when there are physical units in common usage. For example: "milliradians", "g/kg", or "%". While all of these units represent a dimensionless physical quantity there are user communities that use them. The same applies to cases with fractional numbers as dimensionless units, such as: "1e-3" or "1e-6".

The use of units="1", units="" (empty string), or any similar construct as generic units for unitless data are strongly discouraged.