PySDM-examples 2.47__py3-none-any.whl → 2.49__py3-none-any.whl

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.
@@ -26,8 +26,14 @@ def make_core(settings, coal_eff):
26
26
  adaptive=settings.adaptive,
27
27
  )
28
28
  builder.add_dynamic(collision)
29
- M0 = am.make_arbitrary_moment_product(rank=0, attr="volume", attr_unit="m^3")
30
- M1 = am.make_arbitrary_moment_product(rank=1, attr="volume", attr_unit="m^3")
31
- M2 = am.make_arbitrary_moment_product(rank=2, attr="volume", attr_unit="m^3")
32
- products = (M0(name="M0"), M1(name="M1"), M2(name="M2"))
29
+ common_args = {
30
+ "attr": "volume",
31
+ "attr_unit": "m^3",
32
+ "skip_division_by_m0": True,
33
+ "skip_division_by_dv": True,
34
+ }
35
+ products = tuple(
36
+ am.make_arbitrary_moment_product(rank=rank, **common_args)(name=f"M{rank}")
37
+ for rank in range(3)
38
+ )
33
39
  return builder.build(attributes, products)
@@ -3,15 +3,19 @@ from PySDM import Formulae
3
3
  from PySDM.physics import si
4
4
  from PySDM.initialisation.spectra import Lognormal, Sum
5
5
 
6
+ INITIAL_RELATIVE_HUMIDITY = 0.8561
7
+ INITIAL_TEMPERATURE = 284.3 * si.K
8
+ INITIAL_PRESSURE = 938.5 * si.hPa
9
+ INITIAL_ALTITUDE = 600 * si.metres
10
+
6
11
 
7
12
  @strict
8
13
  class Settings:
9
14
  def __init__(self, *, aerosol: str, cloud_type: str):
10
- # TODO #1266 reuse these values in the Yang et al. '18 example which is based on J&N'16
11
- self.p0 = 938.5 * si.hPa
12
- self.RH0 = 0.8561
13
- self.T0 = 284.3 * si.K
14
- self.z0 = 600 * si.m
15
+ self.p0 = INITIAL_PRESSURE
16
+ self.RH0 = INITIAL_RELATIVE_HUMIDITY
17
+ self.T0 = INITIAL_TEMPERATURE
18
+ self.z0 = INITIAL_ALTITUDE
15
19
  self.t_end_of_ascent = 1500 * si.s if cloud_type == "Sc" else None
16
20
  self.dt = 1 * si.s # TODO #1266: not found in the paper yet
17
21
 
@@ -1,6 +1,8 @@
1
1
  import numpy as np
2
2
  from pystrict import strict
3
3
 
4
+ from PySDM_examples import Jensen_and_Nugent_2017
5
+
4
6
  from PySDM.backends import CPU
5
7
  from PySDM.dynamics import condensation
6
8
  from PySDM.initialisation import spectra
@@ -47,10 +49,10 @@ class Settings:
47
49
  self.rtol_thd = condensation.DEFAULTS.rtol_thd
48
50
  self.dt_cond_range = condensation.DEFAULTS.cond_range
49
51
 
50
- self.T0 = 284.3 * si.kelvin
51
- self.initial_water_vapour_mixing_ratio = 7.6 * si.grams / si.kilogram
52
- self.p0 = 938.5 * si.hectopascals
53
- self.z0 = 600 * si.metres
52
+ self.T0 = Jensen_and_Nugent_2017.settings.INITIAL_TEMPERATURE
53
+ self.RH0 = Jensen_and_Nugent_2017.settings.INITIAL_RELATIVE_HUMIDITY
54
+ self.p0 = Jensen_and_Nugent_2017.settings.INITIAL_PRESSURE
55
+ self.z0 = Jensen_and_Nugent_2017.settings.INITIAL_ALTITUDE
54
56
  self.kappa = 0.53 # Petters and S. M. Kreidenweis mean growth-factor derived
55
57
 
56
58
  self.t0 = 1200 * si.second
@@ -26,7 +26,15 @@ class Simulation:
26
26
  dt=dt_output / self.n_substeps,
27
27
  mass_of_dry_air=settings.mass_of_dry_air,
28
28
  p0=settings.p0,
29
- initial_water_vapour_mixing_ratio=settings.initial_water_vapour_mixing_ratio,
29
+ initial_water_vapour_mixing_ratio=self.formulae.constants.eps
30
+ / (
31
+ settings.p0
32
+ / settings.RH0
33
+ / self.formulae.saturation_vapour_pressure.pvs_Celsius(
34
+ settings.T0 - self.formulae.constants.T0
35
+ )
36
+ - 1
37
+ ),
30
38
  T0=settings.T0,
31
39
  w=settings.w,
32
40
  z0=settings.z0,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PySDM-examples
3
- Version: 2.47
3
+ Version: 2.49
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
@@ -37,7 +37,7 @@ PySDM_examples/Berry_1967/settings.py,sha256=9VmVS4zBTGQff-xBdxb9AjUB9iNNm-qMznU
37
37
  PySDM_examples/Berry_1967/spectrum_plotter.py,sha256=WEEaryYBDydStKyx6H915LVTxeFFKj0pmpdVotktjI4,1023
38
38
  PySDM_examples/Bieli_et_al_2022/__init__.py,sha256=YdI2papu13HSfH973XxfrwGZkP_nbiXO4lgGHime_7M,141
39
39
  PySDM_examples/Bieli_et_al_2022/settings.py,sha256=qJxoGChzqta-c_O2yv4E3wEM4yoECa2dyhKmE8AGrtI,1679
40
- PySDM_examples/Bieli_et_al_2022/simulation.py,sha256=i-EEZvt37VuUXOEzbFBy7YrJez7_YHiI-gCtsPj_EbM,1304
40
+ PySDM_examples/Bieli_et_al_2022/simulation.py,sha256=NmLPIwrsV-MTrnZPOQNnxDqVaYsnzq51K_6avIdHZFg,1292
41
41
  PySDM_examples/Bolot_et_al_2013/__init__.py,sha256=6yZ-PdTBwwN9f4HqOe-E0m-CyM47mgg2E4ezVKVELF4,136
42
42
  PySDM_examples/Bulenok_2023_MasterThesis/__init__.py,sha256=GPHWvxMGulWIaSH7CQlESd2jNTRJeMcXRqjzzJ-AAf8,164
43
43
  PySDM_examples/Bulenok_2023_MasterThesis/setups.py,sha256=UVTp0oBMblcR46J29aylfZ6g6-8jlhXCb90ODdcfaSE,3424
@@ -51,7 +51,7 @@ PySDM_examples/Graf_et_al_2019/__init__.py,sha256=nT6uOv3PODePRUzFoyOfH_eOCjJkg5
51
51
  PySDM_examples/Jaruga_and_Pawlowska_2018/__init__.py,sha256=VJz_xFOhVvnqYHKbAPRnZQ3Vky6JEOZxBx8kV0kHIcg,161
52
52
  PySDM_examples/Jensen_and_Nugent_2017/__init__.py,sha256=3iMpMdkdy_BEBBhjD9WR-2HbRHn7dop8kEk2uJJYe9U,66
53
53
  PySDM_examples/Jensen_and_Nugent_2017/plotting.py,sha256=-e6mkOIugGwfydBquGEEaW2JhJ6mI1-pl-7sT1p6v08,2181
54
- PySDM_examples/Jensen_and_Nugent_2017/settings.py,sha256=3HTGTN7Pf7zhC_KCOCrOtKzSmnCHaizc5L8eb1l73GI,2056
54
+ PySDM_examples/Jensen_and_Nugent_2017/settings.py,sha256=rok_FJJxfB9kOeWbKPONmtfV1DOX0RRihcBW2HVGeks,2134
55
55
  PySDM_examples/Jensen_and_Nugent_2017/simulation.py,sha256=g_S1w9vnwzwcpc7U6571zR_fswmHP2bOwTH4r7ZiZ7M,3989
56
56
  PySDM_examples/Jensen_and_Nugent_2017/table_3.py,sha256=HVhqXwNIqkUyl0k718qVaZaf0lnENWpE-sjqj5b08bc,952
