PySDM-examples 2.112__py3-none-any.whl → 2.113__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.
@@ -14,6 +14,7 @@ class Settings:
14
14
  timestep: float,
15
15
  enable_immersion_freezing: bool = True,
16
16
  enable_vapour_deposition_on_ice: bool = True,
17
+ inp_frac: float = 0.1,
17
18
  ):
18
19
  self.n_sd = n_sd
19
20
  self.timestep = timestep
@@ -24,14 +25,21 @@ class Settings:
24
25
 
25
26
  # parameters from the paper
26
27
  self.formulae = Formulae(
27
- constants={"bulk_phase_partitioning_exponent": 0.1},
28
+ constants={
29
+ "bulk_phase_partitioning_exponent": 0.1,
30
+ "NIEMAND_A": -0.517,
31
+ "NIEMAND_B": 8.934,
32
+ },
28
33
  bulk_phase_partitioning="KaulEtAl2015",
29
34
  particle_shape_and_density="MixedPhaseSpheres",
30
35
  diffusion_coordinate="WaterMassLogarithm",
36
+ freezing_temperature_spectrum="Niemand_et_al_2012",
31
37
  )
32
38
  self.initial_water_vapour_mixing_ratio = 1.5 * si.g / si.kg
33
39
  self.parcel_linear_extent = 100 * si.m
34
40
  self.updraft = 0.5 * si.m / si.s
41
+ self.freezing_inp_frac = inp_frac
42
+ self.freezing_inp_dry_radius = 0.5 * si.um
35
43
 
36
44
  thd_0 = self.formulae.state_variable_triplet.th_dry(
37
45
  th_std=269 * si.K,
@@ -57,10 +57,24 @@ class Simulation(BasicSimulation):
57
57
  )
58
58
  del attributes["volume"]
59
59
 
60
- # TODO #1524
61
60
  if settings.enable_immersion_freezing:
62
- attributes["freezing temperature"] = np.full(
63
- shape=(settings.n_sd,), fill_value=250
61
+ trivia = builder.particulator.formulae.trivia
62
+ n_inp = int(settings.n_sd * settings.freezing_inp_frac)
63
+
64
+ rng = np.random.default_rng(seed=builder.particulator.formulae.seed)
65
+
66
+ attributes["freezing temperature"] = rng.permutation(
67
+ np.pad(
68
+ builder.particulator.formulae.freezing_temperature_spectrum.invcdf(
69
+ cdf=rng.uniform(low=0, high=1, size=n_inp),
70
+ A_insol=trivia.sphere_surface(
71
+ diameter=2 * settings.freezing_inp_dry_radius
72
+ ),
73
+ ),
74
+ (0, settings.n_sd - n_inp),
75
+ mode="constant",
76
+ constant_values=(trivia.C2K(-38)),
77
+ )
64
78
  )
65
79
 
66
80
  self.products = (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pysdm-examples
3
- Version: 2.112
3
+ Version: 2.113
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,7 +1,7 @@
1
1
  PySDM_examples/__init__.py,sha256=TnieTsOWPG-6J5Z9S_LgBRil-kbBWmsl3q2dlA4equk,228
2
2
  PySDM_examples/Abade_and_Albuquerque_2024/__init__.py,sha256=JlXdzgcWzQEj87r0IatZAHx4j3hgDsyxP8LisaJvP_U,279
3
- PySDM_examples/Abade_and_Albuquerque_2024/settings.py,sha256=KVll9MY-EEYbxCrDs8PDasHg1YLMhLVIO634WXeb9sQ,2015
4
- PySDM_examples/Abade_and_Albuquerque_2024/simulation.py,sha256=mbUH6mr76TnXDsjhc20-8dBpD1uGuW0IuD7WSW7OUHM,2771
3
+ PySDM_examples/Abade_and_Albuquerque_2024/settings.py,sha256=GtHwC6ZnHy9yEl4vNS2PdBQK6jxm_boAlNnych93OOQ,2307
4
+ PySDM_examples/Abade_and_Albuquerque_2024/simulation.py,sha256=9lBU1M4nKIn1zJFhXsJbdms2Nzasb-98F_a9HCvwccE,3429
5
5
  PySDM_examples/Abdul_Razzak_Ghan_2000/__init__.py,sha256=2M2S0Qff2PJhxzEiV7eIGhJHCVkUywM0moIBT_BXJIg,311
6
6
  PySDM_examples/Abdul_Razzak_Ghan_2000/aerosol.py,sha256=BHZL7DILM2WGK5v251N0pHd_bdk8V1PnhSpItkPh1HI,3405
7
7
  PySDM_examples/Abdul_Razzak_Ghan_2000/data_from_ARG2000_paper.py,sha256=MRyurAnXq5ESE8gA5rzMsVx1ZhwcOz76o2xPRAcTPMQ,11585
@@ -154,7 +154,7 @@ PySDM_examples/utils/read_vtk_1d.py,sha256=7_3sagEbX_FxqFuGkFWdwQapd1-9echFghU8T
154
154
  PySDM_examples/utils/widgets/__init__.py,sha256=U67WZ2YDcXSocMraI7pzcMxCfcxzXNqehDzoG6ogsh4,519
155
155
  PySDM_examples/utils/widgets/freezer.py,sha256=tFlZWShXUzA2X0cxgeE44N1g9kD33q3KQWZBqkgBP0A,407
156
156
  PySDM_examples/utils/widgets/progbar_updater.py,sha256=3uhG32QkAiSM3dTV7DoROJl7fAUNA6ZsJEIKSg3tdmk,267
157
- pysdm_examples-2.112.dist-info/METADATA,sha256=Dc2BNvc42BXVtcaIB7ZNKD1TJMRRNh-qAG1_cdwfC-A,12686
158
- pysdm_examples-2.112.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
159
- pysdm_examples-2.112.dist-info/top_level.txt,sha256=axw2inuuYKPWkQhzBYtkZJTPDlo5LrpGLOA0iSAf9v0,15
160
- pysdm_examples-2.112.dist-info/RECORD,,
157
+ pysdm_examples-2.113.dist-info/METADATA,sha256=D9MY9yOy4EwDTXJhse7wKgP3xTmTdMdqPDtrIUWSlZQ,12686
158
+ pysdm_examples-2.113.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
159
+ pysdm_examples-2.113.dist-info/top_level.txt,sha256=axw2inuuYKPWkQhzBYtkZJTPDlo5LrpGLOA0iSAf9v0,15
160
+ pysdm_examples-2.113.dist-info/RECORD,,