From 1c115c83efa009c80ccdbc0f1168af0b7219c2bb Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 11 May 2026 14:28:57 -0600 Subject: [PATCH 01/10] Address issue 60 --- Metadata-standard-names.md | 8 ++++---- Metadata-standard-names.yaml | 12 ++++++------ standard_names.xml | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Metadata-standard-names.md b/Metadata-standard-names.md index 1d7cab8..3b9cf67 100644 --- a/Metadata-standard-names.md +++ b/Metadata-standard-names.md @@ -2448,10 +2448,10 @@ Thresholds represent some value at which the behavior of some process changes, i * `real`: units = fraction * `volume_fraction_of_unfrozen_water_in_soil`: Volume fraction of unfrozen water in soil * `real`: units = fraction -* `volumetric_equilibrium_soil_moisture`: Volumetric equilibrium soil moisture - * `real`: units = m3 m-3 -* `volumetric_soil_moisture_between_soil_bottom_and_water_table`: Volumetric soil moisture between soil bottom and water table - * `real`: units = m3 m-3 +* `volume_fraction_of_equilibrium_soil_moisture`: Volume fraction of equilibrium soil moisture + * `real`: units = fraction +* `volume_fraction_of_soil_moisture_between_soil_bottom_and_water_table`: Volume fraction of soil moisture between soil bottom and water table + * `real`: units = fraction * `water_storage_in_aquifer`: Water storage in aquifer * `real`: units = mm * `water_storage_in_aquifer_and_saturated_soil`: Water storage in aquifer and saturated soil diff --git a/Metadata-standard-names.yaml b/Metadata-standard-names.yaml index 72cff48..547f72d 100644 --- a/Metadata-standard-names.yaml +++ b/Metadata-standard-names.yaml @@ -5077,14 +5077,14 @@ section: description: Volume fraction of unfrozen water in soil type: real units: fraction - - name: volumetric_equilibrium_soil_moisture - description: Volumetric equilibrium soil moisture + - name: volume_fraction_of_equilibrium_soil_moisture + description: Volume fraction of equilibrium soil moisture type: real - units: m3 m-3 - - name: volumetric_soil_moisture_between_soil_bottom_and_water_table - description: Volumetric soil moisture between soil bottom and water table + units: fraction + - name: volume_fraction_of_soil_moisture_between_soil_bottom_and_water_table + description: Volume fraction of soil moisture between soil bottom and water table type: real - units: m3 m-3 + units: fraction - name: water_storage_in_aquifer description: Water storage in aquifer type: real diff --git a/standard_names.xml b/standard_names.xml index c3a41db..531e01e 100644 --- a/standard_names.xml +++ b/standard_names.xml @@ -3609,11 +3609,11 @@ real - - real + + real - - real + + real real @@ -3850,4 +3850,4 @@ real - \ No newline at end of file + From 96290e5048cefa8187ebc005f366bf82d028ee41 Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 11 May 2026 18:15:09 -0600 Subject: [PATCH 02/10] Resolve #24: "vertical_layer_dimension" is redundant to just "vertical_dimension. The description contains additional clarifying wording if needed --- Metadata-standard-names.md | 6 +++--- Metadata-standard-names.yaml | 8 ++++---- standard_names.xml | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Metadata-standard-names.md b/Metadata-standard-names.md index 3b9cf67..7e26f09 100644 --- a/Metadata-standard-names.md +++ b/Metadata-standard-names.md @@ -302,11 +302,11 @@ Names indicating the size, extent, or bounds of data structures in a model. * `integer`: units = count * `vertical_interface_dimension_interstitial`: Vertical interface dimension interstitial * `integer`: units = count -* `vertical_layer_dimension`: number of vertical layers +* `vertical_dimension`: number of vertical layers * `integer`: units = count -* `vertical_layer_dimension_extended_up_by_1`: number of vertical layers extended up by 1 +* `vertical_dimension_extended_up_by_1`: number of vertical layers extended up by 1 * `integer`: units = count -* `vertical_layer_dimension_minus_one`: Vertical layer dimension minus one +* `vertical_dimension_minus_one`: Vertical dimension minus one * `integer`: units = count ## Constants Constant parameters that should be identical across a full modeling system diff --git a/Metadata-standard-names.yaml b/Metadata-standard-names.yaml index 547f72d..6e0381d 100644 --- a/Metadata-standard-names.yaml +++ b/Metadata-standard-names.yaml @@ -568,16 +568,16 @@ section: description: Vertical interface dimension interstitial type: integer units: count - - name: vertical_layer_dimension + - name: vertical_dimension description: number of vertical layers type: integer units: count - - name: vertical_layer_dimension_extended_up_by_1 + - name: vertical_dimension_extended_up_by_1 description: number of vertical layers extended up by 1 type: integer units: count - - name: vertical_layer_dimension_minus_one - description: Vertical layer dimension minus one + - name: vertical_dimension_minus_one + description: Vertical dimension minus one type: integer units: count - name: Constants diff --git a/standard_names.xml b/standard_names.xml index 531e01e..b1b25ef 100644 --- a/standard_names.xml +++ b/standard_names.xml @@ -425,13 +425,13 @@ integer - + integer - + integer - + integer From c03c63f272d1b0fee3e8bd8d0d10603fc62e44b5 Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 11 May 2026 18:15:33 -0600 Subject: [PATCH 03/10] Add definition for "interface" to the list --- StandardNamesRules.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/StandardNamesRules.rst b/StandardNamesRules.rst index 9212b6a..7fc6b90 100644 --- a/StandardNamesRules.rst +++ b/StandardNamesRules.rst @@ -544,6 +544,8 @@ Special phrases +------------------------+-------------------------------------------------------------------------------------+ | frozen_water | ice | +------------------------+-------------------------------------------------------------------------------------+ +| interface | The vertical boundary of a model layer. | ++------------------------+-------------------------------------------------------------------------------------+ | longwave | Longwave radiation. Defined as thermal emission of radiation from the planet. | +------------------------+-------------------------------------------------------------------------------------+ | moisture | water in all phases contained in soil | From 3c1ed7543776ec6e2cd232b041e150cb8ae4a31b Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 8 Jun 2026 09:20:36 -0600 Subject: [PATCH 04/10] Update CI actions versions --- .github/workflows/pull_request_ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pull_request_ci.yml b/.github/workflows/pull_request_ci.yml index c951b99..05b2326 100644 --- a/.github/workflows/pull_request_ci.yml +++ b/.github/workflows/pull_request_ci.yml @@ -13,10 +13,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.x" @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install dependencies run: | @@ -50,10 +50,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.x" @@ -74,10 +74,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.x" @@ -95,10 +95,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.x" From c7d2ab38e5d6a11038c2ca44bdb5561d732042ac Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 8 Jun 2026 11:21:32 -0600 Subject: [PATCH 05/10] Fix remaining format statements to f-strings --- tools/lib/xml_tools.py | 12 +++++------- tools/write_standard_name_table.py | 3 +-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/tools/lib/xml_tools.py b/tools/lib/xml_tools.py index 70ec007..cf95fa0 100644 --- a/tools/lib/xml_tools.py +++ b/tools/lib/xml_tools.py @@ -70,20 +70,18 @@ def validate_xml_file(filename, schema_file, logger, error_on_noxmllint=False): if not os.path.isfile(schema_file): raise ValueError(f"validate_xml_file: Cannot find schema file {schema_file}") if not os.access(schema_file, os.R_OK): - emsg = "validate_xml_file: Cannot open schema, '{}'" - raise ValueError(emsg.format(schema_file)) + raise ValueError(f"validate_xml_file: Cannot open schema, '{schema_file}'") if _XMLLINT is not None: if logger is not None: - lmsg = "Checking file {} against schema {}" - logger.debug(lmsg.format(filename, schema_file)) + logger.debug(f"Checking file {filename} against schema {schema_file}") cmd = [_XMLLINT, '--noout', '--schema', schema_file, filename] result = call_command(cmd, logger) return result - lmsg = "xmllint not found, could not validate file {}" + lmsg = f"xmllint not found, could not validate file {filename}" if error_on_noxmllint: - raise ValueError("validate_xml_file: " + lmsg.format(filename)) + raise ValueError("validate_xml_file: " + lmsg) if logger is not None: - logger.warning(lmsg.format(filename)) + logger.warning(lmsg) return True # We could not check but still need to proceed ############################################################################### diff --git a/tools/write_standard_name_table.py b/tools/write_standard_name_table.py index aca4040..72a5f80 100755 --- a/tools/write_standard_name_table.py +++ b/tools/write_standard_name_table.py @@ -148,8 +148,7 @@ def parse_section(snl, sec, level='##'): units = item.get('units') snl.write(f' * `{txt}`: units = {units}\n') else: - emsg = "Unknown standard name property, '{}'" - raise ValueError(emsg.format(item.tag)) + raise ValueError(f"Unknown standard name property, '{item.tag}'") def convert_xml_to_yaml(root, library_name, yaml_file): From 755454cbf5ede2f6426edfb1a14e13e8c0307f00 Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 8 Jun 2026 11:27:53 -0600 Subject: [PATCH 06/10] Raise better exceptions on xml_tools errors --- tools/lib/xml_tools.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tools/lib/xml_tools.py b/tools/lib/xml_tools.py index cf95fa0..7f64332 100644 --- a/tools/lib/xml_tools.py +++ b/tools/lib/xml_tools.py @@ -64,13 +64,9 @@ def validate_xml_file(filename, schema_file, logger, error_on_noxmllint=False): """ # Check the filename if not os.path.isfile(filename): - raise ValueError(f"validate_xml_file: Filename, '{filename}', does not exist") - if not os.access(filename, os.R_OK): - raise ValueError(f"validate_xml_file: Cannot open '{filename}'") + raise FileNotFoundError(f"validate_xml_file: Filename, '{filename}', does not exist") if not os.path.isfile(schema_file): - raise ValueError(f"validate_xml_file: Cannot find schema file {schema_file}") - if not os.access(schema_file, os.R_OK): - raise ValueError(f"validate_xml_file: Cannot open schema, '{schema_file}'") + raise FileNotFoundError(f"validate_xml_file: Cannot find schema file {schema_file}") if _XMLLINT is not None: if logger is not None: logger.debug(f"Checking file {filename} against schema {schema_file}") @@ -79,7 +75,7 @@ def validate_xml_file(filename, schema_file, logger, error_on_noxmllint=False): return result lmsg = f"xmllint not found, could not validate file {filename}" if error_on_noxmllint: - raise ValueError("validate_xml_file: " + lmsg) + raise ImportError("validate_xml_file: " + lmsg) if logger is not None: logger.warning(lmsg) return True # We could not check but still need to proceed From 9ac9a08539496e2e0812d732e5c0ea071c4b95d2 Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 8 Jun 2026 12:49:55 -0600 Subject: [PATCH 07/10] Sort new names --- standard_names.xml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/standard_names.xml b/standard_names.xml index b1b25ef..6af38fd 100644 --- a/standard_names.xml +++ b/standard_names.xml @@ -401,9 +401,18 @@ integer + + integer + + + integer + integer + + integer + integer @@ -425,15 +434,6 @@ integer - - integer - - - integer - - - integer -
@@ -3588,6 +3588,9 @@ volume_fraction_of_condensed_water_in_soil real + + real + real @@ -3600,6 +3603,9 @@ real + + real + real @@ -3609,12 +3615,6 @@ real - - real - - - real - real @@ -3850,4 +3850,4 @@ real
- + \ No newline at end of file From cede48ca08c4fccd4211afd947d61fdd9f8d4320 Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 8 Jun 2026 12:57:08 -0600 Subject: [PATCH 08/10] Update metadata files --- Metadata-standard-names.md | 20 +++++++++--------- Metadata-standard-names.yaml | 40 ++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Metadata-standard-names.md b/Metadata-standard-names.md index 7e26f09..cb44c88 100644 --- a/Metadata-standard-names.md +++ b/Metadata-standard-names.md @@ -286,8 +286,14 @@ Names indicating the size, extent, or bounds of data structures in a model. * `real`: units = 1 * `upper_bound_of_vertical_dimension_of_surface_snow`: upper bound of of snow-related arrays for land surface model * `integer`: units = count +* `vertical_dimension`: number of vertical layers + * `integer`: units = count +* `vertical_dimension_extended_up_by_1`: number of vertical layers extended up by 1 + * `integer`: units = count * `vertical_dimension_for_radiation`: Vertical dimension for radiation * `integer`: units = count +* `vertical_dimension_minus_one`: Vertical dimension minus one + * `integer`: units = count * `vertical_dimension_of_sea_ice`: Vertical dimension of sea ice * `integer`: units = count * `vertical_dimension_of_soil`: Vertical dimension of soil @@ -302,12 +308,6 @@ Names indicating the size, extent, or bounds of data structures in a model. * `integer`: units = count * `vertical_interface_dimension_interstitial`: Vertical interface dimension interstitial * `integer`: units = count -* `vertical_dimension`: number of vertical layers - * `integer`: units = count -* `vertical_dimension_extended_up_by_1`: number of vertical layers extended up by 1 - * `integer`: units = count -* `vertical_dimension_minus_one`: Vertical dimension minus one - * `integer`: units = count ## Constants Constant parameters that should be identical across a full modeling system * `avogadro_number`: Avogadro number @@ -2434,6 +2434,8 @@ Thresholds represent some value at which the behavior of some process changes, i * `volume_fraction_of_condensed_water_in_soil`: Volume fraction of condensed water in soil * Equivalent CF name: `volume_fraction_of_condensed_water_in_soil` * `real`: units = fraction +* `volume_fraction_of_equilibrium_soil_moisture`: Volume fraction of equilibrium soil moisture + * `real`: units = fraction * `volume_fraction_of_frozen_soil_moisture_for_lsm`: Volume fraction of frozen soil moisture for land surface model * `real`: units = fraction * `volume_fraction_of_liquid_water_in_soil_at_critical_point`: volume fraction of water in liquid phase in soil at critical point @@ -2442,16 +2444,14 @@ Thresholds represent some value at which the behavior of some process changes, i * `real`: units = m3 m-3 * `volume_fraction_of_liquid_water_in_soil_at_wilting_point`: volume fraction of water in liquid phase in soil at wilting point * `real`: units = m3 m-3 +* `volume_fraction_of_soil_moisture_between_soil_bottom_and_water_table`: Volume fraction of soil moisture between soil bottom and water table + * `real`: units = fraction * `volume_fraction_of_soil_moisture_for_lsm`: Volume fraction of soil moisture for land surface model * `real`: units = fraction * `volume_fraction_of_unfrozen_soil_moisture_for_lsm`: Volume fraction of unfrozen soil moisture for land surface model * `real`: units = fraction * `volume_fraction_of_unfrozen_water_in_soil`: Volume fraction of unfrozen water in soil * `real`: units = fraction -* `volume_fraction_of_equilibrium_soil_moisture`: Volume fraction of equilibrium soil moisture - * `real`: units = fraction -* `volume_fraction_of_soil_moisture_between_soil_bottom_and_water_table`: Volume fraction of soil moisture between soil bottom and water table - * `real`: units = fraction * `water_storage_in_aquifer`: Water storage in aquifer * `real`: units = mm * `water_storage_in_aquifer_and_saturated_soil`: Water storage in aquifer and saturated soil diff --git a/Metadata-standard-names.yaml b/Metadata-standard-names.yaml index 6e0381d..087d104 100644 --- a/Metadata-standard-names.yaml +++ b/Metadata-standard-names.yaml @@ -536,10 +536,22 @@ section: description: upper bound of of snow-related arrays for land surface model type: integer units: count + - name: vertical_dimension + description: number of vertical layers + type: integer + units: count + - name: vertical_dimension_extended_up_by_1 + description: number of vertical layers extended up by 1 + type: integer + units: count - name: vertical_dimension_for_radiation description: Vertical dimension for radiation type: integer units: count + - name: vertical_dimension_minus_one + description: Vertical dimension minus one + type: integer + units: count - name: vertical_dimension_of_sea_ice description: Vertical dimension of sea ice type: integer @@ -568,18 +580,6 @@ section: description: Vertical interface dimension interstitial type: integer units: count - - name: vertical_dimension - description: number of vertical layers - type: integer - units: count - - name: vertical_dimension_extended_up_by_1 - description: number of vertical layers extended up by 1 - type: integer - units: count - - name: vertical_dimension_minus_one - description: Vertical dimension minus one - type: integer - units: count - name: Constants comment: Constant parameters that should be identical across a full modeling system standard_names: @@ -5049,6 +5049,10 @@ section: description: Volume fraction of condensed water in soil type: real units: fraction + - name: volume_fraction_of_equilibrium_soil_moisture + description: Volume fraction of equilibrium soil moisture + type: real + units: fraction - name: volume_fraction_of_frozen_soil_moisture_for_lsm description: Volume fraction of frozen soil moisture for land surface model type: real @@ -5065,6 +5069,10 @@ section: description: volume fraction of water in liquid phase in soil at wilting point type: real units: m3 m-3 + - name: volume_fraction_of_soil_moisture_between_soil_bottom_and_water_table + description: Volume fraction of soil moisture between soil bottom and water table + type: real + units: fraction - name: volume_fraction_of_soil_moisture_for_lsm description: Volume fraction of soil moisture for land surface model type: real @@ -5077,14 +5085,6 @@ section: description: Volume fraction of unfrozen water in soil type: real units: fraction - - name: volume_fraction_of_equilibrium_soil_moisture - description: Volume fraction of equilibrium soil moisture - type: real - units: fraction - - name: volume_fraction_of_soil_moisture_between_soil_bottom_and_water_table - description: Volume fraction of soil moisture between soil bottom and water table - type: real - units: fraction - name: water_storage_in_aquifer description: Water storage in aquifer type: real From dc6d8d2638ce75c0b2f0118744411fd540f13167 Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 8 Jun 2026 14:02:55 -0600 Subject: [PATCH 09/10] Change mentions of "sea level" to "mean sea level" for clarity, as well as consistency with CF standard Names. --- Metadata-standard-names.md | 4 ++-- Metadata-standard-names.yaml | 6 +++--- standard_names.xml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Metadata-standard-names.md b/Metadata-standard-names.md index cb44c88..cec5fe0 100644 --- a/Metadata-standard-names.md +++ b/Metadata-standard-names.md @@ -398,7 +398,7 @@ Variables defining or relating to timing, dates, calendar, and related concepts * `real`: units = Pa * `air_pressure_at_lowest_model_interface`: Air pressure at lowest model interface * `real`: units = Pa -* `air_pressure_at_sea_level`: Air pressure at sea level +* `air_pressure_at_mean_sea_level`: Air pressure at mean sea level * Equivalent CF name: `air_pressure_at_mean_sea_level` * `real`: units = Pa * `air_pressure_at_surface`: Air pressure at local surface @@ -579,7 +579,7 @@ Variables defining or relating to timing, dates, calendar, and related concepts * `upward_heat_flux_in_air_at_surface`: Upward heat flux in air at surface * Equivalent CF name: `surface_upward_heat_flux_in_air` * `real`: units = W m-2 -* `us_standard_air_pressure_at_sea_level`: US Standard Atmospheric pressure at sea level +* `us_standard_air_pressure_at_mean_sea_level`: US Standard Atmospheric pressure at sea level * `real`: units = Pa * `variance_of_air_temperature`: Variance of air temperature * `real`: units = K2 diff --git a/Metadata-standard-names.yaml b/Metadata-standard-names.yaml index 087d104..c5fc9b2 100644 --- a/Metadata-standard-names.yaml +++ b/Metadata-standard-names.yaml @@ -758,9 +758,9 @@ section: description: Air pressure at lowest model interface type: real units: Pa - - name: air_pressure_at_sea_level + - name: air_pressure_at_mean_sea_level cfname: air_pressure_at_mean_sea_level - description: Air pressure at sea level + description: Air pressure at mean sea level type: real units: Pa - name: air_pressure_at_surface @@ -1121,7 +1121,7 @@ section: description: Upward heat flux in air at surface type: real units: W m-2 - - name: us_standard_air_pressure_at_sea_level + - name: us_standard_air_pressure_at_mean_sea_level description: US Standard Atmospheric pressure at sea level type: real units: Pa diff --git a/standard_names.xml b/standard_names.xml index 6af38fd..1f2565f 100644 --- a/standard_names.xml +++ b/standard_names.xml @@ -564,7 +564,7 @@ real - + air_pressure_at_mean_sea_level real @@ -829,7 +829,7 @@ surface_upward_heat_flux_in_air real - + real From 938bb11c505ef451a34daa45c3852f0cf4118276 Mon Sep 17 00:00:00 2001 From: "Michael Kavulich, Jr" Date: Mon, 8 Jun 2026 14:04:27 -0600 Subject: [PATCH 10/10] Remove mwaxmonsky from CODEOWNERS per personal request --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index e18cb07..00a73ca 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -3,7 +3,7 @@ # These owners will be the default owners for everything in the repo. -* @cacraigucar @climbfuji @dustinswales @grantfirl @mattldawson @mkavulich @mwaxmonsky @nusbaume @peverwhee @MarekWlasak @svahl991 @ss421 +* @cacraigucar @climbfuji @dustinswales @grantfirl @mattldawson @mkavulich @nusbaume @peverwhee @MarekWlasak @svahl991 @ss421 # Order is important. The last matching pattern has the most precedence. # So if a pull request only touches javascript files, only these owners