From 5e496e5d5047fe187db74bbab116dd4e8ae6f975 Mon Sep 17 00:00:00 2001 From: Michael Duda Date: Mon, 9 Sep 2024 15:32:27 -0600 Subject: [PATCH 1/4] Update version number to 8.2.2 --- README.md | 2 +- src/core_atmosphere/Registry.xml | 2 +- src/core_init_atmosphere/Registry.xml | 2 +- src/core_landice/Registry.xml | 2 +- src/core_ocean/Registry.xml | 2 +- src/core_seaice/Registry.xml | 2 +- src/core_sw/Registry.xml | 2 +- src/core_test/Registry.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b62228420a..f7775edf2f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -MPAS-v8.2.1 +MPAS-v8.2.2 ==== The Model for Prediction Across Scales (MPAS) is a collaborative project for diff --git a/src/core_atmosphere/Registry.xml b/src/core_atmosphere/Registry.xml index c8f654e377..47448ab706 100644 --- a/src/core_atmosphere/Registry.xml +++ b/src/core_atmosphere/Registry.xml @@ -1,5 +1,5 @@ - + diff --git a/src/core_init_atmosphere/Registry.xml b/src/core_init_atmosphere/Registry.xml index cb1216ca4c..778b64c058 100644 --- a/src/core_init_atmosphere/Registry.xml +++ b/src/core_init_atmosphere/Registry.xml @@ -1,5 +1,5 @@ - + diff --git a/src/core_landice/Registry.xml b/src/core_landice/Registry.xml index 57e34cc8fd..5f21d0157d 100644 --- a/src/core_landice/Registry.xml +++ b/src/core_landice/Registry.xml @@ -1,5 +1,5 @@ - + diff --git a/src/core_ocean/Registry.xml b/src/core_ocean/Registry.xml index 3c1b5dee95..740b4c11af 100644 --- a/src/core_ocean/Registry.xml +++ b/src/core_ocean/Registry.xml @@ -1,5 +1,5 @@ - + - + - + diff --git a/src/core_test/Registry.xml b/src/core_test/Registry.xml index 9ec004120d..0d41ac303d 100644 --- a/src/core_test/Registry.xml +++ b/src/core_test/Registry.xml @@ -1,5 +1,5 @@ - + From b74756faf48115e7dc4aa1ee2ece6c91d61158d5 Mon Sep 17 00:00:00 2001 From: Michael Duda Date: Thu, 5 Sep 2024 17:44:18 -0600 Subject: [PATCH 2/4] Fix portability issue in parse_macros function used by the MPAS registry The parse_macros function that is used by the MPAS registry 'parse' tool previously made use of the state/saveptr/lasts argument to strtok_r when parsing command-line macro definitions. This was not portable and resulted in incorrectly generated output on some systems. This commit reworks the parse_macros function so that it no longer uses the state/saveptr/lasts argument to strtok_r and instead relies only on the return value of strtok_r to provide portability across systems with different strtok_r implementations. --- src/tools/registry/utility.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/tools/registry/utility.c b/src/tools/registry/utility.c index e722d399f8..c726fdb2d6 100644 --- a/src/tools/registry/utility.c +++ b/src/tools/registry/utility.c @@ -309,21 +309,26 @@ int parse_macros(void(*callback)(const char *macro, const char *val, va_list ap) for (i = 0; i < count; i++) { char *tmp; - char *macrotmp; - char *macro; - char *val; + char *saveptr; + const char *macro; + const char *val; + const char *empty = ""; tmp = strdup(macros[i]); - macrotmp = strtok_r(tmp, "=", &val); - if (macrotmp == NULL || val == NULL) { + macro = strtok_r(tmp, "=", &saveptr); + val = strtok_r(NULL, "=", &saveptr); + + if (macro == NULL) { return 1; } - if (strstr(macrotmp, "-D") == macrotmp) { - macro = ¯otmp[2]; - } else { - macro = macrotmp; + if (val == NULL) { + val = empty; + } + + if (strstr(macro, "-D") == macro) { + macro = ¯o[2]; } if (callback != NULL) { From 9d312dbacd27fada49807cec03f73c2ec66ef3e4 Mon Sep 17 00:00:00 2001 From: "Byoung-Joo (BJ) Jung" <33296274+byoung-joo@users.noreply.github.com> Date: Fri, 3 Mar 2023 13:22:11 -0700 Subject: [PATCH 3/4] Add brtemp and cldmask fields to atmosphere Registry.xml file for MPAS-JEDI These fields are required by MPAS-JEDI and are associated with the `jedi_da` package, which is active only if `config_jedi_da = true`. Without setting `config_jedi_da = true` this commit should have no impact on memory usage for stand-alone MPAS-A applications. --- src/core_atmosphere/Registry.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/core_atmosphere/Registry.xml b/src/core_atmosphere/Registry.xml index 10cfbca3ea..377d404bbe 100644 --- a/src/core_atmosphere/Registry.xml +++ b/src/core_atmosphere/Registry.xml @@ -1839,6 +1839,15 @@ + + + + + From 85473a07e2d615e5f45afb7ea6ae3cec991ece57 Mon Sep 17 00:00:00 2001 From: Michael Duda Date: Fri, 20 Sep 2024 12:05:48 -0600 Subject: [PATCH 4/4] Remove redundant query of nCellsSolve dimension in physics_run_init The physics_run_init routine in the mpas_atmphys_manager module contained a redundant query of the nCellsSolve dimension from the mesh pool. This commit simply removes the extra query. --- src/core_atmosphere/physics/mpas_atmphys_manager.F | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core_atmosphere/physics/mpas_atmphys_manager.F b/src/core_atmosphere/physics/mpas_atmphys_manager.F index ef0f3dc154..1b88522786 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_manager.F +++ b/src/core_atmosphere/physics/mpas_atmphys_manager.F @@ -447,7 +447,6 @@ subroutine physics_run_init(configs,mesh,state,clock,stream_manager) call mpas_pool_get_dimension(mesh,'nAerLevels' ,nAerLevels ) call mpas_pool_get_dimension(mesh,'nOznLevels' ,nOznLevels ) call mpas_pool_get_dimension(mesh,'nCellsSolve',nCellsSolve) - call mpas_pool_get_dimension(mesh,'nCellsSolve',nCellsSolve) call mpas_pool_get_dimension(mesh,'nSoilLevels',nSoilLevels) call mpas_pool_get_dimension(mesh,'nVertLevels',nVertLevels)