Skip to content

Conversation

@kuanchihwang
Copy link
Collaborator

Tag name (required for release branches):

None

Originator(s):

kuanchihwang

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

This PR enables CAM-SIMA to run with the "convection-permitting" physics suite from MMM. You can use the MMMCONVPERM component set alias to create a simulation case (e.g., ./create_newcase --compset MMMCONVPERM ...). Be advised that the physics suite is still a work in progress. It is currently run with analytic initial condition, and without a proper land model for surface fluxes.

This PR also fixes a bug where failing to read a constituent-dimensioned variable (e.g., surface_upward_ccpp_constituent_fluxes_from_coupler) will result in a crash.

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       cime_config/config_component.xml
M       cime_config/config_compsets.xml
M       src/dynamics/tests/namelist_definition_analy_ic.xml
  * Add "MMMCONVPERM" as a valid compset alias for the new "convection-permitting" physics suite
M       src/data/physconst.F90
M       src/data/physconst.meta
  * Add latent heat of sublimation to physics constants
  * Fix standard name of `cpvir` in physics constants
M       src/data/registry.xml
  * Add variables needed by YSU orographic gravity wave drag scheme to the registry
  * Add variables needed by MYNN surface layer scheme to the registry
M       src/physics/utils/physics_data.F90
  * Fix model crash due to out-of-bound array access in physics data

Regression tests:

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

Except for the known failing test above, all the other tests pass with respect to the last baseline, sima0_09_000.

When `base_idx` cannot be found by the `do` loop labeled `base_idx_loop`
above, its value is set to `size(base_var_names) + 1`. Then, a few lines
after, it is used again to access `base_var_names(base_idx)`, which
constitutes an out-of-bound array access. CAM-SIMA will crash due to this.

The solution is to `return` the subroutine early, and do not proceed any
further.
@kuanchihwang kuanchihwang marked this pull request as ready for review December 10, 2025 00:22
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.

1 participant