Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
This merge introduces fixes from MPAS v8.2.2, and it connects the v8.2.2 tag to
future commits on 'develop'.

* master:
  Remove redundant query of nCellsSolve dimension in physics_run_init
  Add brtemp and cldmask fields to atmosphere Registry.xml file for MPAS-JEDI
  Fix portability issue in parse_macros function used by the MPAS registry
  Update version number to 8.2.2
  • Loading branch information
mgduda committed Sep 20, 2024
2 parents 6282d70 + 41e9a3f commit 61d9228
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 61d9228

Please sign in to comment.