Skip to content

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

Open
scrasmussen wants to merge 4 commits into
ufs-community:developfrom
scrasmussen:ufs-dev-rm-ccpp-physcons
Open

Remove direct physcons module dependencies from CCPP-Physics#3323
scrasmussen wants to merge 4 commits into
ufs-community:developfrom
scrasmussen:ufs-dev-rm-ccpp-physcons

Conversation

@scrasmussen

@scrasmussen scrasmussen commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Commit Queue Requirements:

  • This PR addresses a relevant WM issue (if not, create an issue).
  • All subcomponent pull requests (if any) have been reviewed by their code managers.
  • Run the full Intel+GNU RT suite (compared to current baselines), preferably on Ursa (Derecho or Hercules are acceptable alternatives). Exceptions: documentation-only PRs, CI-only PRs, etc.
    • Commit log file w/full results from RT suite run (if applicable).
    • Verify that test_changes.list indicates which tests, if any, are changed by this PR. Commit test_changes.list, even if it is empty.
  • Transparency in the use of generative AI is required by NOAA policy. Was GenAI used in this work?
    • [Generative AI tool Claude/Codex was used to assist with developing this code. The code has been reviewed, edited, and validated by NCAR staff.
  • Fill out all sections of this template.

Description:

  • 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.
  • 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

Commit Message:

* UFSWM - Remove direct dependencies on the global physcons module from CCPP physics schemes
  * UFSATM - Remove direct dependencies on the global physcons module from CCPP physics schemes
    * ccpp-physics - Remove direct dependencies on the global physcons module from CCPP physics schemes
      * c3 - Removesdirect dependencies on the global physcons module from CCPP physics schemes
      * MYNN-SFC - Remove direct dependencies on the global physcons module from CCPP physics schemes

Priority:

  • Critical Bugfix: Reason
  • High: Reason
  • Normal

Git Tracking

UFSWM:

Sub component Pull Requests:

UFSWM Blocking Dependencies:

  • Blocked by #
  • None

Documentation:

  • Documentation update required.
    • Relevant updates are included with this PR.
    • A WM issue has been opened to track the need for a documentation update; a person responsible for submitting the update has been assigned to the issue (link issue).
  • Documentation update NOT required.
    • Explanation: The removal of direct dependencies on the global physcons module falls in line with the already documented principles of the CCPP framework and physics

Changes

Regression Test Changes (Please commit test_changes.list):

  • PR Adds New Tests/Baselines.
  • PR Updates/Changes Baselines.
  • No Baseline Changes.

Input data Changes:

  • None.
  • PR adds input data.
  • PR changes existing input data.

Library Changes/Upgrades:

  • Required
    • Library names w/versions:
    • Git Stack Issue (JCSDA/spack-stack#)
  • No Updates

Testing Log:

  • RDHPCS
    • Orion
    • Hercules
    • GaeaC6
    • Derecho
    • Ursa
  • WCOSS2
    • Dogwood/Cactus
    • Acorn
  • CI
  • opnReqTest (complete task if unnecessary)

Testing Remarks:

@gspetro-NOAA

Copy link
Copy Markdown
Collaborator

@scrasmussen You said that control_stochy_gnu and control_csawmg_gnu failed the bit-for-bit comparison, but there's an empty test_changes.list file. Normally test_changes.list should contain a list of tests whose baselines will change in the PR. Could you push the version of the file output by your Derecho run?

@gspetro-NOAA

Copy link
Copy Markdown
Collaborator

Also, you checked off that the PR "Adds New Tests/Baselines," but I don't see any additional tests. It seems to be updating/changing current baselines for the two tests mentioned. Can you confirm?

@gspetro-NOAA gspetro-NOAA added the Baseline Updates Current baselines will be updated. label Aug 17, 2026
@scrasmussen

Copy link
Copy Markdown
Collaborator Author

@gspetro-NOAA apologies for the slow response, the message got lost in my inbox. I've just pushed a commit with the tests/test_changes.list update. I had run a small test to fix some RTs that were failing from a submodule hadn't been updated properly, so I had lost the original changes to test_changes.list, but I updated that based on my test directories.

I've also pushed a change to remove the whitespace changes based on feedback in the ufs-dev ccpp-physics PR. It's only whitespace changes, do I need to rerun the RTs for this commit?

@gspetro-NOAA

Copy link
Copy Markdown
Collaborator

@gspetro-NOAA apologies for the slow response, the message got lost in my inbox. I've just pushed a commit with the tests/test_changes.list update. I had run a small test to fix some RTs that were failing from a submodule hadn't been updated properly, so I had lost the original changes to test_changes.list, but I updated that based on my test directories.

I've also pushed a change to remove the whitespace changes based on feedback in the ufs-dev ccpp-physics PR. It's only whitespace changes, do I need to rerun the RTs for this commit?

No worries! And no need to rerun. If you think the PR is ready, we can run pretests on Ursa, since pretty much all RTs run on that system, whereas other systems sometimes omit certain tests. I just need confirmation that you do not expect to make any other changes.

@gspetro-NOAA gspetro-NOAA moved this from Evaluating to Waiting for Reviews (subcomponent) in PRs to Process Aug 26, 2026
@scrasmussen

Copy link
Copy Markdown
Collaborator Author

No worries! And no need to rerun. If you think the PR is ready, we can run pretests on Ursa, since pretty much all RTs run on that system, whereas other systems sometimes omit certain tests. I just need confirmation that you do not expect to make any other changes.

It's not quite ready, people are still reviewing and approving the physics PRs so those might change a little bit. I guess I'll let you know when all the sub-component PRs are approved and done being changed. Thanks!

@gspetro-NOAA

Copy link
Copy Markdown
Collaborator

No worries! And no need to rerun. If you think the PR is ready, we can run pretests on Ursa, since pretty much all RTs run on that system, whereas other systems sometimes omit certain tests. I just need confirmation that you do not expect to make any other changes.

It's not quite ready, people are still reviewing and approving the physics PRs so those might change a little bit. I guess I'll let you know when all the sub-component PRs are approved and done being changed. Thanks!

Sounds good! 🙂

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

Labels

Baseline Updates Current baselines will be updated. CCPP There are changes to a CCPP repository. CCPP-sub There are changes to one or more CCPP physics submodules. UFSATM There are changes to the UFSATM repository.

Projects

Status: Waiting for Reviews (subcomponent)

Development

Successfully merging this pull request may close these issues.

Remove physcons Module

2 participants