PySDM-examples 2.40__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.40 → PySDM-examples-2.41}/PKG-INFO +1 -1
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Alpert_and_Knopf_2016/__init__.py +1 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_and_Shima_2017/__init__.py +1 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2015/settings.py +1 -4
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/__init__.py +1 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/plots.py +5 -3
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bartman_et_al_2021/label.py +5 -5
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Berry_1967/__init__.py +1 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bieli_et_al_2022/__init__.py +1 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bolot_et_al_2013/__init__.py +1 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Ervens_and_Feingold_2012/__init__.py +1 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Ervens_and_Feingold_2012/settings.py +1 -3
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Kreidenweis_et_al_2003/settings.py +7 -5
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/aerosol_code.py +7 -7
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Merlivat_and_Nief_1967/__init__.py +1 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Niedermeier_et_al_2014/__init__.py +1 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Niedermeier_et_al_2014/simulation.py +5 -3
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Pierchala_et_al_2022/__init__.py +1 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/profile_plotter.py +5 -5
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/settings.py +6 -6
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Srivastava_1982/__init__.py +1 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Srivastava_1982/example.py +4 -4
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Srivastava_1982/simulation.py +3 -3
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/gui_viewer.py +9 -7
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/simulation.py +5 -5
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Van_Hook_1968/__init__.py +1 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/__init__.py +1 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/__init__.py +1 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/__init__.py +1 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/notebook_vars.py +1 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples.egg-info/PKG-INFO +1 -1
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples.egg-info/requires.txt +3 -1
- {PySDM-examples-2.40 → PySDM-examples-2.41}/setup.py +3 -3
- {PySDM-examples-2.40 → PySDM-examples-2.41}/MANIFEST.in +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/aerosol.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/data_from_ARG2000_paper.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/data_from_CloudMicrophysics_ARG.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/run_ARG_parcel.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Alpert_and_Knopf_2016/simulation.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Alpert_and_Knopf_2016/table.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Alpert_and_Knopf_2016/table_1.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Alpert_and_Knopf_2016/table_2.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_and_Shima_2017/example.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_and_Shima_2017/settings.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_and_Shima_2017/simulation.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2015/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2015/example.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2015/example_benchmark.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2015/spin_up.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/commons.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/curved_text.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/frozen_fraction.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/make_particulator.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/run_simulation.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bartman_2020_MasterThesis/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bartman_2020_MasterThesis/fig_4_adaptive_sdm.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bartman_2020_MasterThesis/fig_5_SCIPY_VS_ADAPTIVE.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bartman_et_al_2021/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Berry_1967/example.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Berry_1967/example_fig_6.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Berry_1967/settings.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Berry_1967/spectrum_plotter.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bieli_et_al_2022/settings.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bieli_et_al_2022/simulation.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bulenok_2023_MasterThesis/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bulenok_2023_MasterThesis/setups.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bulenok_2023_MasterThesis/utils.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Grabowski_and_Pawlowska_2023/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Grabowski_and_Pawlowska_2023/settings.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Grabowski_and_Pawlowska_2023/simulation.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Graf_et_al_2019/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Jaruga_and_Pawlowska_2018/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Kreidenweis_et_al_2003/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Kreidenweis_et_al_2003/simulation.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/aerosol.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/plot_helper.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/settings.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/simulation.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Morrison_and_Grabowski_2007/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Morrison_and_Grabowski_2007/common.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Morrison_and_Grabowski_2007/cumulus.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Morrison_and_Grabowski_2007/strato_cumulus.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Niedermeier_et_al_2014/settings.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Pierchala_et_al_2022/commons.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/settings.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/simulation.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/tutorial_settings.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/tutorial_simulation.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/error_measure.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/example.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/example_timing.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/settings.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/spectrum_plotter.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/tutorial_example.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/tutorial_plotter.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/tutorial_settings.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/mpdata_1d.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/plot.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/simulation.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Singer_Ward/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Singer_Ward/aerosol.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Srivastava_1982/equations.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Srivastava_1982/settings.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/fields.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/gui.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/gui_controller.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/gui_settings.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/make_default_product_collection.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/mpdata_2d.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/plots.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/sounding.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/storage.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Yang_et_al_2018/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Yang_et_al_2018/settings.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Yang_et_al_2018/simulation.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/plot_rates.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/settings1D.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/settings_0D.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/simulation1D.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/simulation_0D.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/simulation_ss.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/basic_simulation.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/dummy_controller.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/progbar_controller.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/read_vtk_1d.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/widgets/__init__.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/widgets/freezer.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/widgets/progbar_updater.py +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples.egg-info/SOURCES.txt +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples.egg-info/dependency_links.txt +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples.egg-info/top_level.txt +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/README.md +0 -0
- {PySDM-examples-2.40 → PySDM-examples-2.41}/pyproject.toml +0 -0
- {PySDM-examples-2.40 → 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
|
|
@@ -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.40 → 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.40 → 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
|
|
|
@@ -109,8 +109,8 @@ class AerosolBoreal(DryAerosolMixture):
|
|
|
109
109
|
def __init__(
|
|
110
110
|
self, water_molar_volume: float, Forg: float = 0.668, Acc_N2: float = 540
|
|
111
111
|
):
|
|
112
|
-
# TODO #
|
|
113
|
-
# TODO #
|
|
112
|
+
# TODO #1247: SOA1 or SOA2 unclear from the paper
|
|
113
|
+
# TODO #1247: CAN'T FIND WHERE NH4NO3 PROPERTIES ARE DEFINED IN ICPM
|
|
114
114
|
INORG_MASS_RATIO = 0.1515 / 0.1559
|
|
115
115
|
Aitken = {
|
|
116
116
|
"SOA1": Forg,
|
|
@@ -137,8 +137,8 @@ class AerosolBoreal(DryAerosolMixture):
|
|
|
137
137
|
* si.gram
|
|
138
138
|
/ si.mole,
|
|
139
139
|
"NH4NO3": Substance.from_formula("NH4NO3").mass * si.gram / si.mole,
|
|
140
|
-
"SOA1": 190 * si.g / si.mole, # TODO #
|
|
141
|
-
"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?
|
|
142
142
|
},
|
|
143
143
|
densities={
|
|
144
144
|
"SOA1": 1.2 * si.g / si.cm**3,
|
|
@@ -199,7 +199,7 @@ class AerosolNascent(DryAerosolMixture):
|
|
|
199
199
|
def __init__(
|
|
200
200
|
self, water_molar_volume: float, Acc_Forg: float = 0.3, Acc_N2: float = 30
|
|
201
201
|
):
|
|
202
|
-
# TODO #
|
|
202
|
+
# TODO #1247: CAN'T FIND WHEN PHI IS MULTIPLIED FOR KÖHLER B IN ICPM CODE
|
|
203
203
|
Ultrafine = {
|
|
204
204
|
"SOA1": 0.52,
|
|
205
205
|
"SOA2": 0,
|
|
@@ -217,8 +217,8 @@ class AerosolNascent(DryAerosolMixture):
|
|
|
217
217
|
"(NH4)2SO4": 3,
|
|
218
218
|
},
|
|
219
219
|
molar_masses={
|
|
220
|
-
"SOA1": 190 * si.g / si.mole, # TODO #
|
|
221
|
-
"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?
|
|
222
222
|
"(NH4)2SO4": Substance.from_formula("(NH4)2SO4").mass
|
|
223
223
|
* si.gram
|
|
224
224
|
/ si.mole,
|
{PySDM-examples-2.40 → 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.40 → 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
|
)
|
|
@@ -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
|
|
@@ -70,9 +70,9 @@ class Simulation:
|
|
|
70
70
|
if step != 0:
|
|
71
71
|
particulator.run(steps=1)
|
|
72
72
|
for prod in self.settings.prods:
|
|
73
|
-
self.simulation_res[n_sd][prod][seed][
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
self.simulation_res[n_sd][prod][seed][step] = (
|
|
74
|
+
particulator.products[prod].get()
|
|
75
|
+
)
|
|
76
76
|
|
|
77
77
|
np.testing.assert_allclose(
|
|
78
78
|
actual=self.simulation_res[n_sd][
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/gui_viewer.py
RENAMED
|
@@ -93,13 +93,15 @@ class GUIViewer:
|
|
|
93
93
|
self.spectrumPlots[key] = (
|
|
94
94
|
_SpectrumPlot(r_bins, self.settings.spectrum_per_mass_of_dry_air)
|
|
95
95
|
if key == "size"
|
|
96
|
-
else
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
else (
|
|
97
|
+
_TemperaturePlot(
|
|
98
|
+
self.settings.T_bins_edges, self.settings.formulae
|
|
99
|
+
)
|
|
100
|
+
if key == "temperature"
|
|
101
|
+
else _TerminalVelocityPlot(
|
|
102
|
+
self.settings.terminal_velocity_radius_bin_edges,
|
|
103
|
+
self.settings.formulae,
|
|
104
|
+
)
|
|
103
105
|
)
|
|
104
106
|
)
|
|
105
107
|
clear_output()
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/simulation.py
RENAMED
|
@@ -162,11 +162,11 @@ class Simulation:
|
|
|
162
162
|
)
|
|
163
163
|
|
|
164
164
|
if self.settings.freezing_singular:
|
|
165
|
-
attributes[
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
165
|
+
attributes["freezing temperature"] = (
|
|
166
|
+
formulae.freezing_temperature_spectrum.invcdf(
|
|
167
|
+
np.random.random(immersed_surface_area.size), # TODO #599: seed
|
|
168
|
+
immersed_surface_area,
|
|
169
|
+
)
|
|
170
170
|
)
|
|
171
171
|
else:
|
|
172
172
|
attributes["immersed surface area"] = immersed_surface_area
|
|
@@ -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
|
|
@@ -23,14 +23,14 @@ setup(
|
|
|
23
23
|
},
|
|
24
24
|
install_requires=[
|
|
25
25
|
"PySDM",
|
|
26
|
-
"PyMPDATA" + ">=1.0.15" if CI else "",
|
|
26
|
+
"PyMPDATA" + (">=1.0.15" if CI else ""),
|
|
27
27
|
"open-atmos-jupyter-utils",
|
|
28
28
|
"pystrict",
|
|
29
|
-
"matplotlib"
|
|
29
|
+
"matplotlib",
|
|
30
30
|
"joblib",
|
|
31
31
|
"ipywidgets",
|
|
32
32
|
"seaborn",
|
|
33
|
-
"
|
|
33
|
+
"numdifftools",
|
|
34
34
|
]
|
|
35
35
|
+ (["pyvinecopulib", "vtk"] if platform.architecture()[0] != "32bit" else []),
|
|
36
36
|
extras_require={
|
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/__init__.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/aerosol.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/run_ARG_parcel.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Alpert_and_Knopf_2016/simulation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_and_Shima_2017/settings.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_and_Shima_2017/simulation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2015/example_benchmark.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/frozen_fraction.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/make_particulator.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/run_simulation.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bartman_2020_MasterThesis/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bulenok_2023_MasterThesis/__init__.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bulenok_2023_MasterThesis/setups.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bulenok_2023_MasterThesis/utils.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Grabowski_and_Pawlowska_2023/__init__.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Grabowski_and_Pawlowska_2023/settings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Jaruga_and_Pawlowska_2018/__init__.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Kreidenweis_et_al_2003/__init__.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Kreidenweis_et_al_2003/simulation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Morrison_and_Grabowski_2007/__init__.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Morrison_and_Grabowski_2007/common.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Morrison_and_Grabowski_2007/cumulus.py
RENAMED
|
File without changes
|
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Niedermeier_et_al_2014/settings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/error_measure.py
RENAMED
|
File without changes
|
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/example_timing.py
RENAMED
|
File without changes
|
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/spectrum_plotter.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/tutorial_example.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/tutorial_plotter.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/tutorial_settings.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/__init__.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/mpdata_1d.py
RENAMED
|
File without changes
|
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/simulation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/gui_controller.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/gui_settings.py
RENAMED
|
File without changes
|
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/mpdata_2d.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/plot_rates.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/settings1D.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/settings_0D.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/simulation1D.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/simulation_0D.py
RENAMED
|
File without changes
|
{PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/simulation_ss.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|