Skip to content

Commit 41e9a3f

Browse files
committed
Merge branch 'hotfix-v8.2.2'
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).
2 parents b566fc8 + 36e2823 commit 41e9a3f

File tree

10 files changed

+31
-18
lines changed

10 files changed

+31
-18
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MPAS-v8.2.1
1+
MPAS-v8.2.2
22
====
33

44
The Model for Prediction Across Scales (MPAS) is a collaborative project for

src/core_atmosphere/Registry.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<registry model="mpas" core="atmosphere" core_abbrev="atm" version="8.2.1">
2+
<registry model="mpas" core="atmosphere" core_abbrev="atm" version="8.2.2">
33

44
<!-- **************************************************************************************** -->
55
<!-- ************************************** Dimensions ************************************** -->
@@ -1841,6 +1841,15 @@
18411841
<var name="surface_pressure" type="real" dimensions="nCells Time" units="Pa"
18421842
description="Diagnosed surface pressure"/>
18431843

1844+
<!-- observation-related variables interfacing to Non-Variational SAtellite-based Cloud Analysis (SACA) -->
1845+
<var name="cldmask" type="real" dimensions="nCells Time" units="unitless"
1846+
description="cloud mask (1=cloudy ; 0=clear)"
1847+
packages="jedi_da"/>
1848+
1849+
<var name="brtemp" type="real" dimensions="nCells Time" units="K"
1850+
description="brightness temperature to calculate cloud top height; usually from geostationary IR window channel"
1851+
packages="jedi_da"/>
1852+
18441853
</var_struct>
18451854

18461855
<var_struct name="tend" time_levs="1">

src/core_atmosphere/physics/mpas_atmphys_manager.F

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,6 @@ subroutine physics_run_init(configs,mesh,state,clock,stream_manager)
447447
call mpas_pool_get_dimension(mesh,'nAerLevels' ,nAerLevels )
448448
call mpas_pool_get_dimension(mesh,'nOznLevels' ,nOznLevels )
449449
call mpas_pool_get_dimension(mesh,'nCellsSolve',nCellsSolve)
450-
call mpas_pool_get_dimension(mesh,'nCellsSolve',nCellsSolve)
451450
call mpas_pool_get_dimension(mesh,'nSoilLevels',nSoilLevels)
452451
call mpas_pool_get_dimension(mesh,'nVertLevels',nVertLevels)
453452

src/core_init_atmosphere/Registry.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<registry model="mpas" core="init_atmosphere" core_abbrev="init_atm" version="8.2.1">
2+
<registry model="mpas" core="init_atmosphere" core_abbrev="init_atm" version="8.2.2">
33

44
<!-- **************************************************************************************** -->
55
<!-- ************************************** Dimensions ************************************** -->

src/core_landice/Registry.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<registry model="mpas" core="landice" core_abbrev="li" version="8.2.1">
2+
<registry model="mpas" core="landice" core_abbrev="li" version="8.2.2">
33

44

55
<!-- ======================================================================= -->

src/core_ocean/Registry.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<registry model="mpas" core="ocean" core_abbrev="ocn" version="8.2.1">
2+
<registry model="mpas" core="ocean" core_abbrev="ocn" version="8.2.2">
33

44
<dims>
55
<dim name="nCells" units="unitless"

src/core_seaice/Registry.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<registry model="mpas" core="seaice" core_abbrev="seaice" version="8.2.1">
2+
<registry model="mpas" core="seaice" core_abbrev="seaice" version="8.2.2">
33

44
<dims>
55
<dim name="nCells"

src/core_sw/Registry.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<registry model="mpas" core="sw" core_abbrev="sw" version="8.2.1">
2+
<registry model="mpas" core="sw" core_abbrev="sw" version="8.2.2">
33
<dims>
44
<dim name="nCells"/>
55
<dim name="nEdges"/>

src/core_test/Registry.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<registry model="mpas" core="test" core_abbrev="test" version="8.2.1">
2+
<registry model="mpas" core="test" core_abbrev="test" version="8.2.2">
33
<dims>
44
<dim name="nCells"/>
55
<dim name="nEdges"/>

src/tools/registry/utility.c

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -309,21 +309,26 @@ int parse_macros(void(*callback)(const char *macro, const char *val, va_list ap)
309309

310310
for (i = 0; i < count; i++) {
311311
char *tmp;
312-
char *macrotmp;
313-
char *macro;
314-
char *val;
312+
char *saveptr;
313+
const char *macro;
314+
const char *val;
315+
const char *empty = "";
315316

316317
tmp = strdup(macros[i]);
317-
macrotmp = strtok_r(tmp, "=", &val);
318318

319-
if (macrotmp == NULL || val == NULL) {
319+
macro = strtok_r(tmp, "=", &saveptr);
320+
val = strtok_r(NULL, "=", &saveptr);
321+
322+
if (macro == NULL) {
320323
return 1;
321324
}
322325

323-
if (strstr(macrotmp, "-D") == macrotmp) {
324-
macro = &macrotmp[2];
325-
} else {
326-
macro = macrotmp;
326+
if (val == NULL) {
327+
val = empty;
328+
}
329+
330+
if (strstr(macro, "-D") == macro) {
331+
macro = &macro[2];
327332
}
328333

329334
if (callback != NULL) {

0 commit comments

Comments
 (0)