Repository navigation
cam6_4_207: merge new clubb_mf into cam6_4_203 - #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>
cacraigucar
left a comment
There was a problem hiding this comment.
Getting closer. There are a few new things based on your edits
|
Not sure why I can't comment directly on of Cheryl's new comments, but the 2 issues Claude identified:
I am fine with using the ZM-style relvar. I am knowingly choosing not to hook up CLUBB-MF to TTEND_DP, since it's not straightforward to compute this from the MF vars. |
|
Here is some context to the issue with the add_hist_coordfixed call. |
|
Since clubb_mf is activated/deactivated via the namelist we can't use a CPP #ifdef around the problem variables. I have opened an issue #1697 to investigate and if needed minimize the memory hit from 200+ locally declared variables that are only used when clubb_mf is active. |
|
@cacraigucar @adamrher answered your recent claude question a few comments above.
|
replace downdraft clamp
…rought up to cam_development (cam6_4_206)
…m6_4_204 leapfrog mods.
cacraigucar
left a comment
There was a problem hiding this comment.
Thanks for the extensive editing. I am now approving this!
…ed mpass interp_mod.F90 api changes to match required mods for PR1576
…ing a positive convention, I removed the -1 multiplication factor
Resolve the modify/delete conflict on src/chemistry/aerosol/aero_convproc.F90 (removed on this branch) by porting the CLUBB_MF MF_WUP updraft-speed hook (ESCOMP#1576) into aero_convproc_cam.F90; the matching optional wup_in argument of aero_convproc_run lives in the atmos_phys hplin/mam_atmos_phys branch. Assisted-by: claude-opus:5.5
Mirrors ESCOMP/CAM#1576 (cam6_4_207), which added an optional wup_in argument to aero_convproc_tend so deep convective activation can use the CLUBB_MF plume-ensemble updraft speed (MF_WUP) instead of the mu/(rhoair*zm_areafrac) estimate. Bit-for-bit when wup_in is absent. Assisted-by: claude-opus:5.5
Upstream merge from cam6_4_123 (recorded as base in the preceding commit) to cam6_4_211. CLUBB-MF - Take upstream CLUBB-MF (ESCOMP PR ESCOMP#1576, deep_scheme='CLUBB_MF'): clubb_intr.F90 and clubb_mf.F90 as in 211; cam7/physpkg, build-namelist, defaults and definitions follow 211. - Remove the old stormspeed CLUBB-MF shallow-precip routing (cam/physpkg.F90 prec_sh accumulators and flx_cnd term, convect_shallow ICWMRSH outfld, cam7 convect_diagnostics ICWMRSH/PRECSH addflds). - outfrq9s_clubbmf testmod: 211 version plus do_clubb_mf_addtke/do_clubb_mf_rhtke. senh (HOMME) namelist defaults - New bld/namelist_files/namelist_defaults_senh.xml, consulted by build-namelist before namelist_defaults_cam.xml when se_dyn_target is preqx or theta-l. - theta-l/preqx values follow the E3SM "EAM's HOMME dycore" recommended settings, EAM namelist_defaults_eam.xml (E3SM 057df66), and HOMME code defaults for preqx. - namelist_defaults_cam.xml is 211 plus ne1024 dtime/drydep and the MIDWEST refined mesh. Build and namelist infrastructure - configure: allow threading for HOMME targets; 211's warning for CAM SE. - buildcpp: keep -se_dyn_target; drop -ocn (removed upstream in cam6_4_125). - buildlib: keep Kokkos staging; take 211's env_vars make command. - namelist_definition.xml: drop duplicate CLUBB-MF definitions, close the se_semi_lagrange_hv_q entry (restores se_pgf_formulation), remove the orphaned se_tom_sponge_start, keep one se_cubed_sphere_map. - build-namelist: drop interpolate_* from the SE/senh add_default lists (as in 211). Physics and utilities - moist_mixing_ratio_dycore includes SENH in cam, cam7 and simple physpkg (follows the cam6_4_173 restructure). - Keep stormspeed base-model fixes: aircraft_emit weight_by_lat only for LR; ne1024 restart overflow fix (stormspeed #71) in cam_grid_support/cam_map_utils. - Snapshot pbuf array sized npbuf_all+pcnst as in 211. Externals - ccs_config, cmeps and ctsm fork tags rebased on 211's versions with nh changes; cism removed as upstream.
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
closes #1590