-
Notifications
You must be signed in to change notification settings - Fork 23
Add sedimentation of rhoa, q_tot and moisture tracers to edmf #3843
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
base: main
Are you sure you want to change the base?
Conversation
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.
Basically looks good to me, modulo the minor comments I left (the most important among them may be to use upwinding also for the log(\hat rho) derivative). I also checked the derivations in your notes. They look correct.
@. Yₜ.c.sgsʲs.:($$j).ρa += vtt | ||
|
||
# q_tot and moisture tracers advective form advection with sedimentation velocity | ||
va = vertical_advection(ᶠwₗ³ʲs, Y.c.sgsʲs.:($j).q_liq, edmfx_upwinding) |
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.
Can we write the following block (and the preceding one above) as a loop of condensate species, so we do not need to repeat the same pattern so many times? (And can also add other condensate species, e.g., graupel, more easily later if we really want to.)
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.
Yes, I'll do it after I'm done with the PR. It's easier for me to debug when everything is written out like this. But I'll turn it into a concise loop over tracers and velocities for better readability afterwards
19ce5d4
to
ec4862a
Compare
ec4862a
to
cc50357
Compare
cc50357
to
6974fc5
Compare
6974fc5
to
e805a8a
Compare
This PR adds the sedimentation terms due to precipitation to rhoa, q_tot and other moisture tracers. Here are the derivation notes. It would be great if someone could check my math.
TODO (but possibly in another PR)
h
advectionlazy
expressions. For example for thew
of all the moisture tracersI think this is as smooth as I can make the updraft to be. We will need some additional detrainment/flux term to move mass from updrafts to the environment to ensure that the environmental values don't go too negative from advection. As is, right now, we don't have any means to ensure positivity in the environment while solving prognostic advection on the grid mean and updraft.
RICO:
summary.pdf