Activation¶
JAX-native implementations of the Abdul-Razzak & Ghan (2000) and Morales Betancourt &
Nenes (2014) activation parameterizations, wrapped as callable classes that are
compatible with jax.grad and jax.vmap.
Callable classes¶
ARG2000 ¶
Abdul-Razzak & Ghan (2000) activation scheme.
A thin callable wrapper around arg2000 that satisfies the
ActivationScheme interface. Instantiate
once; call repeatedly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
accom
|
float
|
Condensation accommodation coefficient (forwarded to every call). |
ac
|
Source code in pyrcel/activation/_arg2000.py
MBN2014 ¶
Morales Betancourt & Nenes (2014) activation scheme.
A thin callable wrapper around mbn2014 satisfying the
ActivationScheme interface.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
accom
|
float
|
Condensation accommodation coefficient forwarded to every call. |
ac
|
Source code in pyrcel/activation/_mbn2014.py
ActivationScheme ¶
Bases: ABC
Interface for droplet activation parameterizations.
All schemes accept lognormal aerosol parameters and updraft conditions and
return the maximum parcel supersaturation plus per-mode activated fractions.
JAX-native subclasses (e.g. ARG2000) are fully differentiable via
jax.grad.
Helper functions¶
lognormal_activation ¶
lognormal_activation(
smax: ArrayLike,
mu: ArrayLike,
sigma: ArrayLike,
N: ArrayLike,
kappa: ArrayLike,
T: ArrayLike | None = None,
sgi: ArrayLike | None = None,
) -> tuple[Array, Array]
Activated number and fraction for one or more lognormal modes.
At least one of T or sgi must be supplied. If sgi is given
it is used directly; otherwise the modal critical supersaturation is
computed from T, mu, and kappa via the approximate κ-Köhler
formula.
All scalar arguments broadcast naturally, so the function handles both single-mode scalars and multi-mode arrays in one call.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
smax
|
float
|
Maximum parcel supersaturation (decimal). |
required |
mu
|
float or array - like
|
Geometric mean dry radius of the mode(s), m. |
required |
sigma
|
float or array - like
|
Geometric standard deviation(s). |
required |
N
|
float or array - like
|
Total number concentration(s) (cm⁻³ or any consistent unit). |
required |
kappa
|
float or array - like
|
Hygroscopicity parameter(s). |
required |
T
|
float
|
Parcel temperature (K). Required when |
None
|
sgi
|
float or array - like
|
Pre-computed modal critical supersaturation(s). If given, |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
N_act |
float or array
|
Activated number concentration (same unit as |
act_frac |
float or array
|
Activated fraction in [0, 1]. |
Notes
Uses _lognormal_act with the modal critical supersaturation obtained
from _kohler_crit_approx.
Source code in pyrcel/activation/_common.py
binned_activation ¶
binned_activation(
Smax: ArrayLike,
T: ArrayLike,
rs: ArrayLike,
r_drys: ArrayLike,
Nis: ArrayLike,
kappa: ArrayLike,
) -> tuple[Array, Array, Array, Array]
Equilibrium and kinetic activation statistics for a binned aerosol mode.
A JAX-native re-implementation of
pyrcel.legacy.activation.binned_activation that operates on raw
arrays (no AerosolSpecies object) and is jax.jit-compatible.
Critical radii and supersaturations are computed with the approximate
κ-Köhler formula (_kohler_crit_approx).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
Smax
|
float
|
Environmental maximum supersaturation (decimal). |
required |
T
|
float
|
Environmental temperature (K). |
required |
rs
|
(array - like, shape(nr))
|
Current wet radii of the aerosol/droplet population (m). |
required |
r_drys
|
(array - like, shape(nr))
|
Dry particle radii (m). |
required |
Nis
|
(array - like, shape(nr))
|
Number concentration per size bin (m⁻³). |
required |
kappa
|
float
|
Hygroscopicity parameter for this mode. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
eq_frac |
float
|
Equilibrium-activated fraction: bins with \(S_\text{crit} \le S_\text{max}\). |
kn_frac |
float
|
Kinetic-activated fraction: bins that have grown past their critical wet radius. |
alpha |
float
|
Ratio \(N_\text{kn} / N_\text{eq}\) (kinetic limitation factor). |
phi |
float
|
Fraction of kinetically active bins that are still below their critical wet radius (unactivated tail). |
Notes
Follows the approach of Nenes et al. (2001): the equilibrium count includes all bins whose critical supersaturation is below the environmental value; the kinetic count starts at the smallest bin that has already grown past its critical wet radius and includes all larger bins.
References
[Nenes2001] Nenes, A., Ghan, S., Abdul-Razzak, H., Chuang, P. Y., & Seinfeld, J. H. (2001). Kinetic limitations on cloud droplet formation and impact on cloud albedo. Tellus B, 53(2), 133–149. https://doi.org/10.1034/j.1600-0889.2001.d01-12.x
Source code in pyrcel/activation/_common.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
multi_mode_activation ¶
multi_mode_activation(
Smax: ArrayLike,
T: ArrayLike,
rss: Sequence[ArrayLike],
r_dryss: Sequence[ArrayLike],
Niss: Sequence[ArrayLike],
kappas: ArrayLike,
) -> tuple[list[Array], list[Array]]
Activation statistics for a multi-mode binned aerosol population.
Calls binned_activation for each mode and collects the equilibrium and kinetic activated fractions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
Smax
|
float
|
Environmental maximum supersaturation (decimal). |
required |
T
|
float
|
Environmental temperature (K). |
required |
rss
|
sequence of array-like
|
Current wet radii for each mode, each of shape |
required |
r_dryss
|
sequence of array-like
|
Dry radii for each mode, each of shape |
required |
Niss
|
sequence of array-like
|
Number concentrations per bin for each mode, each shape |
required |
kappas
|
(array - like, shape(n_modes))
|
Hygroscopicity parameter for each mode. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
eq_fracs |
list of float
|
Equilibrium-activated fraction per mode. |
kn_fracs |
list of float
|
Kinetic-activated fraction per mode. |
See Also
pyrcel.activation.binned_activation : Per-mode computation.