Skip to content
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

Separate precipitation sources and sinks #2847

Merged
merged 2 commits into from
Mar 29, 2024
Merged

Separate precipitation sources and sinks #2847

merged 2 commits into from
Mar 29, 2024

Conversation

trontrytel
Copy link
Member

This PR:

  • separates precipitation sources and sinks for the 1-moment microphysics. This is in preparation for coupling with the SGS model. We will need an SGS version of the precipitation sources. The precipitation sinks remain unchanged for w/wo SGS model.
  • moves the precipitation sources and sinks into the microphysics_warppers file
  • introduces the compute_precipitation_cache function for the 1-moment scheme. Hopefully this is where we will dispatch between w/wo SGS model
  • reuses the q_tot_precipitation_sources for the 0-moment microphysics.

This should not introduce any changes in the behavior.

@trontrytel trontrytel requested a review from szy21 March 28, 2024 00:24
@trontrytel trontrytel self-assigned this Mar 28, 2024
Copy link
Member

@szy21 szy21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks! Just one comment on the names:)

(; ᶜts) = p.precomputed
(; ᶜS_ρq_tot) = p.precipitation
cm_params = CAP.microphysics_params(params)
thermo_params = CAP.thermodynamics_params(params)
#TODO missing limiting by q_tot/Δt
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that I lied and there are some small changes in the mse for the 0-moment scheme. I think they are coming from the fact that now I'm using q_tot_precipitation_sources function which does limit the tendency by q_tot / dt. I think this is better than before, so I'll bump the ref counter

@trontrytel trontrytel enabled auto-merge March 28, 2024 22:55
@trontrytel trontrytel added this pull request to the merge queue Mar 29, 2024
Merged via the queue into main with commit 66dd395 Mar 29, 2024
9 of 11 checks passed
@trontrytel trontrytel deleted the aj/edmf_1M branch March 29, 2024 01:13
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.

2 participants