Repository navigation
Conversation
Connect CAM's water_species_in_air to HOMME theta-l condensate water loading (HOMME port of mt5555/E3SM PR NCAR#10), so dp3d carries the mass of dry air, vapor and the listed condensates. - dycore submodule: HOMME water_loading, condensate_idx, get_q_dry and get_R_star(R, q_dry, qv) (371f313e69, on stormspeed_homme.01). - dyn_comp.F90: set HOMME water_loading and condensate_idx from water_species_in_air before HOMME initializes, so CAM and HOMME use one species list. set_thermostate receives the full tracer array. - dp_coupling.F90: pdeldry = pdel*(1 - sum of the listed water species), kept through set_state_pdry(state, .false.) so pintdry/pmiddry and the wet<->dry conversions (and Kessler's dry mixing ratios and density) use the same dry mass as HOMME; update cp_or_cv_dycore each physics step. - air_composition.F90: cp_or_cv_dycore = cpd*R*/Rd for SENH, HOMME's constant-kappa enthalpy. - namelist_defaults_senh.xml: water_species_in_air='Q' for theta-l (loading off by default, as in HOMME/EAM). AI disclosure: prepared with Claude Code (Anthropic). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HOMME condensate water loading is implemented only for theta-l (preqx has its own element_ops without get_q_dry). Without a preqx default, preqx would take CAM's microphysics water_species_in_air list and add condensate mass to dp3d without the matching gas constant. - namelist_defaults_senh.xml: water_species_in_air='Q' for preqx. - dyn_comp.F90: water_loading is set only under MODEL_THETA_L; preqx aborts with a clear message if condensates are listed. AI disclosure: prepared with Claude Code (Anthropic). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- physpkg.F90 (cam, cam7, simple): for SENH, rescale the physics T increment by cpairv/cp_or_cv_dycore at the end of tphysac, as for SE and MPAS. HOMME applies physics heating at constant (nonhydrostatic) pressure, so the dycore gains cp*dT with cp* = cpd*R*/Rd. - physpkg.F90 (cam, cam7, simple): SENH branch for physics_dme_adjust. HOMME's applyCAMforcing_tracers does the moist-mass adjustment, so the call is diagnostic only and the state is restored afterwards. It is not gated by thermo_budget_history, so the physics_dme_adjust snapshots work with the budgets off (cost: one column-local pass per step). - check_energy.F90: SENH dycore-energy diagnostics use the SE energy formula with cp_or_cv_dycore (check_energy_timestep_init, check_energy_cam_chng and tot_energy_phys). - physics_types.F90: SENH no longer returns early from physics_dme_adjust; comment explains the diagnostic-only use. - cam_budget.F90, senh/dycore_budget.F90: enable the thermodynamic budgets and their printing for SENH on the GLL grid. AI disclosure: prepared with Claude Code (Anthropic). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tag name and PR URL are placeholders until the PR is opened and merged. AI disclosure: prepared with Claude Code (Anthropic). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Target:
NCAR/StormSPEEDbranchstormspeedHead:
senh_condensate_loading, 4 commits on the currentstormspeedDepends on: the HOMME PR to
jtruesdal/E3SM#1(condensate water loading, port of mt5555/E3SM#10)..gitmoduleswill be updated to its tag before merge. Until then the submodule points at commit371f313e69, so this PR is a draft.What it does
1. Condensate water loading for SE-NH (theta-l), opt-in.
dp3dandpscarry dry air, vapor and the condensates listed inwater_species_in_air.water_species_in_air, so CAM and HOMME always agree. The default stays'Q'(no loading), as in HOMME and EAM.2. Energy-consistent physics forcing for SE-NH.
cpairv/cp_or_cv_dycore, as already done for SE and MPAS. That rescaling was missing for SE-NH.3. Dry-mass adjustment.
applyCAMforcing_tracersdoes the moist-mass adjustment.physics_dme_adjustis therefore called for SE-NH for diagnostics only, and the state is restored afterwards.physics_dme_adjustsnapshots work withthermo_budget_historyoff.4. Adjust
pdeldrycomputation ind_p_coupling.pdeldryis computed from all listed water species, then was immediately overwritten with a vapor-only value. It is now kept.5.
preqxstays vapor-only.preqxgets a'Q'default and aborts if condensates are listed.6. Thermodynamic budgets enabled for SE-NH on the GLL grid for physics. Budgets computed within the dycore remain disabled.
Answer impact
water_species_in_air = 'Q', because of the temperature rescaling in (2) done within CAM physics.'Q', the HOMME PR port are bit-for-bit.Testing
Runs on derecho/intel: FKESSLER ne30_ne30, theta-l, moist bubble on a reduced-radius planet (X=120), 150 steps. Compared against the earlier SourceMods implementation of condensate loading on the same base:
water_species_in_air = 'Q''Q','CLDLIQ','RAINQM', HOMME port only'Q','CLDLIQ','RAINQM', with thepdeldryfixwater_loading = Tandcondensate_idx = 2 3Build-only checks: QPC6 and QPC7 (ne30pg2, theta-l) build.
preqxdoes not build onstormspeeditself, before this PR.dyn_comp.F90importsfine_ne,hypervis_powerandmax_hypervis_courant, which HOMME'scontrol_modatstormspeed_homme.01no longer has. So thepreqxguard in (5) is untested. With it,preqxgetswater_species_in_air = 'Q'from build-namelist.Not yet run:
aux_cam_e3smandaux_cam_preqx. Not built: the Kokkos target.Notes for reviewers
dycore_budget.F90: most of the diff is about 520 previously commented-out (!!$) budget lines, now enabled. The commented-out lines enable budgets computed in physics (e.g. BF, BP, AP, AM) while leaving budgets within the dycore disabled.tphysactook about 0.5% ofdyn_run.AI disclosure: The original modifications were made by the developer. Changes to adapt to the port of mt5555/E3SM#10 where made and verified against the original using Claude Code (Anthropic). The developer reviewed the changes and remains responsible for the code.