Issue with rain distributions not returning the values of mass when integrated #404
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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