Skip to content

Conversation

@kuanchihwang
Copy link
Collaborator

@kuanchihwang kuanchihwang commented Dec 23, 2025

Tag name (required for release branches):

sima0_10_001 (Tentative)

Originator(s):

kuanchihwang

Descriptions (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number):

MPAS dynamical core uses height, denoted by $\zeta$, as the vertical coordinate system. In CAM-SIMA, the coordinate values are computed in the interface layer of MPAS dynamical core for history and physics initialization.

However, it can be argued that the vertical coordinate system should be considered an implementation detail of MPAS dynamical core, and that it should not concern CAM-SIMA. See Appendix "C.2 Vertical grid" in MPAS user guide for more information.

This PR refactors and relocates vertical coordinate computation to the subdriver layer of MPAS dynamical core. Now, CAM-SIMA just calls the appropriate procedures to get the coordinate values. Unit tests are added to ensure correctness.

This PR also ports a fix from CAM (ESCOMP/CAM#1095) to limit longitude values within the range of $[0, 2 \pi)$ according to MPAS mesh specifications.

Describe any changes made to the build system:

None

Describe any changes made to the namelist:

None

List any changes to the defaults for the input datasets (e.g., boundary datasets):

None

List all files eliminated and why:

None

List all files added and what they do:

None

List all existing files that have been modified, and describe the changes:

M       src/dynamics/mpas/driver/dyn_mpas_procedures.F90
  * Implement standardized procedures for computing vertical coordinates
M       src/dynamics/mpas/driver/dyn_mpas_subdriver.F90
  * Allow selective queries to mesh dimensions
  * Limit longitude values within the range of [0, 2 * pi)
M       src/dynamics/mpas/dyn_grid_impl.F90
  * Refactor reference height computation in terms of standardized procedures
M       src/dynamics/mpas/tests/unit/test_dyn_mpas_procedures.pf
  * Implement unit tests

Regression tests:

SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_gnu.cam-outfrq_kessler_mpas_derecho (Overall: DIFF)
SMS_Ln9.mpasa480_mpasa480.FKESSLER.derecho_intel.cam-outfrq_kessler_mpas_derecho (Overall: DIFF)

Round-off errors due to limiting longitude values within the range of $[0, 2 \pi)$.

SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam_multitape (Overall: NLFAIL)

Known failing test.

@kuanchihwang kuanchihwang marked this pull request as ready for review December 23, 2025 20:45
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kuanchihwang!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants