merge new clubb_mf into cam6_4_180 - #1576
Conversation
…rations on several variables with latest clubb interface and externals.
There was a problem hiding this comment.
Pull request overview
This PR merges updated CLUBB+MF (clubb-mf) changes into CAM, extending the CLUBB interface to support the enhanced integrate_mf call, adding new EDMF diagnostics/outputs, and introducing additional namelist controls for CLUBB+MF behavior (radiation coupling, microphysics, TKE contribution, etc.).
Changes:
- Expanded
clubb_intr.F90CLUBB+MF interface: new pbuf fields, history coords, diagnostic outputs, and enhanced MF plumbing. - Added new CLUBB+MF namelist entries + defaults, and wired them into
build-namelist. - Updated COSP namelist documentation text (but introduced encoding issues that need correction).
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 18 comments.
| File | Description |
|---|---|
src/physics/cam/clubb_intr.F90 |
Adds/updates CLUBB+MF fields, diagnostics, and MF integration interface wiring. |
bld/namelist_files/namelist_definition.xml |
Adds new CLUBB+MF namelist definitions and edits COSP localtime documentation. |
bld/namelist_files/namelist_defaults_cam.xml |
Adds default values for the new CLUBB+MF namelist entries. |
bld/build-namelist |
Adds add_default(...) plumbing for (most) new CLUBB+MF namelist variables. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
adamrher
left a comment
There was a problem hiding this comment.
Hi John. I've completed my first round of the code review, getting about about half-way through clubb_intr. The code merge removed a lot of stuff that Gunther cleaned up in cam6_4_144, and I tried to catch all those instances. I also found about 8 or so *_macmic variables that I'd like to remove from the pbuf.
…ng vs. descending
clean up function arguments in integrate_mf + bug fixes. John will improve the initialization for mcape/mf_cape and correct spelling errors identified by copilot.
| ! with k_cam. (This differs from the legacy code, which sequence- | ||
| ! associated tke_pbuf(i,:) into an nzm-sized dummy — a top_lev-1 | ||
| ! level misalignment whenever top_lev > 1; bit-identical for | ||
| ! top_lev = 1.) |
There was a problem hiding this comment.
Claude added this comment but it's totally unnecessary (all the state% arrays have the same caveats, so this is not a one-off). Please remove.
This PR merges updated CLUBB+MF (clubb-mf) changes into CAM, extending the CLUBB interface to support the enhanced integrate_mf call, adding new EDMF diagnostics/outputs, and introducing additional namelist controls for CLUBB+MF behavior (radiation coupling, microphysics, TKE contribution, etc.).
Changes:
The majority of the code updates reside in clubb_mf.F90. In addition to the new science, clubb_mf is now agnostic to the direction of the vertical level, adjusting the looping and indexes as needed depending on the top down or bottom up nature of the input arrays. Additionally the number of vertical levels for the new mf arrays are consistent with their associated thermodynamic or momentum grid. There are order of operation differences between this update and Adam's original cam6_4_124 version of clubb_mf which cause roundoff precision differences from the base code. On top of these roundoff differences there are bug fixes which are answer changing.
This PR closes #1370