PySDM-examples 2.131__tar.gz → 3.0.0__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.0/PKG-INFO +170 -0
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/PySDM_examples/__init__.py +3 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Abdul_Razzak_Ghan_2000/run_ARG_parcel.py +26 -17
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Alpert_and_Knopf_2016/simulation.py +17 -14
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Alpert_and_Knopf_2016/table_1.py +1 -1
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Alpert_and_Knopf_2016/table_2.py +1 -1
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Arabas_and_Shima_2017/__init__.py +3 -0
- pysdm_examples-3.0.0/PySDM_examples/featured/Arabas_and_Shima_2017/example.py +11 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Arabas_and_Shima_2017/simulation.py +28 -35
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Arabas_et_al_2025/__init__.py +4 -9
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Arabas_et_al_2025/commons.py +1 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Arabas_et_al_2025/make_particulator.py +14 -9
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Arabas_et_al_2025/plots.py +2 -2
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Arabas_et_al_2025/run_simulation.py +8 -7
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Berry_1967/example.py +3 -3
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Berry_1967/spectrum_plotter.py +1 -1
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Bieli_et_al_2022/__init__.py +8 -8
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Bieli_et_al_2022/simulation.py +19 -14
- pysdm_examples-3.0.0/PySDM_examples/featured/Grabowski_and_Pawlowska_2023/__init__.py +23 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Grabowski_and_Pawlowska_2023/settings.py +11 -6
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Grabowski_and_Pawlowska_2023/simulation.py +32 -33
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Jensen_and_Nugent_2017/__init__.py +1 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Jensen_and_Nugent_2017/settings.py +2 -1
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Jensen_and_Nugent_2017/simulation.py +40 -41
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Kreidenweis_et_al_2003/__init__.py +1 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Kreidenweis_et_al_2003/settings.py +12 -8
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Kreidenweis_et_al_2003/simulation.py +27 -29
- pysdm_examples-3.0.0/PySDM_examples/featured/Long_1974/__init__.py +11 -0
- pysdm_examples-3.0.0/PySDM_examples/featured/Long_1974/settings.py +40 -0
- pysdm_examples-3.0.0/PySDM_examples/featured/Long_1974/simulation.py +44 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Lowe_et_al_2019/__init__.py +1 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Lowe_et_al_2019/settings.py +1 -5
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Lowe_et_al_2019/simulation.py +21 -20
- pysdm_examples-3.0.0/PySDM_examples/featured/Luettmer_et_al_2026/__init__.py +25 -0
- pysdm_examples-3.0.0/PySDM_examples/featured/Luettmer_et_al_2026/commons.py +85 -0
- pysdm_examples-3.0.0/PySDM_examples/featured/Luettmer_et_al_2026/plot.py +549 -0
- pysdm_examples-3.0.0/PySDM_examples/featured/Luettmer_et_al_2026/settings.py +99 -0
- pysdm_examples-3.0.0/PySDM_examples/featured/Luettmer_et_al_2026/simulation.py +205 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Shima_et_al_2009/example.py +19 -23
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Shima_et_al_2009/example_timing.py +15 -9
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Shima_et_al_2009/spectrum_plotter.py +6 -13
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Shima_et_al_2009/tutorial_example.py +18 -9
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Shipway_and_Hill_2012/__init__.py +1 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Shipway_and_Hill_2012/plot.py +2 -1
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Shipway_and_Hill_2012/settings.py +3 -2
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Shipway_and_Hill_2012/simulation.py +36 -32
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Srivastava_1982/example.py +6 -3
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Srivastava_1982/simulation.py +10 -8
- pysdm_examples-3.0.0/PySDM_examples/featured/Ware_et_al_2025/__init__.py +22 -0
- pysdm_examples-3.0.0/PySDM_examples/featured/Ware_et_al_2025/example.py +253 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Yang_et_al_2018/__init__.py +1 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Yang_et_al_2018/settings.py +3 -5
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Yang_et_al_2018/simulation.py +19 -23
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/deJong_Mackay_et_al_2023/__init__.py +28 -28
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/deJong_Mackay_et_al_2023/plot_rates.py +1 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/deJong_Mackay_et_al_2023/settings1D.py +3 -1
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/deJong_Mackay_et_al_2023/simulation1D.py +6 -4
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/deJong_Mackay_et_al_2023/simulation_0D.py +53 -45
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/deJong_Mackay_et_al_2023/simulation_ss.py +4 -2
- {pysdm_examples-2.131/PySDM_examples/Pyrcel → pysdm_examples-3.0.0/PySDM_examples/featured/pyrcel_docs_testcase}/__init__.py +1 -0
- {pysdm_examples-2.131/PySDM_examples/Pyrcel → pysdm_examples-3.0.0/PySDM_examples/featured/pyrcel_docs_testcase}/settings.py +1 -0
- {pysdm_examples-2.131/PySDM_examples/Pyrcel → pysdm_examples-3.0.0/PySDM_examples/featured/pyrcel_docs_testcase}/simulation.py +44 -30
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/misc}/Bolin_1958/__init__.py +8 -8
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/misc}/Jouzel_and_Merlivat_1984/__init__.py +0 -1
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/misc}/Jouzel_and_Merlivat_1984/thermodynamic_profiles.py +0 -1
- pysdm_examples-3.0.0/PySDM_examples/misc/Matsushima_et_al_2023/__init__.py +7 -0
- pysdm_examples-3.0.0/PySDM_examples/misc/Murray_et_al_2010/__init__.py +9 -0
- pysdm_examples-3.0.0/PySDM_examples/misc/Murray_et_al_2010/simulation.py +173 -0
- pysdm_examples-3.0.0/PySDM_examples/misc/Toon_et_al_1980/__init__.py +7 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Abade_and_Albuquerque_2024/settings.py +14 -20
- pysdm_examples-3.0.0/PySDM_examples/sandbox/Abade_and_Albuquerque_2024/simulation.py +117 -0
- pysdm_examples-3.0.0/PySDM_examples/sandbox/Arabas_and_Pawlowska_2011/__init__.py +14 -0
- pysdm_examples-3.0.0/PySDM_examples/sandbox/Arabas_and_Pawlowska_2011/settings.py +66 -0
- pysdm_examples-3.0.0/PySDM_examples/sandbox/Arabas_and_Pawlowska_2011/simulation.py +151 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Ervens_and_Feingold_2012/settings.py +1 -1
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Niedermeier_et_al_2014/simulation.py +19 -13
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Rozanski_and_Sonntag_1982/__init__.py +1 -1
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Spichtinger_et_al_2023/__init__.py +4 -0
- pysdm_examples-3.0.0/PySDM_examples/sandbox/Spichtinger_et_al_2023/data/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Spichtinger_et_al_2023/settings.py +1 -1
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Spichtinger_et_al_2023/simulation.py +24 -29
- pysdm_examples-3.0.0/PySDM_examples/sandbox/Steinke_et_al_2011/__init__.py +6 -0
- pysdm_examples-3.0.0/PySDM_examples/sandbox/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples/Bartman_et_al_2021 → pysdm_examples-3.0.0/PySDM_examples/sandbox/condensation_adaptivity}/__init__.py +2 -6
- {pysdm_examples-2.131/PySDM_examples/Bartman_2020_MasterThesis → pysdm_examples-3.0.0/PySDM_examples/sandbox/condensation_adaptivity}/fig_5_SCIPY_VS_ADAPTIVE.py +2 -2
- {pysdm_examples-2.131/PySDM_examples/utils/kinematic_2d → pysdm_examples-3.0.0/PySDM_examples/sandbox/condensation_adaptivity}/plots.py +1 -17
- pysdm_examples-3.0.0/PySDM_examples/sandbox/copulae/__init__.py +6 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/deJong_Azimi/__init__.py +14 -14
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/deJong_Azimi/settings1D.py +1 -1
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/deJong_Azimi/simulation_0D.py +21 -15
- {pysdm_examples-2.131/PySDM_examples/Zaba_et_al → pysdm_examples-3.0.0/PySDM_examples/sandbox/isotopes}/__init__.py +1 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/seeding/settings.py +1 -1
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/seeding/simulation.py +39 -31
- pysdm_examples-3.0.0/PySDM_examples/tutorials/README.md +29 -0
- {pysdm_examples-2.131/PySDM_examples/_HOWTOs → pysdm_examples-3.0.0/PySDM_examples/tutorials}/__init__.py +3 -0
- pysdm_examples-3.0.0/PySDM_examples/tutorials/collisions/__init__.py +4 -0
- pysdm_examples-3.0.0/PySDM_examples/tutorials/collisions/collection_droplet.svg +169 -0
- pysdm_examples-3.0.0/PySDM_examples/tutorials/condensation/__init__.py +4 -0
- pysdm_examples-3.0.0/PySDM_examples/tutorials/condensation/kohler_curve.svg +242 -0
- pysdm_examples-3.0.0/PySDM_examples/tutorials/wikipedia/__init__.py +4 -0
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/PySDM_examples/utils/basic_simulation.py +10 -3
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/PySDM_examples/utils/kinematic_2d/__init__.py +3 -1
- {pysdm_examples-2.131/PySDM_examples/Morrison_and_Grabowski_2007 → pysdm_examples-3.0.0/PySDM_examples/utils/kinematic_2d}/common.py +2 -2
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/PySDM_examples/utils/kinematic_2d/make_default_product_collection.py +1 -1
- {pysdm_examples-2.131/PySDM_examples/Arabas_et_al_2015 → pysdm_examples-3.0.0/PySDM_examples/utils/kinematic_2d}/settings.py +1 -1
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/PySDM_examples/utils/kinematic_2d/simulation.py +57 -50
- {pysdm_examples-2.131/PySDM_examples/Morrison_and_Grabowski_2007 → pysdm_examples-3.0.0/PySDM_examples/utils/kinematic_2d}/strato_cumulus.py +2 -1
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/PySDM_examples/utils/pvanim.py +4 -4
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/README.md +1 -1
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/docs/pysdm_examples_landing.md +32 -42
- pysdm_examples-3.0.0/pyproject.toml +61 -0
- pysdm_examples-3.0.0/pysdm_examples.egg-info/PKG-INFO +170 -0
- pysdm_examples-3.0.0/pysdm_examples.egg-info/SOURCES.txt +193 -0
- pysdm_examples-3.0.0/pysdm_examples.egg-info/requires.txt +32 -0
- pysdm_examples-3.0.0/pysdm_examples.egg-info/scm_file_list.json +288 -0
- pysdm_examples-3.0.0/pysdm_examples.egg-info/scm_version.json +8 -0
- pysdm_examples-3.0.0/setup.py +21 -0
- pysdm_examples-2.131/PKG-INFO +0 -173
- pysdm_examples-2.131/PySDM_examples/Abade_and_Albuquerque_2024/simulation.py +0 -94
- pysdm_examples-2.131/PySDM_examples/Arabas_and_Shima_2017/example.py +0 -11
- pysdm_examples-2.131/PySDM_examples/Arabas_et_al_2015/__init__.py +0 -10
- pysdm_examples-2.131/PySDM_examples/Arabas_et_al_2015/example.py +0 -28
- pysdm_examples-2.131/PySDM_examples/Arabas_et_al_2015/example_benchmark.py +0 -70
- pysdm_examples-2.131/PySDM_examples/Bartman_2020_MasterThesis/__init__.py +0 -4
- pysdm_examples-2.131/PySDM_examples/Bartman_2020_MasterThesis/fig_4_adaptive_sdm.py +0 -71
- pysdm_examples-2.131/PySDM_examples/Bulenok_2023_MasterThesis/__init__.py +0 -5
- pysdm_examples-2.131/PySDM_examples/Bulenok_2023_MasterThesis/performance_comparison_Srivastava_Setup.py +0 -225
- pysdm_examples-2.131/PySDM_examples/Bulenok_2023_MasterThesis/setups.py +0 -112
- pysdm_examples-2.131/PySDM_examples/Bulenok_2023_MasterThesis/utils.py +0 -301
- pysdm_examples-2.131/PySDM_examples/Grabowski_and_Pawlowska_2023/__init__.py +0 -22
- pysdm_examples-2.131/PySDM_examples/utils/kinematic_2d/gui.py +0 -45
- pysdm_examples-2.131/PySDM_examples/utils/kinematic_2d/gui_controller.py +0 -132
- pysdm_examples-2.131/PySDM_examples/utils/kinematic_2d/gui_settings.py +0 -428
- pysdm_examples-2.131/PySDM_examples/utils/kinematic_2d/gui_viewer.py +0 -355
- pysdm_examples-2.131/pyproject.toml +0 -7
- pysdm_examples-2.131/pysdm_examples.egg-info/PKG-INFO +0 -173
- pysdm_examples-2.131/pysdm_examples.egg-info/SOURCES.txt +0 -177
- pysdm_examples-2.131/pysdm_examples.egg-info/requires.txt +0 -15
- pysdm_examples-2.131/setup.py +0 -77
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/MANIFEST.in +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Abdul_Razzak_Ghan_2000/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Abdul_Razzak_Ghan_2000/aerosol.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Abdul_Razzak_Ghan_2000/data_from_ARG2000_paper.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Abdul_Razzak_Ghan_2000/data_from_CloudMicrophysics_ARG.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Alpert_and_Knopf_2016/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Alpert_and_Knopf_2016/table.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Arabas_and_Shima_2017/settings.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Arabas_et_al_2025/curved_text.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Arabas_et_al_2025/frozen_fraction.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Berry_1967/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Berry_1967/example_fig_6.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Berry_1967/settings.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Bieli_et_al_2022/settings.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Jaruga_and_Pawlowska_2018/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Jensen_and_Nugent_2017/plotting.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Jensen_and_Nugent_2017/table_3.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Lowe_et_al_2019/aerosol.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Lowe_et_al_2019/aerosol_code.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Lowe_et_al_2019/constants_def.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Lowe_et_al_2019/plot_helper.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Pierchala_et_al_2022/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Pierchala_et_al_2022/commons.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Shima_et_al_2009/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Shima_et_al_2009/error_measure.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Shima_et_al_2009/settings.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Shima_et_al_2009/tutorial_plotter.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Shima_et_al_2009/tutorial_settings.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Shipway_and_Hill_2012/mpdata_1d.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Srivastava_1982/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Srivastava_1982/equations.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/Srivastava_1982/settings.py +0 -0
- {pysdm_examples-2.131/PySDM_examples/Spichtinger_et_al_2023/data → pysdm_examples-3.0.0/PySDM_examples/featured}/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/featured}/deJong_Mackay_et_al_2023/settings_0D.py +0 -0
- {pysdm_examples-2.131/PySDM_examples/Pyrcel → pysdm_examples-3.0.0/PySDM_examples/featured/pyrcel_docs_testcase}/profile_plotter.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/misc}/Bolot_et_al_2013/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/misc}/Gedzelman_and_Arnold_1994/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/misc}/Gonfiantini_1986/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/misc}/Kinzer_And_Gunn_1951/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/misc}/Kinzer_And_Gunn_1951/table_1_and_2.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/misc}/Lamb_et_al_2017/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/misc}/Merlivat_and_Nief_1967/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/misc}/Miyake_et_al_1968/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/misc}/Morrison_and_Grabowski_2007/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/misc}/Pruppacher_and_Rasmussen_1979/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/misc}/Rogers_1975/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/misc}/Stewart_1975/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/misc}/Van_Hook_1968/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples/Toon_et_al_1980 → pysdm_examples-3.0.0/PySDM_examples/misc}/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Abade_and_Albuquerque_2024/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Ervens_and_Feingold_2012/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Fisher_1991/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Graf_et_al_2019/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Niedermeier_et_al_2014/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Niedermeier_et_al_2014/settings.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Rozanski_and_Sonntag_1982/multibox.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Singer_Ward/__init__.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Singer_Ward/aerosol.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Spichtinger_et_al_2023/data/reference_bulk.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/Spichtinger_et_al_2023/data/simulation_data.py +0 -0
- {pysdm_examples-2.131/PySDM_examples/Bartman_et_al_2021 → pysdm_examples-3.0.0/PySDM_examples/sandbox/condensation_adaptivity}/label.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/deJong_Azimi/cloudy_data.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/deJong_Azimi/cloudy_data_0d.py +0 -0
- {pysdm_examples-2.131/PySDM_examples → pysdm_examples-3.0.0/PySDM_examples/sandbox}/seeding/__init__.py +0 -0
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/PySDM_examples/utils/__init__.py +0 -0
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/PySDM_examples/utils/dummy_controller.py +0 -0
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/PySDM_examples/utils/kinematic_2d/fields.py +0 -0
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/PySDM_examples/utils/kinematic_2d/mpdata_2d.py +0 -0
- {pysdm_examples-2.131/PySDM_examples/Arabas_et_al_2015 → pysdm_examples-3.0.0/PySDM_examples/utils/kinematic_2d}/spin_up.py +0 -0
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/PySDM_examples/utils/kinematic_2d/storage.py +0 -0
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/PySDM_examples/utils/progbar_controller.py +0 -0
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/PySDM_examples/utils/read_vtk_1d.py +0 -0
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/PySDM_examples/utils/widgets/__init__.py +0 -0
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/PySDM_examples/utils/widgets/freezer.py +0 -0
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/PySDM_examples/utils/widgets/progbar_updater.py +0 -0
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/pysdm_examples.egg-info/dependency_links.txt +0 -0
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/pysdm_examples.egg-info/top_level.txt +0 -0
- {pysdm_examples-2.131 → pysdm_examples-3.0.0}/setup.cfg +0 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pysdm-examples
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: PySDM usage examples reproducing results from literature and depicting how to use PySDM from Python Jupyter notebooks
|
|
5
|
+
Author-email: "https://github.com/open-atmos/PySDM/graphs/contributors" <sylwester.arabas@agh.edu.pl>
|
|
6
|
+
License-Expression: GPL-3.0-only
|
|
7
|
+
Project-URL: Tracker, https://github.com/open-atmos/PySDM/issues
|
|
8
|
+
Project-URL: Documentation, https://open-atmos.github.io/PySDM/PySDM_examples
|
|
9
|
+
Project-URL: Source, https://github.com/open-atmos/PySDM/tree/main/examples
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
Requires-Dist: PySDM
|
|
12
|
+
Requires-Dist: PyMPDATA
|
|
13
|
+
Requires-Dist: open-atmos-jupyter-utils
|
|
14
|
+
Requires-Dist: pystrict
|
|
15
|
+
Requires-Dist: matplotlib
|
|
16
|
+
Requires-Dist: joblib
|
|
17
|
+
Requires-Dist: ipywidgets
|
|
18
|
+
Requires-Dist: seaborn
|
|
19
|
+
Requires-Dist: numdifftools
|
|
20
|
+
Requires-Dist: vtk
|
|
21
|
+
Requires-Dist: pyrcel
|
|
22
|
+
Requires-Dist: pyvinecopulib
|
|
23
|
+
Requires-Dist: networkx
|
|
24
|
+
Requires-Dist: PyVista
|
|
25
|
+
Requires-Dist: cmcrameri
|
|
26
|
+
Requires-Dist: cmap
|
|
27
|
+
Provides-Extra: ci-version-pins
|
|
28
|
+
Requires-Dist: PySDM[CI_version_pins]; extra == "ci-version-pins"
|
|
29
|
+
Requires-Dist: PyMPDATA==1.7.3; extra == "ci-version-pins"
|
|
30
|
+
Requires-Dist: open-atmos-jupyter-utils==1.5.0; extra == "ci-version-pins"
|
|
31
|
+
Requires-Dist: pystrict==1.3; extra == "ci-version-pins"
|
|
32
|
+
Requires-Dist: matplotlib!=3.9.1; extra == "ci-version-pins"
|
|
33
|
+
Requires-Dist: joblib==1.6.0; extra == "ci-version-pins"
|
|
34
|
+
Requires-Dist: ipywidgets==8.1; extra == "ci-version-pins"
|
|
35
|
+
Requires-Dist: seaborn==0.13.2; extra == "ci-version-pins"
|
|
36
|
+
Requires-Dist: numdifftools==0.11.1; extra == "ci-version-pins"
|
|
37
|
+
Requires-Dist: vtk==9.7; extra == "ci-version-pins"
|
|
38
|
+
Requires-Dist: pyrcel==2.0.0; extra == "ci-version-pins"
|
|
39
|
+
Requires-Dist: pyvinecopulib==1.0.0; extra == "ci-version-pins"
|
|
40
|
+
Requires-Dist: cmcrameri==1.10; extra == "ci-version-pins"
|
|
41
|
+
Requires-Dist: cmap==0.7.2; extra == "ci-version-pins"
|
|
42
|
+
Dynamic: description
|
|
43
|
+
Dynamic: description-content-type
|
|
44
|
+
|
|
45
|
+
# Introduction
|
|
46
|
+
|
|
47
|
+
<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">
|
|
48
|
+
|
|
49
|
+
PySDM examples are engineered as Jupyter Python notebooks supported by auxiliary Python commons
|
|
50
|
+
that constitute a separate <mark>PySDM-examples</mark> Python package which is also
|
|
51
|
+
<a href="https://pypi.org/p/PySDM-examples">available at PyPI</a>.
|
|
52
|
+
The examples have additional dependencies listed in
|
|
53
|
+
<a href="https://github.com/open-atmos/PySDM/blob/main/examples/setup.py">PySDM-examples package setup.py file</a>.
|
|
54
|
+
Running the example Jupyter notebooks requires the <mark>PySDM-examples</mark> package to be pip-installed.
|
|
55
|
+
For installation instructions see [project docs homepage](https://open-atmos.github.io/PySDM).
|
|
56
|
+
Note that the Jupyter notebooks themselves are not included in the package wheels, but are included
|
|
57
|
+
in the source .tar.gz file on PyPI, and are conveninently browsable on GitHub.
|
|
58
|
+
All notebooks feature header cells with badges enabling single-click execution on
|
|
59
|
+
<a href="https://colab.research.google.com/">Google Colab</a> and on
|
|
60
|
+
<a href="https://mybinder.org/">mybinder.org</a>.
|
|
61
|
+
The examples package is also used in the PySDM test suite.
|
|
62
|
+
|
|
63
|
+
# Example gallery
|
|
64
|
+
|
|
65
|
+
The examples are named referring to the journal paper they aim to reproduce simulations from
|
|
66
|
+
(or sometimes just where the inspiration originated from).
|
|
67
|
+
The list below groups all examples by the dimensionality and type of the employed modelling framework
|
|
68
|
+
("environment" in PySDM nomenclature, which can be: <mark>box</mark>, <mark>parcel</mark>,
|
|
69
|
+
<mark>single-column</mark>, <mark>2D prescribed flow</mark>), and by the set of physical processes simulated
|
|
70
|
+
(<mark>condensation</mark>, collisional <mark>coagulation</mark> and <mark>breakup</mark>,
|
|
71
|
+
<mark>drop freezing</mark>, <mark>isotopic fractionation</mark>, <mark>aqueous chemistry</mark>,
|
|
72
|
+
<mark>seeding</mark>, ...).
|
|
73
|
+
|
|
74
|
+
## 2D kinematic environment (prescribed-flow) mimicking Sc deck
|
|
75
|
+
|
|
76
|
+
The 2D prescribed-flow framework used here can be traced back to the work of
|
|
77
|
+
<a href="https://doi.org/10.1007/978-1-935704-36-2_1">Kessler 1969 (section 3C)</a>.
|
|
78
|
+
The setup employed in PySDM-examples, which mimics a stratiform cloud deck and features periodic horizontal boundary condition
|
|
79
|
+
and vanishing flow at vertical boundaries, was introduced in <a href="https://doi.org/10.1175/JAS3980">Morrison and Grabowski (2007)</a>
|
|
80
|
+
and later adopted for particle-based simulations in <a href="https://doi.org/10.5194/gmd-8-1677-2015">Arabas et al. (2015)</a>.
|
|
81
|
+
It uses a non-devergent single-eddy flow field resulting in an updraft-downdraft pair in the domain.
|
|
82
|
+
The flow field advects two scalar fields in an Eulerian way: water vapour mixing ratio
|
|
83
|
+
and dry-air potential temperature.
|
|
84
|
+
In PySDM-examples, the Eulerian advection is handled using the <a href="https://doi.org/10.21105/joss.03896">PyMPDATA</a> Numba-based
|
|
85
|
+
implementation of the <a href="https://doi.org/10.1002/fld.1071">MPDATA numerical scheme of Smolarkiewicz (e.g., 2006)</a>.
|
|
86
|
+
An animation depicting PySDM simulation capturing <mark>aerosol collisional processing</mark> by warm rain is shown below
|
|
87
|
+
(<a href="https://github.com/open-atmos/PySDM/blob/main/examples/PySDM_examples/_HOWTOs/paraview_hello_world.ipynb">see
|
|
88
|
+
the Paraview hello-world HOWTO Jupyter notbook for code generating the simulation and visualisation</a>):
|
|
89
|
+
<center>
|
|
90
|
+
<img src="https://github.com/open-atmos/PySDM/releases/download/tip/docs_intro_animation_ubuntu-24.04.gif" style="width:80%" />
|
|
91
|
+
</center>
|
|
92
|
+
|
|
93
|
+
Example notebooks:
|
|
94
|
+
- `PySDM_examples.featured.Arabas_et_al_2025`: adaptation of the 2D kinematic setup for studying <mark>glaciation</mark> of the cloud deck by <mark>immersion freezing</mark>
|
|
95
|
+
|
|
96
|
+
## 1D kinematic environment (prescribed-flow, single-column)
|
|
97
|
+
|
|
98
|
+
The single-column PySDM environment is a reimplementation of the <mark>Met Office KiD framework</mark>
|
|
99
|
+
introduced in <a href="https://doi.org/10.1002/qj.1913">Shipway & Hill 2012</a>.
|
|
100
|
+
The framework features a single Eulerian-transported field of water vapour mixing ratio
|
|
101
|
+
(vertical profile of potential temperature is fixed).
|
|
102
|
+
As in the 2D kinematic framework above, the Eulerian advection is handled by
|
|
103
|
+
<a href="https://open-atmos.github.io/PyMPDATA/">PyMPDATA</a>.
|
|
104
|
+
|
|
105
|
+
Example notebooks:
|
|
106
|
+
- `PySDM_examples.featured.Shipway_and_Hill_2012`: reproducing figures from the <a href="https://doi.org/10.1002/qj.1913">Shipway & Hill 2012</a> paper;
|
|
107
|
+
- `PySDM_examples.featured.deJong_Mackay_et_al_2023`: 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
|
|
108
|
+
framework was used to exemplify operation of the <mark>Monte-Carlo collisional breakup scheme</mark> in PySDM (scheme introduced in that paper).
|
|
109
|
+
|
|
110
|
+
## 0D parcel environment
|
|
111
|
+
|
|
112
|
+
The parcel framework implemented in PySDM uses a hydrostatic profile and adiabatic mass and energy conservation
|
|
113
|
+
to drive evolution of thermodynamic state and microphysical properties of particles.
|
|
114
|
+
|
|
115
|
+
Example notebooks include:
|
|
116
|
+
- condensation only
|
|
117
|
+
- `PySDM_examples.featured.Arabas_and_Shima_2017`: monodisperse particle spectrum, activation/deactivation cycle
|
|
118
|
+
- `PySDM_examples.featured.Yang_et_al_2018`: polydisperse particle spectrum, activation/deactivation cycles
|
|
119
|
+
- `PySDM_examples.featured.Abdul_Razzak_Ghan_2000`: polydisperse activation, comparison against <mark>GCM parameterisation</mark>
|
|
120
|
+
- `PySDM_examples.featured.pyrcel_docs_testcase`: polydisperse activation, mimicking example test case from <mark>Pyrcel</mark> documentation
|
|
121
|
+
- `PySDM_examples.featured.Lowe_et_al_2019`: externally mixed polydisperse size spectrum with <mark>surface-active organics</mark> case
|
|
122
|
+
- `PySDM_examples.featured.Grabowski_and_Pawlowska_2023`: polydisperse activation, focus on <mark>ripening</mark>
|
|
123
|
+
- `PySDM_examples.featured.Jensen_and_Nugent_2017`: polydisperse activation featuring <mark>giant CCN</mark>
|
|
124
|
+
- condensation and aqueous-chemistry
|
|
125
|
+
- `PySDM_examples.featured.Kreidenweis_et_al_2003`: <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)
|
|
126
|
+
- `PySDM_examples.featured.Jaruga_and_Pawlowska_2018`: exploration of numerical convergence using the above Hoppel-gap simulation setup
|
|
127
|
+
- freezing
|
|
128
|
+
|
|
129
|
+
The parcel environment is also featured in the <a href="https://open-atmos.github.io/PySDM/PySDM.html#tutorials">PySDM tutorials</a>.
|
|
130
|
+
|
|
131
|
+
<center>
|
|
132
|
+
<img src="https://github.com/open-atmos/PySDM/releases/download/tip/parcel_animation_ubuntu-24.04.gif" style="width:80%" />
|
|
133
|
+
</center>
|
|
134
|
+
|
|
135
|
+
## 0D box environment
|
|
136
|
+
|
|
137
|
+
The box environment is void of any spatial or thermodynamic context, it constitutes the most basic framework.
|
|
138
|
+
|
|
139
|
+
Example notebooks include:
|
|
140
|
+
|
|
141
|
+
- coalescence only:
|
|
142
|
+
- `PySDM_examples.featured.Shima_et_al_2009`: using <mark>Golovin additive kernel</mark> for comparison against analytic solution, featuring interactive in-notebook interface for selecting simulation parameters
|
|
143
|
+
- `PySDM_examples.featured.Berry_1967`: examples using geometric, hydrodynamic and electric-field collision kernels
|
|
144
|
+
- coalescence and breakup:
|
|
145
|
+
- `PySDM_examples.featured.Bieli_et_al_2022`: evolution of moments under collisional growth and breakage
|
|
146
|
+
- `PySDM_examples.featured.deJong_Mackay_et_al_2023`: 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>
|
|
147
|
+
- immersion freezing only:
|
|
148
|
+
- `PySDM_examples.featured.Alpert_and_Knopf_2016`: stochastic immersion freezing with monodisperse vs. lognormal immersed surface areas
|
|
149
|
+
- `PySDM_examples.featured.Arabas_et_al_2025`: comparison of time-dependent and singular immersion freezing schemes
|
|
150
|
+
|
|
151
|
+
The box environment is also featured in the <a href="https://open-atmos.github.io/PySDM/PySDM.html#tutorials">PySDM tutorials</a>.
|
|
152
|
+
|
|
153
|
+
## examples depicting isotope-related formulae (without any simulation context)
|
|
154
|
+
- <mark>equilibrium isotopic fractionation</mark> formulae:
|
|
155
|
+
- `PySDM_examples.misc.Lamb_et_al_2017`
|
|
156
|
+
- `PySDM_examples.misc.Bolot_et_al_2013`
|
|
157
|
+
- `PySDM_examples.misc.Merlivat_and_Nief_1967`
|
|
158
|
+
- `PySDM_examples.misc.Van_Hook_1968`
|
|
159
|
+
- <mark>Rayleigh fractionation</mark>:
|
|
160
|
+
- `PySDM_examples.featured.Pierchala_et_al_2022`: reproducing model plots for a <mark>triple-isotope</mark> lab study, including <mark>kinetic fractionation</mark>
|
|
161
|
+
- `PySDM_examples.misc.Gonfiantini_1986`: flat-surface evaporation at different humidities for D and <sup>18</sup>O
|
|
162
|
+
- isotopic relaxation timescale:
|
|
163
|
+
- `PySDM_examples.misc.Miyake_et_al_1968`: incl. comparison of different <mark>ventilation</mark> parameterisations
|
|
164
|
+
- `PySDM_examples.misc.Bolin_1958`
|
|
165
|
+
- below-cloud <mark>kinetic fractionation</mark>:
|
|
166
|
+
- `PySDM_examples.misc.Gedzelman_and_Arnold_1994`
|
|
167
|
+
|
|
168
|
+
## examples depicting extraterrestrial clouds (formulae-only, no simulations yet)
|
|
169
|
+
- Titan (methane clouds):
|
|
170
|
+
- `PySDM_examples.misc.Toon_et_al_1980`
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
from collections import namedtuple
|
|
2
2
|
|
|
3
3
|
import numpy as np
|
|
4
|
-
from PySDM_examples.Abdul_Razzak_Ghan_2000.aerosol import
|
|
4
|
+
from PySDM_examples.featured.Abdul_Razzak_Ghan_2000.aerosol import (
|
|
5
|
+
CONSTANTS_ARG,
|
|
6
|
+
AerosolARG,
|
|
7
|
+
)
|
|
5
8
|
|
|
6
|
-
from PySDM import
|
|
9
|
+
from PySDM import Particulator, Formulae
|
|
7
10
|
from PySDM import products as PySDM_products
|
|
8
11
|
from PySDM.backends import CPU
|
|
9
12
|
from PySDM.dynamics import AmbientThermodynamics, Condensation
|
|
10
13
|
from PySDM.environments import Parcel
|
|
11
|
-
from PySDM.initialisation import equilibrate_wet_radii
|
|
14
|
+
from PySDM.initialisation.hygroscopic_equilibrium import equilibrate_wet_radii
|
|
12
15
|
from PySDM.initialisation.sampling.spectral_sampling import ConstantMultiplicity
|
|
13
16
|
from PySDM.physics import si
|
|
14
17
|
|
|
@@ -19,6 +22,7 @@ def run_parcel(
|
|
|
19
22
|
N2,
|
|
20
23
|
rad2,
|
|
21
24
|
n_sd_per_mode,
|
|
25
|
+
*,
|
|
22
26
|
RH0=1.0,
|
|
23
27
|
T0=294 * si.K,
|
|
24
28
|
p0=1e5 * si.Pa,
|
|
@@ -44,6 +48,7 @@ def run_parcel(
|
|
|
44
48
|
initial_water_vapour_mixing_ratio=const.eps * pv0 / (p0 - pv0),
|
|
45
49
|
w=w,
|
|
46
50
|
T0=T0,
|
|
51
|
+
backend=CPU(formulae),
|
|
47
52
|
)
|
|
48
53
|
|
|
49
54
|
aerosol = AerosolARG(
|
|
@@ -51,22 +56,19 @@ def run_parcel(
|
|
|
51
56
|
)
|
|
52
57
|
n_sd = n_sd_per_mode * len(aerosol.modes)
|
|
53
58
|
|
|
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
|
-
|
|
64
|
+
r_dry, concentration = ConstantMultiplicity(spectrum).sample_deterministic(
|
|
65
|
+
n_sd_per_mode
|
|
66
|
+
)
|
|
67
|
+
v_dry = formulae.trivia.volume(radius=r_dry)
|
|
68
|
+
specific_concentration = concentration / env.backend.formulae.constants.rho_STP
|
|
67
69
|
attributes["multiplicity"] = np.append(
|
|
68
70
|
attributes["multiplicity"],
|
|
69
|
-
specific_concentration *
|
|
71
|
+
specific_concentration * env.mass_of_dry_air,
|
|
70
72
|
)
|
|
71
73
|
attributes["dry volume"] = np.append(attributes["dry volume"], v_dry)
|
|
72
74
|
attributes["kappa times dry volume"] = np.append(
|
|
@@ -74,13 +76,20 @@ def run_parcel(
|
|
|
74
76
|
)
|
|
75
77
|
|
|
76
78
|
r_wet = equilibrate_wet_radii(
|
|
77
|
-
r_dry=
|
|
78
|
-
environment=
|
|
79
|
+
r_dry=formulae.trivia.radius(volume=attributes["dry volume"]),
|
|
80
|
+
environment=env,
|
|
79
81
|
kappa_times_dry_volume=attributes["kappa times dry volume"],
|
|
80
82
|
)
|
|
81
|
-
attributes["volume"] =
|
|
83
|
+
attributes["volume"] = env.backend.formulae.trivia.volume(radius=r_wet)
|
|
82
84
|
|
|
83
|
-
particulator =
|
|
85
|
+
particulator = 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
|
+
)
|
|
84
93
|
|
|
85
94
|
output = {product.name: [] for product in particulator.products.values()}
|
|
86
95
|
output_attributes = {
|
|
@@ -91,7 +100,7 @@ def run_parcel(
|
|
|
91
100
|
}
|
|
92
101
|
|
|
93
102
|
for _ in range(n_steps):
|
|
94
|
-
particulator.
|
|
103
|
+
particulator.advance(n_steps=1)
|
|
95
104
|
for product in particulator.products.values():
|
|
96
105
|
value = product.get()
|
|
97
106
|
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 Particulator, 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
|
+
).item()
|
|
56
56
|
|
|
57
57
|
constants = None
|
|
58
58
|
if "J_het" not in case:
|
|
@@ -214,20 +214,15 @@ 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(singular=False))
|
|
223
|
-
builder.request_attribute("volume")
|
|
224
217
|
|
|
225
218
|
if hasattr(spectrum, "s_geom") and spectrum.s_geom == 1:
|
|
226
219
|
_isa, _conc = np.full(n_sd, spectrum.m_mode), np.full(
|
|
227
220
|
n_sd, multiplicity / volume
|
|
228
221
|
)
|
|
229
222
|
else:
|
|
230
|
-
_isa, _conc = spectral_sampling.ConstantMultiplicity(
|
|
223
|
+
_isa, _conc = spectral_sampling.ConstantMultiplicity(
|
|
224
|
+
spectrum
|
|
225
|
+
).sample_deterministic(n_sd)
|
|
231
226
|
attributes = {
|
|
232
227
|
"multiplicity": discretise_multiplicities(_conc * volume),
|
|
233
228
|
"immersed surface area": _isa,
|
|
@@ -238,12 +233,20 @@ def simulation(
|
|
|
238
233
|
IceWaterContent(name="qi"),
|
|
239
234
|
TotalUnfrozenImmersedSurfaceArea(name="A_tot"),
|
|
240
235
|
)
|
|
241
|
-
|
|
242
|
-
env = particulator.environment
|
|
243
|
-
|
|
236
|
+
env = Box(dt=time_step, dv=volume, backend=CPU(formulae=formulae))
|
|
244
237
|
env["T"] = initial_temperature
|
|
245
238
|
env["a_w_ice"] = np.nan
|
|
246
239
|
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
|
+
|
|
247
250
|
svp = particulator.formulae.saturation_vapour_pressure
|
|
248
251
|
|
|
249
252
|
cell_id = 0
|
|
@@ -253,7 +256,7 @@ def simulation(
|
|
|
253
256
|
if cooling_rate != 0:
|
|
254
257
|
env["T"] -= np.full((1,), cooling_rate * time_step / 2)
|
|
255
258
|
env["a_w_ice"] = svp.pvs_ice(env["T"][0]) / svp.pvs_water(env["T"][0])
|
|
256
|
-
particulator.
|
|
259
|
+
particulator.advance(0 if i == 0 else 1)
|
|
257
260
|
if cooling_rate != 0:
|
|
258
261
|
env["T"] -= np.full((1,), cooling_rate * time_step / 2)
|
|
259
262
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from PySDM_examples.featured.Arabas_and_Shima_2017.settings import setups
|
|
2
|
+
from PySDM_examples.featured.Arabas_and_Shima_2017.simulation import Simulation
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def main():
|
|
6
|
+
for settings in setups:
|
|
7
|
+
Simulation(settings).run()
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
if __name__ == "__main__":
|
|
11
|
+
main()
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
|
|
3
3
|
import PySDM.products as PySDM_products
|
|
4
|
-
from PySDM
|
|
5
|
-
from PySDM.
|
|
4
|
+
from PySDM import Particulator
|
|
5
|
+
from PySDM.backends import Numba
|
|
6
6
|
from PySDM.dynamics import AmbientThermodynamics, Condensation
|
|
7
7
|
from PySDM.environments import Parcel
|
|
8
|
-
from PySDM.initialisation import equilibrate_wet_radii
|
|
8
|
+
from PySDM.initialisation.hygroscopic_equilibrium import equilibrate_wet_radii
|
|
9
9
|
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=Numba):
|
|
14
14
|
t_half = settings.z_half / settings.w_avg
|
|
15
15
|
|
|
16
16
|
dt_output = (2 * t_half) / settings.n_output
|
|
@@ -18,40 +18,20 @@ 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
|
-
)
|
|
49
21
|
attributes = {}
|
|
50
22
|
r_dry = np.array([settings.r_dry])
|
|
51
23
|
attributes["dry volume"] = settings.formulae.trivia.volume(radius=r_dry)
|
|
52
24
|
attributes["kappa times dry volume"] = attributes["dry volume"] * settings.kappa
|
|
53
25
|
attributes["multiplicity"] = np.array([settings.n_in_dv], dtype=np.int64)
|
|
54
|
-
environment =
|
|
26
|
+
environment = Parcel(
|
|
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
|
+
)
|
|
55
35
|
r_wet = equilibrate_wet_radii(
|
|
56
36
|
r_dry=r_dry,
|
|
57
37
|
environment=environment,
|
|
@@ -72,7 +52,20 @@ class Simulation:
|
|
|
72
52
|
PySDM_products.RipeningRate(unit="s^-1 mg^-1", name="ripening_rate"),
|
|
73
53
|
]
|
|
74
54
|
|
|
75
|
-
self.particulator =
|
|
55
|
+
self.particulator = 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
|
+
)
|
|
76
69
|
|
|
77
70
|
self.n_output = settings.n_output
|
|
78
71
|
|
|
@@ -107,7 +100,7 @@ class Simulation:
|
|
|
107
100
|
|
|
108
101
|
self.save(output)
|
|
109
102
|
for _ in range(self.n_output):
|
|
110
|
-
self.particulator.
|
|
103
|
+
self.particulator.advance(self.n_substeps)
|
|
111
104
|
self.save(output)
|
|
112
105
|
|
|
113
106
|
return output
|
|
@@ -2,26 +2,21 @@
|
|
|
2
2
|
box-model and 2D prescribed-flow immersion-freezing examples based on
|
|
3
3
|
[Arabas et al. 2025](https://doi.org/10.1029/2024MS004770)
|
|
4
4
|
|
|
5
|
-
aida.ipynb:
|
|
6
|
-
.. include:: ./aida.ipynb.badges.md
|
|
7
|
-
|
|
8
|
-
copula_hello.ipynb:
|
|
9
|
-
.. include:: ./copula_hello.ipynb.badges.md
|
|
10
|
-
|
|
11
5
|
fig_2.ipynb:
|
|
12
6
|
.. include:: ./fig_2.ipynb.badges.md
|
|
13
7
|
|
|
14
|
-
figs_10_and_11_and_animations.ipynb:
|
|
15
|
-
.. include:: ./figs_10_and_11_and_animations.ipynb.badges.md
|
|
16
|
-
|
|
17
8
|
fig_A2.ipynb:
|
|
18
9
|
.. include:: ./fig_A2.ipynb.badges.md
|
|
19
10
|
|
|
11
|
+
|
|
20
12
|
figs_3_and_7_and_8.ipynb:
|
|
21
13
|
.. include:: ./figs_3_and_7_and_8.ipynb.badges.md
|
|
22
14
|
|
|
23
15
|
figs_5_and_6.ipynb:
|
|
24
16
|
.. include:: ./figs_5_and_6.ipynb.badges.md
|
|
17
|
+
|
|
18
|
+
figs_10_and_11_and_animations.ipynb:
|
|
19
|
+
.. include:: ./figs_10_and_11_and_animations.ipynb.badges.md
|
|
25
20
|
"""
|
|
26
21
|
|
|
27
22
|
from .make_particulator import make_particulator
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
|
|
3
|
-
from PySDM import
|
|
3
|
+
from PySDM import Particulator, Formulae
|
|
4
4
|
from PySDM import products as PySDM_products
|
|
5
5
|
from PySDM.backends import CPU
|
|
6
6
|
from PySDM.dynamics import Freezing
|
|
@@ -35,7 +35,7 @@ def make_particulator(
|
|
|
35
35
|
"particle_shape_and_density": "MixedPhaseSpheres",
|
|
36
36
|
}
|
|
37
37
|
formulae = Formulae(**formulae_ctor_args)
|
|
38
|
-
backend = CPU(formulae
|
|
38
|
+
backend = CPU(formulae)
|
|
39
39
|
|
|
40
40
|
attributes = {
|
|
41
41
|
"signed water mass": np.ones(n_sd) * droplet_volume * formulae.constants.rho_w
|
|
@@ -51,26 +51,31 @@ def make_particulator(
|
|
|
51
51
|
_,
|
|
52
52
|
attributes["multiplicity"],
|
|
53
53
|
) = sampling.sample(backend=backend, n_sd=n_sd)
|
|
54
|
+
immersion_freezing_flag = "singular"
|
|
54
55
|
else:
|
|
55
56
|
(
|
|
56
57
|
_,
|
|
57
58
|
attributes["immersed surface area"],
|
|
58
59
|
attributes["multiplicity"],
|
|
59
60
|
) = sampling.sample(backend=backend, n_sd=n_sd)
|
|
61
|
+
immersion_freezing_flag = "time-dependent"
|
|
62
|
+
if thaw:
|
|
63
|
+
thaw_flag = "instantaneous"
|
|
64
|
+
else:
|
|
65
|
+
thaw_flag = None
|
|
60
66
|
attributes["multiplicity"] *= total_particle_number
|
|
61
67
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
env = builder.particulator.environment
|
|
68
|
+
env = Box(dt, volume, backend=backend)
|
|
65
69
|
env["T"] = initial_temperature
|
|
66
70
|
env["RH"] = A_VALUE_LARGER_THAN_ONE
|
|
67
71
|
env["rhod"] = 1.0
|
|
68
72
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
return Particulator(
|
|
74
|
+
n_sd=n_sd,
|
|
75
|
+
environment=env,
|
|
76
|
+
dynamics=[Freezing(immersion_freezing=immersion_freezing_flag, thaw=thaw_flag)],
|
|
73
77
|
attributes=attributes,
|
|
78
|
+
requested_attributes=("volume",),
|
|
74
79
|
products=(
|
|
75
80
|
PySDM_products.Time(name="t"),
|
|
76
81
|
PySDM_products.AmbientTemperature(name="T"),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import matplotlib
|
|
2
2
|
import numpy as np
|
|
3
3
|
from matplotlib import pyplot
|
|
4
|
-
from PySDM_examples.Arabas_et_al_2025.curved_text import CurvedText
|
|
5
|
-
from PySDM_examples.Arabas_et_al_2025.frozen_fraction import FrozenFraction
|
|
4
|
+
from PySDM_examples.featured.Arabas_et_al_2025.curved_text import CurvedText
|
|
5
|
+
from PySDM_examples.featured.Arabas_et_al_2025.frozen_fraction import FrozenFraction
|
|
6
6
|
|
|
7
7
|
from PySDM.physics import si
|
|
8
8
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
def update_thermo(
|
|
5
|
-
|
|
6
|
-
svp = particulator.formulae.saturation_vapour_pressure
|
|
7
|
-
|
|
4
|
+
def update_thermo(env, T):
|
|
5
|
+
svp = env.backend.formulae.saturation_vapour_pressure
|
|
8
6
|
env["T"] = T
|
|
9
7
|
env["a_w_ice"] = svp.pvs_ice(T) / svp.pvs_water(T)
|
|
10
8
|
|
|
@@ -17,10 +15,13 @@ def run_simulation(particulator, temperature_profile, n_steps):
|
|
|
17
15
|
for step in range(n_steps + 1):
|
|
18
16
|
if step != 0:
|
|
19
17
|
update_thermo(
|
|
20
|
-
particulator,
|
|
18
|
+
particulator.environment,
|
|
19
|
+
T=temperature_profile((step - 0.5) * particulator.dt),
|
|
20
|
+
)
|
|
21
|
+
particulator.advance(step - particulator.n_steps)
|
|
22
|
+
update_thermo(
|
|
23
|
+
particulator.environment, T=temperature_profile(step * particulator.dt)
|
|
21
24
|
)
|
|
22
|
-
particulator.run(step - particulator.n_steps)
|
|
23
|
-
update_thermo(particulator, T=temperature_profile(step * particulator.dt))
|
|
24
25
|
output["frozen"].append(particulator.attributes["volume"].to_ndarray() < 0)
|
|
25
26
|
else:
|
|
26
27
|
output["spectrum"] = {}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import os
|
|
2
2
|
|
|
3
3
|
import numpy as np
|
|
4
|
-
from PySDM_examples.Berry_1967.settings import Settings
|
|
5
|
-
from PySDM_examples.Berry_1967.spectrum_plotter import SpectrumPlotter
|
|
6
|
-
from PySDM_examples.Shima_et_al_2009.example import run
|
|
4
|
+
from PySDM_examples.featured.Berry_1967.settings import Settings
|
|
5
|
+
from PySDM_examples.featured.Berry_1967.spectrum_plotter import SpectrumPlotter
|
|
6
|
+
from PySDM_examples.featured.Shima_et_al_2009.example import run
|
|
7
7
|
|
|
8
8
|
from PySDM.dynamics.collisions.collision_kernels import (
|
|
9
9
|
Electric,
|