Skip to content

Remove direct physcons module dependencies from MYNN - #32

Open
scrasmussen wants to merge 1 commit into
NCAR:ccpp/devfrom
scrasmussen:mynn-sfc-remove-physcons
Open

Remove direct physcons module dependencies from MYNN#32
scrasmussen wants to merge 1 commit into
NCAR:ccpp/devfrom
scrasmussen:mynn-sfc-remove-physcons

Conversation

@scrasmussen

Copy link
Copy Markdown
Member

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.

Related PRs

- OpenACC correctness fixes

 two present-list corrections are separate
@scrasmussen
scrasmussen force-pushed the mynn-sfc-remove-physcons branch from 6664687 to 642bf38 Compare August 18, 2026 16:50
Comment thread module_sf_mynnsfc.F90
real(kind_phys), parameter :: ep3 = 1.-ep2
real(kind_phys), parameter :: g_inv = 1.0/grav
real(kind_phys), parameter :: rvovrd = Rv/Rd
real(kind_phys) :: cp = 1.0E30_kind_phys

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same question RE: initializing to 1000.0 as in the physics PR

Comment thread module_sf_mynnsfc.F90
!$acc QSFC_lnd, QSFC_wat, QSFC_ice, &
!$acc U10, V10, U1D, V1D, U1D2, V1D2, &
!$acc ZNTstoch_lnd, ZNTstoch_lnd, ZNTstoch_ice, &
!$acc ZNTstoch_lnd, ZNTstoch_wat, ZNTstoch_ice, &

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ha. Nice catches. Were these caught with an AI tool or something?

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