Skip to content

cam6_4_173: fix energy bug in physics-dynamics coupling#1554

Open
PeterHjortLauritzen wants to merge 4 commits into
ESCOMP:cam_developmentfrom
PeterHjortLauritzen:pdc-energy-bug-fix
Open

cam6_4_173: fix energy bug in physics-dynamics coupling#1554
PeterHjortLauritzen wants to merge 4 commits into
ESCOMP:cam_developmentfrom
PeterHjortLauritzen:pdc-energy-bug-fix

Conversation

@PeterHjortLauritzen
Copy link
Copy Markdown
Collaborator

@PeterHjortLauritzen PeterHjortLauritzen commented May 12, 2026

Closes #1551 - Bug in physics tendency scaling
Closes #1553 - RRTMGP diagnostic net_flx bug
Closes #1550 - ZM scheme no longer conserving energy

@PeterHjortLauritzen
Copy link
Copy Markdown
Collaborator Author

Please note that we need to make these changes in CAM-SIMA as well!

@peverwhee peverwhee added the misc tag issue or PR candidate for upcoming misc tag label May 12, 2026
@jimmielin
Copy link
Copy Markdown
Member

Thanks @PeterHjortLauritzen! I checked and the same issue is present in CAM-SIMA.

As I understand from reading your fix, my proposed fix for CAM-SIMA is to create a registry variable saving cp_or_cv_dycore_at_start_of_physics_timestep (to avoid saving it into a temp variable) with the value computed in d_p_coupling, where it calls cam_thermo_water_update to update cp_or_cv_dycore. This value computed at the beginning of the physics timestep is the one that should always be provided to the energy checker/fixer.

When thermo_water_uptake is called within physics, updating cp_or_cv_dycore, its only intended use is for tot_energy_phys diagnostics.

Is that understanding correct? If yes then I can start drafting the equivalent fix in CAM-SIMA which will look different since we don't have physpkg.

@PeterHjortLauritzen
Copy link
Copy Markdown
Collaborator Author

Yes in current CAM! Once we move towards a true variable latent heat formulation in physics we would update cp_pr_cv after each parameterization ...

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.

@cacraigucar cacraigucar changed the title fix energy bug in physics-dynamics coupling cam6_4_173: fix energy bug in physics-dynamics coupling May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

misc tag issue or PR candidate for upcoming misc tag Must have CESM3

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants