PySDM-examples 2.40__tar.gz → 2.41__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. {PySDM-examples-2.40 → PySDM-examples-2.41}/PKG-INFO +1 -1
  2. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Alpert_and_Knopf_2016/__init__.py +1 -0
  3. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_and_Shima_2017/__init__.py +1 -0
  4. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2015/settings.py +1 -4
  5. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/__init__.py +1 -0
  6. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/plots.py +5 -3
  7. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bartman_et_al_2021/label.py +5 -5
  8. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Berry_1967/__init__.py +1 -0
  9. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bieli_et_al_2022/__init__.py +1 -0
  10. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bolot_et_al_2013/__init__.py +1 -0
  11. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Ervens_and_Feingold_2012/__init__.py +1 -0
  12. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Ervens_and_Feingold_2012/settings.py +1 -3
  13. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Kreidenweis_et_al_2003/settings.py +7 -5
  14. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/aerosol_code.py +7 -7
  15. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Merlivat_and_Nief_1967/__init__.py +1 -0
  16. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Niedermeier_et_al_2014/__init__.py +1 -0
  17. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Niedermeier_et_al_2014/simulation.py +5 -3
  18. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Pierchala_et_al_2022/__init__.py +1 -0
  19. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/profile_plotter.py +5 -5
  20. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/settings.py +6 -6
  21. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Srivastava_1982/__init__.py +1 -0
  22. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Srivastava_1982/example.py +4 -4
  23. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Srivastava_1982/simulation.py +3 -3
  24. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/gui_viewer.py +9 -7
  25. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/simulation.py +5 -5
  26. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Van_Hook_1968/__init__.py +1 -0
  27. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/__init__.py +1 -0
  28. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/__init__.py +1 -0
  29. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/__init__.py +1 -0
  30. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/notebook_vars.py +1 -0
  31. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples.egg-info/PKG-INFO +1 -1
  32. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples.egg-info/requires.txt +3 -1
  33. {PySDM-examples-2.40 → PySDM-examples-2.41}/setup.py +3 -3
  34. {PySDM-examples-2.40 → PySDM-examples-2.41}/MANIFEST.in +0 -0
  35. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/__init__.py +0 -0
  36. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/aerosol.py +0 -0
  37. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/data_from_ARG2000_paper.py +0 -0
  38. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/data_from_CloudMicrophysics_ARG.py +0 -0
  39. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Abdul_Razzak_Ghan_2000/run_ARG_parcel.py +0 -0
  40. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Alpert_and_Knopf_2016/simulation.py +0 -0
  41. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Alpert_and_Knopf_2016/table.py +0 -0
  42. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Alpert_and_Knopf_2016/table_1.py +0 -0
  43. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Alpert_and_Knopf_2016/table_2.py +0 -0
  44. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_and_Shima_2017/example.py +0 -0
  45. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_and_Shima_2017/settings.py +0 -0
  46. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_and_Shima_2017/simulation.py +0 -0
  47. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2015/__init__.py +0 -0
  48. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2015/example.py +0 -0
  49. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2015/example_benchmark.py +0 -0
  50. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2015/spin_up.py +0 -0
  51. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/commons.py +0 -0
  52. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/curved_text.py +0 -0
  53. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/frozen_fraction.py +0 -0
  54. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/make_particulator.py +0 -0
  55. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Arabas_et_al_2023/run_simulation.py +0 -0
  56. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bartman_2020_MasterThesis/__init__.py +0 -0
  57. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bartman_2020_MasterThesis/fig_4_adaptive_sdm.py +0 -0
  58. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bartman_2020_MasterThesis/fig_5_SCIPY_VS_ADAPTIVE.py +0 -0
  59. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bartman_et_al_2021/__init__.py +0 -0
  60. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Berry_1967/example.py +0 -0
  61. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Berry_1967/example_fig_6.py +0 -0
  62. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Berry_1967/settings.py +0 -0
  63. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Berry_1967/spectrum_plotter.py +0 -0
  64. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bieli_et_al_2022/settings.py +0 -0
  65. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bieli_et_al_2022/simulation.py +0 -0
  66. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bulenok_2023_MasterThesis/__init__.py +0 -0
  67. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bulenok_2023_MasterThesis/setups.py +0 -0
  68. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Bulenok_2023_MasterThesis/utils.py +0 -0
  69. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Grabowski_and_Pawlowska_2023/__init__.py +0 -0
  70. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Grabowski_and_Pawlowska_2023/settings.py +0 -0
  71. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Grabowski_and_Pawlowska_2023/simulation.py +0 -0
  72. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Graf_et_al_2019/__init__.py +0 -0
  73. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Jaruga_and_Pawlowska_2018/__init__.py +0 -0
  74. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Kreidenweis_et_al_2003/__init__.py +0 -0
  75. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Kreidenweis_et_al_2003/simulation.py +0 -0
  76. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/__init__.py +0 -0
  77. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/aerosol.py +0 -0
  78. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/plot_helper.py +0 -0
  79. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/settings.py +0 -0
  80. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Lowe_et_al_2019/simulation.py +0 -0
  81. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Morrison_and_Grabowski_2007/__init__.py +0 -0
  82. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Morrison_and_Grabowski_2007/common.py +0 -0
  83. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Morrison_and_Grabowski_2007/cumulus.py +0 -0
  84. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Morrison_and_Grabowski_2007/strato_cumulus.py +0 -0
  85. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Niedermeier_et_al_2014/settings.py +0 -0
  86. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Pierchala_et_al_2022/commons.py +0 -0
  87. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/__init__.py +0 -0
  88. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/settings.py +0 -0
  89. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/simulation.py +0 -0
  90. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/tutorial_settings.py +0 -0
  91. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Pyrcel/tutorial_simulation.py +0 -0
  92. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/__init__.py +0 -0
  93. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/error_measure.py +0 -0
  94. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/example.py +0 -0
  95. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/example_timing.py +0 -0
  96. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/settings.py +0 -0
  97. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/spectrum_plotter.py +0 -0
  98. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/tutorial_example.py +0 -0
  99. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/tutorial_plotter.py +0 -0
  100. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shima_et_al_2009/tutorial_settings.py +0 -0
  101. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/__init__.py +0 -0
  102. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/mpdata_1d.py +0 -0
  103. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/plot.py +0 -0
  104. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Shipway_and_Hill_2012/simulation.py +0 -0
  105. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Singer_Ward/__init__.py +0 -0
  106. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Singer_Ward/aerosol.py +0 -0
  107. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Srivastava_1982/equations.py +0 -0
  108. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Srivastava_1982/settings.py +0 -0
  109. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/__init__.py +0 -0
  110. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/fields.py +0 -0
  111. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/gui.py +0 -0
  112. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/gui_controller.py +0 -0
  113. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/gui_settings.py +0 -0
  114. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/make_default_product_collection.py +0 -0
  115. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/mpdata_2d.py +0 -0
  116. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/plots.py +0 -0
  117. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/sounding.py +0 -0
  118. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Szumowski_et_al_1998/storage.py +0 -0
  119. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Yang_et_al_2018/__init__.py +0 -0
  120. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Yang_et_al_2018/settings.py +0 -0
  121. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/Yang_et_al_2018/simulation.py +0 -0
  122. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/plot_rates.py +0 -0
  123. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/settings1D.py +0 -0
  124. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/settings_0D.py +0 -0
  125. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/simulation1D.py +0 -0
  126. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/simulation_0D.py +0 -0
  127. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/deJong_Mackay_et_al_2023/simulation_ss.py +0 -0
  128. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/basic_simulation.py +0 -0
  129. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/dummy_controller.py +0 -0
  130. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/progbar_controller.py +0 -0
  131. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/read_vtk_1d.py +0 -0
  132. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/widgets/__init__.py +0 -0
  133. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/widgets/freezer.py +0 -0
  134. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples/utils/widgets/progbar_updater.py +0 -0
  135. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples.egg-info/SOURCES.txt +0 -0
  136. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples.egg-info/dependency_links.txt +0 -0
  137. {PySDM-examples-2.40 → PySDM-examples-2.41}/PySDM_examples.egg-info/top_level.txt +0 -0
  138. {PySDM-examples-2.40 → PySDM-examples-2.41}/README.md +0 -0
  139. {PySDM-examples-2.40 → PySDM-examples-2.41}/pyproject.toml +0 -0
  140. {PySDM-examples-2.40 → PySDM-examples-2.41}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PySDM-examples
