Skip to content

Commit

Permalink
Merge branch 'hotfix-v8.2.2'
Browse files Browse the repository at this point in the history
This merge addresses several issues in the MPAS-Atmosphere model and in the MPAS
infrastructure. Specific changes in this merge include:

* Fix to a portability issue in the MPAS registry 'parse' tool, which caused
  files in the src/core_<CORE>/inc directory to not be generated correctly at
  build time on some systems (PR #1229).

* Addition of two fields, brtemp and cldmask, that are needed by MPAS-JEDI.
  Although not needed by stand-alone MPAS-Atmosphere, these fields are
  associated with the 'jedi_da' package and therefore have no effect when
  MPAS-Atmosphere is run without setting config_jedi_da = true (PR #1232).

* Removal of a redundant query of the nCellsSolve dimension in the
  physics_run_init routine. The extra query had no impact on results, and its
  removal can be considered clean-up (PR #1236).
  • Loading branch information
mgduda committed Sep 20, 2024
2 parents b566fc8 + 36e2823 commit 41e9a3f
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MPAS-v8.2.1
MPAS-v8.2.2
====

The Model for Prediction Across Scales (MPAS) is a collaborative project for
Expand Down
11 changes: 10 additions & 1 deletion src/core_atmosphere/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="atmosphere" core_abbrev="atm" version="8.2.1">
<registry model="mpas" core="atmosphere" core_abbrev="atm" version="8.2.2">

<!-- **************************************************************************************** -->
<!-- ************************************** Dimensions ************************************** -->
Expand Down Expand Up @@ -1841,6 +1841,15 @@
<var name="surface_pressure" type="real" dimensions="nCells Time" units="Pa"
description="Diagnosed surface pressure"/>

<!-- observation-related variables interfacing to Non-Variational SAtellite-based Cloud Analysis (SACA) -->
<var name="cldmask" type="real" dimensions="nCells Time" units="unitless"
description="cloud mask (1=cloudy ; 0=clear)"
packages="jedi_da"/>

<var name="brtemp" type="real" dimensions="nCells Time" units="K"
description="brightness temperature to calculate cloud top height; usually from geostationary IR window channel"
packages="jedi_da"/>

</var_struct>

<var_struct name="tend" time_levs="1">
Expand Down
1 change: 0 additions & 1 deletion src/core_atmosphere/physics/mpas_atmphys_manager.F
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion src/core_init_atmosphere/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="init_atmosphere" core_abbrev="init_atm" version="8.2.1">
<registry model="mpas" core="init_atmosphere" core_abbrev="init_atm" version="8.2.2">

<!-- **************************************************************************************** -->
<!-- ************************************** Dimensions ************************************** -->
Expand Down
2 changes: 1 addition & 1 deletion src/core_landice/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="landice" core_abbrev="li" version="8.2.1">
<registry model="mpas" core="landice" core_abbrev="li" version="8.2.2">


<!-- ======================================================================= -->
Expand Down
2 changes: 1 addition & 1 deletion src/core_ocean/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="ocean" core_abbrev="ocn" version="8.2.1">
<registry model="mpas" core="ocean" core_abbrev="ocn" version="8.2.2">

<dims>
<dim name="nCells" units="unitless"
Expand Down
2 changes: 1 addition & 1 deletion src/core_seaice/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="seaice" core_abbrev="seaice" version="8.2.1">
<registry model="mpas" core="seaice" core_abbrev="seaice" version="8.2.2">

<dims>
<dim name="nCells"
Expand Down
2 changes: 1 addition & 1 deletion src/core_sw/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="sw" core_abbrev="sw" version="8.2.1">
<registry model="mpas" core="sw" core_abbrev="sw" version="8.2.2">
<dims>
<dim name="nCells"/>
<dim name="nEdges"/>
Expand Down
2 changes: 1 addition & 1 deletion src/core_test/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="test" core_abbrev="test" version="8.2.1">
<registry model="mpas" core="test" core_abbrev="test" version="8.2.2">
<dims>
<dim name="nCells"/>
<dim name="nEdges"/>
Expand Down
23 changes: 14 additions & 9 deletions src/tools/registry/utility.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = &macrotmp[2];
} else {
macro = macrotmp;
if (val == NULL) {
val = empty;
}

if (strstr(macro, "-D") == macro) {
macro = &macro[2];
}

if (callback != NULL) {
Expand Down

0 comments on commit 41e9a3f

Please # to comment.