PySDM-examples 2.118__tar.gz → 2.120__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.
Files changed (173) hide show
  1. {pysdm_examples-2.118 → pysdm_examples-2.120}/PKG-INFO +3 -3
  2. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Pyrcel/simulation.py +3 -1
  3. pysdm_examples-2.120/PySDM_examples/utils/pvanim.py +304 -0
  4. {pysdm_examples-2.118 → pysdm_examples-2.120}/docs/pysdm_examples_landing.md +1 -1
  5. {pysdm_examples-2.118 → pysdm_examples-2.120}/pyproject.toml +1 -1
  6. {pysdm_examples-2.118 → pysdm_examples-2.120}/pysdm_examples.egg-info/PKG-INFO +3 -3
  7. {pysdm_examples-2.118 → pysdm_examples-2.120}/pysdm_examples.egg-info/SOURCES.txt +1 -2
  8. pysdm_examples-2.118/PySDM_examples/Pyrcel/tutorial_settings.py +0 -65
  9. pysdm_examples-2.118/PySDM_examples/Pyrcel/tutorial_simulation.py +0 -90
  10. {pysdm_examples-2.118 → pysdm_examples-2.120}/MANIFEST.in +0 -0
  11. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Abade_and_Albuquerque_2024/__init__.py +0 -0
  12. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Abade_and_Albuquerque_2024/settings.py +0 -0
  13. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Abade_and_Albuquerque_2024/simulation.py +0 -0
  14. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Abdul_Razzak_Ghan_2000/__init__.py +0 -0
  15. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Abdul_Razzak_Ghan_2000/aerosol.py +0 -0
  16. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Abdul_Razzak_Ghan_2000/data_from_ARG2000_paper.py +0 -0
  17. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Abdul_Razzak_Ghan_2000/data_from_CloudMicrophysics_ARG.py +0 -0
  18. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Abdul_Razzak_Ghan_2000/run_ARG_parcel.py +0 -0
  19. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Alpert_and_Knopf_2016/__init__.py +0 -0
  20. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Alpert_and_Knopf_2016/simulation.py +0 -0
  21. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Alpert_and_Knopf_2016/table.py +0 -0
  22. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Alpert_and_Knopf_2016/table_1.py +0 -0
  23. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Alpert_and_Knopf_2016/table_2.py +0 -0
  24. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Arabas_and_Shima_2017/__init__.py +0 -0
  25. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Arabas_and_Shima_2017/example.py +0 -0
  26. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Arabas_and_Shima_2017/settings.py +0 -0
  27. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Arabas_and_Shima_2017/simulation.py +0 -0
  28. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Arabas_et_al_2015/__init__.py +0 -0
  29. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Arabas_et_al_2015/example.py +0 -0
  30. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Arabas_et_al_2015/example_benchmark.py +0 -0
  31. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Arabas_et_al_2015/settings.py +0 -0
  32. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Arabas_et_al_2015/spin_up.py +0 -0
  33. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Arabas_et_al_2025/__init__.py +0 -0
  34. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Arabas_et_al_2025/commons.py +0 -0
  35. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Arabas_et_al_2025/curved_text.py +0 -0
  36. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Arabas_et_al_2025/frozen_fraction.py +0 -0
  37. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Arabas_et_al_2025/make_particulator.py +0 -0
  38. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Arabas_et_al_2025/plots.py +0 -0
  39. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Arabas_et_al_2025/run_simulation.py +0 -0
  40. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Bartman_2020_MasterThesis/__init__.py +0 -0
  41. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Bartman_2020_MasterThesis/fig_4_adaptive_sdm.py +0 -0
  42. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Bartman_2020_MasterThesis/fig_5_SCIPY_VS_ADAPTIVE.py +0 -0
  43. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Bartman_et_al_2021/__init__.py +0 -0
  44. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Bartman_et_al_2021/label.py +0 -0
  45. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Berry_1967/__init__.py +0 -0
  46. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Berry_1967/example.py +0 -0
  47. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Berry_1967/example_fig_6.py +0 -0
  48. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Berry_1967/settings.py +0 -0
  49. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Berry_1967/spectrum_plotter.py +0 -0
  50. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Bieli_et_al_2022/__init__.py +0 -0
  51. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Bieli_et_al_2022/settings.py +0 -0
  52. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Bieli_et_al_2022/simulation.py +0 -0
  53. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Bolin_1958/__init__.py +0 -0
  54. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Bolot_et_al_2013/__init__.py +0 -0
  55. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Bulenok_2023_MasterThesis/__init__.py +0 -0
  56. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Bulenok_2023_MasterThesis/performance_comparison_Srivastava_Setup.py +0 -0
  57. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Bulenok_2023_MasterThesis/setups.py +0 -0
  58. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Bulenok_2023_MasterThesis/utils.py +0 -0
  59. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Ervens_and_Feingold_2012/__init__.py +0 -0
  60. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Ervens_and_Feingold_2012/settings.py +0 -0
  61. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Gedzelman_and_Arnold_1994/__init__.py +0 -0
  62. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Gonfiantini_1986/__init__.py +0 -0
  63. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Grabowski_and_Pawlowska_2023/__init__.py +0 -0
  64. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Grabowski_and_Pawlowska_2023/settings.py +0 -0
  65. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Grabowski_and_Pawlowska_2023/simulation.py +0 -0
  66. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Graf_et_al_2019/__init__.py +0 -0
  67. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Jaruga_and_Pawlowska_2018/__init__.py +0 -0
  68. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Jensen_and_Nugent_2017/__init__.py +0 -0
  69. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Jensen_and_Nugent_2017/plotting.py +0 -0
  70. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Jensen_and_Nugent_2017/settings.py +0 -0
  71. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Jensen_and_Nugent_2017/simulation.py +0 -0
  72. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Jensen_and_Nugent_2017/table_3.py +0 -0
  73. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Kinzer_And_Gunn_1951/__init__.py +0 -0
  74. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Kinzer_And_Gunn_1951/table_1_and_2.py +0 -0
  75. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Kreidenweis_et_al_2003/__init__.py +0 -0
  76. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Kreidenweis_et_al_2003/settings.py +0 -0
  77. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Kreidenweis_et_al_2003/simulation.py +0 -0
  78. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Lamb_et_al_2017/__init__.py +0 -0
  79. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Lowe_et_al_2019/__init__.py +0 -0
  80. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Lowe_et_al_2019/aerosol.py +0 -0
  81. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Lowe_et_al_2019/aerosol_code.py +0 -0
  82. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Lowe_et_al_2019/constants_def.py +0 -0
  83. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Lowe_et_al_2019/plot_helper.py +0 -0
  84. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Lowe_et_al_2019/settings.py +0 -0
  85. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Lowe_et_al_2019/simulation.py +0 -0
  86. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Merlivat_and_Nief_1967/__init__.py +0 -0
  87. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Miyake_et_al_1968/__init__.py +0 -0
  88. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Morrison_and_Grabowski_2007/__init__.py +0 -0
  89. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Morrison_and_Grabowski_2007/common.py +0 -0
  90. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Morrison_and_Grabowski_2007/cumulus.py +0 -0
  91. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Morrison_and_Grabowski_2007/strato_cumulus.py +0 -0
  92. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Niedermeier_et_al_2014/__init__.py +0 -0
  93. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Niedermeier_et_al_2014/settings.py +0 -0
  94. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Niedermeier_et_al_2014/simulation.py +0 -0
  95. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Pierchala_et_al_2022/__init__.py +0 -0
  96. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Pierchala_et_al_2022/commons.py +0 -0
  97. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Pruppacher_and_Rasmussen_1979/__init__.py +0 -0
  98. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Pyrcel/__init__.py +0 -0
  99. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Pyrcel/profile_plotter.py +0 -0
  100. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Pyrcel/settings.py +0 -0
  101. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Rozanski_and_Sonntag_1982/__init__.py +0 -0
  102. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Rozanski_and_Sonntag_1982/multibox.py +0 -0
  103. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Shima_et_al_2009/__init__.py +0 -0
  104. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Shima_et_al_2009/error_measure.py +0 -0
  105. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Shima_et_al_2009/example.py +0 -0
  106. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Shima_et_al_2009/example_timing.py +0 -0
  107. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Shima_et_al_2009/settings.py +0 -0
  108. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Shima_et_al_2009/spectrum_plotter.py +0 -0
  109. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Shima_et_al_2009/tutorial_example.py +0 -0
  110. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Shima_et_al_2009/tutorial_plotter.py +0 -0
  111. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Shima_et_al_2009/tutorial_settings.py +0 -0
  112. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Shipway_and_Hill_2012/__init__.py +0 -0
  113. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Shipway_and_Hill_2012/mpdata_1d.py +0 -0
  114. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Shipway_and_Hill_2012/plot.py +0 -0
  115. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Shipway_and_Hill_2012/settings.py +0 -0
  116. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Shipway_and_Hill_2012/simulation.py +0 -0
  117. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Singer_Ward/__init__.py +0 -0
  118. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Singer_Ward/aerosol.py +0 -0
  119. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Srivastava_1982/__init__.py +0 -0
  120. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Srivastava_1982/equations.py +0 -0
  121. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Srivastava_1982/example.py +0 -0
  122. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Srivastava_1982/settings.py +0 -0
  123. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Srivastava_1982/simulation.py +0 -0
  124. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Stewart_1975/__init__.py +0 -0
  125. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Szumowski_et_al_1998/__init__.py +0 -0
  126. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Szumowski_et_al_1998/fields.py +0 -0
  127. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Szumowski_et_al_1998/gui.py +0 -0
  128. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Szumowski_et_al_1998/gui_controller.py +0 -0
  129. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Szumowski_et_al_1998/gui_settings.py +0 -0
  130. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Szumowski_et_al_1998/gui_viewer.py +0 -0
  131. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Szumowski_et_al_1998/make_default_product_collection.py +0 -0
  132. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Szumowski_et_al_1998/mpdata_2d.py +0 -0
  133. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Szumowski_et_al_1998/plots.py +0 -0
  134. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Szumowski_et_al_1998/simulation.py +0 -0
  135. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Szumowski_et_al_1998/sounding.py +0 -0
  136. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Szumowski_et_al_1998/storage.py +0 -0
  137. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Toon_et_al_1980/__init__.py +0 -0
  138. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Van_Hook_1968/__init__.py +0 -0
  139. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Yang_et_al_2018/__init__.py +0 -0
  140. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Yang_et_al_2018/settings.py +0 -0
  141. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Yang_et_al_2018/simulation.py +0 -0
  142. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/Zaba_et_al_2025/__init__.py +0 -0
  143. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/_HOWTOs/__init__.py +0 -0
  144. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/__init__.py +0 -0
  145. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/deJong_Azimi/__init__.py +0 -0
  146. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/deJong_Azimi/cloudy_data.py +0 -0
  147. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/deJong_Azimi/cloudy_data_0d.py +0 -0
  148. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/deJong_Azimi/settings1D.py +0 -0
  149. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/deJong_Azimi/simulation_0D.py +0 -0
  150. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/deJong_Mackay_et_al_2023/__init__.py +0 -0
  151. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/deJong_Mackay_et_al_2023/plot_rates.py +0 -0
  152. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/deJong_Mackay_et_al_2023/settings1D.py +0 -0
  153. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/deJong_Mackay_et_al_2023/settings_0D.py +0 -0
  154. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/deJong_Mackay_et_al_2023/simulation1D.py +0 -0
  155. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/deJong_Mackay_et_al_2023/simulation_0D.py +0 -0
  156. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/deJong_Mackay_et_al_2023/simulation_ss.py +0 -0
  157. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/seeding/__init__.py +0 -0
  158. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/seeding/settings.py +0 -0
  159. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/seeding/simulation.py +0 -0
  160. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/utils/__init__.py +0 -0
  161. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/utils/basic_simulation.py +0 -0
  162. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/utils/dummy_controller.py +0 -0
  163. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/utils/progbar_controller.py +0 -0
  164. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/utils/read_vtk_1d.py +0 -0
  165. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/utils/widgets/__init__.py +0 -0
  166. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/utils/widgets/freezer.py +0 -0
  167. {pysdm_examples-2.118 → pysdm_examples-2.120}/PySDM_examples/utils/widgets/progbar_updater.py +0 -0
  168. {pysdm_examples-2.118 → pysdm_examples-2.120}/README.md +0 -0
  169. {pysdm_examples-2.118 → pysdm_examples-2.120}/pysdm_examples.egg-info/dependency_links.txt +0 -0
  170. {pysdm_examples-2.118 → pysdm_examples-2.120}/pysdm_examples.egg-info/requires.txt +0 -0
  171. {pysdm_examples-2.118 → pysdm_examples-2.120}/pysdm_examples.egg-info/top_level.txt +0 -0
  172. {pysdm_examples-2.118 → pysdm_examples-2.120}/setup.cfg +0 -0
  173. {pysdm_examples-2.118 → pysdm_examples-2.120}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: pysdm-examples
