PySDM-examples 3.0.0__tar.gz → 3.0.0rc2__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-3.0.0rc2/PKG-INFO +174 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Abade_and_Albuquerque_2024/settings.py +20 -14
- pysdm_examples-3.0.0rc2/PySDM_examples/Abade_and_Albuquerque_2024/simulation.py +94 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Abdul_Razzak_Ghan_2000/run_ARG_parcel.py +16 -25
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Alpert_and_Knopf_2016/simulation.py +14 -17
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Alpert_and_Knopf_2016/table_1.py +1 -1
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Alpert_and_Knopf_2016/table_2.py +1 -1
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Arabas_and_Shima_2017/__init__.py +0 -3
- pysdm_examples-3.0.0rc2/PySDM_examples/Arabas_and_Shima_2017/example.py +11 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Arabas_and_Shima_2017/simulation.py +34 -27
- pysdm_examples-3.0.0rc2/PySDM_examples/Arabas_et_al_2015/__init__.py +10 -0
- pysdm_examples-3.0.0rc2/PySDM_examples/Arabas_et_al_2015/example.py +28 -0
- pysdm_examples-3.0.0rc2/PySDM_examples/Arabas_et_al_2015/example_benchmark.py +70 -0
- {pysdm_examples-3.0.0/PySDM_examples/utils/kinematic_2d → pysdm_examples-3.0.0rc2/PySDM_examples/Arabas_et_al_2015}/settings.py +1 -1
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Arabas_et_al_2025/__init__.py +9 -4
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Arabas_et_al_2025/commons.py +0 -1
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Arabas_et_al_2025/make_particulator.py +11 -8
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Arabas_et_al_2025/plots.py +2 -2
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Arabas_et_al_2025/run_simulation.py +7 -8
- pysdm_examples-3.0.0rc2/PySDM_examples/Bartman_2020_MasterThesis/__init__.py +4 -0
- pysdm_examples-3.0.0rc2/PySDM_examples/Bartman_2020_MasterThesis/fig_4_adaptive_sdm.py +71 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox/condensation_adaptivity → pysdm_examples-3.0.0rc2/PySDM_examples/Bartman_2020_MasterThesis}/fig_5_SCIPY_VS_ADAPTIVE.py +2 -2
- {pysdm_examples-3.0.0/PySDM_examples/sandbox/condensation_adaptivity → pysdm_examples-3.0.0rc2/PySDM_examples/Bartman_et_al_2021}/__init__.py +6 -2
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Berry_1967/example.py +3 -3
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Berry_1967/spectrum_plotter.py +1 -1
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Bieli_et_al_2022/__init__.py +8 -8
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Bieli_et_al_2022/simulation.py +14 -19
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples}/Bolin_1958/__init__.py +8 -8
- pysdm_examples-3.0.0rc2/PySDM_examples/Bulenok_2023_MasterThesis/__init__.py +5 -0
- pysdm_examples-3.0.0rc2/PySDM_examples/Bulenok_2023_MasterThesis/performance_comparison_Srivastava_Setup.py +225 -0
- pysdm_examples-3.0.0rc2/PySDM_examples/Bulenok_2023_MasterThesis/setups.py +112 -0
- pysdm_examples-3.0.0rc2/PySDM_examples/Bulenok_2023_MasterThesis/utils.py +301 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Ervens_and_Feingold_2012/settings.py +1 -1
- pysdm_examples-3.0.0rc2/PySDM_examples/Grabowski_and_Pawlowska_2023/__init__.py +22 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Grabowski_and_Pawlowska_2023/settings.py +6 -11
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Grabowski_and_Pawlowska_2023/simulation.py +32 -31
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Jensen_and_Nugent_2017/__init__.py +0 -1
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Jensen_and_Nugent_2017/settings.py +1 -2
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Jensen_and_Nugent_2017/simulation.py +41 -40
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples}/Jouzel_and_Merlivat_1984/__init__.py +1 -0
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples}/Jouzel_and_Merlivat_1984/thermodynamic_profiles.py +1 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Kreidenweis_et_al_2003/__init__.py +0 -1
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Kreidenweis_et_al_2003/settings.py +8 -12
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Kreidenweis_et_al_2003/simulation.py +29 -27
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Lowe_et_al_2019/__init__.py +0 -1
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Lowe_et_al_2019/settings.py +5 -1
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Lowe_et_al_2019/simulation.py +19 -20
- {pysdm_examples-3.0.0/PySDM_examples/utils/kinematic_2d → pysdm_examples-3.0.0rc2/PySDM_examples/Morrison_and_Grabowski_2007}/strato_cumulus.py +1 -2
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Niedermeier_et_al_2014/simulation.py +17 -18
- {pysdm_examples-3.0.0/PySDM_examples/featured/pyrcel_docs_testcase → pysdm_examples-3.0.0rc2/PySDM_examples/Pyrcel}/__init__.py +0 -1
- {pysdm_examples-3.0.0/PySDM_examples/featured/pyrcel_docs_testcase → pysdm_examples-3.0.0rc2/PySDM_examples/Pyrcel}/settings.py +0 -1
- {pysdm_examples-3.0.0/PySDM_examples/featured/pyrcel_docs_testcase → pysdm_examples-3.0.0rc2/PySDM_examples/Pyrcel}/simulation.py +29 -43
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Rozanski_and_Sonntag_1982/__init__.py +1 -1
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Shima_et_al_2009/example.py +23 -19
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Shima_et_al_2009/example_timing.py +9 -15
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Shima_et_al_2009/spectrum_plotter.py +13 -6
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Shima_et_al_2009/tutorial_example.py +9 -18
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Shipway_and_Hill_2012/__init__.py +0 -1
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Shipway_and_Hill_2012/plot.py +1 -2
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Shipway_and_Hill_2012/settings.py +2 -3
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Shipway_and_Hill_2012/simulation.py +32 -36
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Spichtinger_et_al_2023/__init__.py +0 -4
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Spichtinger_et_al_2023/settings.py +1 -1
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Spichtinger_et_al_2023/simulation.py +26 -22
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Srivastava_1982/example.py +3 -6
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Srivastava_1982/simulation.py +8 -10
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Yang_et_al_2018/__init__.py +0 -1
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Yang_et_al_2018/settings.py +5 -3
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Yang_et_al_2018/simulation.py +23 -19
- {pysdm_examples-3.0.0/PySDM_examples/sandbox/isotopes → pysdm_examples-3.0.0rc2/PySDM_examples/Zaba_et_al}/__init__.py +0 -1
- {pysdm_examples-3.0.0/PySDM_examples/tutorials → pysdm_examples-3.0.0rc2/PySDM_examples/_HOWTOs}/__init__.py +0 -3
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/PySDM_examples/__init__.py +0 -3
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/deJong_Azimi/__init__.py +14 -14
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/deJong_Azimi/settings1D.py +1 -1
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/deJong_Azimi/simulation_0D.py +15 -21
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/deJong_Mackay_et_al_2023/__init__.py +28 -28
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/deJong_Mackay_et_al_2023/plot_rates.py +0 -1
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/deJong_Mackay_et_al_2023/settings1D.py +1 -3
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/deJong_Mackay_et_al_2023/simulation1D.py +4 -6
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/deJong_Mackay_et_al_2023/simulation_0D.py +45 -53
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/deJong_Mackay_et_al_2023/simulation_ss.py +2 -4
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/seeding/settings.py +1 -1
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/seeding/simulation.py +31 -39
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/PySDM_examples/utils/basic_simulation.py +3 -10
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/PySDM_examples/utils/kinematic_2d/__init__.py +1 -3
- pysdm_examples-3.0.0rc2/PySDM_examples/utils/kinematic_2d/gui.py +45 -0
- pysdm_examples-3.0.0rc2/PySDM_examples/utils/kinematic_2d/gui_controller.py +132 -0
- pysdm_examples-3.0.0rc2/PySDM_examples/utils/kinematic_2d/gui_settings.py +428 -0
- pysdm_examples-3.0.0rc2/PySDM_examples/utils/kinematic_2d/gui_viewer.py +355 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox/condensation_adaptivity → pysdm_examples-3.0.0rc2/PySDM_examples/utils/kinematic_2d}/plots.py +17 -1
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/PySDM_examples/utils/kinematic_2d/simulation.py +55 -52
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/PySDM_examples/utils/pvanim.py +4 -4
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/docs/pysdm_examples_landing.md +42 -32
- pysdm_examples-3.0.0rc2/pyproject.toml +7 -0
- pysdm_examples-3.0.0rc2/pysdm_examples.egg-info/PKG-INFO +174 -0
- pysdm_examples-3.0.0rc2/pysdm_examples.egg-info/SOURCES.txt +177 -0
- pysdm_examples-3.0.0rc2/pysdm_examples.egg-info/requires.txt +16 -0
- pysdm_examples-3.0.0rc2/setup.py +78 -0
- pysdm_examples-3.0.0/PKG-INFO +0 -170
- pysdm_examples-3.0.0/PySDM_examples/featured/Arabas_and_Shima_2017/example.py +0 -11
- pysdm_examples-3.0.0/PySDM_examples/featured/Grabowski_and_Pawlowska_2023/__init__.py +0 -23
- pysdm_examples-3.0.0/PySDM_examples/featured/Long_1974/__init__.py +0 -11
- pysdm_examples-3.0.0/PySDM_examples/featured/Long_1974/settings.py +0 -40
- pysdm_examples-3.0.0/PySDM_examples/featured/Long_1974/simulation.py +0 -44
- pysdm_examples-3.0.0/PySDM_examples/featured/Luettmer_et_al_2026/__init__.py +0 -25
- pysdm_examples-3.0.0/PySDM_examples/featured/Luettmer_et_al_2026/commons.py +0 -85
- pysdm_examples-3.0.0/PySDM_examples/featured/Luettmer_et_al_2026/plot.py +0 -549
- pysdm_examples-3.0.0/PySDM_examples/featured/Luettmer_et_al_2026/settings.py +0 -99
- pysdm_examples-3.0.0/PySDM_examples/featured/Luettmer_et_al_2026/simulation.py +0 -205
- pysdm_examples-3.0.0/PySDM_examples/featured/Ware_et_al_2025/__init__.py +0 -22
- pysdm_examples-3.0.0/PySDM_examples/featured/Ware_et_al_2025/example.py +0 -253
- pysdm_examples-3.0.0/PySDM_examples/misc/Matsushima_et_al_2023/__init__.py +0 -7
- pysdm_examples-3.0.0/PySDM_examples/misc/Murray_et_al_2010/__init__.py +0 -9
- pysdm_examples-3.0.0/PySDM_examples/misc/Murray_et_al_2010/simulation.py +0 -173
- pysdm_examples-3.0.0/PySDM_examples/misc/Toon_et_al_1980/__init__.py +0 -7
- pysdm_examples-3.0.0/PySDM_examples/sandbox/Abade_and_Albuquerque_2024/simulation.py +0 -117
- pysdm_examples-3.0.0/PySDM_examples/sandbox/Arabas_and_Pawlowska_2011/__init__.py +0 -14
- pysdm_examples-3.0.0/PySDM_examples/sandbox/Arabas_and_Pawlowska_2011/settings.py +0 -66
- pysdm_examples-3.0.0/PySDM_examples/sandbox/Arabas_and_Pawlowska_2011/simulation.py +0 -151
- pysdm_examples-3.0.0/PySDM_examples/sandbox/Spichtinger_et_al_2023/data/__init__.py +0 -0
- pysdm_examples-3.0.0/PySDM_examples/sandbox/Steinke_et_al_2011/__init__.py +0 -6
- pysdm_examples-3.0.0/PySDM_examples/sandbox/__init__.py +0 -0
- pysdm_examples-3.0.0/PySDM_examples/sandbox/copulae/__init__.py +0 -6
- pysdm_examples-3.0.0/PySDM_examples/tutorials/README.md +0 -29
- pysdm_examples-3.0.0/PySDM_examples/tutorials/collisions/__init__.py +0 -4
- pysdm_examples-3.0.0/PySDM_examples/tutorials/collisions/collection_droplet.svg +0 -169
- pysdm_examples-3.0.0/PySDM_examples/tutorials/condensation/__init__.py +0 -4
- pysdm_examples-3.0.0/PySDM_examples/tutorials/condensation/kohler_curve.svg +0 -242
- pysdm_examples-3.0.0/PySDM_examples/tutorials/wikipedia/__init__.py +0 -4
- pysdm_examples-3.0.0/pyproject.toml +0 -61
- pysdm_examples-3.0.0/pysdm_examples.egg-info/PKG-INFO +0 -170
- pysdm_examples-3.0.0/pysdm_examples.egg-info/SOURCES.txt +0 -193
- pysdm_examples-3.0.0/pysdm_examples.egg-info/requires.txt +0 -32
- pysdm_examples-3.0.0/pysdm_examples.egg-info/scm_file_list.json +0 -288
- pysdm_examples-3.0.0/pysdm_examples.egg-info/scm_version.json +0 -8
- pysdm_examples-3.0.0/setup.py +0 -21
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/MANIFEST.in +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Abade_and_Albuquerque_2024/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Abdul_Razzak_Ghan_2000/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Abdul_Razzak_Ghan_2000/aerosol.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Abdul_Razzak_Ghan_2000/data_from_ARG2000_paper.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Abdul_Razzak_Ghan_2000/data_from_CloudMicrophysics_ARG.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Alpert_and_Knopf_2016/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Alpert_and_Knopf_2016/table.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Arabas_and_Shima_2017/settings.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/utils/kinematic_2d → pysdm_examples-3.0.0rc2/PySDM_examples/Arabas_et_al_2015}/spin_up.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Arabas_et_al_2025/curved_text.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Arabas_et_al_2025/frozen_fraction.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox/condensation_adaptivity → pysdm_examples-3.0.0rc2/PySDM_examples/Bartman_et_al_2021}/label.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Berry_1967/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Berry_1967/example_fig_6.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Berry_1967/settings.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Bieli_et_al_2022/settings.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples}/Bolot_et_al_2013/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Ervens_and_Feingold_2012/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Fisher_1991/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples}/Gedzelman_and_Arnold_1994/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples}/Gonfiantini_1986/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Graf_et_al_2019/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Jaruga_and_Pawlowska_2018/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Jensen_and_Nugent_2017/plotting.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Jensen_and_Nugent_2017/table_3.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples}/Kinzer_And_Gunn_1951/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples}/Kinzer_And_Gunn_1951/table_1_and_2.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples}/Lamb_et_al_2017/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Lowe_et_al_2019/aerosol.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Lowe_et_al_2019/aerosol_code.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Lowe_et_al_2019/constants_def.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Lowe_et_al_2019/plot_helper.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples}/Merlivat_and_Nief_1967/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples}/Miyake_et_al_1968/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples}/Morrison_and_Grabowski_2007/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/utils/kinematic_2d → pysdm_examples-3.0.0rc2/PySDM_examples/Morrison_and_Grabowski_2007}/common.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Niedermeier_et_al_2014/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Niedermeier_et_al_2014/settings.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Pierchala_et_al_2022/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Pierchala_et_al_2022/commons.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples}/Pruppacher_and_Rasmussen_1979/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured/pyrcel_docs_testcase → pysdm_examples-3.0.0rc2/PySDM_examples/Pyrcel}/profile_plotter.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples}/Rogers_1975/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Rozanski_and_Sonntag_1982/multibox.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Shima_et_al_2009/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Shima_et_al_2009/error_measure.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Shima_et_al_2009/settings.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Shima_et_al_2009/tutorial_plotter.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Shima_et_al_2009/tutorial_settings.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Shipway_and_Hill_2012/mpdata_1d.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Singer_Ward/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Singer_Ward/aerosol.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples/Spichtinger_et_al_2023/data}/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Spichtinger_et_al_2023/data/reference_bulk.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/Spichtinger_et_al_2023/data/simulation_data.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Srivastava_1982/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Srivastava_1982/equations.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/Srivastava_1982/settings.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples}/Stewart_1975/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples/Toon_et_al_1980}/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/misc → pysdm_examples-3.0.0rc2/PySDM_examples}/Van_Hook_1968/__init__.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/deJong_Azimi/cloudy_data.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/deJong_Azimi/cloudy_data_0d.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/featured → pysdm_examples-3.0.0rc2/PySDM_examples}/deJong_Mackay_et_al_2023/settings_0D.py +0 -0
- {pysdm_examples-3.0.0/PySDM_examples/sandbox → pysdm_examples-3.0.0rc2/PySDM_examples}/seeding/__init__.py +0 -0
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/PySDM_examples/utils/__init__.py +0 -0
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/PySDM_examples/utils/dummy_controller.py +0 -0
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/PySDM_examples/utils/kinematic_2d/fields.py +0 -0
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/PySDM_examples/utils/kinematic_2d/make_default_product_collection.py +0 -0
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/PySDM_examples/utils/kinematic_2d/mpdata_2d.py +0 -0
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/PySDM_examples/utils/kinematic_2d/storage.py +0 -0
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/PySDM_examples/utils/progbar_controller.py +0 -0
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/PySDM_examples/utils/read_vtk_1d.py +0 -0
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/PySDM_examples/utils/widgets/__init__.py +0 -0
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/PySDM_examples/utils/widgets/freezer.py +0 -0
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/PySDM_examples/utils/widgets/progbar_updater.py +0 -0
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/README.md +0 -0
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/pysdm_examples.egg-info/dependency_links.txt +0 -0
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/pysdm_examples.egg-info/top_level.txt +0 -0
- {pysdm_examples-3.0.0 → pysdm_examples-3.0.0rc2}/setup.cfg +0 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pysdm-examples
|
|
3
|
+
Version: 3.0.0rc2
|
|
4
|
+
Summary: PySDM usage examples reproducing results from literature and depicting how to use PySDM from Python Jupyter notebooks
|
|
5
|
+
Home-page: https://github.com/open-atmos/PySDM
|
|
6
|
+
Author: https://github.com/open-atmos/PySDM/graphs/contributors
|
|
7
|
+
Author-email: sylwester.arabas@agh.edu.pl
|
|
8
|
+
License: GPL-3.0
|
|
9
|
+
Project-URL: Tracker, https://github.com/open-atmos/PySDM/issues
|
|
10
|
+
Project-URL: Documentation, https://open-atmos.github.io/PySDM/PySDM_examples
|
|
11
|
+
Project-URL: Source, https://github.com/open-atmos/PySDM/tree/main/examples
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
Requires-Dist: PySDM
|
|
14
|
+
Requires-Dist: PyMPDATA
|
|
15
|
+
Requires-Dist: open-atmos-jupyter-utils
|
|
16
|
+
Requires-Dist: pystrict
|
|
17
|
+
Requires-Dist: matplotlib
|
|
18
|
+
Requires-Dist: Pillow
|
|
19
|
+
Requires-Dist: joblib
|
|
20
|
+
Requires-Dist: ipywidgets
|
|
21
|
+
Requires-Dist: seaborn
|
|
22
|
+
Requires-Dist: numdifftools
|
|
23
|
+
Requires-Dist: vtk
|
|
24
|
+
Requires-Dist: pyvinecopulib>=0.7.3
|
|
25
|
+
Provides-Extra: tests
|
|
26
|
+
Requires-Dist: pytest; extra == "tests"
|
|
27
|
+
Requires-Dist: nbconvert; extra == "tests"
|
|
28
|
+
Dynamic: author
|
|
29
|
+
Dynamic: author-email
|
|
30
|
+
Dynamic: description
|
|
31
|
+
Dynamic: description-content-type
|
|
32
|
+
Dynamic: home-page
|
|
33
|
+
Dynamic: license
|
|
34
|
+
Dynamic: project-url
|
|
35
|
+
Dynamic: provides-extra
|
|
36
|
+
Dynamic: requires-dist
|
|
37
|
+
Dynamic: summary
|
|
38
|
+
|
|
39
|
+
# Introduction
|
|
40
|
+
|
|
41
|
+
<img align="left" src="https://raw.githubusercontent.com/open-atmos/PySDM/main/docs/logos/pysdm_logo.svg" width=150 height=219 alt="pysdm logo" style="padding-right:1em">
|
|
42
|
+
|
|
43
|
+
PySDM examples are engineered as Jupyter Python notebooks supported by auxiliary Python commons
|
|
44
|
+
that constitute a separate <mark>PySDM-examples</mark> Python package which is also
|
|
45
|
+
<a href="https://pypi.org/p/PySDM-examples">available at PyPI</a>.
|
|
46
|
+
The examples have additional dependencies listed in
|
|
47
|
+
<a href="https://github.com/open-atmos/PySDM/blob/main/examples/setup.py">PySDM-examples package setup.py file</a>.
|
|
48
|
+
Running the example Jupyter notebooks requires the <mark>PySDM-examples</mark> package to be pip-installed.
|
|
49
|
+
For installation instructions see [project docs homepage](https://open-atmos.github.io/PySDM).
|
|
50
|
+
Note that the Jupyter notebooks themselves are not included in the package wheels, but are included
|
|
51
|
+
in the source .tar.gz file on PyPI, and are conveninently browsable on GitHub.
|
|
52
|
+
All notebooks feature header cells with badges enabling single-click execution on
|
|
53
|
+
<a href="https://colab.research.google.com/">Google Colab</a> and on
|
|
54
|
+
<a href="https://mybinder.org/">mybinder.org</a>.
|
|
55
|
+
The examples package is also used in the PySDM test suite.
|
|
56
|
+
|
|
57
|
+
# Example gallery
|
|
58
|
+
|
|
59
|
+
The examples are named referring to the journal paper they aim to reproduce simulations from
|
|
60
|
+
(or sometimes just where the inspiration originated from).
|
|
61
|
+
The list below groups all examples by the dimensionality and type of the employed modelling framework
|
|
62
|
+
("environment" in PySDM nomenclature, which can be: <mark>box</mark>, <mark>parcel</mark>,
|
|
63
|
+
<mark>single-column</mark>, <mark>2D prescribed flow</mark>), and by the set of physical processes simulated
|
|
64
|
+
(<mark>condensation</mark>, collisional <mark>coagulation</mark> and <mark>breakup</mark>,
|
|
65
|
+
<mark>drop freezing</mark>, <mark>isotopic fractionation</mark>, <mark>aqueous chemistry</mark>,
|
|
66
|
+
<mark>seeding</mark>, ...).
|
|
67
|
+
|
|
68
|
+
## 2D kinematic environment (prescribed-flow) mimicking Sc deck
|
|
69
|
+
|
|
70
|
+
The 2D prescribed-flow framework used here can be traced back to the work of
|
|
71
|
+
<a href="https://doi.org/10.1007/978-1-935704-36-2_1">Kessler 1969 (section 3C)</a>.
|
|
72
|
+
The setup employed in PySDM-examples, which mimics a stratiform cloud deck and features periodic horizontal boundary condition
|
|
73
|
+
and vanishing flow at vertical boundaries, was introduced in <a href="https://doi.org/10.1175/JAS3980">Morrison and Grabowski (2007)</a>
|
|
74
|
+
and later adopted for particle-based simulations in <a href="https://doi.org/10.5194/gmd-8-1677-2015">Arabas et al. (2015)</a>.
|
|
75
|
+
It uses a non-devergent single-eddy flow field resulting in an updraft-downdraft pair in the domain.
|
|
76
|
+
The flow field advects two scalar fields in an Eulerian way: water vapour mixing ratio
|
|
77
|
+
and dry-air potential temperature.
|
|
78
|
+
In PySDM-examples, the Eulerian advection is handled using the <a href="https://doi.org/10.21105/joss.03896">PyMPDATA</a> Numba-based
|
|
79
|
+
implementation of the <a href="https://doi.org/10.1002/fld.1071">MPDATA numerical scheme of Smolarkiewicz (e.g., 2006)</a>.
|
|
80
|
+
An animation depicting PySDM simulation capturing <mark>aerosol collisional processing</mark> by warm rain is shown below
|
|
81
|
+
(<a href="https://github.com/open-atmos/PySDM/blob/main/examples/PySDM_examples/_HOWTOs/paraview_hello_world.ipynb">see
|
|
82
|
+
the Paraview hello-world HOWTO Jupyter notbook for code generating the simulation and visualisation</a>):
|
|
83
|
+
<center>
|
|
84
|
+
<img src="https://github.com/open-atmos/PySDM/releases/download/tip/docs_intro_animation_ubuntu-24.04.gif" style="width:80%" />
|
|
85
|
+
</center>
|
|
86
|
+
|
|
87
|
+
Example notebooks:
|
|
88
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Arabas_et_al_2015.html">Arabas_et_al_2015</a>
|
|
89
|
+
- in-notebook GUI for setting up, running and interactively visualising the 2D kinematic simulations (with an option to export raw data to <mark>VTK</mark> and <mark>netCDF</mark> files, as well as to save plots to SVG or PDF):
|
|
90
|
+
- "hello world" notebook depicting how to automate using Python the process of loading data and creating animations in <mark>Paraview</mark>
|
|
91
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Arabas_et_al_2025.html">Arabas_et_al_2025</a>: adaptation of the 2D kinematic setup for studying <mark>glaciation</mark> of the cloud deck by <mark>immersion freezing</mark>
|
|
92
|
+
|
|
93
|
+
## 1D kinematic environment (prescribed-flow, single-column)
|
|
94
|
+
|
|
95
|
+
The single-column PySDM environment is a reimplementation of the <mark>Met Office KiD framework</mark>
|
|
96
|
+
introduced in <a href="https://doi.org/10.1002/qj.1913">Shipway & Hill 2012</a>.
|
|
97
|
+
The framework features a single Eulerian-transported field of water vapour mixing ratio
|
|
98
|
+
(vertical profile of potential temperature is fixed).
|
|
99
|
+
As in the 2D kinematic framework above, the Eulerian advection is handled by
|
|
100
|
+
<a href="https://open-atmos.github.io/PyMPDATA/">PyMPDATA</a>.
|
|
101
|
+
|
|
102
|
+
Example notebooks:
|
|
103
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Shipway_and_Hill_2012.html">Shipway_and_Hill_2012</a>: reproducing figures from the <a href="https://doi.org/10.1002/qj.1913">Shipway & Hill 2012</a> paper;
|
|
104
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/deJong_Mackay_et_al_2023.html">deJong_Mackay_et_al_2023</a>: reproducing figures from the <a href="https://doi.org/10.5194/gmd-16-4193-2023">de Jong et al. 2023</a> paper where the single-column
|
|
105
|
+
framework was used to exemplify operation of the <mark>Monte-Carlo collisional breakup scheme</mark> in PySDM (scheme introduced in that paper).
|
|
106
|
+
|
|
107
|
+
## OD/1D iterative parcel/column environment mimicking removal of precipitation
|
|
108
|
+
|
|
109
|
+
This framework uses a parcel model with removal of precipitation for analysis,
|
|
110
|
+
iterative equilibration, the isotopic composition of the water vapour and
|
|
111
|
+
rain water in a column of air (no Eulerian transport, only iterative passage of a parcel through the column).
|
|
112
|
+
|
|
113
|
+
<a href="https://open-atmos.github.io/PySDM/PySDM_examples/Rozanski_and_Sonntag_1982.html">Rozanski_and_Sonntag_1982</a>: bulk microphysics example (i.e. single super droplet) with
|
|
114
|
+
deuterium and heavy-oxygen <mark>water isotopologues</mark> featured.
|
|
115
|
+
|
|
116
|
+
## 0D parcel environment
|
|
117
|
+
|
|
118
|
+
The parcel framework implemented in PySDM uses a hydrostatic profile and adiabatic mass and energy conservation
|
|
119
|
+
to drive evolution of thermodynamic state and microphysical properties of particles.
|
|
120
|
+
|
|
121
|
+
Example notebooks include:
|
|
122
|
+
- condensation only
|
|
123
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Arabas_and_Shima_2017.html">Arabas_and_Shima_2017</a>: monodisperse particle spectrum, activation/deactivation cycle
|
|
124
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Yang_et_al_2018.html">Yang_et_al_2018</a>: polydisperse particle spectrum, activation/deactivation cycles
|
|
125
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Abdul_Razzak_Ghan_2000.html">Abdul_Razzak_Ghan_2000</a>: polydisperse activation, comparison against <mark>GCM parameterisation</mark>
|
|
126
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Pyrcel.html">Pyrcel</a>: polydisperse activation, mimicking example test case from <mark>Pyrcel</mark> documentation
|
|
127
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Lowe_et_al_2019.html">Lowe_et_al_2019</a>: externally mixed polydisperse size spectrum with <mark>surface-active organics</mark> case
|
|
128
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Grabowski_and_Pawlowska_2023.html">Grabowski_and_Pawlowska_2023</a>: polydisperse activation, focus on <mark>ripening</mark>
|
|
129
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Jensen_and_Nugent_2017.html">Jensen_and_Nugent_2017</a>: polydisperse activation featuring <mark>giant CCN</mark>
|
|
130
|
+
- condensation and aqueous-chemistry
|
|
131
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Kreidenweis_et_al_2003.html">Kreidenweis_et_al_2003</a>: <mark>Hoppel gap</mark> simulation setup (i.e. depiction of evolution of aerosol mass spectrum from a monomodal to bimodal due to aqueous‐phase SO2 oxidation)
|
|
132
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Jaruga_and_Pawlowska_2018.html">Jaruga_and_Pawlowska_2018</a>: exploration of numerical convergence using the above Hoppel-gap simulation setup
|
|
133
|
+
- freezing
|
|
134
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Spichtinger_et_al_2023.html">Spichtinger_et_al_2023</a>: <mark>homogeneous freezing</mark> and ice growth (<mark>Wegener-Bergeron-Findeisen process</mark>)
|
|
135
|
+
|
|
136
|
+
The parcel environment is also featured in the <a href="https://open-atmos.github.io/PySDM/PySDM.html#tutorials">PySDM tutorials</a>.
|
|
137
|
+
|
|
138
|
+
## 0D box environment
|
|
139
|
+
|
|
140
|
+
The box environment is void of any spatial or thermodynamic context, it constitutes the most basic framework.
|
|
141
|
+
|
|
142
|
+
Example notebooks include:
|
|
143
|
+
|
|
144
|
+
- coalescence only:
|
|
145
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Shima_et_al_2009.html">Shima_et_al_2009</a>: using <mark>Golovin additive kernel</mark> for comparison against analytic solution, featuring interactive in-notebook interface for selecting simulation parameters
|
|
146
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Berry_1967.html">Berry_1967</a>: examples using geometric, hydrodynamic and electric-field collision kernels
|
|
147
|
+
- coalescence and breakup:
|
|
148
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Bieli_et_al_2022.html">Bieli_et_al_2022</a>: evolution of moments under collisional growth and breakage
|
|
149
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/deJong_Mackay_et_al_2023.html">deJong_Mackay_et_al_2023</a>: validation of the breakup scheme against analytical solutions from <a href="https://doi.org/10.1175/1520-0469(1982)039%3C1317:ASMOPC%3E2.0.CO;2">Srivastava 1982</a>
|
|
150
|
+
- immersion freezing only:
|
|
151
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Alpert_and_Knopf_2016.html">Alpert_and_Knopf_2016</a>: stochastic immersion freezing with monodisperse vs. lognormal immersed surface areas
|
|
152
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Arabas_et_al_2025.html">Arabas_et_al_2025</a>: comparison of time-dependent and singular immersion freezing schemes
|
|
153
|
+
|
|
154
|
+
The box environment is also featured in the <a href="https://open-atmos.github.io/PySDM/PySDM.html#tutorials">PySDM tutorials</a>.
|
|
155
|
+
|
|
156
|
+
## examples depicting isotope-related formulae (without any simulation context)
|
|
157
|
+
- <mark>equilibrium isotopic fractionation</mark> formulae:
|
|
158
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Lamb_et_al_2017.html">Lamb_et_al_2017</a>
|
|
159
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Bolot_et_al_2013.html">Bolot_et_al_2013</a>
|
|
160
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Merlivat_and_Nief_1967.html">Merlivat_and_Nief_1967</a>
|
|
161
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Van_Hook_1968.html">Van_Hook_1968</a>
|
|
162
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Graf_et_al_2019.html">Graf_et_al_2019</a>
|
|
163
|
+
- <mark>Rayleigh fractionation</mark>:
|
|
164
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Pierchala_et_al_2022.html">Pierchala_et_al_2022</a>: reproducing model plots for a <mark>triple-isotope</mark> lab study, including <mark>kinetic fractionation</mark>
|
|
165
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Gonfiantini_1986.html">Gonfiantini_1986</a>: flat-surface evaporation at different humidities for D and <sup>18</sup>O
|
|
166
|
+
- isotopic relaxation timescale:
|
|
167
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Miyake_et_al_1968.html">Miyake_et_al_1968</a>: incl. comparison of different <mark>ventilation</mark> parameterisations
|
|
168
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Bolin_1958.html">Bolin_1958</a>
|
|
169
|
+
- below-cloud <mark>kinetic fractionation</mark>:
|
|
170
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Gedzelman_and_Arnold_1994.html">Gedzelman_and_Arnold_1994</a>
|
|
171
|
+
|
|
172
|
+
## examples depicting extraterrestrial clouds (formulae-only, no simulations yet)
|
|
173
|
+
- Titan (methane clouds):
|
|
174
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Toon_et_al_1980.html">Toon_et_al_1980</a>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from pystrict import strict
|
|
2
2
|
|
|
3
|
-
from PySDM
|
|
3
|
+
from PySDM import Formulae
|
|
4
4
|
from PySDM.physics import si
|
|
5
5
|
from PySDM.initialisation.spectra import Lognormal
|
|
6
6
|
|
|
@@ -10,42 +10,48 @@ class Settings:
|
|
|
10
10
|
def __init__(
|
|
11
11
|
self,
|
|
12
12
|
*,
|
|
13
|
-
backend: CPU,
|
|
14
13
|
n_sd: int,
|
|
15
14
|
timestep: float,
|
|
16
|
-
# default values correspond to paper settings
|
|
17
|
-
singular: bool = True,
|
|
18
15
|
enable_immersion_freezing: bool = True,
|
|
19
16
|
enable_vapour_deposition_on_ice: bool = True,
|
|
20
17
|
inp_frac: float = 0.1,
|
|
21
|
-
kappa: float = 0.6,
|
|
22
|
-
updraft: float = 0.5 * si.m / si.s,
|
|
23
18
|
):
|
|
24
|
-
self.backend = backend
|
|
25
19
|
self.n_sd = n_sd
|
|
26
20
|
self.timestep = timestep
|
|
27
21
|
self.enable_immersion_freezing = enable_immersion_freezing
|
|
28
22
|
self.enable_vapour_deposition_on_ice = enable_vapour_deposition_on_ice
|
|
29
|
-
|
|
23
|
+
|
|
30
24
|
self.initial_total_pressure = 1000 * si.hPa # note: not given in the paper
|
|
31
25
|
|
|
26
|
+
# parameters from the paper
|
|
27
|
+
self.formulae = Formulae(
|
|
28
|
+
constants={
|
|
29
|
+
"bulk_phase_partitioning_exponent": 0.1,
|
|
30
|
+
"NIEMAND_A": -0.517,
|
|
31
|
+
"NIEMAND_B": 8.934,
|
|
32
|
+
},
|
|
33
|
+
bulk_phase_partitioning="KaulEtAl2015",
|
|
34
|
+
particle_shape_and_density="MixedPhaseSpheres",
|
|
35
|
+
diffusion_coordinate="WaterMassLogarithm",
|
|
36
|
+
freezing_temperature_spectrum="Niemand_et_al_2012",
|
|
37
|
+
)
|
|
32
38
|
self.initial_water_vapour_mixing_ratio = 1.5 * si.g / si.kg
|
|
33
39
|
self.parcel_linear_extent = 100 * si.m
|
|
34
|
-
self.updraft =
|
|
40
|
+
self.updraft = 0.5 * si.m / si.s
|
|
35
41
|
self.freezing_inp_frac = inp_frac
|
|
36
42
|
self.freezing_inp_dry_radius = 0.5 * si.um
|
|
37
43
|
|
|
38
|
-
thd_0 =
|
|
44
|
+
thd_0 = self.formulae.state_variable_triplet.th_dry(
|
|
39
45
|
th_std=269 * si.K,
|
|
40
46
|
water_vapour_mixing_ratio=self.initial_water_vapour_mixing_ratio,
|
|
41
47
|
)
|
|
42
|
-
rhod_0 =
|
|
48
|
+
rhod_0 = self.formulae.state_variable_triplet.rho_d(
|
|
43
49
|
p=self.initial_total_pressure,
|
|
44
50
|
water_vapour_mixing_ratio=self.initial_water_vapour_mixing_ratio,
|
|
45
51
|
theta_std=thd_0,
|
|
46
52
|
)
|
|
47
53
|
|
|
48
|
-
self.mass_of_dry_air = rhod_0 *
|
|
54
|
+
self.mass_of_dry_air = rhod_0 * self.formulae.trivia.volume(
|
|
49
55
|
radius=self.parcel_linear_extent
|
|
50
56
|
)
|
|
51
57
|
self.soluble_aerosol = Lognormal(
|
|
@@ -55,7 +61,7 @@ class Settings:
|
|
|
55
61
|
m_mode=75 * si.nm,
|
|
56
62
|
s_geom=1.6,
|
|
57
63
|
)
|
|
58
|
-
self.kappa =
|
|
59
|
-
self.initial_temperature =
|
|
64
|
+
self.kappa = 0.6
|
|
65
|
+
self.initial_temperature = self.formulae.state_variable_triplet.T(
|
|
60
66
|
rhod=rhod_0, thd=thd_0
|
|
61
67
|
)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
|
|
3
|
+
from PySDM_examples.utils import BasicSimulation
|
|
4
|
+
|
|
5
|
+
from PySDM import Builder
|
|
6
|
+
from PySDM.backends import CPU
|
|
7
|
+
from PySDM.dynamics import (
|
|
8
|
+
Condensation,
|
|
9
|
+
AmbientThermodynamics,
|
|
10
|
+
VapourDepositionOnIce,
|
|
11
|
+
Freezing,
|
|
12
|
+
)
|
|
13
|
+
from PySDM.initialisation.sampling.spectral_sampling import ConstantMultiplicity
|
|
14
|
+
from PySDM.products import (
|
|
15
|
+
AmbientTemperature,
|
|
16
|
+
AmbientWaterVapourMixingRatio,
|
|
17
|
+
ParcelDisplacement,
|
|
18
|
+
WaterMixingRatio,
|
|
19
|
+
SpecificIceWaterContent,
|
|
20
|
+
)
|
|
21
|
+
from PySDM.environments import Parcel
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Simulation(BasicSimulation):
|
|
25
|
+
def __init__(self, settings):
|
|
26
|
+
builder = Builder(
|
|
27
|
+
backend=CPU(settings.formulae, override_jit_flags={"parallel": False}),
|
|
28
|
+
n_sd=settings.n_sd,
|
|
29
|
+
environment=Parcel(
|
|
30
|
+
dt=settings.timestep,
|
|
31
|
+
mass_of_dry_air=settings.mass_of_dry_air,
|
|
32
|
+
p0=settings.initial_total_pressure,
|
|
33
|
+
initial_water_vapour_mixing_ratio=settings.initial_water_vapour_mixing_ratio,
|
|
34
|
+
T0=settings.initial_temperature,
|
|
35
|
+
w=settings.updraft,
|
|
36
|
+
mixed_phase=True,
|
|
37
|
+
),
|
|
38
|
+
)
|
|
39
|
+
builder.add_dynamic(AmbientThermodynamics())
|
|
40
|
+
builder.add_dynamic(Condensation())
|
|
41
|
+
|
|
42
|
+
if settings.enable_immersion_freezing:
|
|
43
|
+
builder.add_dynamic(Freezing(immersion_freezing="singular"))
|
|
44
|
+
if settings.enable_vapour_deposition_on_ice:
|
|
45
|
+
builder.add_dynamic(VapourDepositionOnIce())
|
|
46
|
+
|
|
47
|
+
r_dry, n_in_dv = ConstantMultiplicity(settings.soluble_aerosol).sample(
|
|
48
|
+
n_sd=settings.n_sd
|
|
49
|
+
)
|
|
50
|
+
attributes = builder.particulator.environment.init_attributes(
|
|
51
|
+
n_in_dv=n_in_dv, kappa=settings.kappa, r_dry=r_dry
|
|
52
|
+
)
|
|
53
|
+
attributes["signed water mass"] = (
|
|
54
|
+
builder.particulator.formulae.particle_shape_and_density.volume_to_mass(
|
|
55
|
+
attributes["volume"]
|
|
56
|
+
)
|
|
57
|
+
)
|
|
58
|
+
del attributes["volume"]
|
|
59
|
+
|
|
60
|
+
if settings.enable_immersion_freezing:
|
|
61
|
+
trivia = builder.particulator.formulae.trivia
|
|
62
|
+
n_inp = int(settings.n_sd * settings.freezing_inp_frac)
|
|
63
|
+
|
|
64
|
+
rng = np.random.default_rng(seed=builder.particulator.formulae.seed)
|
|
65
|
+
|
|
66
|
+
attributes["freezing temperature"] = rng.permutation(
|
|
67
|
+
np.pad(
|
|
68
|
+
builder.particulator.formulae.freezing_temperature_spectrum.invcdf(
|
|
69
|
+
cdf=rng.uniform(low=0, high=1, size=n_inp),
|
|
70
|
+
A_insol=trivia.sphere_surface(
|
|
71
|
+
diameter=2 * settings.freezing_inp_dry_radius
|
|
72
|
+
),
|
|
73
|
+
),
|
|
74
|
+
(0, settings.n_sd - n_inp),
|
|
75
|
+
mode="constant",
|
|
76
|
+
constant_values=(trivia.C2K(-38)),
|
|
77
|
+
)
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
self.products = (
|
|
81
|
+
WaterMixingRatio(name="water", radius_range=(0, np.inf)),
|
|
82
|
+
SpecificIceWaterContent(name="ice"),
|
|
83
|
+
ParcelDisplacement(name="height"),
|
|
84
|
+
AmbientTemperature(name="T"),
|
|
85
|
+
AmbientWaterVapourMixingRatio(
|
|
86
|
+
name="vapour", var="water_vapour_mixing_ratio"
|
|
87
|
+
),
|
|
88
|
+
)
|
|
89
|
+
super().__init__(
|
|
90
|
+
particulator=builder.build(attributes=attributes, products=self.products)
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
def run(self, *, nt, steps_per_output_interval):
|
|
94
|
+
return self._run(nt=nt, steps_per_output_interval=steps_per_output_interval)
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
from collections import namedtuple
|
|
2
2
|
|
|
3
3
|
import numpy as np
|
|
4
|
-
from PySDM_examples.
|
|
5
|
-
CONSTANTS_ARG,
|
|
6
|
-
AerosolARG,
|
|
7
|
-
)
|
|
4
|
+
from PySDM_examples.Abdul_Razzak_Ghan_2000.aerosol import CONSTANTS_ARG, AerosolARG
|
|
8
5
|
|
|
9
|
-
from PySDM import
|
|
6
|
+
from PySDM import Builder, Formulae
|
|
10
7
|
from PySDM import products as PySDM_products
|
|
11
8
|
from PySDM.backends import CPU
|
|
12
9
|
from PySDM.dynamics import AmbientThermodynamics, Condensation
|
|
@@ -22,7 +19,6 @@ def run_parcel(
|
|
|
22
19
|
N2,
|
|
23
20
|
rad2,
|
|
24
21
|
n_sd_per_mode,
|
|
25
|
-
*,
|
|
26
22
|
RH0=1.0,
|
|
27
23
|
T0=294 * si.K,
|
|
28
24
|
p0=1e5 * si.Pa,
|
|
@@ -48,7 +44,6 @@ def run_parcel(
|
|
|
48
44
|
initial_water_vapour_mixing_ratio=const.eps * pv0 / (p0 - pv0),
|
|
49
45
|
w=w,
|
|
50
46
|
T0=T0,
|
|
51
|
-
backend=CPU(formulae),
|
|
52
47
|
)
|
|
53
48
|
|
|
54
49
|
aerosol = AerosolARG(
|
|
@@ -56,19 +51,22 @@ def run_parcel(
|
|
|
56
51
|
)
|
|
57
52
|
n_sd = n_sd_per_mode * len(aerosol.modes)
|
|
58
53
|
|
|
54
|
+
builder = Builder(backend=CPU(formulae), n_sd=n_sd, environment=env)
|
|
55
|
+
builder.add_dynamic(AmbientThermodynamics())
|
|
56
|
+
builder.add_dynamic(Condensation())
|
|
57
|
+
builder.request_attribute("critical saturation")
|
|
58
|
+
|
|
59
59
|
attributes = {
|
|
60
60
|
k: np.empty(0) for k in ("dry volume", "kappa times dry volume", "multiplicity")
|
|
61
61
|
}
|
|
62
62
|
for i, mode in enumerate(aerosol.modes):
|
|
63
63
|
kappa, spectrum = mode["kappa"]["CompressedFilmOvadnevaite"], mode["spectrum"]
|
|
64
|
-
r_dry, concentration = ConstantMultiplicity(spectrum).
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
v_dry = formulae.trivia.volume(radius=r_dry)
|
|
68
|
-
specific_concentration = concentration / env.backend.formulae.constants.rho_STP
|
|
64
|
+
r_dry, concentration = ConstantMultiplicity(spectrum).sample(n_sd_per_mode)
|
|
65
|
+
v_dry = builder.formulae.trivia.volume(radius=r_dry)
|
|
66
|
+
specific_concentration = concentration / builder.formulae.constants.rho_STP
|
|
69
67
|
attributes["multiplicity"] = np.append(
|
|
70
68
|
attributes["multiplicity"],
|
|
71
|
-
specific_concentration *
|
|
69
|
+
specific_concentration * builder.particulator.environment.mass_of_dry_air,
|
|
72
70
|
)
|
|
73
71
|
attributes["dry volume"] = np.append(attributes["dry volume"], v_dry)
|
|
74
72
|
attributes["kappa times dry volume"] = np.append(
|
|
@@ -76,20 +74,13 @@ def run_parcel(
|
|
|
76
74
|
)
|
|
77
75
|
|
|
78
76
|
r_wet = equilibrate_wet_radii(
|
|
79
|
-
r_dry=formulae.trivia.radius(volume=attributes["dry volume"]),
|
|
80
|
-
environment=
|
|
77
|
+
r_dry=builder.formulae.trivia.radius(volume=attributes["dry volume"]),
|
|
78
|
+
environment=builder.particulator.environment,
|
|
81
79
|
kappa_times_dry_volume=attributes["kappa times dry volume"],
|
|
82
80
|
)
|
|
83
|
-
attributes["volume"] =
|
|
81
|
+
attributes["volume"] = builder.formulae.trivia.volume(radius=r_wet)
|
|
84
82
|
|
|
85
|
-
particulator =
|
|
86
|
-
n_sd=n_sd,
|
|
87
|
-
environment=env,
|
|
88
|
-
dynamics=[AmbientThermodynamics(), Condensation()],
|
|
89
|
-
requested_attributes=("critical saturation",),
|
|
90
|
-
attributes=attributes,
|
|
91
|
-
products=products,
|
|
92
|
-
)
|
|
83
|
+
particulator = builder.build(attributes, products=products)
|
|
93
84
|
|
|
94
85
|
output = {product.name: [] for product in particulator.products.values()}
|
|
95
86
|
output_attributes = {
|
|
@@ -100,7 +91,7 @@ def run_parcel(
|
|
|
100
91
|
}
|
|
101
92
|
|
|
102
93
|
for _ in range(n_steps):
|
|
103
|
-
particulator.
|
|
94
|
+
particulator.run(steps=1)
|
|
104
95
|
for product in particulator.products.values():
|
|
105
96
|
value = product.get()
|
|
106
97
|
output[product.name].append(value[0])
|
|
@@ -5,7 +5,7 @@ import numpy as np
|
|
|
5
5
|
from matplotlib import pyplot
|
|
6
6
|
from packaging import version
|
|
7
7
|
|
|
8
|
-
from PySDM import
|
|
8
|
+
from PySDM import Builder, Formulae
|
|
9
9
|
from PySDM.backends import CPU
|
|
10
10
|
from PySDM.dynamics import Freezing
|
|
11
11
|
from PySDM.environments import Box
|
|
@@ -52,7 +52,7 @@ class Simulation:
|
|
|
52
52
|
else:
|
|
53
53
|
total_time = (
|
|
54
54
|
np.diff(np.asarray(self.temperature_range)) / case["cooling_rate"]
|
|
55
|
-
)
|
|
55
|
+
)
|
|
56
56
|
|
|
57
57
|
constants = None
|
|
58
58
|
if "J_het" not in case:
|
|
@@ -214,15 +214,20 @@ def simulation(
|
|
|
214
214
|
constants=constants,
|
|
215
215
|
particle_shape_and_density="MixedPhaseSpheres",
|
|
216
216
|
)
|
|
217
|
+
builder = Builder(
|
|
218
|
+
n_sd=n_sd,
|
|
219
|
+
backend=CPU(formulae=formulae),
|
|
220
|
+
environment=Box(dt=time_step, dv=volume),
|
|
221
|
+
)
|
|
222
|
+
builder.add_dynamic(Freezing(immersion_freezing="time-dependent"))
|
|
223
|
+
builder.request_attribute("volume")
|
|
217
224
|
|
|
218
225
|
if hasattr(spectrum, "s_geom") and spectrum.s_geom == 1:
|
|
219
226
|
_isa, _conc = np.full(n_sd, spectrum.m_mode), np.full(
|
|
220
227
|
n_sd, multiplicity / volume
|
|
221
228
|
)
|
|
222
229
|
else:
|
|
223
|
-
_isa, _conc = spectral_sampling.ConstantMultiplicity(
|
|
224
|
-
spectrum
|
|
225
|
-
).sample_deterministic(n_sd)
|
|
230
|
+
_isa, _conc = spectral_sampling.ConstantMultiplicity(spectrum).sample(n_sd)
|
|
226
231
|
attributes = {
|
|
227
232
|
"multiplicity": discretise_multiplicities(_conc * volume),
|
|
228
233
|
"immersed surface area": _isa,
|
|
@@ -233,20 +238,12 @@ def simulation(
|
|
|
233
238
|
IceWaterContent(name="qi"),
|
|
234
239
|
TotalUnfrozenImmersedSurfaceArea(name="A_tot"),
|
|
235
240
|
)
|
|
236
|
-
|
|
241
|
+
particulator = builder.build(attributes=attributes, products=products)
|
|
242
|
+
env = particulator.environment
|
|
243
|
+
|
|
237
244
|
env["T"] = initial_temperature
|
|
238
245
|
env["a_w_ice"] = np.nan
|
|
239
246
|
env["RH"] = 1 + np.finfo(float).eps
|
|
240
|
-
|
|
241
|
-
particulator = Particulator(
|
|
242
|
-
n_sd=n_sd,
|
|
243
|
-
environment=env,
|
|
244
|
-
attributes=attributes,
|
|
245
|
-
products=products,
|
|
246
|
-
dynamics=[Freezing(immersion_freezing="time-dependent")],
|
|
247
|
-
requested_attributes=("volume",),
|
|
248
|
-
)
|
|
249
|
-
|
|
250
247
|
svp = particulator.formulae.saturation_vapour_pressure
|
|
251
248
|
|
|
252
249
|
cell_id = 0
|
|
@@ -256,7 +253,7 @@ def simulation(
|
|
|
256
253
|
if cooling_rate != 0:
|
|
257
254
|
env["T"] -= np.full((1,), cooling_rate * time_step / 2)
|
|
258
255
|
env["a_w_ice"] = svp.pvs_ice(env["T"][0]) / svp.pvs_water(env["T"][0])
|
|
259
|
-
particulator.
|
|
256
|
+
particulator.run(0 if i == 0 else 1)
|
|
260
257
|
if cooling_rate != 0:
|
|
261
258
|
env["T"] -= np.full((1,), cooling_rate * time_step / 2)
|
|
262
259
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
|
|
3
3
|
import PySDM.products as PySDM_products
|
|
4
|
-
from PySDM import
|
|
5
|
-
from PySDM.
|
|
4
|
+
from PySDM.backends import CPU
|
|
5
|
+
from PySDM.builder import Builder
|
|
6
6
|
from PySDM.dynamics import AmbientThermodynamics, Condensation
|
|
7
7
|
from PySDM.environments import Parcel
|
|
8
8
|
from PySDM.initialisation.hygroscopic_equilibrium import equilibrate_wet_radii
|
|
@@ -10,7 +10,7 @@ from PySDM.physics import constants as const
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class Simulation:
|
|
13
|
-
def __init__(self, settings, backend=
|
|
13
|
+
def __init__(self, settings, backend=CPU):
|
|
14
14
|
t_half = settings.z_half / settings.w_avg
|
|
15
15
|
|
|
16
16
|
dt_output = (2 * t_half) / settings.n_output
|
|
@@ -18,20 +18,40 @@ class Simulation:
|
|
|
18
18
|
while dt_output / self.n_substeps >= settings.dt_max: # TODO #334 dt_max
|
|
19
19
|
self.n_substeps += 1
|
|
20
20
|
|
|
21
|
+
builder = Builder(
|
|
22
|
+
backend=backend(
|
|
23
|
+
formulae=settings.formulae,
|
|
24
|
+
**(
|
|
25
|
+
{"override_jit_flags": {"parallel": False}}
|
|
26
|
+
if backend == CPU
|
|
27
|
+
else {}
|
|
28
|
+
),
|
|
29
|
+
),
|
|
30
|
+
n_sd=1,
|
|
31
|
+
environment=Parcel(
|
|
32
|
+
dt=dt_output / self.n_substeps,
|
|
33
|
+
mass_of_dry_air=settings.mass_of_dry_air,
|
|
34
|
+
p0=settings.p0,
|
|
35
|
+
initial_water_vapour_mixing_ratio=settings.initial_water_vapour_mixing_ratio,
|
|
36
|
+
T0=settings.T0,
|
|
37
|
+
w=settings.w,
|
|
38
|
+
),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
builder.add_dynamic(AmbientThermodynamics())
|
|
42
|
+
builder.add_dynamic(
|
|
43
|
+
Condensation(
|
|
44
|
+
rtol_x=settings.rtol_x,
|
|
45
|
+
rtol_thd=settings.rtol_thd,
|
|
46
|
+
dt_cond_range=settings.dt_cond_range,
|
|
47
|
+
)
|
|
48
|
+
)
|
|
21
49
|
attributes = {}
|
|
22
50
|
r_dry = np.array([settings.r_dry])
|
|
23
51
|
attributes["dry volume"] = settings.formulae.trivia.volume(radius=r_dry)
|
|
24
52
|
attributes["kappa times dry volume"] = attributes["dry volume"] * settings.kappa
|
|
25
53
|
attributes["multiplicity"] = np.array([settings.n_in_dv], dtype=np.int64)
|
|
26
|
-
environment =
|
|
27
|
-
dt=dt_output / self.n_substeps,
|
|
28
|
-
mass_of_dry_air=settings.mass_of_dry_air,
|
|
29
|
-
p0=settings.p0,
|
|
30
|
-
initial_water_vapour_mixing_ratio=settings.initial_water_vapour_mixing_ratio,
|
|
31
|
-
T0=settings.T0,
|
|
32
|
-
w=settings.w,
|
|
33
|
-
backend=backend(formulae=settings.formulae),
|
|
34
|
-
)
|
|
54
|
+
environment = builder.particulator.environment
|
|
35
55
|
r_wet = equilibrate_wet_radii(
|
|
36
56
|
r_dry=r_dry,
|
|
37
57
|
environment=environment,
|
|
@@ -52,20 +72,7 @@ class Simulation:
|
|
|
52
72
|
PySDM_products.RipeningRate(unit="s^-1 mg^-1", name="ripening_rate"),
|
|
53
73
|
]
|
|
54
74
|
|
|
55
|
-
self.particulator =
|
|
56
|
-
n_sd=1,
|
|
57
|
-
dynamics=[
|
|
58
|
-
AmbientThermodynamics(),
|
|
59
|
-
Condensation(
|
|
60
|
-
rtol_x=settings.rtol_x,
|
|
61
|
-
rtol_thd=settings.rtol_thd,
|
|
62
|
-
dt_cond_range=settings.dt_cond_range,
|
|
63
|
-
),
|
|
64
|
-
],
|
|
65
|
-
attributes=attributes,
|
|
66
|
-
products=products,
|
|
67
|
-
environment=environment,
|
|
68
|
-
)
|
|
75
|
+
self.particulator = builder.build(attributes, products)
|
|
69
76
|
|
|
70
77
|
self.n_output = settings.n_output
|
|
71
78
|
|
|
@@ -100,7 +107,7 @@ class Simulation:
|
|
|
100
107
|
|
|
101
108
|
self.save(output)
|
|
102
109
|
for _ in range(self.n_output):
|
|
103
|
-
self.particulator.
|
|
110
|
+
self.particulator.run(self.n_substeps)
|
|
104
111
|
self.save(output)
|
|
105
112
|
|
|
106
113
|
return output
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# pylint: disable=invalid-name
|
|
2
|
+
"""
|
|
3
|
+
2D prescribed-flow case extended with Paraview visualisation with spin-up logic from
|
|
4
|
+
[Arabas et al. 2015](http://doi.org/10.5194/gmd-8-1677-2015)
|
|
5
|
+
|
|
6
|
+
gui.ipynb:
|
|
7
|
+
.. include:: ./gui.ipynb.badges.md
|
|
8
|
+
"""
|
|
9
|
+
from .settings import Settings
|
|
10
|
+
from .spin_up import SpinUp
|