-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changes after updating 2-moment distribution parameters #394
Conversation
50f1cc0
to
79e2bed
Compare
@@ -116,7 +116,7 @@ The default free parameter values are: | |||
|``\nu`` | ``2`` | | |||
|``A`` | ``400`` | | |||
|``a`` | ``0.7`` | | |||
|``c`` | ``3`` | | |||
|``b`` | ``3`` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need to define c
that is used in autoconversion? (line 106?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was an error in the documentation. Following the SB2006 paper and ClimaParams, c=4
is the accretion parameter, while in the autoconversion formula we have two parameters a
and b
, which are equal to 0.7 and 3. In the formula in line 106, b
and c
must be replaced with a
and b
respectively. I just change it in the last commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
src/Microphysics2M.jl
Outdated
- `q_rai` - rain water specific humidity | ||
- `N_liq` - cloud droplet number density | ||
- `N_rai` - rain droplet number density | ||
- `N_liq` - cloud droplet number density |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like during rebasing we accepted both lines. We only need one N_liq
etc :)
src/Microphysics2M.jl
Outdated
- `q_rai` - rain water specific humidity | ||
- `N_liq` - cloud droplet number density | ||
- `N_rai` - rain droplet number density | ||
- `N_liq` - cloud droplet number density |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, the arguments are repeated
src/Microphysics2M.jl
Outdated
Br = | ||
(xr == 0) ? FT(0) : | ||
((SF.gamma(FT(νr + 1) / μr) * xr / SF.gamma(FT(νr + 2) / μr))^(-μr)) | ||
Ac = (N_liq * Bc^(FT(νc + 1))) / SF.gamma(FT(νc + 1)) | ||
Ac = (μc * N_liq * Bc^(FT(νc + 1) / μc)) / SF.gamma(FT(νc + 1) / μc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ac = (μc * N_liq * Bc^(FT(νc + 1) / μc)) / SF.gamma(FT(νc + 1) / μc) | |
Ac = μc * N_liq * Bc^(FT(νc + 1) / μc) / SF.gamma(FT(νc + 1) / μc) |
src/Microphysics2M.jl
Outdated
xc = (N_liq < τ_N) ? FT(0) : ((q_liq * ρ_air) / N_liq) | ||
xr = (N_rai < τ_N) ? FT(0) : ((q_rai * ρ_air) / N_rai) | ||
C = FT((4 / 3) * π * ρ_w) | ||
|
||
Bc = | ||
(xc == 0) ? FT(0) : | ||
(SF.gamma(FT(νc + 1)) * xc / SF.gamma(FT(νc + 2)))^(-1) | ||
((SF.gamma(FT(νc + 1) / μc) * xc / SF.gamma(FT(νc + 2) / μc))^(-μc)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
((SF.gamma(FT(νc + 1) / μc) * xc / SF.gamma(FT(νc + 2) / μc))^(-μc)) | |
(SF.gamma(FT(νc + 1) / μc) * xc / SF.gamma(FT(νc + 2) / μc))^(-μc) |
src/Microphysics2M.jl
Outdated
- `q_liq` - cloud water specific humidity | ||
- `q_rai` - rain water specific humidity | ||
- `N_liq` - cloud droplet number density | ||
- `N_rai` - rain droplet number density | ||
- `N_liq` - cloud droplet number density |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
src/parameters/Microphysics2M.jl
Outdated
$(DocStringExtensions.FIELDS) | ||
""" | ||
Base.@kwdef struct CloudParticlePDF_SB2006{FT} <: ParametersType{FT} | ||
"Raindrop size distribution coefficient νc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Raindrop size distribution coefficient νc" | |
"Cloud droplet size distribution coefficient νc" |
src/parameters/Microphysics2M.jl
Outdated
Base.@kwdef struct CloudParticlePDF_SB2006{FT} <: ParametersType{FT} | ||
"Raindrop size distribution coefficient νc" | ||
νc::FT | ||
"Raindrop size distribution coefficient μc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Raindrop size distribution coefficient μc" | |
"Cloud droplet size distribution coefficient μc" |
src/Microphysics2M.jl
Outdated
xc = (N_liq < τ_N) ? FT(0) : ((q_liq * ρ_air) / N_liq) | ||
xr = (N_rai < τ_N) ? FT(0) : ((q_rai * ρ_air) / N_rai) | ||
C = FT(4 / 3 * π * ρ_w) | ||
Z₀ = FT(1e-18) | ||
|
||
Bc = | ||
(xc == 0) ? FT(0) : | ||
(SF.gamma(FT(νc + 1)) * xc / SF.gamma(FT(νc + 2)))^FT(-1) | ||
((SF.gamma(FT(νc + 1) / μc) * xc / SF.gamma(FT(νc + 2) / μc))^(-μc)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
((SF.gamma(FT(νc + 1) / μc) * xc / SF.gamma(FT(νc + 2) / μc))^(-μc)) | |
(SF.gamma(FT(νc + 1) / μc) * xc / SF.gamma(FT(νc + 2) / μc))^(-μc) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #394 +/- ##
==========================================
+ Coverage 94.87% 96.99% +2.11%
==========================================
Files 36 35 -1
Lines 1386 1363 -23
==========================================
+ Hits 1315 1322 +7
+ Misses 71 41 -30
|
789df7c
to
58d5728
Compare
Purpose
To-do
Content