Draw WP1M and MP1M precipitation sources from ρqᵉ - #1031
Merged
Merged
Conversation
With saturation adjustment, ρqᵉ is vapor plus equilibrium cloud and excludes rain and snow, but it had no microphysical tendency: it fell through to the zero OneMomentCloudMicrophysics fallback. Autoconversion, accretion, rain evaporation and the negative-rain relaxation therefore changed ρqʳ without an opposite change in ρqᵉ, creating or destroying water (#1012). Before #489 the prognostic was total water including rain, so the zero fallback was correct; renaming it to ρqᵉ and subtracting precipitation left the fallback in place. The ρqᵉ tendency is now minus the sum of the ρqʳ and ρqˢⁿ tendencies. MP1M has no snow process tendency, and Val(:ρqˢⁿ) on WP1M hits the zero fallback, so the ρqˢⁿ term is zero today but keeps the sum closed if snow processes are added. The regression test calls every prognostic moisture tendency on a scalar state (no transport) for the warm- and mixed-phase schemes and checks that they sum to zero while the rain tendency is nonzero, covering autoconversion, accretion, evaporation and the negative-rain guard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
glwagner
approved these changes
Sep 28, 2026
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.
Closes #1012.
With saturation adjustment, ρqᵉ (vapor plus equilibrium cloud) excludes rain and snow but had no microphysical tendency, so autoconversion, accretion, rain evaporation and the negative-rain relaxation changed ρqʳ without a matching change in ρqᵉ. This adds a ρqᵉ tendency equal to minus the sum of the ρqʳ and ρqˢⁿ tendencies for
OneMomentCloudMicrophysicswithWarmPhaseEquilibriumandMixedPhaseEquilibrium.A new no-transport test calls every prognostic moisture tendency on a scalar state and checks that they sum to zero while the rain tendency is nonzero, for autoconversion, accretion, evaporation and the negative-rain guard in both schemes; it fails on
main(8 of 16) and passes with this change. In a 2D moist bubble (60 min, on top of #997), domain water drift goes from +16% to −0.07%.This matters more once #997 lands: before it, created rain was nearly heat-neutral; with it, the created rain drives spurious heating.
🤖 Generated with Claude Code