Skip to content

Issue with rain distributions not returning the values of mass when integrated #404

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

Closed
wants to merge 2 commits into from

Conversation

anastasia-popova
Copy link
Contributor

Purpose

We noticed a difference in distributions from the one that the 2M scheme solves vs the one that the P3 scheme solves for. This can be seen using the integral functions I added to the Microphysics 2M file.

mass_integral() integrated the SB2006 distribution in terms of mass over all mass values
diameter_integral() converts the SB2006 distribution to be in terms of diameter and then integrates over all diameter values
p3_integral() takes the distribution that is solved for in the P3 Scheme (analogous to the process in the "Assumed Particle Distribution" section of the P3 Docs (assuming that rain has an exponential distribution i.e., mu = 0)).

When run without the mass term, all of the distributions return the total N values.
However, when run with the mass, only the P3 distribution returns the total q value.

specifically with the following values we get these outputs:
q = 5e-4
N = 1e8
mass_integral() = (0.053242761992414823, 2.1347496010890966e-10)
diameter_integral() = (0.05396701648992669, 5.426008450982034e-10)
p3_integral() = (0.0004999999999990584, 5.0271524832576724e-12)

Plugging in directly the values for A and lambda from the SB2006 paper instead of using the limited_vars, we get the following:
mass_integral() = (0.00025670012836447303, 1.728586069347634e-12)
This is still not the correct value but it is not off by a factor of 2 instead of a factor of 100.

To-do

Content


  • I have read and checked the items on the review checklist.

Copy link

codecov bot commented May 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.83%. Comparing base (491cf68) to head (0985330).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #404      +/-   ##
==========================================
- Coverage   96.97%   96.83%   -0.15%     
==========================================
  Files          35       35              
  Lines        1355     1357       +2     
==========================================
  Hits         1314     1314              
- Misses         41       43       +2     
Components Coverage Δ
src 98.88% <ø> (ø)
ext 69.79% <ø> (-1.49%) ⬇️

@trontrytel
Copy link
Member

Should be fixed in #403

@trontrytel trontrytel closed this Jun 4, 2024
@trontrytel trontrytel deleted the ap/rainDist branch May 8, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants