Skip to content

Commit 4d7d5fb

Browse files
committed
refactor: 2M SB2006 implementation
* clarify notation in diameter and mass spaces * do more log-space calculations for numerical stability * define coefficients as length scales instead of inverse length scales * Reference equations to SB2006 where appropriate * Update struct names for rain particle pdf options * Set integration bounds from pdf quantiles
1 parent b477934 commit 4d7d5fb

12 files changed

+1040
-790
lines changed

docs/src/API.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,16 @@ Microphysics2M
4848
```@docs
4949
Microphysics2M.pdf_cloud_parameters
5050
Microphysics2M.pdf_rain_parameters
51+
Microphysics2M.pdf_cloud_parameters_mass
52+
Microphysics2M.pdf_rain_parameters_mass
53+
Microphysics2M.log_pdf_cloud_parameters_mass
5154
```
5255

5356
### Size distributions
5457
```@docs
5558
Microphysics2M.size_distribution
56-
Microphysics2M.get_size_distribution_bound
59+
Microphysics2M.size_distribution_value
60+
Microphysics2M.get_size_distribution_bounds
5761
```
5862

5963
## Rates
@@ -330,6 +334,8 @@ Parameters.LD2004
330334
Parameters.VarTimescaleAcnv
331335
Parameters.SB2006
332336
Parameters.RainParticlePDF_SB2006
337+
Parameters.RainParticlePDF_SB2006_limited
338+
Parameters.RainParticlePDF_SB2006_notlimited
333339
Parameters.CloudParticlePDF_SB2006
334340
Parameters.AcnvSB2006
335341
Parameters.AccrSB2006

docs/src/CloudDiagnostics.md

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,32 @@ Available diagnostics are:
88
- Radar reflectivity
99
- Effective radius
1010

11+
Calculating these diagnostics make use of the physical moment equation for the
12+
generalized gamma distribution, as a function of particle mass. We denote the moment
13+
as ``M_x^n`` to emphasize that it is the moment with respect to the particle size
14+
distribution written as a function of particle mass ``x``.
15+
```math
16+
\begin{equation}
17+
M_x^n(;N, ν, μ, B)
18+
= ∫_0^∞ x^n ⋅ f(x) dx
19+
= N ⋅ B^{-\frac{n}{μ}} ⋅ \frac{Γ\left(\frac{ν+1+n}{μ}\right)}{Γ\left(\frac{ν+1}{μ}\right)}
20+
\end{equation}
21+
```
22+
where:
23+
```math
24+
\begin{equation}
25+
f(x) = A ⋅ x^ν ⋅ \exp(-B ⋅ x^μ)
26+
\end{equation}
27+
```
28+
is the particle size distribution as a function of particle mass, and
29+
```math
30+
\begin{equation}
31+
B = \left( \bar{x} \frac{Γ\left(\frac{ν+1}{μ}\right)}{Γ\left(\frac{ν+2}{μ}\right)} \right)^{-μ}
32+
\end{equation}
33+
```
34+
is the particle size distribution parameter, in which ``\bar{x} = L/N`` is the mean particle mass.
35+
See the particle size distribution section in [Microphysics 2M](@ref) for more details.
36+
1137
## Radar reflectivity
1238

1339
The radar reflectivity factor ``Z`` is used to measure the power returned
@@ -49,27 +75,27 @@ where:
4975

5076
For the [2-moment scheme](https://clima.github.io/CloudMicrophysics.jl/dev/Microphysics2M/)
5177
we take into consideration the effect of both cloud and rain droplets.
52-
Integrating over the assumed cloud droplets Gamma distribution leads to
78+
The radar reflectivity, as written above is proportional to the 2nd moment cloud number distribution in mass
5379
```math
5480
\begin{equation}
55-
Z_c = A_c C^{\nu_c+1} \frac{ (B_c C^{\mu_c})^{-\frac{3+\nu_c}{\mu_c}} \, \Gamma \left(\frac{3+\nu_c}{\mu_c}\right)}{\mu_c},
81+
Z_c = M_x^2 / C^2
5682
\end{equation}
5783
```
5884
where:
59-
- ``\Gamma \,(x) = \int_{0}^{\infty} \! t^{x - 1} e^{-t} \mathrm{d}t`` is the gamma function,
60-
- ``C = \frac{4}{3} \pi \rho_w``.
85+
- ``C = \frac{4}{3} π ρ_w``.
86+
The additional factor of ``C^2`` results in a radar reflectivity that equals the 6th moment in radius.
6187

6288
Similar for rain drop exponential distribution
6389
```math
6490
\begin{equation}
65-
Z_r = A_r C^{\nu_r+1} \frac{ (B_r C^{\mu_r})^{-\frac{3+\nu_r}{\mu_r}} \, \Gamma \left(\frac{3+\nu_r}{\mu_r}\right)}{\mu_r},
91+
Z_r = M_x^2 / C^2
6692
\end{equation}
6793
```
6894
The final radar reflectivity factor is a sum of ``Z_c`` and ``Z_r``.
6995

7096
## Effective radius
7197

72-
The effective radius of hydrometeors (``r_{eff}``) is defined as
98+
The effective radius of hydrometeors (``r_\text{eff}``) is defined as
7399
the area weighted radius of the population of particles.
74100
It can be computed as the ratio of the third to the second moment
75101
of the size distribution.
@@ -80,19 +106,25 @@ We compute the total third and second moment as a sum of cloud condensate and
80106
precipitation moments:
81107
```math
82108
\begin{equation}
83-
r_{eff} = \frac{M_{3}^c + M_{3}^r}{M_{2}^c + M_{2}^r} = \frac{{\int_0^\infty r^{3} \, (n_c(r) + n_r(r)) \, dr}}{{\int_0^\infty r^{2} \, (n_c(r) + n_r(r)) \, dr}}.
109+
r_{eff}
110+
= \frac{M^3_{r,c} + M^3_{r,r}}{M^2_{r,c} + M^2_{r,r}}
111+
= \frac{∫_0^∞ r^3 \, (n_c(r) + n_r(r)) \, dr}{∫_0^∞ r^2 \, (n_c(r) + n_r(r)) \, dr}.
84112
\label{eq:reff}
85113
\end{equation}
86114
```
87-
After integrating we obtain
115+
The 3rd moment in radius, ``M^3_r`` equals the 1st moment in mass, ``M^1_x``,
88116
```math
89117
\begin{equation}
90-
M_{3}^c + M_{3}^r = A_c C^{\nu_c+1} \frac{ (B_c C^{\mu_c})^{-\frac{2+\nu_c}{\mu_c}} \, \Gamma \left(\frac{2+\nu_c}{\mu_c}\right)}{\mu_c} + A_r C^{\nu_r+1} \frac{ (B_r C^{\mu_r})^{-\frac{2+\nu_r}{\mu_r}} \, \Gamma \left(\frac{2+\nu_r}{\mu_r}\right)}{\mu_r}.
118+
M^3_r = M^1_x / C
91119
\end{equation}
92120
```
121+
where
122+
- ``C = \frac{4}{3} π ρ_w`` relates radius to mass for a spherical particle, ``x = C r^3``.
123+
124+
Similarly, the 2nd moment in radius, ``M^2_r`` equals the "2/3rd" moment in mass, ``M^2_x``,
93125
```math
94126
\begin{equation}
95-
M_{2}^c + M_{2}^r = A_c C^{\nu_c+1} \frac{ (B_c C^{\mu_c})^{-\frac{5+3\nu_c}{3\mu_c}} \, \Gamma \left(\frac{5+3\nu_c}{3\mu_c}\right)}{\mu_c} + A_r C^{\nu_r+1} \frac{ (B_r C^{\mu_r})^{-\frac{5+3\nu_r}{3\mu_r}} \, \Gamma \left(\frac{5+3\nu_r}{3\mu_r}\right)}{\mu_r}.
127+
M_r^2 = M_x^\frac{2}{3} / C^\frac{2}{3}
96128
\end{equation}
97129
```
98130

0 commit comments

Comments
 (0)