Skip to content

Remove direct physcons module dependencies from CCPP-Physics - #1235

Open
scrasmussen wants to merge 234 commits into
NCAR:mainfrom
scrasmussen:scm-dev-rm-ccpp-physcons
Open

Remove direct physcons module dependencies from CCPP-Physics#1235
scrasmussen wants to merge 234 commits into
NCAR:mainfrom
scrasmussen:scm-dev-rm-ccpp-physcons

Conversation

@scrasmussen

@scrasmussen scrasmussen commented Aug 15, 2026

Copy link
Copy Markdown
Member

Related PRs:

Description of Changes:

  • Removes direct dependencies on the global physcons module from CCPP physics schemes.
  • Supplies physical constants through explicit CCPP arguments, with standard names, units, and metadata.
  • Makes each scheme’s required constants visible in its interface instead of relying on hidden module state.
  • Improves portability and reuse of physics schemes in different host models and configurations.
  • Simplifies dependency tracking, testing, and maintenance by centralizing ownership of physical constants in the host/CCPP framework.

Tests Conducted:

  • ufs-wm Derecho regression tests
    • Regression Test Answer Changes
      • control_stochy_gnu failed only the bit-for-bit comparison
        • note: this test for intel, debug-intel, and debug-gnu passed
        • Some initial differences are tiny, around 1e-12, but the regression comparison has no numerical tolerance, so they fail
        • By hour 12, stochastic physics has amplified those perturbations into widespread differences
      • control_csawmg_gnu failed only the bit-for-bit comparison
        • note: this test for intel, debug-intel, and debug-gnu passed
        • The evidence points to the physical-constants refactor in UFSATM/ccpp/physics/physics/CONV/Chikira_Sugiyama/cs_conv.F90:303. Previously, derived quantities such as elocp, emeltocp, cpoel, and fact2 were compile-time parameters. They are now recomputed at runtime from CCPP arguments. Optimized GNU evaluates that arithmetic slightly differently
  • SCM RTs

grantfirl and others added 30 commits December 12, 2024 12:07
…emove *_of_new_state (default name refers to 'current' value)
…medmfvdifq return new tendencies and new tendency application block in GFS_PBL_generic_post
- Added tendency variables (`ten_t`, `ten_u`, `ten_v`) for temperature and wind tendencies in SAMF deep and shallow convection schemes.
- Updated relevant `.meta` files to reflect changes in variable intent (`inout` -> `in` where appropriate) and added tendencies.
- Modified Interstitials (`GFS_DCNV_generic_post`, `GFS_DCNV_generic_pre`, `GFS_SCNV_generic_post`, `GFS_SCNV_generic_pre`) to directly use tendencies instead of saved state variables.
- Removed redundant saved variables (`save_u`, `save_v`, `save_t`).
- Added `delt` to post interstitials.
…endency paradigm; cleanup saving of states no longer needed
@scrasmussen scrasmussen changed the title Scm dev rm ccpp physcons Remove references to physcons module from SCM Aug 15, 2026
@scrasmussen scrasmussen changed the title Remove references to physcons module from SCM Remove direct physcons module dependencies from CCPP-Physics Aug 18, 2026
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.