Skip to content

Add support for energy checker for ZM deep convection scheme#298

Open
jimmielin wants to merge 4 commits intoESCOMP:developmentfrom
jimmielin:hplin/zm_check_energy_chng
Open

Add support for energy checker for ZM deep convection scheme#298
jimmielin wants to merge 4 commits intoESCOMP:developmentfrom
jimmielin:hplin/zm_check_energy_chng

Conversation

@jimmielin
Copy link
Copy Markdown
Member

Originator(s): @jimmielin

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

List all namelist files that were added or changed: N/A

List all files eliminated and why: N/A

List all files added and what they do:

A       schemes/zhang_mcfarlane/zm_prepare_flux_for_check_energy.F90
A       schemes/zhang_mcfarlane/zm_prepare_flux_for_check_energy.meta
  - new interstitial scheme to combine liquid and ice fluxes from ZM for energy checker

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

M       suites/suite_cam4.xml
M       suites/suite_cam7.xml
  - add calls to new interstitial scheme and energy checker in CAM4 and CAM7 suite

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

Is this an answer-changing PR? If so, is it a new physics package, algorithm change, tuning change, etc?
B4B but new functionality - energy checker now runs and checks fluxes from ZM.

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

@jimmielin jimmielin self-assigned this Sep 9, 2025
@jimmielin jimmielin added the cleanup This issue indicates an opportunity for code cleanup. label Sep 9, 2025
@nusbaume nusbaume self-requested a review September 14, 2025 01:08
Copy link
Copy Markdown
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 fixing this issue @jimmielin! However I am worried that the formula being applied in CAM might be incorrect, so I am hoping to get some scientists' input before moving this PR forward.


! Combine precipitation and reserved liquid for total liquid+ice flux
! This represents net liquid and ice fluxes through column boundaries
flx_cnd(:ncol) = prec_dp(:ncol) + rliq(:ncol)
Copy link
Copy Markdown
Collaborator

@nusbaume nusbaume Sep 14, 2025

Choose a reason for hiding this comment

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

I realize this is copying exactly what is in CAM, but is this actually the correct equation? If flx_cnd is supposed to be the total liquid+ice flux, and the reserved condensate values are considered "flux", then shouldn't this equation actually be:

Suggested change
flx_cnd(:ncol) = prec_dp(:ncol) + rliq(:ncol)
flx_cnd(:ncol) = prec_dp(:ncol) + rliq(:ncol) + rice(:ncol)

I am guessing this is actually a question for @PeterHjortLauritzen and/or @swrneale.

dimensions = (horizontal_loop_extent)
intent = in
[ rice ]
standard_name = vertically_integrated_cloud_ice_tendency_due_to_all_convection_to_be_applied_later_in_time_loop
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We don't have to do it for this PR, but I just realized that we probably need to specify that this is liquid water equivalent cloud ice mass. Maybe worth opening an issue?

Suggested change
standard_name = vertically_integrated_cloud_ice_tendency_due_to_all_convection_to_be_applied_later_in_time_loop
standard_name = vertically_integrated_lwe_cloud_ice_tendency_due_to_all_convection_to_be_applied_later_in_time_loop

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks Jesse - this appears to be only used in ZM (as output) and in this PR, so it's self contained and I've went ahead and updated this in the code and the standard names spreadsheet.

Interestingly rice is not used anywhere - it's not really "to be applied later in time loop" - from looking at physpkg. I know rliq is accounted for somewhere in RK / CLUBB. So this probably is also a science question?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@adamrher noted in the 9:00 am meeting that rice is no longer needed in CAM or CAM-SIMA anymore. So once we remove it from CAM and from the code in this PR I think we'll be good. Thanks!

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

Labels

cleanup This issue indicates an opportunity for code cleanup.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants