Update MCSP Momentum - #8628
Open
whannah1 wants to merge 15 commits into
Open
Conversation
…unction interface
Contributor
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Mesoscale Coherent System Parameterization (MCSP) in both
EAM (Fortran) and EAMxx (C++) Zhang–McFarlane implementations by replacing
separate U/V momentum coefficients with a single momentum coefficient and
adding an option to use the full (u,v) shear vector.
Changes:
- Replace
*_u_coeff/*_v_coeffwith*_mom_coeffand add
*_use_full_shearacross EAM/EAMxx runtime options, namelists, and docs. - Refactor MCSP shear computation to return shear components (u and v), and use
either full magnitude or legacy zonal-only shear for gating/diagnostics. - Update EAMxx Fortran-bridge initialization signature to pass MCSP tunables.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| components/eamxx/src/physics/zm/zm_functions.hpp | Introduces mcsp_mom_coeff and mcsp_use_full_shear; updates shear API to return (u,v) components. |
| components/eamxx/src/physics/zm/tests/zm_conv_mcsp_tend_tests.cpp | Loosens BFB comparisons for momentum/DSE fields due to differing cos implementations. |
| components/eamxx/src/physics/zm/impl/zm_opts_impl.hpp | Adjusts standalone-test defaults to exercise momentum/shear paths. |
| components/eamxx/src/physics/zm/impl/zm_conv_mcsp_tend_impl.hpp | Refactors momentum tendency computation to scale with shear vector; updates KE fixer logic. |
| components/eamxx/src/physics/zm/impl/zm_conv_mcsp_calculate_shear_impl.hpp | Computes storm-relative shear vector components and returns both. |
| components/eamxx/src/physics/zm/fortran_bridge/zm_eamxx_bridge.hpp | Extends bridge init API to pass MCSP coefficients and shear toggle. |
| components/eamxx/src/physics/zm/fortran_bridge/zm_eamxx_bridge.cpp | Wires new bridge init parameters through the C++ wrapper. |
| components/eamxx/src/physics/zm/fortran_bridge/zm_eamxx_bridge_main.F90 | Accepts and assigns new MCSP parameters into zm_param. |
| components/eamxx/src/physics/zm/eamxx_zm_process_interface.cpp | Passes MCSP tunables into the Fortran bridge during initialization. |
| components/eamxx/cime_config/namelist_defaults_eamxx.xml | Adds new MCSP namelist defaults for mcsp_mom_coeff and mcsp_use_full_shear. |
| components/eam/src/physics/cam/zm/zm_conv.F90 | Minor cleanup: remove unused args/iterators and simplify gather-index interface. |
| components/eam/src/physics/cam/zm/zm_conv_types.F90 | Updates zm_param_t to new MCSP parameters; updates broadcast/print/test setup. |
| components/eam/src/physics/cam/zm/zm_conv_mcsp.F90 | Refactors MCSP shear API to return components; updates momentum tendencies and gating. |
| components/eam/src/physics/cam/zm/zm_conv_intr.F90 | Updates namelist parsing and ptend flags for new MCSP momentum/shear options. |
| components/eam/docs/user-guide/namelist_parameters.md | Documents new MCSP namelist variables and defaults. |
| components/eam/bld/namelist_files/namelist_definition.xml | Replaces old MCSP uwind/vwind namelist definitions with new options. |
| components/eam/bld/namelist_files/namelist_defaults_eam.xml | Updates build-time default namelist entries for new MCSP options. |
| components/eam/bld/build-namelist | Updates build-namelist to propagate new MCSP defaults into generated namelists. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
FYI - analysis of the effects of turning on these updates can be found here: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the Mesoscale Coherent System Parameterization (MCSP) in the both EAM and EAMxx versions of ZM to generalize the treatment of of shear and momentum tendencies. It replaces separate U & V coefficients with a single coefficient and adds a new option to use the full (u,v) shear vector rather than just the zonal component. By default the momentum coefficients are zero and the new shear calculation is disabled, so this is essentially a stealth upgrade.
MCSP parameterization improvements:
zmconv_MCSP_uwind_coeffandzmconv_MCSP_vwind_coeffwith a singlezmconv_MCSP_mom_coeffparameter, and added a logicalzmconv_MCSP_use_full_shearto control whether the full (u,v) shear vector is used instead of just the zonal component. This simplifies configuration and enables more flexible momentum forcing.Fortran physics code refactoring:
mcsp_mom_coeffandmcsp_use_full_shearparameters, removing references to separate u and v coefficients throughoutzm_conv_intr.F90andzm_conv_mcsp.F90.Minor code cleanups:
zm_conv.F90.These changes modernize the MCSP configuration, improve clarity for users, and enable more flexible future development.
[BFB]