3
- Version: 2.40
3
+ Version: 2.41
4
4
  Summary: PySDM usage examples reproducing results from literature and depicting how to use PySDM from Python Jupyter notebooks
5
5
  Home-page: https://github.com/open-atmos/PySDM
6
6
  Author: https://github.com/open-atmos/PySDM/graphs/contributors
@@ -2,6 +2,7 @@
2
2
  box-environment example based on
3
3
  [Alpert & Knopf 2016 (Atmos. Chem. Phys. 16)](https://doi.org/10.5194/acp-16-2083-2016)
4
4
  """
5
+
5
6
  # pylint: disable=invalid-name
6
7
  from .simulation import Simulation, simulation
7
8
  from .table_1 import Table1
@@ -2,4 +2,5 @@
2
2
  condensation-evaportaion parcel example based on
3
3
  [Arabas and Shima 2017 (Nonlin. Processes Geophys. 24)](https://doi.org/10.5194/npg-24-535-2017)
4
4
  """
5
+
5
6
  # pylint: disable=invalid-name
@@ -28,10 +28,7 @@ class Settings(StratoCumulus):
28
28
  def __init__(
29
29
  self,
30
30
  formulae=None,
31
- rhod_w_max: float = 0.6
32
- * si.metres
33
- / si.seconds
34
- * (si.kilogram / si.metre**3),
31
+ rhod_w_max: float = 0.6 * si.metres / si.seconds * (si.kilogram / si.metre**3),
35
32
  ):
36
33
  super().__init__(formulae or Formulae(), rhod_w_max=rhod_w_max)
37
34
 
@@ -2,6 +2,7 @@
2
2
  box-model and 2D prescribed-flow immersion-freezing examples based on
3
3
  [Arabas et al. 2023](https://arxiv.org/abs/2308.05015)
4
4
  """
5
+
5
6
  from .make_particulator import make_particulator
6
7
  from .plots import make_freezing_spec_plot, make_pdf_plot, make_temperature_plot
7
8
  from .run_simulation import run_simulation
@@ -28,9 +28,11 @@ def make_temperature_plot(data):
28
28
  xy2.plot(
29
29
  datum["t"],
30
30
  np.asarray(datum["qi"]) / qi_unit, # marker='.',
31
- label=f"Monte-Carlo ({labels[v['singular']]})"
32
- if not plotted[v["singular"]]
33
- else "",
31
+ label=(
32
+ f"Monte-Carlo ({labels[v['singular']]})"
33
+ if not plotted[v["singular"]]
34
+ else ""
35
+ ),
34
36
  color=colors[v["singular"]],
35
37
  )
36
38
  plotted[v["singular"]] = True
@@ -1,11 +1,11 @@
1
1
  def label(settings):
2
2
  lbl = str(
3
3
  {
4
- k.replace("condensation_", ""): f"{v:.1e}"
5
- if isinstance(v, float)
6
- else str(v).zfill(2)
7
- if isinstance(v, int)
8
- else v
4
+ k.replace("condensation_", ""): (
5
+ f"{v:.1e}"
6
+ if isinstance(v, float)
7
+ else str(v).zfill(2) if isinstance(v, int) else v
8
+ )
9
9
  for k, v in settings.items()
10
10
  }
11
11
  )
@@ -2,4 +2,5 @@
2
2
  box-model coalescence-only example based on
3
3
  [Berry 1967 (J. Atmos. Sci. 24)](https://doi.org/10.1175/1520-0469(1967)024%3C0688:CDGBC%3E2.0.CO;2)
4
4
  """
5
+
5
6
  # pylint: disable=invalid-name
@@ -1,4 +1,5 @@
1
1
  """
2
2
  collision-only box-model example from [Bieli et al. 2022](https://doi.org/10.1029/2022MS002994)
3
3
  """
4
+
4
5
  # pylint: disable=invalid-name
@@ -2,4 +2,5 @@
2
2
  figures from Bolot et al. 2013 (Atmos. Chem. Phys. 13)
3
3
  https://doi.org/10.5194/acp-13-7903-2013
4
4
  """
5
+
5
6
  # pylint: disable=invalid-name
@@ -2,4 +2,5 @@
2
2
  aerosol distribution from
3
3
  [Ervens and Feingold 2012 (Atmos. Chem. Phys. 12)](https://doi.org/10.5194/acp-12-5807-2012)
4
4
  """
5
+
5
6
  # pylint: disable=invalid-name
@@ -7,8 +7,6 @@ def sampled_ccn_diameter_number_concentration_spectrum(
7
7
  n_sd: int = 11, size_range: tuple = (0.02 * si.um, 2 * si.um)
8
8
  ):
9
9
  return Logarithmic(
10
- spectrum=Lognormal(
11
- s_geom=1.4, m_mode=0.04 * si.um, norm_factor=100 / si.cm**3
12
- ),
10
+ spectrum=Lognormal(s_geom=1.4, m_mode=0.04 * si.um, norm_factor=100 / si.cm**3),
13
11
  size_range=size_range,
14
12
  ).sample(n_sd)
@@ -70,11 +70,13 @@ class Settings:
70
70
 
71
71
  self.starting_amounts = {
72
72
  "moles_"
73
- + k: self.formulae.trivia.volume(self.r_dry)
74
- * self.DRY_RHO
75
- / self.dry_molar_mass
76
- if k in ("N_mIII", "S_VI")
77
- else np.zeros(self.n_sd)
73
+ + k: (
74
+ self.formulae.trivia.volume(self.r_dry)
75
+ * self.DRY_RHO
76
+ / self.dry_molar_mass
77
+ if k in ("N_mIII", "S_VI")
78
+ else np.zeros(self.n_sd)
79
+ )
78
80
  for k in AQUEOUS_COMPOUNDS
79
81
  }
80
82
 
@@ -109,8 +109,8 @@ class AerosolBoreal(DryAerosolMixture):
109
109
  def __init__(
110
110
  self, water_molar_volume: float, Forg: float = 0.668, Acc_N2: float = 540
111
111
  ):
112
- # TODO #604: SOA1 or SOA2 unclear from the paper
113
- # TODO #604: CAN'T FIND WHERE NH4NO3 PROPERTIES ARE DEFINED IN ICPM
112
+ # TODO #1247: SOA1 or SOA2 unclear from the paper
113
+ # TODO #1247: CAN'T FIND WHERE NH4NO3 PROPERTIES ARE DEFINED IN ICPM
114
114
  INORG_MASS_RATIO = 0.1515 / 0.1559
115
115
  Aitken = {
116
116
  "SOA1": Forg,
@@ -137,8 +137,8 @@ class AerosolBoreal(DryAerosolMixture):
137
137
  * si.gram
138
138
  / si.mole,
139
139
  "NH4NO3": Substance.from_formula("NH4NO3").mass * si.gram / si.mole,
140
- "SOA1": 190 * si.g / si.mole, # TODO #604: 190 OR 200?
141
- "SOA2": 368.4 * si.g / si.mole, # TODO #604: 368.4 OR 200?
140
+ "SOA1": 190 * si.g / si.mole, # TODO #1247: 190 OR 200?
141
+ "SOA2": 368.4 * si.g / si.mole, # TODO #1247: 368.4 OR 200?
142
142
  },
143
143
  densities={
144
144
  "SOA1": 1.2 * si.g / si.cm**3,
@@ -199,7 +199,7 @@ class AerosolNascent(DryAerosolMixture):
199
199
  def __init__(
200
200
  self, water_molar_volume: float, Acc_Forg: float = 0.3, Acc_N2: float = 30
201
201
  ):
202
- # TODO #604: CAN'T FIND WHEN PHI IS MULTIPLIED FOR KÖHLER B IN ICPM CODE
202
+ # TODO #1247: CAN'T FIND WHEN PHI IS MULTIPLIED FOR KÖHLER B IN ICPM CODE
203
203
  Ultrafine = {
204
204
  "SOA1": 0.52,
205
205
  "SOA2": 0,
@@ -217,8 +217,8 @@ class AerosolNascent(DryAerosolMixture):
217
217
  "(NH4)2SO4": 3,
218
218
  },
219
219
  molar_masses={
220
- "SOA1": 190 * si.g / si.mole, # TODO #604: 190 OR 200?
221
- "SOA2": 368.4 * si.g / si.mole, # TODO #604: 368.4 OR 200?
220
+ "SOA1": 190 * si.g / si.mole, # TODO #1247: 190 OR 200?
221
+ "SOA2": 368.4 * si.g / si.mole, # TODO #1247: 368.4 OR 200?
222
222
  "(NH4)2SO4": Substance.from_formula("(NH4)2SO4").mass
223
223
  * si.gram
224
224
  / si.mole,
@@ -2,4 +2,5 @@
2
2
  figure from Merlivat and Nief 1967 (Tellus)
3
3
  https://doi.org/10.3402/tellusa.v19i1.9756
4
4
  """
5
+
5
6
  # pylint: disable=invalid-name
@@ -1,3 +1,4 @@
1
1
  """ based on [Niedermeier et al. 2014](https://doi.org/10.1002/2013GL058684) """
2
+
2
3
  from .settings import Settings
3
4
  from .simulation import Simulation
@@ -68,9 +68,11 @@ class Simulation(BasicSimulation):
68
68
  data[:-1],
69
69
  np.full(
70
70
  settings.in_sampling_n,
71
- data[-1]
72
- if attribute != "multiplicity"
73
- else data[-1] / settings.in_sampling_n,
71
+ (
72
+ data[-1]
73
+ if attribute != "multiplicity"
74
+ else data[-1] / settings.in_sampling_n
75
+ ),
74
76
  ),
75
77
  )
76
78
  )
@@ -2,4 +2,5 @@
2
2
  based on Pierchala et al. 2022 (Geochim. Cosmochim. Acta)
3
3
  https://doi.org/10.1016/j.gca.2022.01.020
4
4
  """
5
+
5
6
  # pylint: disable=invalid-name
@@ -57,11 +57,11 @@ class ProfilePlotter:
57
57
  settings.formulae.trivia.radius(volume=np.asarray(volume)) / si.um,
58
58
  output["products"]["z"],
59
59
  color="magenta" if drop_id < settings.n_sd_per_mode[0] else "blue",
60
- label="mode 1"
61
- if drop_id == 0
62
- else "mode 2"
63
- if drop_id == settings.n_sd_per_mode[0]
64
- else "",
60
+ label=(
61
+ "mode 1"
62
+ if drop_id == 0
63
+ else "mode 2" if drop_id == settings.n_sd_per_mode[0] else ""
64
+ ),
65
65
  )
66
66
  axR.legend(loc="upper right")
67
67
  axR.set_xlabel("Droplet radius [μm]")
@@ -1,9 +1,9 @@
1
1
  from typing import Iterable
2
2
 
3
3
  import numpy as np
4
+ from numdifftools import Derivative
4
5
  from scipy.integrate import solve_ivp
5
6
  from scipy.interpolate import interp1d
6
- from scipy.misc import derivative
7
7
 
8
8
  from PySDM import Formulae
9
9
  from PySDM.dynamics import condensation
@@ -60,8 +60,8 @@ class Settings:
60
60
  self.t_max = t_max
61
61
 
62
62
  t_1 = 600 * si.s
63
- self.rho_times_w = (
64
- lambda t: rho_times_w_1 * np.sin(np.pi * t / t_1) if t < t_1 else 0
63
+ self.rho_times_w = lambda t: (
64
+ rho_times_w_1 * np.sin(np.pi * t / t_1) if t < t_1 else 0
65
65
  )
66
66
  apprx_w1 = rho_times_w_1 / self.formulae.constants.rho_STP
67
67
  self.particle_reservoir_depth = (
@@ -106,9 +106,9 @@ class Settings:
106
106
  water_vapour_mixing_ratio = self.water_vapour_mixing_ratio(
107
107
  z_above_reservoir
108
108
  )
109
- d_water_vapour_mixing_ratio__dz = derivative(
110
- self.water_vapour_mixing_ratio, z_above_reservoir
111
- )
109
+ d_water_vapour_mixing_ratio__dz = Derivative(
110
+ self.water_vapour_mixing_ratio
111
+ )(z_above_reservoir)
112
112
  T = self.formulae.state_variable_triplet.T(
113
113
  rhod[0], self.thd(z_above_reservoir)
114
114
  )
@@ -2,6 +2,7 @@
2
2
  box-model examples feat. analytic solution for breakup from
3
3
  [Srivastava 1982 (JAS)](https://doi.org/10.1175/1520-0469(1982)039%3C1317:ASMOPC%3E2.0.CO;2)
4
4
  """
5
+
5
6
  from .equations import Equations, EquationsHelpers
6
7
  from .example import (
7
8
  add_to_plot_simulation_results,
@@ -137,10 +137,10 @@ def get_breakup_coalescence_analytic_results(equations, settings, m0, x, x_log):
137
137
 
138
138
  def get_analytic_results(equations, settings, mean_mass, mean_mass_ratio):
139
139
  res = {}
140
- res[
141
- SimProducts.Computed.mean_drop_volume_total_volume_ratio.name
142
- ] = compute_drop_volume_total_volume_ratio(
143
- mean_volume=mean_mass / settings.rho, total_volume=settings.total_volume
140
+ res[SimProducts.Computed.mean_drop_volume_total_volume_ratio.name] = (
141
+ compute_drop_volume_total_volume_ratio(
142
+ mean_volume=mean_mass / settings.rho, total_volume=settings.total_volume
143
+ )
144
144
  )
145
145
  res[SimProducts.PySDM.total_numer.name] = equations.M / mean_mass_ratio
146
146
  return res
@@ -70,9 +70,9 @@ class Simulation:
70
70
  if step != 0:
71
71
  particulator.run(steps=1)
72
72
  for prod in self.settings.prods:
73
- self.simulation_res[n_sd][prod][seed][
74
- step
75
- ] = particulator.products[prod].get()
73
+ self.simulation_res[n_sd][prod][seed][step] = (
74
+ particulator.products[prod].get()
75
+ )
76
76
 
77
77
  np.testing.assert_allclose(
78
78
  actual=self.simulation_res[n_sd][
@@ -93,13 +93,15 @@ class GUIViewer:
93
93
  self.spectrumPlots[key] = (
94
94
  _SpectrumPlot(r_bins, self.settings.spectrum_per_mass_of_dry_air)
95
95
  if key == "size"
96
- else _TemperaturePlot(
97
- self.settings.T_bins_edges, self.settings.formulae
98
- )
99
- if key == "temperature"
100
- else _TerminalVelocityPlot(
101
- self.settings.terminal_velocity_radius_bin_edges,
102
- self.settings.formulae,
96
+ else (
97
+ _TemperaturePlot(
98
+ self.settings.T_bins_edges, self.settings.formulae
99
+ )
100
+ if key == "temperature"
101
+ else _TerminalVelocityPlot(
102
+ self.settings.terminal_velocity_radius_bin_edges,
103
+ self.settings.formulae,
104
+ )
103
105
  )
104
106
  )
105
107
  clear_output()
@@ -162,11 +162,11 @@ class Simulation:
162
162
  )
163
163
 
164
164
  if self.settings.freezing_singular:
165
- attributes[
166
- "freezing temperature"
167
- ] = formulae.freezing_temperature_spectrum.invcdf(
168
- np.random.random(immersed_surface_area.size), # TODO #599: seed
169
- immersed_surface_area,
165
+ attributes["freezing temperature"] = (
166
+ formulae.freezing_temperature_spectrum.invcdf(
167
+ np.random.random(immersed_surface_area.size), # TODO #599: seed
168
+ immersed_surface_area,
169
+ )
170
170
  )
171
171
  else:
172
172
  attributes["immersed surface area"] = immersed_surface_area
@@ -2,4 +2,5 @@
2
2
  figure from Van Hook 1968 (J. Phys. Chem.)
3
3
  https://doi.org/10.1021/j100850a028
4
4
  """
5
+
5
6
  # pylint: disable=invalid-name
@@ -2,6 +2,7 @@
2
2
  PySDM_examples package includes common Python modules used in PySDM smoke tests
3
3
  and in example notebooks (but the package wheels do not include the notebooks)
4
4
  """
5
+
5
6
  from importlib.metadata import PackageNotFoundError, version
6
7
 
7
8
  try:
@@ -2,6 +2,7 @@
2
2
  box- and single-column breakup-focused examples from
3
3
  [de Jong et al. 2023](https://doi.org/10.5194/gmd-16-4193-2023)
4
4
  """
5
+
5
6
  # pylint: disable=invalid-name
6
7
  from .plot_rates import plot_ax, plot_zeros_ax
7
8
  from .settings1D import Settings1D
@@ -1,6 +1,7 @@
1
1
  """
2
2
  reusable commons for examples
3
3
  """
4
+
4
5
  from .basic_simulation import BasicSimulation
5
6
  from .dummy_controller import DummyController
6
7
  from .notebook_vars import notebook_vars
@@ -1,4 +1,5 @@
1
1
  """ helper routines for use in smoke tests """
2
+
2
3
  from pathlib import Path
3
4
 
4
5
  import nbformat
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PySDM-examples
3
- Version: 2.40
3
+ Version: 2.41
4
4
  Summary: PySDM usage examples reproducing results from literature and depicting how to use PySDM from Python Jupyter notebooks
5
5
  Home-page: https://github.com/open-atmos/PySDM
6
6
  Author: https://github.com/open-atmos/PySDM/graphs/contributors
@@ -1,10 +1,12 @@
1
1
  PySDM
2
+ PyMPDATA
2
3
  open-atmos-jupyter-utils
3
4
  pystrict
5
+ matplotlib
4
6
  joblib
5
7
  ipywidgets
6
8
  seaborn
7
- ghapi
9
+ numdifftools
8
10
  pyvinecopulib
9
11
  vtk
10
12
 
@@ -23,14 +23,14 @@ setup(
23
23
  },
24
24
  install_requires=[
25
25
  "PySDM",
26
- "PyMPDATA" + ">=1.0.15" if CI else "",
26
+ "PyMPDATA" + (">=1.0.15" if CI else ""),
27
27
  "open-atmos-jupyter-utils",
28
28
  "pystrict",
29
- "matplotlib" + "<3.8.0" if CI else "", # TODO #1142
29
+ "matplotlib",
30
30
  "joblib",
31
31
  "ipywidgets",
32
32
  "seaborn",
33
- "ghapi",
33
+ "numdifftools",
34
34
  ]
35
35
  + (["pyvinecopulib", "vtk"] if platform.architecture()[0] != "32bit" else []),
36
36
  extras_require={
File without changes
File without changes
File without changes