PySDM-examples 2.100__py3-none-any.whl → 2.102__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.
@@ -220,6 +220,7 @@ def simulation(
220
220
  environment=Box(dt=time_step, dv=volume),
221
221
  )
222
222
  builder.add_dynamic(Freezing(singular=False))
223
+ builder.request_attribute("volume")
223
224
 
224
225
  if hasattr(spectrum, "s_geom") and spectrum.s_geom == 1:
225
226
  _isa, _conc = np.full(n_sd, spectrum.m_mode), np.full(
@@ -230,7 +231,7 @@ def simulation(
230
231
  attributes = {
231
232
  "multiplicity": discretise_multiplicities(_conc * volume),
232
233
  "immersed surface area": _isa,
233
- "volume": np.full(n_sd, droplet_volume),
234
+ "signed water mass": np.full(n_sd, droplet_volume * formulae.constants.rho_w),
234
235
  }
235
236
  np.testing.assert_almost_equal(attributes["multiplicity"], multiplicity)
236
237
  products = (
@@ -27,8 +27,6 @@ def make_particulator(
27
27
  volume,
28
28
  thaw=False
29
29
  ):
30
- attributes = {"volume": np.ones(n_sd) * droplet_volume}
31
-
32
30
  formulae_ctor_args = {
33
31
  "seed": seed,
34
32
  "constants": constants,
@@ -39,6 +37,10 @@ def make_particulator(
39
37
  formulae = Formulae(**formulae_ctor_args)
40
38
  backend = CPU(formulae, override_jit_flags={"parallel": False})
41
39
 
40
+ attributes = {
41
+ "signed water mass": np.ones(n_sd) * droplet_volume * formulae.constants.rho_w
42
+ }
43
+
42
44
  sampling = SpectroGlacialSampling(
43
45
  freezing_temperature_spectrum=formulae.freezing_temperature_spectrum,
44
46
  insoluble_surface_spectrum=ABIFM_spec,
@@ -65,6 +67,7 @@ def make_particulator(
65
67
  env["rhod"] = 1.0
66
68
 
67
69
  builder.add_dynamic(Freezing(singular=singular, thaw=thaw))
70
+ builder.request_attribute("volume")
68
71
 
69
72
  return builder.build(
70
73
  attributes=attributes,
@@ -51,15 +51,15 @@ class Simulation(BasicSimulation):
51
51
  "multiplicity": ccn_conc_float * air_volume,
52
52
  "dry volume": dry_volume,
53
53
  "kappa times dry volume": settings.kappa * dry_volume,
54
- "volume": None,
55
54
  "immersed surface area": immersed_surface_area,
56
55
  }
57
- attributes["volume"] = settings.formulae.trivia.volume(
56
+ attributes["signed water mass"] = settings.formulae.trivia.volume(
58
57
  radius=equilibrate_wet_radii(
59
58
  r_dry=ccn_diameter / 2,
60
59
  environment=builder.particulator.environment,
61
60
  kappa_times_dry_volume=attributes["kappa times dry volume"],
62
61
  )
62
+ * settings.formulae.constants.rho_w
63
63
  )
64
64
 
65
65
  for attribute, data in attributes.items():
@@ -154,6 +154,8 @@ class Simulation:
154
154
  )
155
155
 
156
156
  if self.settings.processes["freezing"]:
157
+ attributes["signed water mass"] = attributes.pop("water mass")
158
+
157
159
  if self.settings.freezing_inp_spec is None:
158
160
  immersed_surface_area = formulae.trivia.sphere_surface(
159
161
  diameter=2 * formulae.trivia.radius(volume=attributes["dry volume"])
@@ -59,7 +59,7 @@ class Settings:
59
59
  v_dry = self.formulae.trivia.volume(radius=r_dry)
60
60
  self.seeded_particle_multiplicity = n_in_dv
61
61
  self.seeded_particle_extensive_attributes = {
62
- "water mass": [0.0001 * si.ng] * n_sd_seeding,
62
+ "signed water mass": [0.0001 * si.ng] * n_sd_seeding,
63
63
  "dry volume": v_dry,
64
64
  "kappa times dry volume": 0.8 * v_dry,
65
65
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: PySDM-examples
3
- Version: 2.100
3
+ Version: 2.102
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
@@ -8,7 +8,7 @@ PySDM_examples/Abdul_Razzak_Ghan_2000/data_from_ARG2000_paper.py,sha256=MRyurAnX
8
8
  PySDM_examples/Abdul_Razzak_Ghan_2000/data_from_CloudMicrophysics_ARG.py,sha256=6vuCL55D2KnUutnqZvdv1Wnpgt0rz4BTFELKzOQP1uo,11547
9
9
  PySDM_examples/Abdul_Razzak_Ghan_2000/run_ARG_parcel.py,sha256=_n_sc0o-iAUr7_ZQmIqY4YNCViGtd82LE_r1AU3phvU,5460
10
10
  PySDM_examples/Alpert_and_Knopf_2016/__init__.py,sha256=L9OFD5gAfjzjowsdFdESfUX93r04L3t-3OI-MHGyuLw,519
11
- PySDM_examples/Alpert_and_Knopf_2016/simulation.py,sha256=YkO3L1JOyz_5ygWBunnY97lkj68IgVgJEJ2m67UkmoE,10034
11
+ PySDM_examples/Alpert_and_Knopf_2016/simulation.py,sha256=2Pu4WikpaooKSFqG88GYTWS_uFYuAjpkg3zMCtZNwdQ,10112
12
12
  PySDM_examples/Alpert_and_Knopf_2016/table.py,sha256=z3d4Pms0nwe4Jb10FilOtNcE4cpUx3zGtDSeStH1l6o,228
13
13
  PySDM_examples/Alpert_and_Knopf_2016/table_1.py,sha256=edJfFNqOYwZvOL4nKM5Ir5kFppDqbfz4hPUESqCnNaI,3792
14
14
  PySDM_examples/Alpert_and_Knopf_2016/table_2.py,sha256=oxeB_UNLWzrSHKoWOot-kAe5X_i9n18SKDOh7fF9KkQ,1857
@@ -25,7 +25,7 @@ PySDM_examples/Arabas_et_al_2023/__init__.py,sha256=G2H7d8lSyHGQKsPw5FiT6We_DeQj
25
25
  PySDM_examples/Arabas_et_al_2023/commons.py,sha256=MZ1fVte_6rZ-BJKQoppZUQqCpve8cau_y0kG5dBb-xs,575
26
26
  PySDM_examples/Arabas_et_al_2023/curved_text.py,sha256=DoUvIuHkZ8xrgyXwdwEjUZLMeFseyOG7HfPS78CRNnY,5338
27
27
  PySDM_examples/Arabas_et_al_2023/frozen_fraction.py,sha256=8ok3PbeXMwn87hCQt5tsNcHMCbYZHdW7dnCL-Fcx3LQ,783
28
- PySDM_examples/Arabas_et_al_2023/make_particulator.py,sha256=e_rg8PbIHHW5N_metonQAsgrXGBhjcF0Jkonek8ovA4,2119
28
+ PySDM_examples/Arabas_et_al_2023/make_particulator.py,sha256=yq1szRl3p_v-46y6DAAaWMA-rKfm2BuUx7z5MJnqIKk,2211
29
29
  PySDM_examples/Arabas_et_al_2023/plots.py,sha256=YaF3LTOPX2k6d5ZG_FKPOgZPcSjM7oVMdnSFzK6-DQM,5035
30
30
  PySDM_examples/Arabas_et_al_2023/run_simulation.py,sha256=Yq4EjdvOr1nYrvK8b1LZtqtbvf0bg6Mm2CWg5zsDqi4,1281
31
31
  PySDM_examples/Bartman_2020_MasterThesis/__init__.py,sha256=la2o79L6WLPueZ3EI5ThGtNRuSkXvKQwJJmvrNhhHa8,136
@@ -79,7 +79,7 @@ PySDM_examples/Morrison_and_Grabowski_2007/cumulus.py,sha256=kyypwfFdYqY_QyoPr88
79
79
  PySDM_examples/Morrison_and_Grabowski_2007/strato_cumulus.py,sha256=NsYP-AOHcY-HDvhg1dWAHWVFZzlaxpDoQJNbrSphdUg,1139
80
80
  PySDM_examples/Niedermeier_et_al_2014/__init__.py,sha256=onCrRnKNGSVExQkYDjxtrLF94CnsjEwqF4TZ5lUbySs,199
81
81
  PySDM_examples/Niedermeier_et_al_2014/settings.py,sha256=wO9NwcgOhzIDmmyVDHVYuGSlbnJUq7FjRL1kfCekS8M,1556
82
- PySDM_examples/Niedermeier_et_al_2014/simulation.py,sha256=F1DKol-ujtJ5PaNKyKATquuTgHwces2it4jXDu-4dho,3408
82
+ PySDM_examples/Niedermeier_et_al_2014/simulation.py,sha256=0gkQ_5wUaBdQWdxY-KU-fj2-Ih0SL19Lw5xCSCkFaoI,3439
83
83
  PySDM_examples/Pierchala_et_al_2022/__init__.py,sha256=GEv_wVIl6qmbdDcneB_q-51crD1C9jN-C4ILFq1BYf0,242
84
84
  PySDM_examples/Pierchala_et_al_2022/commons.py,sha256=GPFC4NbhyTFT_XEcsS6xLMzDIPwOZ0eislYteeSkqqc,1021
85
85
  PySDM_examples/Pyrcel/__init__.py,sha256=Ix8ZNYHhQe_rqLJaFBo_v1pRHpQkXT1-N5ql8L6bTSg,283
@@ -119,7 +119,7 @@ PySDM_examples/Szumowski_et_al_1998/gui_viewer.py,sha256=JZFAfD9FXHS5msVYAzccoF5
119
119
  PySDM_examples/Szumowski_et_al_1998/make_default_product_collection.py,sha256=m8qiUHsCaGSBo_b8MqhHtO4a-MBuhG42XHBn42Vy6Cw,4682
120
120
  PySDM_examples/Szumowski_et_al_1998/mpdata_2d.py,sha256=Y3Qimm2hSDvtJxdc9mBoPCftMFSDTaOE7dSDd2lt_DU,4441
121
121
  PySDM_examples/Szumowski_et_al_1998/plots.py,sha256=fzeluxlLF9VbSMmcu2wvd9WPl3ApIuA0jouwOh6rJHA,7001
122
- PySDM_examples/Szumowski_et_al_1998/simulation.py,sha256=ADPFimJ4bEVZ1Ocjesb7oFEVsecEA3QvNd7tjUnYUWs,10287
122
+ PySDM_examples/Szumowski_et_al_1998/simulation.py,sha256=H0tDBLSh8xhCq3aYtFlgBcnun-PX3sg8_R_ZfMPE7VI,10363
123
123
  PySDM_examples/Szumowski_et_al_1998/sounding.py,sha256=vk3KHRPrBbZpz6QCqj2RtWyEpl_N7jSMR-zoDWM_ZVQ,1440
124
124
  PySDM_examples/Szumowski_et_al_1998/storage.py,sha256=NaGoujCRLubSEbhLA0QZDaSkATpJuF09HCnGdWQzcxQ,2579
125
125
  PySDM_examples/Van_Hook_1968/__init__.py,sha256=rTmp4AjFBnNJP61rn7Scui5G_AwQruqjz50tF04EmsY,170
@@ -140,7 +140,7 @@ PySDM_examples/deJong_Mackay_et_al_2023/simulation1D.py,sha256=xDA7I3EBoeAw_sHfp
140
140
  PySDM_examples/deJong_Mackay_et_al_2023/simulation_0D.py,sha256=TRDny1dwoEXClkRm90yI94JVY44-9xj4UBFsRQAtA9Q,4607
141
141
  PySDM_examples/deJong_Mackay_et_al_2023/simulation_ss.py,sha256=fYE5LRPbt5qIYC3NaXhC-qsq9GDETBxmXf2Ih3ezFyw,5864
142
142
  PySDM_examples/seeding/__init__.py,sha256=RfACRu9O8zoWLR0HV6aUdikNlphpuAhY2QznMZUu72w,220
143
- PySDM_examples/seeding/settings.py,sha256=_dD_0YrWsXkqWpTuSHXDTUE9xktSd9196h6bpsLDNC4,2217
143
+ PySDM_examples/seeding/settings.py,sha256=ktJWLzWWeN7Q44WGjVaIVuF1nS2UE2zrUuwSAMu_NR8,2224
144
144
  PySDM_examples/seeding/simulation.py,sha256=kx-kUj0yJMc6zizQsu_K_E4_0-UQqPv1XSkx6AyF9tc,4088
145
145
  PySDM_examples/utils/__init__.py,sha256=kf3zKLHnQkH5inbjfzaapfDy5ACDeU8efmbJtRVJaHo,217
146
146
  PySDM_examples/utils/basic_simulation.py,sha256=4EdgD0p8EKNNcqYYVSlGm1MG2ac7_6heQdwS-kp-Tmw,698
@@ -150,7 +150,7 @@ PySDM_examples/utils/read_vtk_1d.py,sha256=7_3sagEbX_FxqFuGkFWdwQapd1-9echFghU8T
150
150
  PySDM_examples/utils/widgets/__init__.py,sha256=U67WZ2YDcXSocMraI7pzcMxCfcxzXNqehDzoG6ogsh4,519
151
151
  PySDM_examples/utils/widgets/freezer.py,sha256=tFlZWShXUzA2X0cxgeE44N1g9kD33q3KQWZBqkgBP0A,407
152
152
  PySDM_examples/utils/widgets/progbar_updater.py,sha256=3uhG32QkAiSM3dTV7DoROJl7fAUNA6ZsJEIKSg3tdmk,267
153
- PySDM_examples-2.100.dist-info/METADATA,sha256=WNerCvBSR9wWouLdANSqkds05fblhpg2mlav7IWWjno,12290
154
- PySDM_examples-2.100.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
155
- PySDM_examples-2.100.dist-info/top_level.txt,sha256=axw2inuuYKPWkQhzBYtkZJTPDlo5LrpGLOA0iSAf9v0,15
156
- PySDM_examples-2.100.dist-info/RECORD,,
153
+ PySDM_examples-2.102.dist-info/METADATA,sha256=GOisAKETFu8CjME9LY2P6kWFFYFu1TxcDD2eURsk9GU,12290
154
+ PySDM_examples-2.102.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
155
+ PySDM_examples-2.102.dist-info/top_level.txt,sha256=axw2inuuYKPWkQhzBYtkZJTPDlo5LrpGLOA0iSAf9v0,15
156
+ PySDM_examples-2.102.dist-info/RECORD,,