-
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
Implementing Chen 2022 Formulas (rain, ice, snow) into 1M scheme #149
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #149 +/- ##
==========================================
+ Coverage 97.67% 97.68% +0.01%
==========================================
Files 12 12
Lines 818 822 +4
==========================================
+ Hits 799 803 +4
Misses 19 19
☔ View full report in Codecov by Sentry. |
474ce0b
to
4a44974
Compare
@apoorva-thanvantri - Thank you for adding all the parameterizations to the 1-moment scheme. It's really cool that you added the aspect ratio computation for snow! I squashed and rebased everything and modified the velocity comparison plots and the documentation. I think that to avoid conflicts the easiest thing would be to delete or rename your old branch. And then checkout to a new branch from main and pull the changes. Otherwise you will be resolving many conflicts. A couple of things to do before we can merge this:
|
See also issue #154 To fully update the bulk 1-moment scheme to Chen et al 2022 velocities we would also have to re-do the integrals such as accretion, evaporation and such. Maybe we should meet for some integral party at some point. Those are not hard, but it will be annoying (especially for snow...) |
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.
It looks beautiful, you did great Apoorva! A lot of my suggestions are just changing some whole numbers to FT(number)
just to keep things consistent, not sure if there's any value in that computationally, but just in case? My other suggestions are related to the valid range of D_r
. I think these changes would make it easier on future users/developers because it's so easy to be unaware that you're out of the valid range.
The rain ``a_i``, ``b_i``, and ``c_i`` are listed in the table below. | ||
The formula is applicable when ``D > 0.1 mm``, | ||
$q$ refers to ``q = e^{0.115231 \; \rho_a}``, where ``\rho_a`` is air density [kg/m3]. | ||
The units are: [v] = m/s, [D]=mm, [``a_i``] = ``mm^{-b_i} m/s``, [``b_i``] is dimensionless, [``c_i``] = 1/mm. |
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.
It looks like in the actual code, D [=] meters. Maybe note that here so that the user doesn't get confused with units when using the code.
The rain ``a_i``, ``b_i``, and ``c_i`` are listed in the table below. | ||
The formula is applicable when ``D > 0.1 mm``, | ||
$q$ refers to ``q = e^{0.115231 \; \rho_a}``, where ``\rho_a`` is air density [kg/m3]. | ||
The units are: [v] = m/s, [D]=mm, [``a_i``] = ``mm^{-b_i} m/s``, [``b_i``] is dimensionless, [``c_i``] = 1/mm. |
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.
The units are: [v] = m/s, [D]=mm, [``a_i``] = ``mm^{-b_i} m/s``, [``b_i``] is dimensionless, [``c_i``] = 1/mm. | |
The units are: [v] = m/s, [D] = mm, [``a_i``] = ``mm^{-b_i} m/s``, [``b_i``] is dimensionless, [``c_i``] = 1/mm. |
((16 * (a0_comb)^3 * (ρ_i)^2) / (9 * π * (m0_comb)^2)) * | ||
(D_r / (2 * _r0 * 1000))^(3 * ae_comb - 2 * me_comb) | ||
aspect_ratio = aspect_ratio^(α) | ||
vt = 0 |
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.
vt = 0 | |
vt = FT(0) |
src/Microphysics1M.jl
Outdated
k = 3 #for mass weighted terminal velocity | ||
|
||
if precip isa CT.RainType && spherical | ||
ϕ = 1 |
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.
ϕ = 1 | |
ϕ = FT(1) |
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.
Definitely! Otherwise it's not type stable. I'll try to refactor the code a little to have the same function signature for all 1-moment terminal velocities. I can change all of those
Hi! Sounds good - I'm running a few more simulations on KiD and then I will
get to these issues (I can add the plots and move the parameters). I'm also
free for an integral party whenever :)
…On Fri, Aug 11, 2023 at 10:21 AM Anna Jaruga ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/Microphysics1M.jl
<#149 (comment)>
:
> +
+ As = 0.00174079 * (log(ρ_i))^2 − 0.0378769 * log(ρ_i) - 0.263503
+ Bs = (0.575231 + 0.0909307 * log(ρ_i) + 0.515579 / sqrt(ρ_i))^(-1)
+ Cs =
+ -0.345387 +
+ 0.177362 * exp(-0.000427794 * ρ_i) +
+ 0.00419647 * sqrt(ρ_i)
+ Es = -0.156593 - 0.0189334 * (log(ρ_i))^2 + 0.1377817 * sqrt(ρ_i)
+ Fs = -exp(-3.35641 - 0.0156199 * (log(ρ_i))^2 + 0.765337 * log(ρ_i))
+ Gs =
+ (-0.0309715 + 1.55054 / (log(ρ_i)) - 0.518349 * log(ρ_i) / ρ_i)^(-1)
+
+ k = 3 #for mass weighted terminal velocity
+
+ if precip isa CT.RainType && spherical
+ ϕ = 1
Definitely! Otherwise it's not type stable. I'll try to refactor the code
a little to have the same function signature for all 1-moment terminal
velocities. I can change all of those
—
Reply to this email directly, view it on GitHub
<#149 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQD2TPTMRFK2PRPN5H2NACDXUZSZVANCNFSM6AAAAAA24BRI5M>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
9c32355
to
49e3f7d
Compare
Closing in favour of #163 |
Purpose
Implementing formulas from Chen 2022 into the 1M scheme
To-do
Content