3
- Version: 2.118
3
+ Version: 2.120
4
4
  Summary: PySDM usage examples reproducing results from literature and depicting how to use PySDM from Python Jupyter notebooks
5
5
  Home-page: https://github.com/open-atmos/PySDM
6
6
  Author: https://github.com/open-atmos/PySDM/graphs/contributors
@@ -77,7 +77,7 @@ The 2D prescribed-flow framework used here can be traced back to the work of
77
77
  implementation of the <a href="https://doi.org/10.1002/fld.1071">MPDATA numerical scheme of Smolarkiewicz (e.g., 2006)</a>.
78
78
  An animation depicting PySDM simulation capturing <mark>aerosol collisional processing</mark> by warm rain is shown below:
79
79
 
80
- ![animation](https://github.com/open-atmos/PySDM/wiki/files/kinematic_2D_example.gif)
80
+ <source src="https://github.com/open-atmos/PySDM/releases/download/tip/docs_intro_animation_ubuntu-24.04.mp4" type="video/mp4">
81
81
 
82
82
  Example notebooks:
83
83
  - <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Arabas_et_al_2015.html">Arabas_et_al_2015</a>
@@ -91,7 +91,9 @@ class Simulation(BasicSimulation):
91
91
  attr[drop_id].append(attr_data[drop_id])
92
92
  super()._save(output)
93
93
 
94
- def run(self):
94
+ def run(self, observers=()):
95
+ for observer in observers:
96
+ self.particulator.observers.append(observer)
95
97
  output_products = super()._run(
96
98
  self.settings.nt, self.settings.steps_per_output_interval
97
99
  )
@@ -0,0 +1,304 @@
1
+ #!/usr/bin/env pvpython
2
+ import argparse
3
+ from collections import namedtuple
4
+ import pathlib
5
+
6
+ from paraview import simple as pvs # pylint: disable=import-error
7
+
8
+ pvs._DisableFirstRenderCameraReset()
9
+
10
+
11
+ def cli_using_argparse(argp):
12
+ argp.add_argument("product_path", help="path to pvd products file")
13
+ argp.add_argument("attributes_path", help=" path to pvd attributes file")
14
+ argp.add_argument("output_path", help="path where to write output files")
15
+ argp.add_argument(
16
+ "--multiplicity_preset",
17
+ default="Inferno (matplotlib)",
18
+ help="Preset for multiplicity",
19
+ )
20
+ argp.add_argument(
21
+ "--multiplicity_logscale",
22
+ action="store_false",
23
+ help="Use log scale for multiplicity",
24
+ )
25
+ argp.add_argument(
26
+ "--effectiveradius_preset",
27
+ default="Black, Blue and White",
28
+ help="Preset for effectiveradius",
29
+ )
30
+ argp.add_argument(
31
+ "--effectiveradius_logscale",
32
+ action="store_false",
33
+ help="Use log scale for effectiveradius",
34
+ )
35
+ argp.add_argument(
36
+ "--effectiveradius_nan_color",
37
+ nargs=3,
38
+ type=float,
39
+ default=[0.666, 0.333, 1.0],
40
+ help="Nan color in RGB format for effectiveradius",
41
+ )
42
+ argp.add_argument(
43
+ "--sd_products_opacity", type=float, default=0.9, help="Opacity for sd_products"
44
+ )
45
+ argp.add_argument(
46
+ "--calculator1_opacity",
47
+ type=float,
48
+ default=0.19,
49
+ help="Opacity for calculator1",
50
+ )
51
+ argp.add_argument(
52
+ "--sd_attributes_opacity",
53
+ type=float,
54
+ default=0.77,
55
+ help="Opacity for sd_attributes",
56
+ )
57
+ argp.add_argument(
58
+ "--animationframename",
59
+ type=str,
60
+ help="Name of the file with animation last frame",
61
+ )
62
+ argp.add_argument(
63
+ "--animationname",
64
+ type=str,
65
+ help="Name of the file with animation",
66
+ )
67
+ argp.add_argument(
68
+ "--framerate", type=int, help="Number of frame rates.", default=15
69
+ )
70
+
71
+
72
+ ap = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
73
+ cli_using_argparse(ap)
74
+
75
+ args = ap.parse_args()
76
+ sd_productspvd = pvs.OpenDataFile(args.product_path)
77
+ sd_attributespvd = pvs.OpenDataFile(args.attributes_path)
78
+
79
+
80
+ setup = {
81
+ "renderView1": pvs.GetActiveViewOrCreate("RenderView"),
82
+ "sd_attributespvdDisplay": pvs.GetDisplayProperties(
83
+ sd_attributespvd, view=pvs.GetActiveViewOrCreate("RenderView")
84
+ ),
85
+ "effectiveradiusLUT": pvs.GetColorTransferFunction("effectiveradius"),
86
+ "sd_productspvdDisplay": pvs.GetDisplayProperties(
87
+ sd_productspvd, view=pvs.GetActiveViewOrCreate("RenderView")
88
+ ),
89
+ }
90
+
91
+ setup = namedtuple("Setup", setup.keys())(**setup)
92
+
93
+ setup.effectiveradiusLUT.RescaleTransferFunction(0.1380997175392798, 207.7063518856934)
94
+
95
+ setup.renderView1.Update()
96
+
97
+
98
+ def create_new_calculator(
99
+ calcinput,
100
+ representation,
101
+ function,
102
+ color_by1,
103
+ color_by2,
104
+ color_by3,
105
+ scalar_coloring=False,
106
+ hide=False,
107
+ *,
108
+ y,
109
+ registrationame,
110
+ ):
111
+ calculator = pvs.Calculator(registrationName=registrationame, Input=calcinput)
112
+ display = pvs.Show(calculator, y.renderView1, representation)
113
+ calculator.Function = function
114
+ y.renderView1.Update()
115
+ if scalar_coloring is True:
116
+ pvs.ColorBy(display, (color_by1, color_by2, color_by3))
117
+ if hide is True:
118
+ pvs.Hide(calculator, y.renderView1)
119
+ return y.renderView1.Update()
120
+
121
+
122
+ def scalar_bar(name, *, y, erLUT):
123
+ calculator1Display = pvs.Show(
124
+ calculator1, y.renderView1, "UnstructuredGridRepresentation"
125
+ )
126
+ calculator1Display.SetScalarBarVisibility(y.renderView1, True)
127
+ scalarBar = pvs.GetScalarBar(erLUT.effectiveradiusLUT, y.renderView1)
128
+ scalarBar.ComponentTitle = ""
129
+ scalarBar.Title = name
130
+ y.renderView1.Update()
131
+
132
+
133
+ def create_glyph(
134
+ registration_name, put, scale_array1, scale_array2, color_by=False, *, y
135
+ ):
136
+ glyph = pvs.Glyph(registrationName=registration_name, Input=put, GlyphType="Arrow")
137
+ glyphDisplay = pvs.Show(glyph, y.renderView1, "GeometryRepresentation")
138
+ glyphDisplay.Representation = "Surface"
139
+ glyph.ScaleArray = [scale_array1, scale_array2]
140
+ glyph.ScaleFactor = 100
141
+ glyphDisplay.SetScalarBarVisibility(y.renderView1, True)
142
+ if color_by is True:
143
+ glyphDisplay.ColorArrayName = ["POINTS", ""]
144
+ pvs.ColorBy(glyphDisplay, None)
145
+ y.renderView1.Update()
146
+
147
+
148
+ def apply_presets_logscale_opacity_and_update(*, y, attdisplay, erLUT, proddisplay):
149
+ multiplicityLUT = pvs.GetColorTransferFunction("multiplicity")
150
+ multiplicityLUT.RescaleTransferFunction(19951.0, 50461190157.0)
151
+ calculator1Display = pvs.Show(
152
+ calculator1, y.renderView1, "UnstructuredGridRepresentation"
153
+ )
154
+ multiplicityLUT.ApplyPreset(args.multiplicity_preset, True)
155
+ if args.multiplicity_logscale:
156
+ multiplicityLUT.MapControlPointsToLogSpace()
157
+ multiplicityLUT.UseLogScale = 1
158
+ else:
159
+ multiplicityLUT.MapControlPointsToLinearSpace()
160
+ multiplicityLUT.UseLogScale = 0
161
+
162
+ erLUT.effectiveradiusLUT.ApplyPreset(args.effectiveradius_preset, True)
163
+ if args.effectiveradius_logscale:
164
+ erLUT.effectiveradiusLUT.MapControlPointsToLogSpace()
165
+ erLUT.effectiveradiusLUT.UseLogScale = 1
166
+ else:
167
+ erLUT.effectiveradiusLUT.MapControlPointsToLinearSpace()
168
+ erLUT.effectiveradiusLUT.UseLogScale = 0
169
+
170
+ erLUT.effectiveradiusLUT.NanColor = args.effectiveradius_nan_color
171
+
172
+ proddisplay.sd_productspvdDisplay.SetRepresentationType("Surface With Edges")
173
+ proddisplay.sd_productspvdDisplay.Opacity = args.sd_products_opacity
174
+ calculator1Display.Opacity = args.calculator1_opacity
175
+ attdisplay.sd_attributespvdDisplay.Opacity = args.sd_attributes_opacity
176
+
177
+ y.renderView1.Update()
178
+
179
+
180
+ def get_layout(*, y):
181
+ layout1 = pvs.GetLayout()
182
+ layout1.SetSize(1205, 739)
183
+ y.renderView1.Update()
184
+
185
+
186
+ def set_current_camera_placement(*, y):
187
+ y.renderView1.InteractionMode = "2D"
188
+ y.renderView1.CameraPosition = [
189
+ 836.5045867211775,
190
+ 677.8909274570431,
191
+ -4098.0762113533165,
192
+ ]
193
+ y.renderView1.CameraFocalPoint = [836.5045867211775, 677.8909274570431, 0.0]
194
+ y.renderView1.CameraViewUp = [1.0, 0.0, 0.0]
195
+ y.renderView1.CameraParallelScale = 1060.6601717798205
196
+ y.renderView1.Update()
197
+
198
+
199
+ def axes_settings(*, view):
200
+ view.ViewSize = [2000, 800]
201
+ view.Background = [1, 1, 1]
202
+ view.CenterAxesVisibility = True
203
+ view.OrientationAxesVisibility = True
204
+ axesGrid = view.AxesGrid
205
+ axesGrid.Visibility = True
206
+ axesGrid.XTitle = "Z [m]"
207
+ axesGrid.YTitle = "X [m]"
208
+
209
+ axesGrid.XAxisUseCustomLabels = True
210
+ axesGrid.XAxisLabels = [300, 600, 900, 1200]
211
+ axesGrid.YAxisUseCustomLabels = True
212
+ axesGrid.YAxisLabels = [300, 600, 900, 1200]
213
+
214
+ axesGrid.XTitleFontSize = 30
215
+ axesGrid.XLabelFontSize = 30
216
+ axesGrid.YTitleFontSize = 30
217
+ axesGrid.YLabelFontSize = 30
218
+
219
+ axesGrid.XTitleColor = [1.0, 1.0, 1.0]
220
+ axesGrid.XLabelColor = [1.0, 1.0, 1.0]
221
+ axesGrid.YTitleColor = [1.0, 1.0, 1.0]
222
+ axesGrid.YLabelColor = [1.0, 1.0, 1.0]
223
+ axesGrid.GridColor = [0.1, 0.1, 0.1]
224
+ view.CenterAxesVisibility = False
225
+ view.Update()
226
+
227
+
228
+ def time_annotation(*, y):
229
+ time = pvs.AnnotateTimeFilter(
230
+ guiName="AnnotateTimeFilter1", Format="Time:{time:f}s"
231
+ )
232
+ pvs.Show(time, y.renderView1)
233
+ y.renderView1.Update()
234
+
235
+
236
+ def text(text_in, position_y, *, view):
237
+ sentence = pvs.Text()
238
+ sentence.Text = text_in
239
+ textDisplay = pvs.Show(sentence, view)
240
+ textDisplay.Color = [1.0, 1.0, 1.0]
241
+ textDisplay.WindowLocation = "Any Location"
242
+ textDisplay.FontSize = 16
243
+ textDisplay.Position = [0.01, position_y]
244
+
245
+
246
+ def last_anim_frame(animation_frame_name):
247
+ time_steps = sd_productspvd.TimestepValues
248
+ last_time = time_steps[len(time_steps) - 1]
249
+ setup.renderView1.ViewTime = last_time
250
+ for reader in (sd_productspvd,):
251
+ reader.UpdatePipeline(last_time)
252
+ pvs.ExportView(
253
+ filename=str(pathlib.Path(args.output_path) / animation_frame_name),
254
+ view=setup.renderView1,
255
+ Rasterize3Dgeometry=False,
256
+ GL2PSdepthsortmethod="BSP sorting (slow, best)",
257
+ )
258
+ pvs.RenderAllViews()
259
+
260
+
261
+ calculator1 = create_new_calculator(
262
+ sd_attributespvd,
263
+ "UnstructuredGridRepresentation",
264
+ '"relative fall velocity"*(-iHat)',
265
+ "None",
266
+ "None",
267
+ "None",
268
+ y=setup,
269
+ registrationame="Calculator1",
270
+ )
271
+ scalar_bar("effective radius [um]", y=setup, erLUT=setup)
272
+ create_glyph("Glyph1", calculator1, "POINTS", "relative fall velocity", y=setup)
273
+ calculator2 = create_new_calculator(
274
+ sd_productspvd,
275
+ "StructuredGridRepresentation",
276
+ "cx*jHat+cy*iHat",
277
+ "CELLS",
278
+ "Result",
279
+ "Magnitude",
280
+ True,
281
+ True,
282
+ y=setup,
283
+ registrationame="Calculator2",
284
+ )
285
+ apply_presets_logscale_opacity_and_update(
286
+ y=setup, attdisplay=setup, erLUT=setup, proddisplay=setup
287
+ )
288
+ create_glyph("Glyph2", calculator2, "CELLS", "Result", True, y=setup)
289
+ get_layout(y=setup)
290
+ set_current_camera_placement(y=setup)
291
+ axes_settings(view=setup.renderView1)
292
+ time_annotation(y=setup)
293
+ text("Arrows scale with Courant number C=u*Δt/Δx,", 0.7, view=setup.renderView1)
294
+ text("reflecting the grid spacing Δx and Δy.", 0.65, view=setup.renderView1)
295
+ last_anim_frame(animation_frame_name=args.animationframename)
296
+ scene = pvs.GetAnimationScene()
297
+ scene.UpdateAnimationUsingDataTimeSteps()
298
+ pvs.Render(setup.renderView1)
299
+ pvs.SaveAnimation(
300
+ str(pathlib.Path(args.output_path) / args.animationname),
301
+ setup.renderView1,
302
+ FrameRate=args.framerate,
303
+ )
304
+ pvs.RenderAllViews()
@@ -41,7 +41,7 @@ The 2D prescribed-flow framework used here can be traced back to the work of
41
41
  implementation of the <a href="https://doi.org/10.1002/fld.1071">MPDATA numerical scheme of Smolarkiewicz (e.g., 2006)</a>.
42
42
  An animation depicting PySDM simulation capturing <mark>aerosol collisional processing</mark> by warm rain is shown below:
43
43
 
44
- ![animation](https://github.com/open-atmos/PySDM/wiki/files/kinematic_2D_example.gif)
44
+ <source src="https://github.com/open-atmos/PySDM/releases/download/tip/docs_intro_animation_ubuntu-24.04.mp4" type="video/mp4">
45
45
 
46
46
  Example notebooks:
47
47
  - `PySDM_examples.Arabas_et_al_2015`
@@ -4,4 +4,4 @@ local_scheme = "no-local-version"
4
4
  version_scheme = "post-release"
5
5
 
6
6
  [build-system]
7
- requires = ['setuptools==76.0.0', 'setuptools-scm==8.2.1']
7
+ requires = ['setuptools==80.7.1', 'setuptools-scm==8.3.1']
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: pysdm-examples
3
- Version: 2.118
3
+ Version: 2.120
4
4
  Summary: PySDM usage examples reproducing results from literature and depicting how to use PySDM from Python Jupyter notebooks
5
5
  Home-page: https://github.com/open-atmos/PySDM
6
6
  Author: https://github.com/open-atmos/PySDM/graphs/contributors
@@ -77,7 +77,7 @@ The 2D prescribed-flow framework used here can be traced back to the work of
77
77
  implementation of the <a href="https://doi.org/10.1002/fld.1071">MPDATA numerical scheme of Smolarkiewicz (e.g., 2006)</a>.
78
78
  An animation depicting PySDM simulation capturing <mark>aerosol collisional processing</mark> by warm rain is shown below:
79
79
 
80
- ![animation](https://github.com/open-atmos/PySDM/wiki/files/kinematic_2D_example.gif)
80
+ <source src="https://github.com/open-atmos/PySDM/releases/download/tip/docs_intro_animation_ubuntu-24.04.mp4" type="video/mp4">
81
81
 
82
82
  Example notebooks:
83
83
  - <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Arabas_et_al_2015.html">Arabas_et_al_2015</a>
@@ -94,8 +94,6 @@ PySDM_examples/Pyrcel/__init__.py
94
94
  PySDM_examples/Pyrcel/profile_plotter.py
95
95
  PySDM_examples/Pyrcel/settings.py
96
96
  PySDM_examples/Pyrcel/simulation.py
97
- PySDM_examples/Pyrcel/tutorial_settings.py
98
- PySDM_examples/Pyrcel/tutorial_simulation.py
99
97
  PySDM_examples/Rozanski_and_Sonntag_1982/__init__.py
100
98
  PySDM_examples/Rozanski_and_Sonntag_1982/multibox.py
101
99
  PySDM_examples/Shima_et_al_2009/__init__.py
@@ -158,6 +156,7 @@ PySDM_examples/utils/__init__.py
158
156
  PySDM_examples/utils/basic_simulation.py
159
157
  PySDM_examples/utils/dummy_controller.py
160
158
  PySDM_examples/utils/progbar_controller.py
159
+ PySDM_examples/utils/pvanim.py
161
160
  PySDM_examples/utils/read_vtk_1d.py
162
161
  PySDM_examples/utils/widgets/__init__.py
163
162
  PySDM_examples/utils/widgets/freezer.py
@@ -1,65 +0,0 @@
1
- from typing import Dict
2
-
3
- import numpy as np
4
- from pystrict import strict
5
-
6
- from PySDM import Formulae
7
- from PySDM.initialisation.impl.spectrum import Spectrum
8
-
9
-
10
- @strict
11
- class Settings:
12
- def __init__(
13
- self,
14
- dz: float,
15
- n_sd_per_mode: tuple,
16
- aerosol_modes_by_kappa: Dict[float, Spectrum],
17
- vertical_velocity: float,
18
- initial_temperature: float,
19
- initial_pressure: float,
20
- initial_relative_humidity: float,
21
- displacement: float,
22
- formulae: Formulae,
23
- ):
24
- self.formulae = formulae
25
- self.n_sd_per_mode = n_sd_per_mode
26
- self.aerosol_modes_by_kappa = aerosol_modes_by_kappa
27
-
28
- const = self.formulae.constants
29
- self.vertical_velocity = vertical_velocity
30
- self.initial_pressure = initial_pressure
31
- self.initial_temperature = initial_temperature
32
- pv0 = initial_relative_humidity * formulae.saturation_vapour_pressure.pvs_water(
33
- initial_temperature
34
- )
35
- self.initial_vapour_mixing_ratio = const.eps * pv0 / (initial_pressure - pv0)
36
- self.t_max = displacement / vertical_velocity
37
- self.timestep = dz / vertical_velocity
38
- self.output_interval = self.timestep
39
-
40
- @property
41
- def initial_air_density(self):
42
- const = self.formulae.constants
43
- dry_air_density = (
44
- self.formulae.trivia.p_d(
45
- self.initial_pressure, self.initial_vapour_mixing_ratio
46
- )
47
- / self.initial_temperature
48
- / const.Rd
49
- )
50
- return dry_air_density * (1 + self.initial_vapour_mixing_ratio)
51
-
52
- @property
53
- def nt(self) -> int:
54
- nt = self.t_max / self.timestep
55
- nt_int = round(nt)
56
- np.testing.assert_almost_equal(nt, nt_int)
57
- return nt_int
58
-
59
- @property
60
- def steps_per_output_interval(self) -> int:
61
- return int(self.output_interval / self.timestep)
62
-
63
- @property
64
- def output_steps(self) -> np.ndarray:
65
- return np.arange(0, self.nt + 1, self.steps_per_output_interval)
@@ -1,90 +0,0 @@
1
- import numpy as np
2
- from PySDM_examples.utils import BasicSimulation
3
-
4
- from PySDM import Builder
5
- from PySDM.backends import CPU
6
- from PySDM.backends.impl_numba.test_helpers import scipy_ode_condensation_solver
7
- from PySDM.dynamics import AmbientThermodynamics, Condensation
8
- from PySDM.environments import Parcel
9
- from PySDM.initialisation import equilibrate_wet_radii
10
- from PySDM.initialisation.sampling.spectral_sampling import ConstantMultiplicity
11
- from PySDM.physics import si
12
-
13
-
14
- class Simulation(BasicSimulation):
15
- def __init__(
16
- self, settings, products=None, scipy_solver=False, rtol_thd=1e-10, rtol_x=1e-10
17
- ):
18
- env = Parcel(
19
- dt=settings.timestep,
20
- p0=settings.initial_pressure,
21
- initial_water_vapour_mixing_ratio=settings.initial_vapour_mixing_ratio,
22
- T0=settings.initial_temperature,
23
- w=settings.vertical_velocity,
24
- mass_of_dry_air=44 * si.kg,
25
- )
26
- n_sd = sum(settings.n_sd_per_mode)
27
- builder = Builder(n_sd=n_sd, backend=CPU(formulae=settings.formulae))
28
- builder.set_environment(env)
29
- builder.add_dynamic(AmbientThermodynamics())
30
- builder.add_dynamic(Condensation(rtol_thd=rtol_thd, rtol_x=rtol_x))
31
-
32
- volume = env.mass_of_dry_air / settings.initial_air_density
33
- attributes = {
34
- k: np.empty(0) for k in ("dry volume", "kappa times dry volume", "n")
35
- }
36
- for i, (kappa, spectrum) in enumerate(settings.aerosol_modes_by_kappa.items()):
37
- sampling = ConstantMultiplicity(spectrum)
38
- r_dry, n_per_volume = sampling.sample(settings.n_sd_per_mode[i])
39
- v_dry = settings.formulae.trivia.volume(radius=r_dry)
40
- attributes["n"] = np.append(attributes["n"], n_per_volume * volume)
41
- attributes["dry volume"] = np.append(attributes["dry volume"], v_dry)
42
- attributes["kappa times dry volume"] = np.append(
43
- attributes["kappa times dry volume"], v_dry * kappa
44
- )
45
- r_wet = equilibrate_wet_radii(
46
- r_dry=settings.formulae.trivia.radius(volume=attributes["dry volume"]),
47
- environment=env,
48
- kappa_times_dry_volume=attributes["kappa times dry volume"],
49
- )
50
- attributes["volume"] = settings.formulae.trivia.volume(radius=r_wet)
51
-
52
- super().__init__(
53
- particulator=builder.build(attributes=attributes, products=products)
54
- )
55
- if scipy_solver:
56
- scipy_ode_condensation_solver.patch_particulator(self.particulator)
57
-
58
- self.output_attributes = {
59
- "volume": tuple([] for _ in range(self.particulator.n_sd))
60
- }
61
- self.settings = settings
62
-
63
- self.__sanity_checks(attributes, volume)
64
-
65
- def __sanity_checks(self, attributes, volume):
66
- for attribute in attributes.values():
67
- assert attribute.shape[0] == self.particulator.n_sd
68
- np.testing.assert_approx_equal(
69
- sum(attributes["multiplicity"]) / volume,
70
- sum(
71
- mode.norm_factor
72
- for mode in self.settings.aerosol_modes_by_kappa.values()
73
- ),
74
- significant=4,
75
- )
76
-
77
- def _save(self, output):
78
- for key, attr in self.output_attributes.items():
79
- attr_data = self.particulator.attributes[key].to_ndarray()
80
- for drop_id in range(self.particulator.n_sd):
81
- attr[drop_id].append(attr_data[drop_id])
82
- super()._save(output)
83
-
84
- def run(self, observers=()):
85
- for observer in observers:
86
- self.particulator.observers.append(observer)
87
- output_products = super()._run(
88
- self.settings.nt, self.settings.steps_per_output_interval
89
- )
90
- return {"products": output_products, "attributes": self.output_attributes}
File without changes
File without changes
File without changes