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

@trontrytel trontrytel commented Jun 6, 2025

This PR adds the sedimentation terms due to precipitation to rhoa, q_tot and other moisture tracers and enthalpy. Here are the derivation notes.

PXL_20250606_000906473

TODO:

  • Add the terms to h advection
  • Debug snow in RICO
  • Test with TRMM

Next steps

  • Add more lazy expressions. For example for the w of all the moisture tracers
  • Loop over tracers in a more concise way
  • Add the one missing term that is currently making the simulations unstable (or understand why we don't want it)
  • Understand what terms need to be added to implicit solver
  • Add additional detrainment like 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.

DyCOMS
summary.pdf

RICO
summary.pdf

TRMM
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 2 times, most recently from 6974fc5 to e805a8a Compare July 18, 2025 21:14
@trontrytel trontrytel force-pushed the aj/edmf_1M_sedimentation branch from e805a8a to 2a5a08c Compare August 4, 2025 23:31
@trontrytel trontrytel requested a review from szy21 August 4, 2025 23:31
@trontrytel trontrytel force-pushed the aj/edmf_1M_sedimentation branch from 8534a47 to 05f379e Compare August 5, 2025 00:25
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