PySDM 2.64__py3-none-any.whl → 2.65__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/initialisation/init_fall_momenta.py +9 -8
- {PySDM-2.64.dist-info → PySDM-2.65.dist-info}/METADATA +2 -2
- {PySDM-2.64.dist-info → PySDM-2.65.dist-info}/RECORD +6 -6
- {PySDM-2.64.dist-info → PySDM-2.65.dist-info}/LICENSE +0 -0
- {PySDM-2.64.dist-info → PySDM-2.65.dist-info}/WHEEL +0 -0
- {PySDM-2.64.dist-info → PySDM-2.65.dist-info}/top_level.txt +0 -0
|
@@ -12,8 +12,7 @@ from PySDM.particulator import Particulator
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def init_fall_momenta(
|
|
15
|
-
|
|
16
|
-
rho_w: float, # TODO #798 - we plan to use masses instead of volumes soon
|
|
15
|
+
water_mass: np.ndarray,
|
|
17
16
|
zero: bool = False,
|
|
18
17
|
terminal_velocity_approx=GunnKinzer1949, # TODO #1155
|
|
19
18
|
):
|
|
@@ -24,24 +23,26 @@ def init_fall_momenta(
|
|
|
24
23
|
`PySDM.attributes.physics.relative_fall_velocity.RelativeFallVelocity` attribute)
|
|
25
24
|
|
|
26
25
|
Parameters:
|
|
27
|
-
-
|
|
28
|
-
- rho_w: the density of water (generally found in formulae.constants)
|
|
26
|
+
- water_mass: a numpy array of superdroplet water masses
|
|
29
27
|
|
|
30
28
|
Returns:
|
|
31
29
|
- a numpy array of initial momentum values
|
|
32
30
|
"""
|
|
33
31
|
if zero:
|
|
34
|
-
return np.zeros_like(
|
|
32
|
+
return np.zeros_like(water_mass)
|
|
35
33
|
|
|
36
34
|
particulator = Particulator(0, CPU(Formulae())) # TODO #1155
|
|
37
35
|
|
|
38
36
|
approximation = terminal_velocity_approx(particulator=particulator)
|
|
39
37
|
|
|
40
|
-
|
|
38
|
+
volume_arr = particulator.formulae.particle_shape_and_density.mass_to_volume(
|
|
39
|
+
water_mass
|
|
40
|
+
)
|
|
41
|
+
radii_arr = particulator.formulae.trivia.radius(volume=volume_arr)
|
|
41
42
|
radii = particulator.Storage.from_ndarray(radii_arr)
|
|
42
43
|
|
|
43
|
-
output = particulator.Storage.empty((len(
|
|
44
|
+
output = particulator.Storage.empty((len(water_mass),), dtype=float)
|
|
44
45
|
|
|
45
46
|
approximation(output=output, radius=radii)
|
|
46
47
|
|
|
47
|
-
return output.to_ndarray() *
|
|
48
|
+
return output.to_ndarray() * water_mass
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PySDM
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.65
|
|
4
4
|
Summary: Pythonic particle-based (super-droplet) warm-rain/aqueous-chemistry cloud microphysics package with box, parcel & 1D/2D prescribed-flow examples in Python, Julia and Matlab
|
|
5
5
|
Home-page: https://github.com/open-atmos/PySDM
|
|
6
6
|
Author: https://github.com/open-atmos/PySDM/graphs/contributors
|
|
@@ -34,7 +34,7 @@ Provides-Extra: tests
|
|
|
34
34
|
Requires-Dist: matplotlib ; extra == 'tests'
|
|
35
35
|
Requires-Dist: pytest ; extra == 'tests'
|
|
36
36
|
Requires-Dist: pytest-timeout ; extra == 'tests'
|
|
37
|
-
Requires-Dist: PyPartMC ==1.3.
|
|
37
|
+
Requires-Dist: PyPartMC ==1.3.3 ; extra == 'tests'
|
|
38
38
|
Requires-Dist: pyrcel ; extra == 'tests'
|
|
39
39
|
Requires-Dist: jupyter-core <5.0.0 ; extra == 'tests'
|
|
40
40
|
Requires-Dist: ipywidgets !=8.0.3 ; extra == 'tests'
|
|
@@ -177,7 +177,7 @@ PySDM/impl/wall_timer.py,sha256=cDApBqoTS_kUfnBzzQtP-XTJxBMBmyqv4m9mODaA2CE,465
|
|
|
177
177
|
PySDM/initialisation/__init__.py,sha256=Li4IboyzZBIwoLbNKceZq9nDUgJpShQr8QyibDZM_5Q,351
|
|
178
178
|
PySDM/initialisation/discretise_multiplicities.py,sha256=D_8EsoXwSLsgIGUyOuLDDVuaQpZAQbtEDtJfcXK90Bw,779
|
|
179
179
|
PySDM/initialisation/equilibrate_wet_radii.py,sha256=mQSMWChcF3YnfH9AIYAzYgjZXmXxZ3NaS0yNVCk5nuY,3774
|
|
180
|
-
PySDM/initialisation/init_fall_momenta.py,sha256=
|
|
180
|
+
PySDM/initialisation/init_fall_momenta.py,sha256=LFMTVm5DaO8B2_txi4yj9jvHGpgNX3JxYXzdaCai_VE,1427
|
|
181
181
|
PySDM/initialisation/aerosol_composition/__init__.py,sha256=IsaPAyhxPXHaXY2nu9cyYdtjWnwxAGKZejvpRsv3Dyc,206
|
|
182
182
|
PySDM/initialisation/aerosol_composition/dry_aerosol.py,sha256=FxFqPyR7Fhg1mi5lYfim4Z4PsnWrwIKGsVRiWa2HW6s,4372
|
|
183
183
|
PySDM/initialisation/impl/__init__.py,sha256=vejuF9ebIGXb7l9zEiBBbNjs1Qct1KZuZRPLh8w3SJE,125
|
|
@@ -375,8 +375,8 @@ PySDM/products/size_spectral/size_standard_deviation.py,sha256=ikW_BefV27gwUlDPo
|
|
|
375
375
|
PySDM/products/size_spectral/total_particle_concentration.py,sha256=stDEn67KGhxEkrOC4CCfCFVgjtQPMphZTfJ1Vy_H5aw,454
|
|
376
376
|
PySDM/products/size_spectral/total_particle_specific_concentration.py,sha256=z6SfknIoXgT2XbVeuswrwBew9yTlmbW7qWFRmD4rqUg,460
|
|
377
377
|
PySDM/products/size_spectral/water_mixing_ratio.py,sha256=i2g2s8Hj_ZTmggZvXuGRWnqyxutSknncY8Imzw_Vfhk,1301
|
|
378
|
-
PySDM-2.
|
|
379
|
-
PySDM-2.
|
|
380
|
-
PySDM-2.
|
|
381
|
-
PySDM-2.
|
|
382
|
-
PySDM-2.
|
|
378
|
+
PySDM-2.65.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
379
|
+
PySDM-2.65.dist-info/METADATA,sha256=2hjCWA1nYn4fr__zSllUrdgc7ese3FonreX3gRIKa9A,45787
|
|
380
|
+
PySDM-2.65.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
381
|
+
PySDM-2.65.dist-info/top_level.txt,sha256=6NYaDAhUnaYMD7ebD_dQ7HlhiJS7NMuKEXb0ck7Wcsg,6
|
|
382
|
+
PySDM-2.65.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|