Skip to content

Conversation

jimmielin
Copy link
Member

@jimmielin jimmielin commented Aug 15, 2025

Companion PRs: ESCOMP/CAM#1361 and ESCOMP/CAM-SIMA#410

Originator(s): @jimmielin

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

  • Partial cleanup and refactoring of HB PBL scheme for CCPPization.
  • Completes Convert compute_hb_diff; pblintd to CCPP #239. Moves HB (hb_diff.F90) both compute_hb_diff and compute_hb_free_atm_diff to atmospheric_physics holtslag_boville.F90.
  • Interstitials necessary for inputs into HB in holtslag_boville_interstitials.F90.
  • (is there an issue for diffusion solver?) Moves vertical diffusion solver (compute_vdiff) without molecular diffusion (i.e., not WACCM-X) into CCPPized schemes in diffusion_solver.F90.
  • Creates stub (zeroed outputs) interstitial schemes for Turbulent Mountain Stress (TMS) and Beljaars orographic surface drag and other code for WACCM (e.g., UBC; use of composition-dependent rair) in diffusion_stubs.F90 -- schemes in this file will eventually be moved to their corresponding schemes, e.g., tms, beljaars, ubc, ... when they are fully CCPPized.

List all namelist files that were added or changed:

A       schemes/holtslag_boville/holtslag_boville_diff_options_namelist.xml
A       schemes/vertical_diffusion/vertical_diffusion_options_namelist.xml
  - separate "namelist" scheme for HB.
  - separate "namelist" scheme for diffusion solver.

List all files eliminated and why: N/A

List all files added and what they do:

A       to_be_ccppized/coords_1d.meta
  - metadata file for coords1d DDT.

A       to_be_ccppized/vdiff_lu_solver.F90
  - LU solver for diffusion_solver.F90, moved from CAM

A       schemes/holtslag_boville/holtslag_boville_diff.F90
A       schemes/holtslag_boville/holtslag_boville_diff.meta
A       schemes/holtslag_boville/holtslag_boville_diff_options.F90
A       schemes/holtslag_boville/holtslag_boville_diff_options.meta
  - CCPPized Holtslag-Boville boundary layer scheme (originally hb_diff.F90)

A       schemes/holtslag_boville/holtslag_boville_diff_interstitials.F90
A       schemes/holtslag_boville/holtslag_boville_diff_interstitials.meta
  - CCPPized interstitial schemes supporting inputs into HB.

A       schemes/vertical_diffusion/diffusion_solver.F90
A       schemes/vertical_diffusion/diffusion_solver.meta
A       schemes/vertical_diffusion/vertical_diffusion_options.F90
A       schemes/vertical_diffusion/vertical_diffusion_options.meta
  - CCPPized vertical diffusion solver without support for molecular diffusion
    (originally diffusion_solver.F90 in CAM)

A       schemes/vertical_diffusion/diffusion_stubs.F90
A       schemes/vertical_diffusion/diffusion_stubs.meta
  - CCPPized stub for UBC (upper boundary conditions)
  - CCPPized stub for TMS (Turbulent Mountain Stress) surface orographic drag.
  - CCPPized stub for Beljaars surface orographic drag.
  - CCPPized stub for WACCM to use composition-dependent rair in vertical diffusion.


A       schemes/vertical_diffusion/vertical_diffusion_sponge_layer.F90
A       schemes/vertical_diffusion/vertical_diffusion_sponge_layer.meta
  - CCPPized interstitial for sponge layer kvm
    (originally in vertical_diffusion_tend)

A       test/test_suites/suite_vdiff_holtslag_boville.xml
  - draft SDF for vertical diffusion using HB PBL scheme.

List all existing files that have been modified, and describe the changes:
(Helpful git command: git diff --name-status development...<your_branch_name>)

M       to_be_ccppized/coords_1d.F90
  - make coords1d lowercase to workaround upstream framework limitation

List all automated tests that failed, as well as an explanation for why they weren't fixed:

  • CAM-SIMA will not build without removing to_be_ccppized/nlte_fomichev.F90 due to dependency on CAM-only module chem_surfvals

Is this an answer-changing PR? If so, is it a new physics package, algorithm change, tuning change, etc?
B4B with CAM - new physics package

If yes to the above question, describe how this code was validated with the new/modified features:

  • new baselines in hb_vdiff derecho gnu test (new test)
  • updated baselines in rk_stratiform test due to change in snapshots necessary due to CAM pbuf field change.
    and updated baselines in CAM4 tests due to adding HB PBL and vertical diffusion solver.

