PySDM-examples 2.101__py3-none-any.whl → 2.103__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.
- PySDM_examples/Alpert_and_Knopf_2016/simulation.py +2 -1
- PySDM_examples/Arabas_et_al_2023/make_particulator.py +5 -2
- PySDM_examples/Morrison_and_Grabowski_2007/cumulus.py +1 -1
- PySDM_examples/Morrison_and_Grabowski_2007/strato_cumulus.py +0 -1
- PySDM_examples/Niedermeier_et_al_2014/simulation.py +2 -2
- PySDM_examples/Shipway_and_Hill_2012/settings.py +1 -2
- PySDM_examples/Szumowski_et_al_1998/simulation.py +2 -0
- PySDM_examples/Toon_et_al_1980/__init__.py +0 -0
- PySDM_examples/seeding/settings.py +1 -1
- {PySDM_examples-2.101.dist-info → pysdm_examples-2.103.dist-info}/METADATA +5 -1
- {PySDM_examples-2.101.dist-info → pysdm_examples-2.103.dist-info}/RECORD +13 -12
- {PySDM_examples-2.101.dist-info → pysdm_examples-2.103.dist-info}/WHEEL +1 -1
- {PySDM_examples-2.101.dist-info → pysdm_examples-2.103.dist-info}/top_level.txt +0 -0
|
@@ -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
|
-
"
|
|
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,
|
|
@@ -50,7 +50,7 @@ class Cumulus(Common):
|
|
|
50
50
|
def drhod_dz(z, _):
|
|
51
51
|
lv = self.formulae.latent_heat.lv(T_of_z(z))
|
|
52
52
|
return self.formulae.hydrostatics.drho_dz(
|
|
53
|
-
|
|
53
|
+
p_of_z(z), T_of_z(z), q_of_z(z), lv
|
|
54
54
|
)
|
|
55
55
|
|
|
56
56
|
theta_std0 = self.formulae.trivia.th_std(
|
|
@@ -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["
|
|
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():
|
|
@@ -99,7 +99,6 @@ class Settings:
|
|
|
99
99
|
)
|
|
100
100
|
)
|
|
101
101
|
|
|
102
|
-
g = self.formulae.constants.g_std
|
|
103
102
|
self.rhod0 = self.formulae.state_variable_triplet.rho_d(
|
|
104
103
|
p=p0,
|
|
105
104
|
water_vapour_mixing_ratio=self.water_vapour_mixing_ratio(0 * si.m),
|
|
@@ -123,7 +122,7 @@ class Settings:
|
|
|
123
122
|
)
|
|
124
123
|
lv = self.formulae.latent_heat.lv(T)
|
|
125
124
|
return self.formulae.hydrostatics.drho_dz(
|
|
126
|
-
|
|
125
|
+
p, T, water_vapour_mixing_ratio, lv
|
|
127
126
|
) / (
|
|
128
127
|
1 + water_vapour_mixing_ratio
|
|
129
128
|
) - rhod * d_water_vapour_mixing_ratio__dz / (
|
|
@@ -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"])
|
|
File without changes
|
|
@@ -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.
|
|
3
|
+
Version: 2.103
|
|
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
|
|
@@ -160,3 +160,7 @@ The box environment is also featured in the <a href="https://open-atmos.github.i
|
|
|
160
160
|
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Bolin_1958.html">Bolin_1958</a>
|
|
161
161
|
- below-cloud <mark>kinetic fractionation</mark>:
|
|
162
162
|
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Gedzelman_and_Arnold_1994.html">Gedzelman_and_Arnold_1994</a>
|
|
163
|
+
|
|
164
|
+
## examples depicting extraterrestrial clouds (formulae-only, no simulations yet)
|
|
165
|
+
- Titan (methane clouds):
|
|
166
|
+
- <a href="https://open-atmos.github.io/PySDM/PySDM_examples/Toon_et_al_1980.html">Toon_et_al_1980</a>
|
|
@@ -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=
|
|
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=
|
|
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
|
|
@@ -75,11 +75,11 @@ PySDM_examples/Merlivat_and_Nief_1967/__init__.py,sha256=ng7qsws-A87JR1X5DSewG2A
|
|
|
75
75
|
PySDM_examples/Miyake_et_al_1968/__init__.py,sha256=6uWg29ppJfgyvgwuuBPJdX9immnAly-gkFF_fjTZ9hE,202
|
|
76
76
|
PySDM_examples/Morrison_and_Grabowski_2007/__init__.py,sha256=C8SGK7hJSZmigurj720OGVOO1lCSayznPszwd8siVEw,283
|
|
77
77
|
PySDM_examples/Morrison_and_Grabowski_2007/common.py,sha256=aOSCsXSCRPLEgV2LThpmAdF_gGANPAypUDxwGe5C2Do,5221
|
|
78
|
-
PySDM_examples/Morrison_and_Grabowski_2007/cumulus.py,sha256=
|
|
79
|
-
PySDM_examples/Morrison_and_Grabowski_2007/strato_cumulus.py,sha256=
|
|
78
|
+
PySDM_examples/Morrison_and_Grabowski_2007/cumulus.py,sha256=5NajwdLrUU3Sb8kyEpN4HAhhMpVAe9Tt0Pjgm4A35zk,4459
|
|
79
|
+
PySDM_examples/Morrison_and_Grabowski_2007/strato_cumulus.py,sha256=2tLh5p2ruFtfuPFr96wGWgZC-jYYrdmzDtF_rglQ6hk,1096
|
|
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=
|
|
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
|
|
@@ -101,7 +101,7 @@ PySDM_examples/Shima_et_al_2009/tutorial_settings.py,sha256=nTe_rKAIPpXwnh52mDBr
|
|
|
101
101
|
PySDM_examples/Shipway_and_Hill_2012/__init__.py,sha256=_yZNTXhicir6Q1PaX_ThYx_z_gwTVdKV8P86oTM-Ycw,298
|
|
102
102
|
PySDM_examples/Shipway_and_Hill_2012/mpdata_1d.py,sha256=8l7Zcv2PluBXYZO0qQ4j4_otLcLPtPWSGJJgzRfxEKs,2341
|
|
103
103
|
PySDM_examples/Shipway_and_Hill_2012/plot.py,sha256=Q6lnGWE3oSDKV_F1qKUIihhbYABQ3S1A1qg7Q2rXwn4,3606
|
|
104
|
-
PySDM_examples/Shipway_and_Hill_2012/settings.py,sha256=
|
|
104
|
+
PySDM_examples/Shipway_and_Hill_2012/settings.py,sha256=0_ixO9es8oaDBu8O8SYKMjerXitcQW4fWL_pifCB3Cg,6413
|
|
105
105
|
PySDM_examples/Shipway_and_Hill_2012/simulation.py,sha256=5uG7Nq80jQ8TTfypwnFIThOF9ndTL_hseUcXPfMKbOg,10351
|
|
106
106
|
PySDM_examples/Singer_Ward/__init__.py,sha256=2nKsepqAvYfHeiGAF1qca6DRzPQvUMosxhoCQKM7iiQ,161
|
|
107
107
|
PySDM_examples/Singer_Ward/aerosol.py,sha256=H7TcvI94Wc-IvhTMFshFaJRJY3eUjihAlSdNxVKZzL0,5805
|
|
@@ -119,9 +119,10 @@ 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=
|
|
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
|
+
PySDM_examples/Toon_et_al_1980/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
125
126
|
PySDM_examples/Van_Hook_1968/__init__.py,sha256=rTmp4AjFBnNJP61rn7Scui5G_AwQruqjz50tF04EmsY,170
|
|
126
127
|
PySDM_examples/Yang_et_al_2018/__init__.py,sha256=w7eRDdbBJKvp-iRqgTJDEGlX2o1vqubjjuqc0YECodc,278
|
|
127
128
|
PySDM_examples/Yang_et_al_2018/settings.py,sha256=snD3ehCPaWD2QBJosdCYKX4X-dHb0LnBiayhPkXUY3w,2327
|
|
@@ -140,7 +141,7 @@ PySDM_examples/deJong_Mackay_et_al_2023/simulation1D.py,sha256=xDA7I3EBoeAw_sHfp
|
|
|
140
141
|
PySDM_examples/deJong_Mackay_et_al_2023/simulation_0D.py,sha256=TRDny1dwoEXClkRm90yI94JVY44-9xj4UBFsRQAtA9Q,4607
|
|
141
142
|
PySDM_examples/deJong_Mackay_et_al_2023/simulation_ss.py,sha256=fYE5LRPbt5qIYC3NaXhC-qsq9GDETBxmXf2Ih3ezFyw,5864
|
|
142
143
|
PySDM_examples/seeding/__init__.py,sha256=RfACRu9O8zoWLR0HV6aUdikNlphpuAhY2QznMZUu72w,220
|
|
143
|
-
PySDM_examples/seeding/settings.py,sha256=
|
|
144
|
+
PySDM_examples/seeding/settings.py,sha256=ktJWLzWWeN7Q44WGjVaIVuF1nS2UE2zrUuwSAMu_NR8,2224
|
|
144
145
|
PySDM_examples/seeding/simulation.py,sha256=kx-kUj0yJMc6zizQsu_K_E4_0-UQqPv1XSkx6AyF9tc,4088
|
|
145
146
|
PySDM_examples/utils/__init__.py,sha256=kf3zKLHnQkH5inbjfzaapfDy5ACDeU8efmbJtRVJaHo,217
|
|
146
147
|
PySDM_examples/utils/basic_simulation.py,sha256=4EdgD0p8EKNNcqYYVSlGm1MG2ac7_6heQdwS-kp-Tmw,698
|
|
@@ -150,7 +151,7 @@ PySDM_examples/utils/read_vtk_1d.py,sha256=7_3sagEbX_FxqFuGkFWdwQapd1-9echFghU8T
|
|
|
150
151
|
PySDM_examples/utils/widgets/__init__.py,sha256=U67WZ2YDcXSocMraI7pzcMxCfcxzXNqehDzoG6ogsh4,519
|
|
151
152
|
PySDM_examples/utils/widgets/freezer.py,sha256=tFlZWShXUzA2X0cxgeE44N1g9kD33q3KQWZBqkgBP0A,407
|
|
152
153
|
PySDM_examples/utils/widgets/progbar_updater.py,sha256=3uhG32QkAiSM3dTV7DoROJl7fAUNA6ZsJEIKSg3tdmk,267
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
pysdm_examples-2.103.dist-info/METADATA,sha256=_K40VQSggBUNkHCKH3tHeFUa2oHLb1ejwnoHqcy3_5s,12504
|
|
155
|
+
pysdm_examples-2.103.dist-info/WHEEL,sha256=nn6H5-ilmfVryoAQl3ZQ2l8SH5imPWFpm1A5FgEuFV4,91
|
|
156
|
+
pysdm_examples-2.103.dist-info/top_level.txt,sha256=axw2inuuYKPWkQhzBYtkZJTPDlo5LrpGLOA0iSAf9v0,15
|
|
157
|
+
pysdm_examples-2.103.dist-info/RECORD,,
|
|
File without changes
|