Repository navigation
Conversation
Contributor
|
📖 Docs preview for this PR: https://clima.github.io/ClimaAtmos.jl/previews/PR4783/ |
szy21
force-pushed
the
zs/sgs_precip
branch
6 times, most recently
from
August 25, 2026 20:22
df9dd87 to
3991cfe
Compare
szy21
commented
Aug 26, 2026
Comment on lines
+1017
to
+1029
| # input = @. lazy(tuple(ᶜCF_d, ᶜq_precip)) | ||
| # Operators.column_accumulate!( | ||
| # ᶜprecip_frac, | ||
| # input; | ||
| # init = zero(FT), | ||
| # reverse = true, | ||
| # ) do a_p_above, (CF_d_level, q_precip_level) | ||
| # ifelse( | ||
| # q_precip_level > q_precip_min, | ||
| # max(CF_d_level, f_decay * a_p_above), | ||
| # zero(FT), | ||
| # ) | ||
| # end |
Member
Author
There was a problem hiding this comment.
This results in large allocation. The for loop below doesn't allocate, and should give the same result. @nefrathenrici do you have an idea why column_accumulate allocates here?
…the nodes Condition the cell-mean rain and snow on the sampled SGS PDF inside the 1M quadrature instead of holding them constant across the nodes, so that below-cloud evaporation and sublimation see the humidity of the air the precipitation falls through and in-cloud accretion sees the in-shaft concentration. - `_discrete_cloud_fraction`: the discrete cloudy mass `CF_d` of the quadrature measure (smoothed count of the condensate-carrying nodes), added to `ᶜsgs_moments` in the existing single pass. - `set_precip_fraction!`: the precipitation fraction `a_p` by maximum-random overlap of the cloud cover swept from the model top down, closed where the precipitation ends (`sgs_precip_overlap_decay`; negative = off). - Three placements of a dose `β_p` (`sgs_precip_incloud_fraction`, with a separate snow share `sgs_snow_incloud_fraction`): the moist half of the PDF, the moistest `a_p` of it by a fitted threshold on the centred saturation excess (`sgs_precip_shaft_threshold`), or the sub-population form (all cloudy nodes plus a random share of the clear nodes at the in-shaft concentration, `sgs_precip_shaft_random`), with a floor on the shaft width (`sgs_precip_fraction_floor`). The node vapour is kept independent of where the precipitation is placed; the discrete mean of the placed precipitation is the cell mean exactly. - The scalar options of the quadrature microphysics are packed into one broadcastable `SGSMicrophysicsOptions` so the tendency broadcast stays under the GPU argument limit. All new parameters default to the previous (uniform) behaviour. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
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.
Purpose
wip. do not review it yet.
To-do
Content