Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

trontrytel
Copy link
Member

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.

PXL_20250606_000906473

TODO (but possibly in another PR)

  • Add the terms to h advection
  • Add more lazy expressions. For example for the w of all the moisture tracers
  • Debug snow in RICO
  • Test with TRMM
  • Add terms to the implicit solver

I 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

@trontrytel trontrytel requested review from costachris and tapios June 6, 2025 00:28
@trontrytel trontrytel self-assigned this Jun 6, 2025
Copy link
Contributor

@tapios tapios left a 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)
Copy link
Contributor

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.)

Copy link
Member Author

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

@trontrytel trontrytel force-pushed the aj/edmf_1M_sedimentation branch from 19ce5d4 to ec4862a Compare July 3, 2025 00:16
@trontrytel trontrytel force-pushed the aj/edmf_1M_sedimentation branch from ec4862a to cc50357 Compare July 18, 2025 21:05
@trontrytel trontrytel marked this pull request as ready for review July 18, 2025 21:06
@trontrytel trontrytel force-pushed the aj/edmf_1M_sedimentation branch from cc50357 to 6974fc5 Compare July 18, 2025 21:09
@trontrytel trontrytel force-pushed the aj/edmf_1M_sedimentation branch from 6974fc5 to e805a8a Compare July 18, 2025 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants