Rain formation as a function of air velocity - #770
Open
trontrytel wants to merge 3 commits into
Open
trontrytel wants to merge 3 commits into
trontrytel wants to merge 3 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #770 +/- ##
==========================================
+ Coverage 92.74% 92.85% +0.10%
==========================================
Files 56 56
Lines 2990 3022 +32
==========================================
+ Hits 2773 2806 +33
+ Misses 217 216 -1
🚀 New features to boost your workflow:
|
trontrytel
force-pushed
the
aj/regime_rain_formation
branch
2 times, most recently
from
July 30, 2026 19:00
fece4e6 to
a0ea034
Compare
trontrytel
force-pushed
the
aj/regime_rain_formation
branch
2 times, most recently
from
August 14, 2026 00:53
a9ff8c6 to
c1a7204
Compare
trontrytel
force-pushed
the
aj/regime_rain_formation
branch
2 times, most recently
from
September 4, 2026 19:11
716fcbb to
2b2415c
Compare
trontrytel
marked this pull request as ready for review
September 4, 2026 19:16
trontrytel
force-pushed
the
aj/regime_rain_formation
branch
from
September 4, 2026 20:41
2b2415c to
0c0b9b1
Compare
szy21
reviewed
Sep 4, 2026
|
|
||
| @inline function rain_autoconversion_timescale(::CMP.VelocityDependent, mp, w) | ||
| (; τ_slow, τ_fast, w_0) = mp.process_params.rain_autoconversion | ||
| f = w^4 / (w^4 + w_0^4) |
Member
There was a problem hiding this comment.
any physical reason for the fourth power?
Member
Author
There was a problem hiding this comment.
Just wanted something smooth that still provides a fast transition between the two regimes. I added some comments in the docs
szy21
approved these changes
Sep 4, 2026
szy21
reviewed
Sep 7, 2026
szy21
reviewed
Sep 7, 2026
trontrytel
force-pushed
the
aj/regime_rain_formation
branch
from
September 14, 2026 21:13
0c0b9b1 to
8aee3c9
Compare
- rain_autoconversion_timescale checks option/parameter consistency with _consistent_params for Kessler1M, PrescribedNd and VelocityDependent, so a mismatched pair throws instead of returning a wrong timescale; tests added - GPU tests: the array-vs-scalar isequal checks were vacuous; compare element-wise with isequal(FT(bad_value)) so unwritten outputs are caught - docs: explain the fourth power in f(w) as a modelling choice (steep, smooth, even step with f = 1/2 at w_0) and list the ClimaParams keys; the fast timescale default is 1000 s (rain_autoconversion_timescale), not 900 s - bulk_tendencies_tests: pass w to the three stiff PrescribedIceNumber test calls added in #787 that were still using the pre-PR argument order (they compiled because nsub has a default, and failed with q_tot = 0) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- Bump the version to 0.41: adding w to the 1M bulk_microphysics_tendencies signatures is a breaking change and v0.40.0 is already released - Type Δt::AbstractFloat and nsub::Integer in the LinearizedAverage method: the pre-0.41 call shape (no w, trailing dt, nsubs) otherwise still dispatches with nsubs bound to Δt and returns garbage silently; test added - Make w a required argument of every rain_autoconversion_timescale method (the Kessler1M and PrescribedNd tendencies pass zero(q_lcl)); include w in the FT promotion of _microphysics_source_terms - Reject w_0 <= 0 and non-positive timescales when reading VelDepAcnv from the TOML dict (w_0 = 0 gives 0/0 at w = 0) - Docs: which vertical velocity w is meant (draft velocity in an EDMF host; with grid-mean GCM w the option reduces to Kessler with τ_slow), the thermo convention and the module usage example now include w - Tests pin the fourth power through f(w_0) = 1/2, f(w_0/2) = 1/17, f(2 w_0) = 16/17, check τ_slow > τ_fast on the defaults, and cover the timescale helper under mixed Dual/plain arguments Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Member
Author
|
This is a breaking release for Atmos, because it requires BMTs to have vertical velocity as input. I already have a branch in Atmos that updates this. But with all the other issues we are having there right now, I'll hold off till next week with merging it. I don't want to add to the reverting PRs |
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.
This PR adds rain autoconversion function that depends on air vertical velocity. The idea is to differentiate between the stratiform (less turbulent, slower) and convective (more turbulent, fast) regime.
This requires adding vertical velocity to bulk microphysics tendencies. So once approved this will be a breaking release for Atmos.