-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fig 2c in (new) Adade & Albuquerque 2024 example; new physics submodu…
…le: bulk phase partitioning with one impl as in Kaul et al. 2015 (#1365)
- Loading branch information
Showing
16 changed files
with
1,981 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
""" phase partitioning formulae for bulk description of cloud water """ | ||
|
||
from PySDM.impl.null_physics_class import Null | ||
from .kaul_et_al_2015 import KaulEtAl2015 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
""" | ||
Eq. 1 in [Kaul et al. 2015](https://doi.org/10.1175/MWR-D-14-00319.1) | ||
""" | ||
|
||
import numpy as np | ||
|
||
|
||
class KaulEtAl2015: # pylint: disable=too-few-public-methods | ||
def __init__(self, const): | ||
assert np.isfinite(const.bulk_phase_partitioning_exponent) | ||
|
||
@staticmethod | ||
def liquid_fraction(const, T): | ||
return np.minimum( | ||
1, | ||
np.power( | ||
np.maximum( | ||
0, | ||
(T - const.bulk_phase_partitioning_T_cold) | ||
/ ( | ||
const.bulk_phase_partitioning_T_warm | ||
- const.bulk_phase_partitioning_T_cold | ||
), | ||
), | ||
const.bulk_phase_partitioning_exponent, | ||
), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
examples/PySDM_examples/Abade_and_Albuquerque_2024/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# pylint: disable=invalid-name | ||
""" | ||
mixed-phase example using parcel environment based on | ||
[Abade & Albuquerque 2024 (QJRMS)](https://doi.org/10.1002/qj.4775) | ||
""" | ||
|
||
from .simulation import Simulation | ||
from .settings import Settings |
Oops, something went wrong.