Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/pull_request_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ jobs:
sudo apt-get update
sudo apt-get -y install libxml2-utils

- name: Check for duplicate standard names
run: tools/check_xml_unique.py standard_names.xml
- name: Check for duplicate standard names, descriptions
run: |
tools/check_xml_unique.py standard_names.xml
tools/check_xml_unique.py standard_names.xml --field="description"

check-name-rules:
name: Check standard names against rules
Expand Down
252 changes: 124 additions & 128 deletions Metadata-standard-names.md

Large diffs are not rendered by default.

41 changes: 31 additions & 10 deletions StandardNamesRules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ESM Standard Name Rules
In the latter example, ``ln`` is operating on the quantity ``water_vapor_partial_pressure_assuming_saturation``,
while ``derivative_of`` is a combined transformation of ``water_vapor_partial_pressure_assuming_saturation``
and ``air_temperature``. When multiple transformations are present, a more detailed description
should be provided in the ``long_name`` field to prevent any possible ambiguity.
should be provided in the ``description`` field to prevent any possible ambiguity.

#. Variables are current and instantaneous unless specified. Variables that are not
current (e.g., previous timestep) or non-instantaneous (e.g., accumulated values)
Expand Down Expand Up @@ -94,7 +94,7 @@ ESM Standard Name Rules
``[variable]_at_top_interfaces`` is defined on `n` points, and
``[variable]_at_bottom_interfaces`` is defined on `n` points.

#. By default, *mixing_ratio* refers to mass mixing ratios. The long name should
#. By default, *mixing_ratio* refers to mass mixing ratios. The description should
explicitly specify that it refers to the *mass* mixing ratio.
Mass mixing ratios should contain information regarding
with respect to what quantity they are defined, and options are *wrt_dry_air*,
Expand Down Expand Up @@ -146,7 +146,7 @@ ESM Standard Name Rules
#. Spell out acronyms unless they are obvious to a vast majority of
scientists/developers who may come across them. A list of currently-used
aliases is below. Whenever such an alias exist, use the alias in the
standard name and the full term in the long name.
standard name and the full term in the description.

#. For control-oriented variables, if the variable is a Fortran logical,
use flag_for ``_X``. If it is any other data type, use control_for ``_X``. All flags
Expand All @@ -165,23 +165,27 @@ Technical specifications
========================

#. The standard name dictionary consists of a number of individual XML elements:
one "standard_name" element for each entry. A standard name entry consist of a "name" attribute
that represents the variable name, and (optionally) a "long_name" attribute that gives
a detailed description of what that name represents. The standard_name XML entry also contains a nested
"type" entry, indicating the data type that a standard_name should represent, and as attributes the
one ``standard_name`` element for each entry. A standard name entry consist of a ``name`` attribute
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a sentence to this section to explain what the long name is as opposed to the description, where it is being used, please? It's entirely unclear from this paragraph that the description is for the purpose of the ESMStandardNames repo only, whereas the long_name is for the actual metadata tables only.

Copy link
Collaborator Author

@mkavulich mkavulich Jun 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@climbfuji I'm having some trouble coming up with some satisfying wording here. Right now I think the mention of "long_name" adds more confusion than it resolves. Would it make sense to just remove the reference to "long_name" all together, since with this proposed change it would no longer be a part of the Standard Names? That way we can just say the following, which I believe is clear and unambiguous:

A standard name entry consist of a name attribute that represents the variable name, and (optionally) a description attribute that gives a detailed description of what that name represents. Note that the description field is only provided for information and disambiguation only (though it should be unique), and does not need to be included for individual implementations of the standard names.

If you have other suggestions (general or specific) I welcome them.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would describe what the "description" field is about and say that the description field is not to be confused with the long_name field that is used in the actual metadata in the CCPP physics implementation in models, and then refer the reader to the CCPP technical documentation for details?

