Skip to content

Commit

Permalink
units_metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanGregory committed Nov 20, 2023
2 parents dc11b8b + 3e65afe commit c1b1394
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cf-conventions.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include::version.adoc[]
= NetCDF Climate and Forecast (CF) Metadata Conventions
Brian{nbsp}Eaton; Jonathan{nbsp}Gregory; Bob{nbsp}Drach; Karl{nbsp}Taylor; Steve{nbsp}Hankin; Jon{nbsp}Blower; John{nbsp}Caron; Rich{nbsp}Signell; Phil{nbsp}Bentley; Greg{nbsp}Rappa; Heinke{nbsp}Höck; Alison{nbsp}Pamment; Martin{nbsp}Juckes; Martin{nbsp}Raspaud; Randy{nbsp}Horne; Timothy{nbsp}Whiteaker; David{nbsp}Blodgett; Charlie{nbsp}Zender; Daniel{nbsp}Lee; David{nbsp}Hassell; Alan{nbsp}D.{nbsp}Snow; Tobias{nbsp}Kölling; Dave{nbsp}Allured; Aleksandar{nbsp}Jelenak; Anders{nbsp}Meier{nbsp}Soerensen; Lucile{nbsp}Gaultier; Sylvain{nbsp}Herlédan; Fernando{nbsp}Manzano; Lars{nbsp}Bärring
Brian{nbsp}Eaton; Jonathan{nbsp}Gregory; Bob{nbsp}Drach; Karl{nbsp}Taylor; Steve{nbsp}Hankin; Jon{nbsp}Blower; John{nbsp}Caron; Rich{nbsp}Signell; Phil{nbsp}Bentley; Greg{nbsp}Rappa; Heinke{nbsp}Höck; Alison{nbsp}Pamment; Martin{nbsp}Juckes; Martin{nbsp}Raspaud; Randy{nbsp}Horne; Timothy{nbsp}Whiteaker; David{nbsp}Blodgett; Charlie{nbsp}Zender; Daniel{nbsp}Lee; David{nbsp}Hassell; Alan{nbsp}D.{nbsp}Snow; Tobias{nbsp}Kölling; Dave{nbsp}Allured; Aleksandar{nbsp}Jelenak; Anders{nbsp}Meier{nbsp}Soerensen; Lucile{nbsp}Gaultier; Sylvain{nbsp}Herlédan; Fernando{nbsp}Manzano; Lars{nbsp}Bärring; Christopher{nbsp}Barker
Version {current-version}, 31 August, 2022: See https://cfconventions.org for further information
:doctype: book
:pdf-folio-placement: physical
Expand Down Expand Up @@ -47,7 +47,7 @@ include::toc-extra.adoc[]
* Sylvain Herlédan, OceanDataLab
* Fernando Manzano, Puertos del Estado
* Lars Bärring, SMHI
* Chris Barker, NOAA
* Christopher Barker, NOAA

Many others have contributed to the development of CF through their participation in discussions about proposed changes.

Expand Down
4 changes: 2 additions & 2 deletions ch03.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ When **`units`** of on-scale temperature are converted, the data may require the
On-scale temperature is _unique_ among quantities in this respect; for all other quantities, zero means the same whatever the unit of measurement. For example (using **bold** to indicate a numerical data value), **0** `kilogram` is the same mass as **0** `pound`, but **0** `degC` is not the same temperature as **0** `degF` (= **-17.8** `degC`), because these two temperature **`units`** implicitly refer to measurement scales which have different origins.

On the other hand, when the temperature value is a _temperature difference_, which compares two on-scale temperatures with the same origin, the value of that origin is irrelevant as it cancels out when taking the difference.
Therefore to change the **`units`** of a temperature difference requires only multiplication by a scale factor, without the addition of an offset.
Therefore to convert the **`units`** of a temperature difference requires only multiplication by a scale factor, without the addition of an offset.

The **`units`** attribute does not distinguish between on-scale temperatures and temperature differences.
This ambiguity also affects units of temperature raised to some power e.g. `K^2` or multiplied by other units e.g. `W m-2 K-1`, `degF/foot` or `degC m s-1`.
A **`standard_name`** (<<standard-name>>) or **`standard_name`** modifier (<<standard-name-modifiers>>) may clarify the intention, but they are optional.
Some statistical operations described by the **`cell_methods`** attribute (<<cell-methods>>; <<appendix-cell-methods>>) imply that temperature must be interpreted as temperature difference, but this attribute is optional too.

In order to change the **`units`** correctly, it is essential to know whether a temperature is on-scale or a difference.
In order to convert the **`units`** correctly, it is essential to know whether a temperature is on-scale or a difference.
Therefore this standard strongly recommends that any variable whose **`units`** involve a temperature unit should also have a **`units_metadata`** attribute to make the distinction.
This attribute must have one of the following three values: `temperature: on_scale`, `temperature: difference`, `temperature: unknown`.
The **`units_metadata`** attribute, **`standard_name`** modifier (<<standard-name-modifiers>>) and **`cell_methods`** attribute (<<appendix-cell-methods>>) must be consistent if present.
Expand Down
1 change: 1 addition & 0 deletions history.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
=== Working version (most recent first)

* {issues}481[Issue #481]: Introduce **`units_metadata`** attribute and clarify some other aspects of **`units`**
* {issues}483[Issue #483]: Add a missing author
* {issues}463[Issue #463]: Convert URLs with HTTP protocol to HTTPS if available, fixed a few dead links
* {issues}383[Issue #383]: Link to the CF website and deleted the Preface section
* {issues}472[Issue #472]: Fix incorrect formating for some \<= symbols
Expand Down

0 comments on commit c1b1394

Please sign in to comment.