PySDM-examples 2.39__tar.gz → 2.41__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PKG-INFO +1 -1
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/aerosol.py +19 -6
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/run_ARG_parcel.py +4 -4
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Alpert_and_Knopf_2016/__init__.py +1 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Arabas_and_Shima_2017/__init__.py +1 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2015/settings.py +1 -4
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/__init__.py +1 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/plots.py +5 -3
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Bartman_et_al_2021/label.py +5 -5
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Berry_1967/__init__.py +1 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Bieli_et_al_2022/__init__.py +1 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Bolot_et_al_2013/__init__.py +1 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Ervens_and_Feingold_2012/__init__.py +1 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Ervens_and_Feingold_2012/settings.py +1 -3
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Kreidenweis_et_al_2003/settings.py +7 -5
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/aerosol.py +21 -9
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/aerosol_code.py +34 -16
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Merlivat_and_Nief_1967/__init__.py +1 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Niedermeier_et_al_2014/__init__.py +1 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Niedermeier_et_al_2014/simulation.py +5 -3
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Pierchala_et_al_2022/__init__.py +1 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/profile_plotter.py +5 -5
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/settings.py +6 -6
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Singer_Ward/aerosol.py +16 -8
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Srivastava_1982/__init__.py +1 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Srivastava_1982/example.py +4 -4
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Srivastava_1982/simulation.py +3 -3
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/gui_viewer.py +9 -7
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/simulation.py +5 -5
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Van_Hook_1968/__init__.py +1 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/__init__.py +1 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/__init__.py +1 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/utils/__init__.py +1 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/utils/notebook_vars.py +1 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples.egg-info/PKG-INFO +1 -1
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples.egg-info/requires.txt +3 -1
- {PySDM-examples-2.39 → PySDM-examples-2.41}/setup.py +3 -3
- {PySDM-examples-2.39 → PySDM-examples-2.41}/MANIFEST.in +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/data_from_ARG2000_paper.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/data_from_CloudMicrophysics_ARG.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Alpert_and_Knopf_2016/simulation.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Alpert_and_Knopf_2016/table.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Alpert_and_Knopf_2016/table_1.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Alpert_and_Knopf_2016/table_2.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Arabas_and_Shima_2017/example.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Arabas_and_Shima_2017/settings.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Arabas_and_Shima_2017/simulation.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2015/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2015/example.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2015/example_benchmark.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2015/spin_up.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/commons.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/curved_text.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/frozen_fraction.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/make_particulator.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/run_simulation.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Bartman_2020_MasterThesis/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Bartman_2020_MasterThesis/fig_4_adaptive_sdm.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Bartman_2020_MasterThesis/fig_5_SCIPY_VS_ADAPTIVE.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Bartman_et_al_2021/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Berry_1967/example.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Berry_1967/example_fig_6.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Berry_1967/settings.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Berry_1967/spectrum_plotter.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Bieli_et_al_2022/settings.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Bieli_et_al_2022/simulation.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Bulenok_2023_MasterThesis/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Bulenok_2023_MasterThesis/setups.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Bulenok_2023_MasterThesis/utils.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Grabowski_and_Pawlowska_2023/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Grabowski_and_Pawlowska_2023/settings.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Grabowski_and_Pawlowska_2023/simulation.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Graf_et_al_2019/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Jaruga_and_Pawlowska_2018/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Kreidenweis_et_al_2003/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Kreidenweis_et_al_2003/simulation.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/plot_helper.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/settings.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/simulation.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Morrison_and_Grabowski_2007/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Morrison_and_Grabowski_2007/common.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Morrison_and_Grabowski_2007/cumulus.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Morrison_and_Grabowski_2007/strato_cumulus.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Niedermeier_et_al_2014/settings.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Pierchala_et_al_2022/commons.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/settings.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/simulation.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/tutorial_settings.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/tutorial_simulation.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/error_measure.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/example.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/example_timing.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/settings.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/spectrum_plotter.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/tutorial_example.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/tutorial_plotter.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/tutorial_settings.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/mpdata_1d.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/plot.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/simulation.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Singer_Ward/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Srivastava_1982/equations.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Srivastava_1982/settings.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/fields.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/gui.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/gui_controller.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/gui_settings.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/make_default_product_collection.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/mpdata_2d.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/plots.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/sounding.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/storage.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Yang_et_al_2018/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Yang_et_al_2018/settings.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Yang_et_al_2018/simulation.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/plot_rates.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/settings1D.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/settings_0D.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/simulation1D.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/simulation_0D.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/simulation_ss.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/utils/basic_simulation.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/utils/dummy_controller.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/utils/progbar_controller.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/utils/read_vtk_1d.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/utils/widgets/__init__.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/utils/widgets/freezer.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/utils/widgets/progbar_updater.py +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples.egg-info/SOURCES.txt +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples.egg-info/dependency_links.txt +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples.egg-info/top_level.txt +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/README.md +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/pyproject.toml +0 -0
- {PySDM-examples-2.39 → PySDM-examples-2.41}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PySDM-examples
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.41
|
|
4
4
|
Summary: PySDM usage examples reproducing results from literature and depicting how to use PySDM from Python Jupyter notebooks
|
|
5
5
|
Home-page: https://github.com/open-atmos/PySDM
|
|
6
6
|
Author: https://github.com/open-atmos/PySDM/graphs/contributors
|
{PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/aerosol.py
RENAMED
|
@@ -16,6 +16,7 @@ CONSTANTS_ARG = {
|
|
|
16
16
|
class AerosolARG(DryAerosolMixture):
|
|
17
17
|
def __init__(
|
|
18
18
|
self,
|
|
19
|
+
water_molar_volume: float,
|
|
19
20
|
M2_sol: float = 0,
|
|
20
21
|
M2_N: float = 100 / si.cm**3,
|
|
21
22
|
M2_rad: float = 50 * si.nm,
|
|
@@ -35,13 +36,19 @@ class AerosolARG(DryAerosolMixture):
|
|
|
35
36
|
)
|
|
36
37
|
self.modes = (
|
|
37
38
|
{
|
|
38
|
-
"kappa": self.kappa(
|
|
39
|
+
"kappa": self.kappa(
|
|
40
|
+
mass_fractions={"(NH4)2SO4": 1.0, "insoluble": 0.0},
|
|
41
|
+
water_molar_volume=water_molar_volume,
|
|
42
|
+
),
|
|
39
43
|
"spectrum": spectra.Lognormal(
|
|
40
44
|
norm_factor=100.0 / si.cm**3, m_mode=50.0 * si.nm, s_geom=2.0
|
|
41
45
|
),
|
|
42
46
|
},
|
|
43
47
|
{
|
|
44
|
-
"kappa": self.kappa(
|
|
48
|
+
"kappa": self.kappa(
|
|
49
|
+
mass_fractions={"(NH4)2SO4": M2_sol, "insoluble": (1 - M2_sol)},
|
|
50
|
+
water_molar_volume=water_molar_volume,
|
|
51
|
+
),
|
|
45
52
|
"spectrum": spectra.Lognormal(
|
|
46
53
|
norm_factor=M2_N, m_mode=M2_rad, s_geom=2.0
|
|
47
54
|
),
|
|
@@ -51,7 +58,7 @@ class AerosolARG(DryAerosolMixture):
|
|
|
51
58
|
|
|
52
59
|
@strict
|
|
53
60
|
class AerosolWhitby(DryAerosolMixture):
|
|
54
|
-
def __init__(self):
|
|
61
|
+
def __init__(self, water_molar_volume: float):
|
|
55
62
|
nuclei = {"(NH4)2SO4": 1.0}
|
|
56
63
|
accum = {"(NH4)2SO4": 1.0}
|
|
57
64
|
coarse = {"(NH4)2SO4": 1.0}
|
|
@@ -69,19 +76,25 @@ class AerosolWhitby(DryAerosolMixture):
|
|
|
69
76
|
)
|
|
70
77
|
self.modes = (
|
|
71
78
|
{
|
|
72
|
-
"kappa": self.kappa(
|
|
79
|
+
"kappa": self.kappa(
|
|
80
|
+
mass_fractions=nuclei, water_molar_volume=water_molar_volume
|
|
81
|
+
),
|
|
73
82
|
"spectrum": spectra.Lognormal(
|
|
74
83
|
norm_factor=1000.0 / si.cm**3, m_mode=0.008 * si.um, s_geom=1.6
|
|
75
84
|
),
|
|
76
85
|
},
|
|
77
86
|
{
|
|
78
|
-
"kappa": self.kappa(
|
|
87
|
+
"kappa": self.kappa(
|
|
88
|
+
mass_fractions=accum, water_molar_volume=water_molar_volume
|
|
89
|
+
),
|
|
79
90
|
"spectrum": spectra.Lognormal(
|
|
80
91
|
norm_factor=800 / si.cm**3, m_mode=0.034 * si.um, s_geom=2.1
|
|
81
92
|
),
|
|
82
93
|
},
|
|
83
94
|
{
|
|
84
|
-
"kappa": self.kappa(
|
|
95
|
+
"kappa": self.kappa(
|
|
96
|
+
mass_fractions=coarse, water_molar_volume=water_molar_volume
|
|
97
|
+
),
|
|
85
98
|
"spectrum": spectra.Lognormal(
|
|
86
99
|
norm_factor=0.72 / si.cm**3, m_mode=0.46 * si.um, s_geom=2.2
|
|
87
100
|
),
|
{PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/run_ARG_parcel.py
RENAMED
|
@@ -6,7 +6,6 @@ from PySDM_examples.Abdul_Razzak_Ghan_2000.aerosol import CONSTANTS_ARG, Aerosol
|
|
|
6
6
|
from PySDM import Builder, Formulae
|
|
7
7
|
from PySDM import products as PySDM_products
|
|
8
8
|
from PySDM.backends import CPU
|
|
9
|
-
from PySDM.backends.impl_numba.test_helpers import scipy_ode_condensation_solver
|
|
10
9
|
from PySDM.dynamics import AmbientThermodynamics, Condensation
|
|
11
10
|
from PySDM.environments import Parcel
|
|
12
11
|
from PySDM.initialisation import equilibrate_wet_radii
|
|
@@ -47,10 +46,12 @@ def run_parcel(
|
|
|
47
46
|
T0=T0,
|
|
48
47
|
)
|
|
49
48
|
|
|
50
|
-
aerosol = AerosolARG(
|
|
49
|
+
aerosol = AerosolARG(
|
|
50
|
+
M2_sol=sol2, M2_N=N2, M2_rad=rad2, water_molar_volume=const.Mv / const.rho_w
|
|
51
|
+
)
|
|
51
52
|
n_sd = n_sd_per_mode * len(aerosol.modes)
|
|
52
53
|
|
|
53
|
-
builder = Builder(backend=CPU(), n_sd=n_sd, environment=env)
|
|
54
|
+
builder = Builder(backend=CPU(formulae), n_sd=n_sd, environment=env)
|
|
54
55
|
builder.add_dynamic(AmbientThermodynamics())
|
|
55
56
|
builder.add_dynamic(Condensation())
|
|
56
57
|
builder.request_attribute("critical supersaturation")
|
|
@@ -79,7 +80,6 @@ def run_parcel(
|
|
|
79
80
|
attributes["volume"] = builder.formulae.trivia.volume(radius=r_wet)
|
|
80
81
|
|
|
81
82
|
particulator = builder.build(attributes, products=products)
|
|
82
|
-
scipy_ode_condensation_solver.patch_particulator(particulator)
|
|
83
83
|
|
|
84
84
|
output = {product.name: [] for product in particulator.products.values()}
|
|
85
85
|
output_attributes = {
|
|
@@ -28,10 +28,7 @@ class Settings(StratoCumulus):
|
|
|
28
28
|
def __init__(
|
|
29
29
|
self,
|
|
30
30
|
formulae=None,
|
|
31
|
-
rhod_w_max: float = 0.6
|
|
32
|
-
* si.metres
|
|
33
|
-
/ si.seconds
|
|
34
|
-
* (si.kilogram / si.metre**3),
|
|
31
|
+
rhod_w_max: float = 0.6 * si.metres / si.seconds * (si.kilogram / si.metre**3),
|
|
35
32
|
):
|
|
36
33
|
super().__init__(formulae or Formulae(), rhod_w_max=rhod_w_max)
|
|
37
34
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
box-model and 2D prescribed-flow immersion-freezing examples based on
|
|
3
3
|
[Arabas et al. 2023](https://arxiv.org/abs/2308.05015)
|
|
4
4
|
"""
|
|
5
|
+
|
|
5
6
|
from .make_particulator import make_particulator
|
|
6
7
|
from .plots import make_freezing_spec_plot, make_pdf_plot, make_temperature_plot
|
|
7
8
|
from .run_simulation import run_simulation
|
|
@@ -28,9 +28,11 @@ def make_temperature_plot(data):
|
|
|
28
28
|
xy2.plot(
|
|
29
29
|
datum["t"],
|
|
30
30
|
np.asarray(datum["qi"]) / qi_unit, # marker='.',
|
|
31
|
-
label=
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
label=(
|
|
32
|
+
f"Monte-Carlo ({labels[v['singular']]})"
|
|
33
|
+
if not plotted[v["singular"]]
|
|
34
|
+
else ""
|
|
35
|
+
),
|
|
34
36
|
color=colors[v["singular"]],
|
|
35
37
|
)
|
|
36
38
|
plotted[v["singular"]] = True
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
def label(settings):
|
|
2
2
|
lbl = str(
|
|
3
3
|
{
|
|
4
|
-
k.replace("condensation_", ""):
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
k.replace("condensation_", ""): (
|
|
5
|
+
f"{v:.1e}"
|
|
6
|
+
if isinstance(v, float)
|
|
7
|
+
else str(v).zfill(2) if isinstance(v, int) else v
|
|
8
|
+
)
|
|
9
9
|
for k, v in settings.items()
|
|
10
10
|
}
|
|
11
11
|
)
|
{PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Ervens_and_Feingold_2012/settings.py
RENAMED
|
@@ -7,8 +7,6 @@ def sampled_ccn_diameter_number_concentration_spectrum(
|
|
|
7
7
|
n_sd: int = 11, size_range: tuple = (0.02 * si.um, 2 * si.um)
|
|
8
8
|
):
|
|
9
9
|
return Logarithmic(
|
|
10
|
-
spectrum=Lognormal(
|
|
11
|
-
s_geom=1.4, m_mode=0.04 * si.um, norm_factor=100 / si.cm**3
|
|
12
|
-
),
|
|
10
|
+
spectrum=Lognormal(s_geom=1.4, m_mode=0.04 * si.um, norm_factor=100 / si.cm**3),
|
|
13
11
|
size_range=size_range,
|
|
14
12
|
).sample(n_sd)
|
{PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Kreidenweis_et_al_2003/settings.py
RENAMED
|
@@ -70,11 +70,13 @@ class Settings:
|
|
|
70
70
|
|
|
71
71
|
self.starting_amounts = {
|
|
72
72
|
"moles_"
|
|
73
|
-
+ k:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
+ k: (
|
|
74
|
+
self.formulae.trivia.volume(self.r_dry)
|
|
75
|
+
* self.DRY_RHO
|
|
76
|
+
/ self.dry_molar_mass
|
|
77
|
+
if k in ("N_mIII", "S_VI")
|
|
78
|
+
else np.zeros(self.n_sd)
|
|
79
|
+
)
|
|
78
80
|
for k in AQUEOUS_COMPOUNDS
|
|
79
81
|
}
|
|
80
82
|
|
|
@@ -8,7 +8,9 @@ from PySDM.physics import si
|
|
|
8
8
|
|
|
9
9
|
@strict
|
|
10
10
|
class AerosolMarine(DryAerosolMixture):
|
|
11
|
-
def __init__(
|
|
11
|
+
def __init__(
|
|
12
|
+
self, water_molar_volume: float, Forg: float = 0.2, Acc_N2: float = 134
|
|
13
|
+
):
|
|
12
14
|
Aitken = {
|
|
13
15
|
"palmitic": Forg,
|
|
14
16
|
"(NH4)2SO4": (1 - Forg),
|
|
@@ -48,7 +50,7 @@ class AerosolMarine(DryAerosolMixture):
|
|
|
48
50
|
self.modes = (
|
|
49
51
|
{
|
|
50
52
|
"f_org": 1 - self.f_soluble_volume(Aitken),
|
|
51
|
-
"kappa": self.kappa(Aitken),
|
|
53
|
+
"kappa": self.kappa(Aitken, water_molar_volume=water_molar_volume),
|
|
52
54
|
"nu_org": self.nu_org(Aitken),
|
|
53
55
|
"spectrum": spectra.Lognormal(
|
|
54
56
|
norm_factor=226 / si.cm**3, m_mode=19.6 * si.nm, s_geom=1.71
|
|
@@ -56,7 +58,9 @@ class AerosolMarine(DryAerosolMixture):
|
|
|
56
58
|
},
|
|
57
59
|
{
|
|
58
60
|
"f_org": 1 - self.f_soluble_volume(Accumulation),
|
|
59
|
-
"kappa": self.kappa(
|
|
61
|
+
"kappa": self.kappa(
|
|
62
|
+
Accumulation, water_molar_volume=water_molar_volume
|
|
63
|
+
),
|
|
60
64
|
"nu_org": self.nu_org(Accumulation),
|
|
61
65
|
"spectrum": spectra.Lognormal(
|
|
62
66
|
norm_factor=Acc_N2 / si.cm**3, m_mode=69.5 * si.nm, s_geom=1.7
|
|
@@ -69,7 +73,9 @@ class AerosolMarine(DryAerosolMixture):
|
|
|
69
73
|
|
|
70
74
|
@strict
|
|
71
75
|
class AerosolBoreal(DryAerosolMixture):
|
|
72
|
-
def __init__(
|
|
76
|
+
def __init__(
|
|
77
|
+
self, water_molar_volume: float, Forg: float = 0.668, Acc_N2: float = 540
|
|
78
|
+
):
|
|
73
79
|
# note: SOA1 or SOA2 unclear from the paper
|
|
74
80
|
Aitken = {
|
|
75
81
|
"SOA1": Forg,
|
|
@@ -116,7 +122,7 @@ class AerosolBoreal(DryAerosolMixture):
|
|
|
116
122
|
self.modes = (
|
|
117
123
|
{
|
|
118
124
|
"f_org": 1 - self.f_soluble_volume(Aitken),
|
|
119
|
-
"kappa": self.kappa(Aitken),
|
|
125
|
+
"kappa": self.kappa(Aitken, water_molar_volume=water_molar_volume),
|
|
120
126
|
"nu_org": self.nu_org(Aitken),
|
|
121
127
|
"spectrum": spectra.Lognormal(
|
|
122
128
|
norm_factor=1110 / si.cm**3, m_mode=22.7 * si.nm, s_geom=1.75
|
|
@@ -124,7 +130,9 @@ class AerosolBoreal(DryAerosolMixture):
|
|
|
124
130
|
},
|
|
125
131
|
{
|
|
126
132
|
"f_org": 1 - self.f_soluble_volume(Accumulation),
|
|
127
|
-
"kappa": self.kappa(
|
|
133
|
+
"kappa": self.kappa(
|
|
134
|
+
Accumulation, water_molar_volume=water_molar_volume
|
|
135
|
+
),
|
|
128
136
|
"nu_org": self.nu_org(Accumulation),
|
|
129
137
|
"spectrum": spectra.Lognormal(
|
|
130
138
|
norm_factor=Acc_N2 / si.cm**3,
|
|
@@ -139,7 +147,9 @@ class AerosolBoreal(DryAerosolMixture):
|
|
|
139
147
|
|
|
140
148
|
@strict
|
|
141
149
|
class AerosolNascent(DryAerosolMixture):
|
|
142
|
-
def __init__(
|
|
150
|
+
def __init__(
|
|
151
|
+
self, water_molar_volume: float, Acc_Forg: float = 0.3, Acc_N2: float = 30
|
|
152
|
+
):
|
|
143
153
|
Ultrafine = {
|
|
144
154
|
"SOA1": 0.52,
|
|
145
155
|
"SOA2": 0,
|
|
@@ -178,7 +188,7 @@ class AerosolNascent(DryAerosolMixture):
|
|
|
178
188
|
self.modes = (
|
|
179
189
|
{
|
|
180
190
|
"f_org": 1 - self.f_soluble_volume(Ultrafine),
|
|
181
|
-
"kappa": self.kappa(Ultrafine),
|
|
191
|
+
"kappa": self.kappa(Ultrafine, water_molar_volume=water_molar_volume),
|
|
182
192
|
"nu_org": self.nu_org(Ultrafine),
|
|
183
193
|
"spectrum": spectra.Lognormal(
|
|
184
194
|
norm_factor=2000 / si.cm**3, m_mode=11.5 * si.nm, s_geom=1.71
|
|
@@ -186,7 +196,9 @@ class AerosolNascent(DryAerosolMixture):
|
|
|
186
196
|
},
|
|
187
197
|
{
|
|
188
198
|
"f_org": 1 - self.f_soluble_volume(Accumulation),
|
|
189
|
-
"kappa": self.kappa(
|
|
199
|
+
"kappa": self.kappa(
|
|
200
|
+
Accumulation, water_molar_volume=water_molar_volume
|
|
201
|
+
),
|
|
190
202
|
"nu_org": self.nu_org(Accumulation),
|
|
191
203
|
"spectrum": spectra.Lognormal(
|
|
192
204
|
norm_factor=Acc_N2 / si.cm**3, m_mode=100 * si.nm, s_geom=1.70
|
|
@@ -19,7 +19,9 @@ class AerosolMarine(DryAerosolMixture):
|
|
|
19
19
|
# NMODE = [1 1];
|
|
20
20
|
# DENSITY = [1.841, 1.78, 1.77, 0.852, 1.5, 2., 2.65, 2.165]; %[gcm-3]
|
|
21
21
|
|
|
22
|
-
def __init__(
|
|
22
|
+
def __init__(
|
|
23
|
+
self, water_molar_volume: float, Forg: float = 0.2, Acc_N2: float = 137
|
|
24
|
+
):
|
|
23
25
|
Aitken = {
|
|
24
26
|
"palmitic": Forg,
|
|
25
27
|
"(NH4)2SO4": (1 - Forg),
|
|
@@ -59,7 +61,9 @@ class AerosolMarine(DryAerosolMixture):
|
|
|
59
61
|
self.modes = (
|
|
60
62
|
{
|
|
61
63
|
"f_org": 1 - self.f_soluble_volume(Aitken),
|
|
62
|
-
"kappa": self.kappa(
|
|
64
|
+
"kappa": self.kappa(
|
|
65
|
+
mass_fractions=Aitken, water_molar_volume=water_molar_volume
|
|
66
|
+
),
|
|
63
67
|
"nu_org": self.nu_org(Aitken),
|
|
64
68
|
"spectrum": spectra.Lognormal(
|
|
65
69
|
norm_factor=223 / si.cm**3, m_mode=19.6 * si.nm, s_geom=1.68
|
|
@@ -67,7 +71,9 @@ class AerosolMarine(DryAerosolMixture):
|
|
|
67
71
|
},
|
|
68
72
|
{
|
|
69
73
|
"f_org": 1 - self.f_soluble_volume(Accumulation),
|
|
70
|
-
"kappa": self.kappa(
|
|
74
|
+
"kappa": self.kappa(
|
|
75
|
+
mass_fractions=Accumulation, water_molar_volume=water_molar_volume
|
|
76
|
+
),
|
|
71
77
|
"nu_org": self.nu_org(Accumulation),
|
|
72
78
|
"spectrum": spectra.Lognormal(
|
|
73
79
|
norm_factor=Acc_N2 / si.cm**3, m_mode=69.5 * si.nm, s_geom=1.68
|
|
@@ -100,9 +106,11 @@ class AerosolBoreal(DryAerosolMixture):
|
|
|
100
106
|
# DENSITY = [1.841, 1.78, 1.77, 1.5, 1.5, 2., 2.65, 2.165]; %[gcm-3]
|
|
101
107
|
# DENSITY = [1.72, 1.78, 1.77, 1.2, 1.4, 2., 2.65, 2.165]; %[gcm-3]
|
|
102
108
|
|
|
103
|
-
def __init__(
|
|
104
|
-
|
|
105
|
-
|
|
109
|
+
def __init__(
|
|
110
|
+
self, water_molar_volume: float, Forg: float = 0.668, Acc_N2: float = 540
|
|
111
|
+
):
|
|
112
|
+
# TODO #1247: SOA1 or SOA2 unclear from the paper
|
|
113
|
+
# TODO #1247: CAN'T FIND WHERE NH4NO3 PROPERTIES ARE DEFINED IN ICPM
|
|
106
114
|
INORG_MASS_RATIO = 0.1515 / 0.1559
|
|
107
115
|
Aitken = {
|
|
108
116
|
"SOA1": Forg,
|
|
@@ -129,8 +137,8 @@ class AerosolBoreal(DryAerosolMixture):
|
|
|
129
137
|
* si.gram
|
|
130
138
|
/ si.mole,
|
|
131
139
|
"NH4NO3": Substance.from_formula("NH4NO3").mass * si.gram / si.mole,
|
|
132
|
-
"SOA1": 190 * si.g / si.mole, # TODO #
|
|
133
|
-
"SOA2": 368.4 * si.g / si.mole, # TODO #
|
|
140
|
+
"SOA1": 190 * si.g / si.mole, # TODO #1247: 190 OR 200?
|
|
141
|
+
"SOA2": 368.4 * si.g / si.mole, # TODO #1247: 368.4 OR 200?
|
|
134
142
|
},
|
|
135
143
|
densities={
|
|
136
144
|
"SOA1": 1.2 * si.g / si.cm**3,
|
|
@@ -149,7 +157,9 @@ class AerosolBoreal(DryAerosolMixture):
|
|
|
149
157
|
self.modes = (
|
|
150
158
|
{
|
|
151
159
|
"f_org": 1 - self.f_soluble_volume(Aitken),
|
|
152
|
-
"kappa": self.kappa(
|
|
160
|
+
"kappa": self.kappa(
|
|
161
|
+
mass_fractions=Aitken, water_molar_volume=water_molar_volume
|
|
162
|
+
),
|
|
153
163
|
"nu_org": self.nu_org(Aitken),
|
|
154
164
|
"spectrum": spectra.Lognormal(
|
|
155
165
|
norm_factor=1110 / si.cm**3, m_mode=22.65 * si.nm, s_geom=1.75
|
|
@@ -157,7 +167,9 @@ class AerosolBoreal(DryAerosolMixture):
|
|
|
157
167
|
},
|
|
158
168
|
{
|
|
159
169
|
"f_org": 1 - self.f_soluble_volume(Accumulation),
|
|
160
|
-
"kappa": self.kappa(
|
|
170
|
+
"kappa": self.kappa(
|
|
171
|
+
mass_fractions=Accumulation, water_molar_volume=water_molar_volume
|
|
172
|
+
),
|
|
161
173
|
"nu_org": self.nu_org(Accumulation),
|
|
162
174
|
"spectrum": spectra.Lognormal(
|
|
163
175
|
norm_factor=Acc_N2 / si.cm**3,
|
|
@@ -184,8 +196,10 @@ class AerosolNascent(DryAerosolMixture):
|
|
|
184
196
|
|
|
185
197
|
# DENSITY = [1.841, 1.78, 1.77, 1.2, 1.24, 2., 2.65, 2.165]; %[gcm-3]
|
|
186
198
|
|
|
187
|
-
def __init__(
|
|
188
|
-
|
|
199
|
+
def __init__(
|
|
200
|
+
self, water_molar_volume: float, Acc_Forg: float = 0.3, Acc_N2: float = 30
|
|
201
|
+
):
|
|
202
|
+
# TODO #1247: CAN'T FIND WHEN PHI IS MULTIPLIED FOR KÖHLER B IN ICPM CODE
|
|
189
203
|
Ultrafine = {
|
|
190
204
|
"SOA1": 0.52,
|
|
191
205
|
"SOA2": 0,
|
|
@@ -203,8 +217,8 @@ class AerosolNascent(DryAerosolMixture):
|
|
|
203
217
|
"(NH4)2SO4": 3,
|
|
204
218
|
},
|
|
205
219
|
molar_masses={
|
|
206
|
-
"SOA1": 190 * si.g / si.mole, # TODO #
|
|
207
|
-
"SOA2": 368.4 * si.g / si.mole, # TODO #
|
|
220
|
+
"SOA1": 190 * si.g / si.mole, # TODO #1247: 190 OR 200?
|
|
221
|
+
"SOA2": 368.4 * si.g / si.mole, # TODO #1247: 368.4 OR 200?
|
|
208
222
|
"(NH4)2SO4": Substance.from_formula("(NH4)2SO4").mass
|
|
209
223
|
* si.gram
|
|
210
224
|
/ si.mole,
|
|
@@ -224,7 +238,9 @@ class AerosolNascent(DryAerosolMixture):
|
|
|
224
238
|
self.modes = (
|
|
225
239
|
{
|
|
226
240
|
"f_org": 1 - self.f_soluble_volume(Ultrafine),
|
|
227
|
-
"kappa": self.kappa(
|
|
241
|
+
"kappa": self.kappa(
|
|
242
|
+
mass_fractions=Ultrafine, water_molar_volume=water_molar_volume
|
|
243
|
+
),
|
|
228
244
|
"nu_org": self.nu_org(Ultrafine),
|
|
229
245
|
"spectrum": spectra.Lognormal(
|
|
230
246
|
norm_factor=2000 / si.cm**3, m_mode=11.5 * si.nm, s_geom=1.71
|
|
@@ -232,7 +248,9 @@ class AerosolNascent(DryAerosolMixture):
|
|
|
232
248
|
},
|
|
233
249
|
{
|
|
234
250
|
"f_org": 1 - self.f_soluble_volume(Accumulation),
|
|
235
|
-
"kappa": self.kappa(
|
|
251
|
+
"kappa": self.kappa(
|
|
252
|
+
mass_fractions=Accumulation, water_molar_volume=water_molar_volume
|
|
253
|
+
),
|
|
236
254
|
"nu_org": self.nu_org(Accumulation),
|
|
237
255
|
"spectrum": spectra.Lognormal(
|
|
238
256
|
norm_factor=Acc_N2 / si.cm**3, m_mode=100 * si.nm, s_geom=1.703
|
{PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Niedermeier_et_al_2014/simulation.py
RENAMED
|
@@ -68,9 +68,11 @@ class Simulation(BasicSimulation):
|
|
|
68
68
|
data[:-1],
|
|
69
69
|
np.full(
|
|
70
70
|
settings.in_sampling_n,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
(
|
|
72
|
+
data[-1]
|
|
73
|
+
if attribute != "multiplicity"
|
|
74
|
+
else data[-1] / settings.in_sampling_n
|
|
75
|
+
),
|
|
74
76
|
),
|
|
75
77
|
)
|
|
76
78
|
)
|
|
@@ -57,11 +57,11 @@ class ProfilePlotter:
|
|
|
57
57
|
settings.formulae.trivia.radius(volume=np.asarray(volume)) / si.um,
|
|
58
58
|
output["products"]["z"],
|
|
59
59
|
color="magenta" if drop_id < settings.n_sd_per_mode[0] else "blue",
|
|
60
|
-
label=
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
label=(
|
|
61
|
+
"mode 1"
|
|
62
|
+
if drop_id == 0
|
|
63
|
+
else "mode 2" if drop_id == settings.n_sd_per_mode[0] else ""
|
|
64
|
+
),
|
|
65
65
|
)
|
|
66
66
|
axR.legend(loc="upper right")
|
|
67
67
|
axR.set_xlabel("Droplet radius [μm]")
|
{PySDM-examples-2.39 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/settings.py
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
from typing import Iterable
|
|
2
2
|
|
|
3
3
|
import numpy as np
|
|
4
|
+
from numdifftools import Derivative
|
|
4
5
|
from scipy.integrate import solve_ivp
|
|
5
6
|
from scipy.interpolate import interp1d
|
|
6
|
-
from scipy.misc import derivative
|
|
7
7
|
|
|
8
8
|
from PySDM import Formulae
|
|
9
9
|
from PySDM.dynamics import condensation
|
|
@@ -60,8 +60,8 @@ class Settings:
|
|
|
60
60
|
self.t_max = t_max
|
|
61
61
|
|
|
62
62
|
t_1 = 600 * si.s
|
|
63
|
-
self.rho_times_w = (
|
|
64
|
-
|
|
63
|
+
self.rho_times_w = lambda t: (
|
|
64
|
+
rho_times_w_1 * np.sin(np.pi * t / t_1) if t < t_1 else 0
|
|
65
65
|
)
|
|
66
66
|
apprx_w1 = rho_times_w_1 / self.formulae.constants.rho_STP
|
|
67
67
|
self.particle_reservoir_depth = (
|
|
@@ -106,9 +106,9 @@ class Settings:
|
|
|
106
106
|
water_vapour_mixing_ratio = self.water_vapour_mixing_ratio(
|
|
107
107
|
z_above_reservoir
|
|
108
108
|
)
|
|
109
|
-
d_water_vapour_mixing_ratio__dz =
|
|
110
|
-
self.water_vapour_mixing_ratio
|
|
111
|
-
)
|
|
109
|
+
d_water_vapour_mixing_ratio__dz = Derivative(
|
|
110
|
+
self.water_vapour_mixing_ratio
|
|
111
|
+
)(z_above_reservoir)
|
|
112
112
|
T = self.formulae.state_variable_triplet.T(
|
|
113
113
|
rhod[0], self.thd(z_above_reservoir)
|
|
114
114
|
)
|
|
@@ -8,7 +8,7 @@ from PySDM.physics import si
|
|
|
8
8
|
|
|
9
9
|
@strict
|
|
10
10
|
class AerosolBetaCaryophylleneDark(DryAerosolMixture):
|
|
11
|
-
def __init__(self, Forg: float = 0.8, N: float = 400):
|
|
11
|
+
def __init__(self, water_molar_volume: float, Forg: float = 0.8, N: float = 400):
|
|
12
12
|
mode = {
|
|
13
13
|
"(NH4)2SO4": (1 - Forg),
|
|
14
14
|
"bcary_dark": Forg,
|
|
@@ -38,7 +38,9 @@ class AerosolBetaCaryophylleneDark(DryAerosolMixture):
|
|
|
38
38
|
self.modes = (
|
|
39
39
|
{
|
|
40
40
|
"f_org": 1 - self.f_soluble_volume(mode),
|
|
41
|
-
"kappa": self.kappa(
|
|
41
|
+
"kappa": self.kappa(
|
|
42
|
+
mass_fractions=mode, water_molar_volume=water_molar_volume
|
|
43
|
+
),
|
|
42
44
|
"nu_org": self.nu_org(mode),
|
|
43
45
|
"spectrum": spectra.Lognormal(
|
|
44
46
|
norm_factor=N / si.cm**3, m_mode=50.0 * si.nm, s_geom=1.75
|
|
@@ -50,7 +52,7 @@ class AerosolBetaCaryophylleneDark(DryAerosolMixture):
|
|
|
50
52
|
|
|
51
53
|
|
|
52
54
|
class AerosolBetaCaryophylleneLight(DryAerosolMixture):
|
|
53
|
-
def __init__(self, Forg: float = 0.8, N: float = 400):
|
|
55
|
+
def __init__(self, water_molar_volume: float, Forg: float = 0.8, N: float = 400):
|
|
54
56
|
mode = {
|
|
55
57
|
"(NH4)2SO4": (1 - Forg),
|
|
56
58
|
"bcary_light": Forg,
|
|
@@ -80,7 +82,9 @@ class AerosolBetaCaryophylleneLight(DryAerosolMixture):
|
|
|
80
82
|
self.modes = (
|
|
81
83
|
{
|
|
82
84
|
"f_org": 1 - self.f_soluble_volume(mode),
|
|
83
|
-
"kappa": self.kappa(
|
|
85
|
+
"kappa": self.kappa(
|
|
86
|
+
mass_fractions=mode, water_molar_volume=water_molar_volume
|
|
87
|
+
),
|
|
84
88
|
"nu_org": self.nu_org(mode),
|
|
85
89
|
"spectrum": spectra.Lognormal(
|
|
86
90
|
norm_factor=N / si.cm**3, m_mode=50.0 * si.nm, s_geom=1.75
|
|
@@ -93,7 +97,7 @@ class AerosolBetaCaryophylleneLight(DryAerosolMixture):
|
|
|
93
97
|
|
|
94
98
|
@strict
|
|
95
99
|
class AerosolAlphaPineneDark(DryAerosolMixture):
|
|
96
|
-
def __init__(self, Forg: float = 0.8, N: float = 400):
|
|
100
|
+
def __init__(self, water_molar_volume: float, Forg: float = 0.8, N: float = 400):
|
|
97
101
|
mode = {
|
|
98
102
|
"(NH4)2SO4": (1 - Forg),
|
|
99
103
|
"apinene_dark": Forg,
|
|
@@ -123,7 +127,9 @@ class AerosolAlphaPineneDark(DryAerosolMixture):
|
|
|
123
127
|
self.modes = (
|
|
124
128
|
{
|
|
125
129
|
"f_org": 1 - self.f_soluble_volume(mode),
|
|
126
|
-
"kappa": self.kappa(
|
|
130
|
+
"kappa": self.kappa(
|
|
131
|
+
mass_fractions=mode, water_molar_volume=water_molar_volume
|
|
132
|
+
),
|
|
127
133
|
"nu_org": self.nu_org(mode),
|
|
128
134
|
"spectrum": spectra.Lognormal(
|
|
129
135
|
norm_factor=N / si.cm**3, m_mode=50.0 * si.nm, s_geom=1.75
|
|
@@ -136,7 +142,7 @@ class AerosolAlphaPineneDark(DryAerosolMixture):
|
|
|
136
142
|
|
|
137
143
|
@strict
|
|
138
144
|
class AerosolAlphaPineneLight(DryAerosolMixture):
|
|
139
|
-
def __init__(self, Forg: float = 0.8, N: float = 400):
|
|
145
|
+
def __init__(self, water_molar_volume: float, Forg: float = 0.8, N: float = 400):
|
|
140
146
|
mode = {
|
|
141
147
|
"(NH4)2SO4": (1 - Forg),
|
|
142
148
|
"apinene_light": Forg,
|
|
@@ -166,7 +172,9 @@ class AerosolAlphaPineneLight(DryAerosolMixture):
|
|
|
166
172
|
self.modes = (
|
|
167
173
|
{
|
|
168
174
|
"f_org": 1 - self.f_soluble_volume(mode),
|
|
169
|
-
"kappa": self.kappa(
|
|
175
|
+
"kappa": self.kappa(
|
|
176
|
+
mass_fractions=mode, water_molar_volume=water_molar_volume
|
|
177
|
+
),
|
|
170
178
|
"nu_org": self.nu_org(mode),
|
|
171
179
|
"spectrum": spectra.Lognormal(
|
|
172
180
|
norm_factor=N / si.cm**3, m_mode=50.0 * si.nm, s_geom=1.75
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
box-model examples feat. analytic solution for breakup from
|
|
3
3
|
[Srivastava 1982 (JAS)](https://doi.org/10.1175/1520-0469(1982)039%3C1317:ASMOPC%3E2.0.CO;2)
|
|
4
4
|
"""
|
|
5
|
+
|
|
5
6
|
from .equations import Equations, EquationsHelpers
|
|
6
7
|
from .example import (
|
|
7
8
|
add_to_plot_simulation_results,
|
|
@@ -137,10 +137,10 @@ def get_breakup_coalescence_analytic_results(equations, settings, m0, x, x_log):
|
|
|
137
137
|
|
|
138
138
|
def get_analytic_results(equations, settings, mean_mass, mean_mass_ratio):
|
|
139
139
|
res = {}
|
|
140
|
-
res[
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
res[SimProducts.Computed.mean_drop_volume_total_volume_ratio.name] = (
|
|
141
|
+
compute_drop_volume_total_volume_ratio(
|
|
142
|
+
mean_volume=mean_mass / settings.rho, total_volume=settings.total_volume
|
|
143
|
+
)
|
|
144
144
|
)
|
|
145
145
|
res[SimProducts.PySDM.total_numer.name] = equations.M / mean_mass_ratio
|
|
146
146
|
return res
|