jimmielin added 30 commits May 12, 2025 17:12
@jimmielin jimmielin requested a review from nusbaume September 2, 2025 19:12
@jimmielin
Copy link
Member Author

jimmielin commented Sep 2, 2025

Thanks @nusbaume for the detailed review!

I've updated most of the standard names to match the ones just recently assigned by Peter and Adam in the CCPP standard names spreadsheet, then "merged in" some of your suggested changes to further quantify these names. I think a good chunk of _tbd were removed, and perhaps we can discuss next week about our policy of keeping the tbd or not in certain cases. (I think at least for stubs of quantities that will interact with not-yet-CCPPized schemes we should definitely keep a tbd in there.)

I've kicked off another round of regression tests to make sure the changes are still bit-for-bit with CAM. I tested in SIMA and they still match b4b with the snapshots.

Some of the questions might need the input of scientists. Since there'll likely be another round of cleanup after this PR (to finalize standard names and to incorporate Michael's refactoring changes) I would vote to try to get this merged into ESCOMP/CAM first if the queue is ready then we can address the remaining issues (which are mostly metadata) as we get closer to the code freeze.

Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

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

Thanks for responding to all of my concerns @jimmielin! I just had a few remaining questions and requests.

dimensions = (horizontal_loop_extent, vertical_interface_dimension)
intent = in
[ ti ]
standard_name = air_temperature_at_interface_for_vertical_diffusion_tbd
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like there are still some _tbd suffixes in the file. Just double-checking that those are there on purpose?

! will be added to this later as they are computed.
!> \section arg_table_vertical_diffusion_diffuse_horizontal_momentum_timestep_init Argument Table
!! \htmlinclude arg_table_vertical_diffusion_diffuse_horizontal_momentum_timestep_init.html
subroutine vertical_diffusion_diffuse_horizontal_momentum_timestep_init( &
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for the explanation! I think it is slightly unconventional in the sense that one scheme is being used to calculate a quantity at runtime while another, different scheme is being used to initialized it. However given that these are all under the same Fortran module, and that for now I am not sure there will ever be a situation where vertical_diffusion_wind_damping_rate will be included in an SDF without vertical_diffusion_diffuse_horizontal_momentum, then I am happy to leave this as-is.

(I'll keep this un-resolved in case this issue comes be up again, but we can consider it "resolved" for the sake of this PR!)

@jimmielin jimmielin requested a review from nusbaume September 5, 2025 18:46
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

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

Everything looks great to me now besides a few questions waiting on scientist input, but those aren't strictly necessary for this PR. Thanks again for bringing this in!

@nusbaume nusbaume requested a review from peverwhee September 5, 2025 19:19
Copy link
Collaborator

@peverwhee peverwhee left a comment

Choose a reason for hiding this comment

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

a couple of tiny things/questions!

type = real | kind = kind_phys
intent = in
[ taux ]
standard_name = eastward_stress_at_surface_for_vertical_diffusion_tbd
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looking at the spreadsheet, it seems we're still waiting for this standard name and others. I guess I'd vote for removing the "_tbd"s anyway, since, as Jesse mentioned, the standard names seem reasonable.

@jimmielin jimmielin requested a review from peverwhee September 24, 2025 22:32
@jimmielin jimmielin merged commit 4971625 into ESCOMP:development Sep 26, 2025
4 checks passed
@github-project-automation github-project-automation bot moved this from Done to Tag in CAM Development Sep 26, 2025
jimmielin added a commit that referenced this pull request Sep 26, 2025
…for atmos_phys (#310)

Tag name (The PR title should also include the tag name):
atmos_phys0_18_000
Originator(s): @jimmielin @nusbaume 

List all `development` PR numbers included in this PR and the title of
each:
- Add Github action to use git-fleximod for externals checking #306 by
@nusbaume
- Complete CCPPization of Holtslag-Boville PBL scheme and vertical
diffusion solver #270 by @jimmielin

List all automated tests that failed, as well as an explanation for why
they weren't fixed:
All B4B in CAM verified via Izumi/Nag Izumi/GNU (previously via
Derecho/Intel)
B4B in SIMA with HB testcase see
ESCOMP/CAM-SIMA#410
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Tag
Development

Successfully merging this pull request may close these issues.

4 participants