From e0c96ab02918445b41f22c5c80ee2e0fa98dec59 Mon Sep 17 00:00:00 2001 From: Jesse Nusbaumer Date: Tue, 5 Dec 2023 12:51:53 -0700 Subject: [PATCH 1/4] Update standard names dictionary with new entries from SIMA idealized physics schemes. --- Metadata-standard-names.md | 54 ++++++++++++++++++++-- standard_names.xml | 95 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 143 insertions(+), 6 deletions(-) diff --git a/Metadata-standard-names.md b/Metadata-standard-names.md index 7bb3dca..66901cd 100644 --- a/Metadata-standard-names.md +++ b/Metadata-standard-names.md @@ -7,7 +7,9 @@ * [diagnostics](#diagnostics) * [atmospheric_composition](#atmospheric_composition) * [atmospheric_composition: GOCART aerosols](#atmospheric_composition: GOCART aerosols) -* [standard_variables](#standard_variables) +* [required standard variables](#required standard variables) +* [optional standard variables](#optional standard variables) +* [system variables](#system variables) * [GFS_typedefs_GFS_control_type](#GFS_typedefs_GFS_control_type) * [GFS_typedefs_GFS_interstitial_type](#GFS_typedefs_GFS_interstitial_type) * [GFS_typedefs_GFS_tbd_type](#GFS_typedefs_GFS_tbd_type) @@ -130,6 +132,8 @@ Note that appending '_on_previous_timestep' to standard_names in this section yi * `logical(kind=)`: units = flag * `lagrangian_tendency_of_air_pressure`: Vertical pressure velocity * `real(kind=kind_phys)`: units = Pa s-1 +* `density_of_dry_air`: Density of dry air + * `real(kind=kind_phys)`: units = kg m-3 * `air_pressure`: Midpoint air pressure * `real(kind=kind_phys)`: units = Pa * `air_pressure_of_dry_air`: Dry midpoint pressure @@ -152,6 +156,8 @@ Note that appending '_on_previous_timestep' to standard_names in this section yi * `real(kind=kind_phys)`: units = m * `geopotential_height_wrt_surface`: geopotential height w.r.t. local surface * `real(kind=kind_phys)`: units = m +* `geopotential_height_wrt_surface_at_interface`: geopotential height w.r.t. local surface at interface + * `real(kind=kind_phys)`: units = m * `potentially_advected_quantities`: Potentially advected quantities * `real(kind=kind_phys)`: units = various * `air_pressure_at_interface`: Air pressure at interface @@ -168,6 +174,8 @@ Note that appending '_on_previous_timestep' to standard_names in this section yi * `logical(kind=kind_phys)`: units = flag * `is_initialized_physics_grid`: Flag to indicate if physics grid is initialized * `logical(kind=kind_phys)`: units = flag +* `print_qneg_warn`: Logging setting for negative constituent mass fixer + * `character(kind=len=*)`: units = 1 * `geopotential_height_at_interface`: Geopotential height at interface * `real(kind=kind_phys)`: units = m * `vertically_integrated_total_energy_of_initial_state`: Vertically integrated total energy of initial state @@ -178,9 +186,11 @@ Note that appending '_on_previous_timestep' to standard_names in this section yi * `real(kind=kind_phys)`: units = kg m-2 * `vertically_integrated_total_water_of_current_state`: Vertically integrated total water of current state * `real(kind=kind_phys)`: units = kg m-2 +* `heating_rate`: heating rate + * `real(kind=kind_phys)`: units = J kg-1 s-1 * `tendency_of_air_temperature`: Change in temperature from a parameterization * `real(kind=kind_phys)`: units = K s-1 -* `tendency_of_air_temperature_due_to_model_physics`: Total change in temperature from a physics suite +* `tendency_of_air_temperature_due_to_model_physics`: Total change in temperature from a physics suite * `real(kind=kind_phys)`: units = K s-1 * `tendency_of_air_potential_temperature`: Change in potential temperature from a parameterization * `real(kind=kind_phys)`: units = K s-1 @@ -194,6 +204,14 @@ Note that appending '_on_previous_timestep' to standard_names in this section yi * `real(kind=kind_phys)`: units = m s-2 * `tendency_of_y_wind_due_to_model_physics`: Tendency of y wind due to model physics * `real(kind=kind_phys)`: units = m s-2 +* `tendency_of_eastward_wind`: Change in eastward wind from a parameterization + * `real(kind=kind_phys)`: units = m s-2 +* `tendency_of_eastward_wind_due_to_model_physics`: Total change in eastward wind from a physics suite + * `real(kind=kind_phys)`: units = m s-2 +* `tendency_of_northward_wind`: Change in northward wind from a parameterization + * `real(kind=kind_phys)`: units = m s-2 +* `tendency_of_northward_wind_due_to_model_physics`: Total change in northward wind from a physics suite + * `real(kind=kind_phys)`: units = m s-2 * `surface_upward_heat_flux_in_air`: Surface upward heat flux in air * `real(kind=kind_phys)`: units = W m-2 * `cumulative_boundary_flux_of_total_energy`: Cumulative boundary flux of total energy @@ -208,6 +226,8 @@ Note that appending '_on_previous_timestep' to standard_names in this section yi * `real(kind=kind_phys)`: units = Pa * `reference_air_pressure_normalized_by_surface_air_pressure`: reference pressure normalized by surface pressure * `real(kind=kind_phys)`: units = 1 +* `reference_pressure_in_atmosphere_layer_normalized_by_reference_pressure`: reference pressure in atmosphere layer normalized by reference pressure + * `real(kind=kind_phys)`: units = 1 * `dimensionless_exner_function`: exner function * `real(kind=kind_phys)`: units = 1 * `air_potential_temperature`: air potential temperature @@ -218,6 +238,10 @@ Note that appending '_on_previous_timestep' to standard_names in this section yi * `real(kind=kind_phys)`: units = K * `composition_dependent_gas_constant_of_dry_air`: Composition dependent gas constant of dry air * `real(kind=kind_phys)`: units = J kg-1 K-1 +* `composition_dependent_specific_heat_of_dry_air_at_constant_pressure`: composition dependent specific heat of dry air at constant pressure + * `real(kind=kind_phys)`: units = J kg-1 K-1 +* `composition_dependent_ratio_of_dry_air_gas_constant_to_specific_heat_of_dry_air_at_constant_pressure`: composition dependent ratio of dry air gas constant to specific heat of dry air at constant pressure + * `real(kind=kind_phys)`: units = 1 * `ratio_of_water_vapor_gas_constant_to_composition_dependent_dry_air_gas_constant_minus_one`: (Rwv / Rdair) - 1.0 * `real(kind=kind_phys)`: units = 1 * `mass_content_of_cloud_ice_in_atmosphere_layer`: Mass content of cloud ice in atmosphere layer @@ -246,14 +270,20 @@ Note that appending '_on_previous_timestep' to standard_names in this section yi * `real(kind=kind_phys)`: units = mol mol-1 * `water_vapor_mixing_ratio_wrt_dry_air`: Ratio of the mass of water vapor to the mass of dry air * `real(kind=kind_phys)`: units = kg kg-1 +* `cloud_liquid_water_mixing_ratio_wrt_moist_air_and_condensed_water`: Ratio of the mass of liquid water to the mass of moist air and condensed water + * `real(kind=kind_phys)`: units = kg kg-1 * `cloud_liquid_water_mixing_ratio_wrt_moist_air`: Ratio of the mass of liquid water to the mass of moist air * `real(kind=kind_phys)`: units = kg kg-1 * `cloud_liquid_water_mixing_ratio_wrt_dry_air`: Ratio of the mass of liquid water to the mass of dry air * `real(kind=kind_phys)`: units = kg kg-1 * `cloud_ice_mixing_ratio_wrt_dry_air`: Ratio of the mass of ice to the mass of dry air * `real(kind=kind_phys)`: units = kg kg-1 +* `rain_mixing_ratio_wrt_moist_air_and_condensed_water`: ratio of the mass of rain to the mass of moist air and condensed water + * `real(kind=kind_phys)`: units = kg kg-1 * `rain_mixing_ratio_wrt_moist_air`: ratio of the mass of rain to the mass of moist air * `real(kind=kind_phys)`: units = kg kg-1 +* `rain_mixing_ratio_wrt_dry_air`: ratio of the mass of rain to the mass of dry air + * `real(kind=kind_phys)`: units = kg kg-1 * `mole_fraction_of_ozone_in_air`: Mole fraction of ozone in air * `real(kind=kind_phys)`: units = mol mol-1 * `mole_fraction_of_carbon_dioxide_in_air`: Mole fraction of carbon dioxide in air @@ -333,12 +363,30 @@ Note that appending '_on_previous_timestep' to standard_names in this section yi * `real(kind=kind_phys)`: units = m-1 * `volume_extinction_in_air_due_to_aerosol_particles_lambda3`: Aerosol extinction at wavelength3 * `real(kind=kind_phys)`: units = m-1 -## standard_variables +## required standard variables Standard / required CCPP variables * `ccpp_error_message`: Error message for error handling in CCPP * `character(kind=len=512)`: units = none * `ccpp_error_code`: Error code for error handling in CCPP * `integer(kind=)`: units = 1 +## optional standard variables +Optional CCPP variables +* `scheme_name`: CCPP physics scheme name + * `character(kind=len=64)`: units = none +* `ccpp_constituent_properties`: CCPP Constituent Properties + * `ccpp_constituent_prop_ptr_t(kind=)`: units = none +* `ccpp_constituents`: Array of constituents managed by CCPP Framework + * `real(kind=kind_phys)`: units = none +* `ccpp_constituent_minimum_values`: CCPP constituent minimum values + * `real(kind=kind_phys)`: units = none +* `number_of_ccpp_constituents`: Number of constituents managed by CCPP Framework + * `integer(kind=)`: units = count +## system variables +Variables related to the compute environment +* `flag_for_mpi_root`: Flag for MPI root + * `logical(kind=)`: units = flag +* `log_output_unit`: Log output unit + * `integer(kind=)`: units = 1 ## GFS_typedefs_GFS_control_type * `sigma_pressure_hybrid_coordinate_a_coefficient`: Sigma pressure hybrid coordinate a coefficient * `real(kind=kind_phys)`: units = Pa diff --git a/standard_names.xml b/standard_names.xml index 39907f8..a0d7b35 100644 --- a/standard_names.xml +++ b/standard_names.xml @@ -193,6 +193,10 @@ long_name="Vertical pressure velocity"> real + + real + real @@ -231,6 +235,10 @@ long_name="geopotential height w.r.t. local surface"> real + + real + real @@ -256,6 +264,10 @@ long_name="Flag to indicate if physics grid is initialized"> logical + + character + real @@ -271,13 +283,16 @@ real + + real + real + long_name="Total change in temperature from a physics suite"> real real + + real + + + real + + + real + + + real + real @@ -326,6 +357,10 @@ long_name="reference pressure normalized by surface pressure"> real + + real + real @@ -345,6 +380,14 @@ real + + real + + + real + @@ -395,6 +438,10 @@ long_name="Ratio of the mass of water vapor to the mass of dry air"> real + + real + real @@ -407,10 +454,18 @@ long_name="Ratio of the mass of ice to the mass of dry air"> real + + real + real + + real + real @@ -568,7 +623,7 @@ real -
@@ -579,6 +634,40 @@ integer
+
+ + character + + + ccpp_constituent_prop_ptr_t + + + real + + + real + + + integer + +
+
+ + logical + + + integer + +
real From 4e0c3a728008dfcdc298aa672f6f3343694b027b Mon Sep 17 00:00:00 2001 From: Jesse Nusbaumer Date: Thu, 18 Jan 2024 08:03:53 -0700 Subject: [PATCH 2/4] Apply standard name review suggestions. --- StandardNamesRules.rst | 4 ++++ standard_names.xml | 14 +++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/StandardNamesRules.rst b/StandardNamesRules.rst index 1ab2748..21e3181 100644 --- a/StandardNamesRules.rst +++ b/StandardNamesRules.rst @@ -107,6 +107,10 @@ CCPP Standard Name Rules use flag_for ``_X``. If it is any other data type, use control_for ``_X``. All flags should be Fortran logicals. +#. Standard names that start with ``ccpp_`` represent CCPP framework-provided variables. + All other standard names should avoid the use of ``ccpp`` in their name in order + to avoid any confusion. + #. No punctuation should appear in standard names except for underscores (_). #. Standard names are case insensitive, i.e. example = EXAMPLE. diff --git a/standard_names.xml b/standard_names.xml index a0d7b35..c732bab 100644 --- a/standard_names.xml +++ b/standard_names.xml @@ -193,7 +193,7 @@ long_name="Vertical pressure velocity"> real - real @@ -264,7 +264,7 @@ long_name="Flag to indicate if physics grid is initialized"> logical - character @@ -292,7 +292,7 @@ real + long_name="Total change in air temperature from a physics suite"> real real
-
+
character @@ -634,8 +634,8 @@ integer
-
+
character From 85385d0b0c688acc3c7eef677844761e51d13f45 Mon Sep 17 00:00:00 2001 From: Jesse Nusbaumer Date: Thu, 18 Jan 2024 08:17:49 -0700 Subject: [PATCH 3/4] Enforce specific printing order in metadata name-checking script. --- tools/meta_stdname_check.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/meta_stdname_check.py b/tools/meta_stdname_check.py index afcb066..d343027 100755 --- a/tools/meta_stdname_check.py +++ b/tools/meta_stdname_check.py @@ -34,6 +34,7 @@ import os import os.path import datetime +from collections import OrderedDict ################################################ #Add CCPP framework (lib) modules to python path @@ -198,8 +199,8 @@ def missing_metafile_names(metafile, stdname_set): #Create set of all standard names not in dictionary set: missing_stdname_set = meta_stdname_set.difference(stdname_set) - #Return list of missing standard names: - return list(missing_stdname_set) + #Return sorted list of missing standard names: + return sorted(missing_stdname_set) #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #Function to find the paths to all metadata files within @@ -297,7 +298,7 @@ def print_missing_names(missing_names_dict): std_names = get_dict_stdnames(stdname_dict_root) #Create new meta file/missing names dictionary: -meta_miss_names_dict = {} +meta_miss_names_dict = OrderedDict() #Check if user passed in single metadata file: if os.path.isfile(metafile_loc): From 65909286be20c45bfb374d0e6d0939f448d2ae06 Mon Sep 17 00:00:00 2001 From: Jesse Nusbaumer Date: Thu, 25 Jan 2024 08:43:35 -0700 Subject: [PATCH 4/4] Update standard names based off code review discussion. --- Metadata-standard-names.md | 6 +++--- standard_names.xml | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Metadata-standard-names.md b/Metadata-standard-names.md index a21492f..e77ba1e 100644 --- a/Metadata-standard-names.md +++ b/Metadata-standard-names.md @@ -190,7 +190,7 @@ Note that appending '_on_previous_timestep' to standard_names in this section yi * `real(kind=kind_phys)`: units = kg m-2 * `vertically_integrated_total_water_of_current_state`: Vertically integrated total water of current state * `real(kind=kind_phys)`: units = kg m-2 -* `heating_rate`: heating rate +* `tendency_of_dry_air_enthalpy_at_constant_pressure`: Tendency of dry air enthalpy at constant pressure * `real(kind=kind_phys)`: units = J kg-1 s-1 * `tendency_of_air_temperature`: Change in temperature from a parameterization * `real(kind=kind_phys)`: units = K s-1 @@ -224,13 +224,13 @@ Note that appending '_on_previous_timestep' to standard_names in this section yi * `real(kind=kind_phys)`: units = W m-2 * `us_standard_air_pressure_at_sea_level`: US Standard Atmospheric pressure at sea level * `real(kind=kind_phys)`: units = Pa -* `reference_pressure`: reference pressure used in definition of potential temperature, Exner function, etc. +* `surface_reference_pressure`: Reference pressure used in definition of potential temperature, Exner function, etc. * `real(kind=kind_phys)`: units = Pa * `reference_pressure_in_atmosphere_layer`: reference pressure in atmosphere layer * `real(kind=kind_phys)`: units = Pa * `reference_air_pressure_normalized_by_surface_air_pressure`: reference pressure normalized by surface pressure * `real(kind=kind_phys)`: units = 1 -* `reference_pressure_in_atmosphere_layer_normalized_by_reference_pressure`: reference pressure in atmosphere layer normalized by reference pressure +* `reference_pressure_in_atmosphere_layer_normalized_by_surface_reference_pressure`: Reference pressure in atmosphere layer normalized by surface reference pressure * `real(kind=kind_phys)`: units = 1 * `dimensionless_exner_function`: exner function * `real(kind=kind_phys)`: units = 1 diff --git a/standard_names.xml b/standard_names.xml index a4b37a2..242c52e 100644 --- a/standard_names.xml +++ b/standard_names.xml @@ -290,8 +290,8 @@ real - + real real - + real real - + real