57
57
  PySDM_examples/Kreidenweis_et_al_2003/__init__.py,sha256=9QbrxhPe0QJxboGKeqHhq9rrvQ5VUcjTpqWgWsxnM1E,225
@@ -116,8 +116,8 @@ PySDM_examples/Szumowski_et_al_1998/sounding.py,sha256=vk3KHRPrBbZpz6QCqj2RtWyEp
116
116
  PySDM_examples/Szumowski_et_al_1998/storage.py,sha256=NaGoujCRLubSEbhLA0QZDaSkATpJuF09HCnGdWQzcxQ,2579
117
117
  PySDM_examples/Van_Hook_1968/__init__.py,sha256=nTGyMcf6D4l6Ib0hMwyx4es1nX5dpuPbM9AYEleaIPE,119
118
118
  PySDM_examples/Yang_et_al_2018/__init__.py,sha256=zY7OnJ0d5eyWh3j0VvuHJMYOum9jY596-Ek2po0efmE,227
119
- PySDM_examples/Yang_et_al_2018/settings.py,sha256=J62kB5pEThmMcWSLsLKgcv0Pii6VLPDbfz6HPgs7O9o,2185
120
- PySDM_examples/Yang_et_al_2018/simulation.py,sha256=sG2kO_l66ec5XRYIDygB6_493jqKh6fF2hc_TyAh8z8,3928
119
+ PySDM_examples/Yang_et_al_2018/settings.py,sha256=snD3ehCPaWD2QBJosdCYKX4X-dHb0LnBiayhPkXUY3w,2327
120
+ PySDM_examples/Yang_et_al_2018/simulation.py,sha256=N1XsZAMDfT7n9423Tt2PN2NDXVsOYjQIAZMMY2hWXNg,4173
121
121
  PySDM_examples/deJong_Azimi/__init__.py,sha256=VSVGYB3ckDnW2WVTnrn0tebEIbsE3xYNL6_gdQh4XMs,264
122
122
  PySDM_examples/deJong_Azimi/cloudy_data.py,sha256=WrseLwj7uF0cESY7xRWqXbXzOu-WPJCNAPyrNMOqQHE,11258
123
123
  PySDM_examples/deJong_Azimi/cloudy_data_0d.py,sha256=uadPxR4zMQFViIFjoqiGfAxTFLAVaUd9Xf6Coj-lXVg,12260
@@ -139,7 +139,7 @@ PySDM_examples/utils/read_vtk_1d.py,sha256=7_3sagEbX_FxqFuGkFWdwQapd1-9echFghU8T
139
139
  PySDM_examples/utils/widgets/__init__.py,sha256=U67WZ2YDcXSocMraI7pzcMxCfcxzXNqehDzoG6ogsh4,519
140
140
  PySDM_examples/utils/widgets/freezer.py,sha256=tFlZWShXUzA2X0cxgeE44N1g9kD33q3KQWZBqkgBP0A,407
141
141
  PySDM_examples/utils/widgets/progbar_updater.py,sha256=3uhG32QkAiSM3dTV7DoROJl7fAUNA6ZsJEIKSg3tdmk,267
142
- PySDM_examples-2.47.dist-info/METADATA,sha256=AbwJKzZZzY02CRdyvMQZ2fNdo1TEtq81o0-nuEfBkmM,36124
143
- PySDM_examples-2.47.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
144
- PySDM_examples-2.47.dist-info/top_level.txt,sha256=axw2inuuYKPWkQhzBYtkZJTPDlo5LrpGLOA0iSAf9v0,15
145
- PySDM_examples-2.47.dist-info/RECORD,,
142
+ PySDM_examples-2.49.dist-info/METADATA,sha256=wDGKl9UYNtJ9Q-iYpsQUjdRX6jcA7FF-BTPfCLL41-8,36124
143
+ PySDM_examples-2.49.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
144
+ PySDM_examples-2.49.dist-info/top_level.txt,sha256=axw2inuuYKPWkQhzBYtkZJTPDlo5LrpGLOA0iSAf9v0,15
145
+ PySDM_examples-2.49.dist-info/RECORD,,