You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge branch 'staging/dycore-prefix-namelist' into develop (PR #1285)
When MPAS-A is used as a dynamical core in a host model (e.g., CAM/CAM-SIMA),
it needs to share the namelist file with other model components. As a result,
MPAS-A namelist groups and options may not be easily recognizable at first
sight. The solution, which is implemented by this merge, is to add a unique
identifier to all MPAS-A namelist group and option names.
The following transformations are performed for each MPAS-A namelist group and
option name:
- Leading 'config_' is removed recursively from the name. Case-insensitive.
- Leading 'mpas_' is removed recursively from the name. Case-insensitive.
- Prepend 'mpas_' to the name.
By doing so, it is now easier to distinguish MPAS-A namelist groups and options
from host model ones. The possibility of name collisions with host model ones is
also resolved once and for all. Note that only namelist I/O is affected.
Internally, MPAS-A still refers to its namelist options by their original names.
Compared to the implementation in CAM, this merge applies the "name mangling"
logic in an algorithmic and predictable way. It works automatically even if
there are additions, modifications, or deletions to MPAS-A namelist groups and
options.
The "name mangling" logic is entirely guarded behind the MPAS_CAM_DYCORE macro.
For stand-alone MPAS-A, its namelist groups and options keep their original
names as in the registry. For CAM, it is not affected by this merge because it
does not use the code generation functionality of MPAS-A for namelist reading at
all. For CAM-SIMA, the Fortran include files generated by the parse utility stay
the same. Its regression tests all pass, indicating identical model results to
the previous baseline.
* staging/dycore-prefix-namelist:
Prefix all namelist group and option names for MPAS dycore in CAM/CAM-SIMA
0 commit comments