that represents the variable name, and (optionally) a ``description`` attribute that gives
a detailed description of what that name represents. Note that the ``description`` field is only
provided for information and disambiguation only (though it should be unique), and does not need to be included for
individual implementations of the standard names. This is not necessarily the same as the ``long_name`` entry as described
in the `CCPP Technical Documentation <https://ccpp-techdoc.readthedocs.io/en/latest/CompliantPhysicsParams.html#ccpp-arg-table>`_,
but it can be used to inform the contents of that field. The ``standard_name`` XML entry also contains a nested
``type`` entry, indicating the data type that a ``standard_name`` should represent, and as attributes the
physical units of that variable quantity (see the `section on Units <#units>`_) and the FORTRAN "kind"
of the variable quantity. For example, the element
for the variable name ``exner_function`` may look similar to this:

<standard_name name="exner_function"
long_name="exner function, (p/p0)^(Rd/cp), where p0 is 1000 hPa">
description="exner function, (p/p0)^(Rd/cp), where p0 is 1000 hPa">
<type kind="kind_phys" units="1">real</type>
</standard_name>

This XML element indicates that the variable ``exner_function`` represents the quantity described by the ``long_name``
This XML element indicates that the variable ``exner_function`` represents the quantity described by the ``description``
attribute. It is a real variable of "kind_phys" kind, and units of "1", meaning it is non-dimensional and
does not correspond to a more descriptive non-dimensional type such as "fraction"; see the `section on Units <#units>`_
for more details
for more details.

These standard_name elements can optionally be separated by "section" elements. These are parsed out into human-readable sections in the generated markdown file (``Metadata-standard-names.md``).

Expand Down Expand Up @@ -628,10 +632,16 @@ Acronyms, Abbreviations, and Aliases
+---------------------+---------------------------------------------------------+
| **Short** | **Meaning** |
+=====================+=========================================================+
| cnvc90 | GFS Convective Cloud Diagnostics |
+---------------------+---------------------------------------------------------+
| edmf | eddy-diffusivity/mass-flux |
+---------------------+---------------------------------------------------------+
| gwd | gravity wave drag |
+---------------------+---------------------------------------------------------+
| gfdl | Geophysical Fluid Dynamics Laboratory |
+---------------------+---------------------------------------------------------+
| gfs | Global Forecast System |
+---------------------+---------------------------------------------------------+
| ir | infrared |
+---------------------+---------------------------------------------------------+
| lwe | liquid water equivalent |
Expand All @@ -646,10 +656,19 @@ Acronyms, Abbreviations, and Aliases
+---------------------+---------------------------------------------------------+
| nir | near-infrared part of the EM spectrum (radiation) |
+---------------------+---------------------------------------------------------+
| nrl | Naval Research Lab |
+---------------------+---------------------------------------------------------+
| nsstm | GFS near-surface sea temperature scheme |
+---------------------+---------------------------------------------------------+
| pbl | planetary boundary layer |
+---------------------+---------------------------------------------------------+
| pdf | probability density function |
+---------------------+---------------------------------------------------------+
| rrtmgp | Rapid Radiative Transfer Model for General circulation |
| | model applications - Parallel |
+---------------------+---------------------------------------------------------+
| sas | simplified Arakawa-Schubert scheme |
+---------------------+---------------------------------------------------------+
| skeb | stochastic kinetic energy backscatter |
+---------------------+---------------------------------------------------------+
| shoc | simplified higher-order closure stochastic scheme |
Expand All @@ -664,6 +683,8 @@ Acronyms, Abbreviations, and Aliases
+---------------------+---------------------------------------------------------+
| toa | top of atmosphere |
+---------------------+---------------------------------------------------------+
| ugwp | Unified Gravity Wave Physics |
+---------------------+---------------------------------------------------------+
| uv | ultraviolet part of the EM spectrum (radiation) |
+---------------------+---------------------------------------------------------+
| vis | visible part of the EM spectrum (radiation) |
Expand Down
Loading