-
Notifications
You must be signed in to change notification settings - Fork 19
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
Adding nonequilibrium parameterization to EDMF #3518
base: main
Are you sure you want to change the base?
Conversation
ᶜq_liq⁰ = similar(Y.c, FT), | ||
ᶜq_ice⁰ = similar(Y.c, FT), |
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.
ᶜq_liq⁰ = similar(Y.c, FT), | |
ᶜq_ice⁰ = similar(Y.c, FT), |
Can we instead compute these on the fly?
@. ᶜq_tot⁰ = divide_by_ρa( | ||
Y.c.ρq_tot - ρaq_tot⁺(Y.c.sgsʲs), | ||
ᶜρa⁰, | ||
Y.c.ρq_tot, | ||
Y.c.ρ, | ||
turbconv_model, | ||
) | ||
@. ᶜq_liq⁰ = divide_by_ρa( | ||
Y.c.ρq_liq - ρaq_liq⁺(Y.c.sgsʲs), | ||
ᶜρa⁰, | ||
Y.c.ρq_liq, | ||
Y.c.ρ, | ||
turbconv_model, | ||
) | ||
@. ᶜq_ice⁰ = divide_by_ρa( | ||
Y.c.ρq_ice - ρaq_ice⁺(Y.c.sgsʲs), | ||
ᶜρa⁰, | ||
Y.c.ρq_ice, | ||
Y.c.ρ, | ||
turbconv_model, | ||
) |
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.
@. ᶜq_tot⁰ = divide_by_ρa( | |
Y.c.ρq_tot - ρaq_tot⁺(Y.c.sgsʲs), | |
ᶜρa⁰, | |
Y.c.ρq_tot, | |
Y.c.ρ, | |
turbconv_model, | |
) | |
@. ᶜq_liq⁰ = divide_by_ρa( | |
Y.c.ρq_liq - ρaq_liq⁺(Y.c.sgsʲs), | |
ᶜρa⁰, | |
Y.c.ρq_liq, | |
Y.c.ρ, | |
turbconv_model, | |
) | |
@. ᶜq_ice⁰ = divide_by_ρa( | |
Y.c.ρq_ice - ρaq_ice⁺(Y.c.sgsʲs), | |
ᶜρa⁰, | |
Y.c.ρq_ice, | |
Y.c.ρ, | |
turbconv_model, | |
) |
thermo_params, | ||
ᶜp, | ||
ᶜmse⁰ - ᶜΦ, | ||
TD.PhasePartition.(ᶜq_tot⁰, ᶜq_liq⁰, ᶜq_ice⁰), |
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.
TD.PhasePartition.(ᶜq_tot⁰, ᶜq_liq⁰, ᶜq_ice⁰), | |
nonequil_phase_part(ᶜts, Y.c.sgsʲs, ᶜρa⁰, Y.c.ρ, turbconv_model), |
and somewhere in the module we can define:
nonequil_phase_part(ts, sgsʲs, ᶜρa⁰, ρ, turbconv_model) =
nonequil_phase_part(
ρ * TD.total_specific_humidity(ts),
ρ * TD.liquid_specific_humidity(ts),
ρ * TD.ice_specific_humidity(ts),
sgsʲs, ᶜρa⁰, ρ, turbconv_model
)
function nonequil_phase_part(ρq_tot, ρq_liq, ρq_ice, sgsʲs, ᶜρa⁰, ρ, turbconv_model)
q_tot = divide_by_ρa(
ρq_tot - ρaq_tot⁺(sgsʲs),
ᶜρa⁰,
ρq_tot,
ρ,
turbconv_model,
)
q_liq = divide_by_ρa(
ρq_liq - ρaq_liq⁺(sgsʲs),
ᶜρa⁰,
ρq_liq,
ρ,
turbconv_model,
)
q_ice = divide_by_ρa(
ρq_ice - ρaq_ice⁺(sgsʲs),
ᶜρa⁰,
ρq_ice,
ρ,
turbconv_model,
)
return TD.PhasePartition(q_tot, q_liq, q_ice)
end
Thank you! FYI we have decided to only support |
I'm thinking of putting |
Purpose
To-do
Content