Skip to content

Commit

Permalink
units_metadata not allowed if no temperature unit
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanGregory committed Nov 17, 2023
1 parent 76e0af8 commit dc11b8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ch03.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ In order to change the **`units`** correctly, it is essential to know whether a
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.
A variable must not have a **`units_metadata`** attribute if it has no **`units`** attribute or if its **`units`** do not involve a temperature unit.

[[use-of-units-metadata-ex]]
[caption="Example 3.1. "]
Expand Down
1 change: 1 addition & 0 deletions conformance.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Exceptions are the units **`level`**, **`layer`**, and **`sigma_level`**.
* The **`units`** of a variable that specifies a **`standard_name`** must be physically equivalent to the canonical units given in the standard name table, as modified by the **`standard_name`** modifier, if there is one, according to Appendix C, and then modified by all the methods listed in order by the **`cell_methods`** attribute, if one is present, according to Appendix E.
* If the **`standard_name`** attribute includes the `standard_error` modifier, the **`units_metadata`** attribute, if present, must have the value `temperature: difference`.
* If the **`cell_methods`** attribute includes any entry with any of the methods `range`, `standard_deviation` or `variance`, the **`units_metadata`** attribute, if present, must have the value `temperature: difference`.
* A variable must not have a **`units_metadata`** attribute if it has no **`units`** attribute or if its **`units`** do not involve a temperature unit.

*Recommendations:*

Expand Down

0 comments on commit dc11b8b

Please sign in to comment.