PySDM 2.44__py3-none-any.whl → 2.45__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/sampling/spectral_sampling.py +2 -1
- PySDM/physics/constants_defaults.py +10 -0
- PySDM/physics/diffusion_kinetics/__init__.py +2 -0
- PySDM/physics/diffusion_kinetics/grabowski_et_al_2011.py +9 -0
- PySDM/physics/diffusion_kinetics/jensen_and_nugent_2017.py +14 -0
- PySDM/physics/diffusion_kinetics/pruppacher_and_klett_2005.py +8 -0
- PySDM/physics/diffusion_thermics/__init__.py +1 -0
- PySDM/physics/diffusion_thermics/grabowski_et_al_2011.py +23 -0
- PySDM/physics/impl/fake_unit_registry.py +2 -0
- PySDM/physics/trivia.py +4 -0
- PySDM/products/condensation/peak_supersaturation.py +4 -0
- {PySDM-2.44.dist-info → PySDM-2.45.dist-info}/METADATA +1 -1
- {PySDM-2.44.dist-info → PySDM-2.45.dist-info}/RECORD +16 -13
- {PySDM-2.44.dist-info → PySDM-2.45.dist-info}/LICENSE +0 -0
- {PySDM-2.44.dist-info → PySDM-2.45.dist-info}/WHEEL +0 -0
- {PySDM-2.44.dist-info → PySDM-2.45.dist-info}/top_level.txt +0 -0
|
@@ -55,7 +55,8 @@ class DeterministicSpectralSampling(
|
|
|
55
55
|
diff = abs(1 - np.sum(y_float) / spectrum.norm_factor)
|
|
56
56
|
if diff > self.error_threshold:
|
|
57
57
|
raise ValueError(
|
|
58
|
-
f"{100
|
|
58
|
+
f"{diff * 100:.3g}% error in total real-droplet number due to sampling "
|
|
59
|
+
f"({len(x)} samples)"
|
|
59
60
|
)
|
|
60
61
|
|
|
61
62
|
return x, y_float
|
|
@@ -321,6 +321,16 @@ CRAIG_1961_INTERCEPT_COEFF = 10 * PER_MILLE
|
|
|
321
321
|
""" [Bohren 1987](https://doi.org/10.1119/1.15109) """
|
|
322
322
|
asymmetry_g = 0.85 # forward scattering from cloud droplets
|
|
323
323
|
|
|
324
|
+
""" TODO #1266 """
|
|
325
|
+
diffussion_thermics_D_G11_A = 1e-5 * si.m**2 / si.s
|
|
326
|
+
diffussion_thermics_D_G11_B = 0.15 / si.K
|
|
327
|
+
diffussion_thermics_D_G11_C = -1.9
|
|
328
|
+
|
|
329
|
+
diffussion_thermics_K_G11_A = 1.5e-11 * si.W / si.m / si.K**4
|
|
330
|
+
diffussion_thermics_K_G11_B = -4.8e-8 * si.W / si.m / si.K**3
|
|
331
|
+
diffussion_thermics_K_G11_C = 1e-4 * si.W / si.m / si.K**2
|
|
332
|
+
diffussion_thermics_K_G11_D = -3.9e-4 * si.W / si.m / si.K
|
|
333
|
+
|
|
324
334
|
|
|
325
335
|
def compute_derived_values(c: dict):
|
|
326
336
|
c["eps"] = c["Mv"] / c["Md"]
|
|
@@ -5,3 +5,5 @@ Formulae for handling transition-régime corrections in condensational growth/ev
|
|
|
5
5
|
from .fuchs_sutugin import FuchsSutugin
|
|
6
6
|
from .lowe_et_al_2019 import LoweEtAl2019
|
|
7
7
|
from .neglect import Neglect
|
|
8
|
+
from .grabowski_et_al_2011 import GrabowskiEtAl2011
|
|
9
|
+
from .jensen_and_nugent_2017 import JensenAndNugent2017
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""
|
|
2
|
+
as in [Jensen and Nugent 2017](https://doi.org/10.1175/JAS-D-15-0370.1)
|
|
3
|
+
(which refers to [Grabowski et al. (2011)](https://doi.org/10.1016/j.atmosres.2010.10.020)
|
|
4
|
+
but uses different gas constant, typo?)
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import numpy as np
|
|
8
|
+
from .grabowski_et_al_2011 import GrabowskiEtAl2011
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class JensenAndNugent2017(GrabowskiEtAl2011):
|
|
12
|
+
@staticmethod
|
|
13
|
+
def lambdaD(const, D, T):
|
|
14
|
+
return D / np.sqrt(2 * const.Rd * T)
|
|
@@ -19,3 +19,11 @@ class PruppacherKlett:
|
|
|
19
19
|
return D / (
|
|
20
20
|
(r / (r + const.dv_pk05)) + 2 * np.sqrt(const.PI) * lmbd / r / const.MAC
|
|
21
21
|
)
|
|
22
|
+
|
|
23
|
+
@staticmethod
|
|
24
|
+
def lambdaK(_, T, p): # pylint: disable=unused-argument
|
|
25
|
+
return -1
|
|
26
|
+
|
|
27
|
+
@staticmethod
|
|
28
|
+
def K(const, K, r, lmbd): # pylint: disable=unused-argument
|
|
29
|
+
return K # TODO #1266
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""
|
|
2
|
+
as in [Grabowski et al. (2011)](https://doi.org/10.1016/j.atmosres.2010.10.020)
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class GrabowskiEtAl2011:
|
|
7
|
+
def __init__(self, _):
|
|
8
|
+
pass
|
|
9
|
+
|
|
10
|
+
@staticmethod
|
|
11
|
+
def D(const, T, p): # pylint: disable=unused-argument
|
|
12
|
+
return const.diffussion_thermics_D_G11_A * (
|
|
13
|
+
const.diffussion_thermics_D_G11_B * T + const.diffussion_thermics_D_G11_C
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
@staticmethod
|
|
17
|
+
def K(const, T, p): # pylint: disable=unused-argument
|
|
18
|
+
return (
|
|
19
|
+
const.diffussion_thermics_K_G11_A * T**3
|
|
20
|
+
+ const.diffussion_thermics_K_G11_B * T**2
|
|
21
|
+
+ const.diffussion_thermics_K_G11_C * T
|
|
22
|
+
+ const.diffussion_thermics_K_G11_D
|
|
23
|
+
)
|
|
@@ -26,6 +26,7 @@ class FakeUnitRegistry: # pylint: disable=too-few-public-methods
|
|
|
26
26
|
"litre",
|
|
27
27
|
"hour",
|
|
28
28
|
"newton",
|
|
29
|
+
"watt",
|
|
29
30
|
):
|
|
30
31
|
self.__setattr__(prefix + unit, _fake(si.__getattr__(prefix + unit)))
|
|
31
32
|
self.__setattr__(
|
|
@@ -48,5 +49,6 @@ class FakeUnitRegistry: # pylint: disable=too-few-public-methods
|
|
|
48
49
|
"h",
|
|
49
50
|
"bar",
|
|
50
51
|
"N",
|
|
52
|
+
"W",
|
|
51
53
|
):
|
|
52
54
|
self.__setattr__(prefix + unit, _fake(si.__getattr__(prefix + unit)))
|
PySDM/physics/trivia.py
CHANGED
|
@@ -19,6 +19,10 @@ class PeakSupersaturation(Product):
|
|
|
19
19
|
def register(self, builder):
|
|
20
20
|
super().register(builder)
|
|
21
21
|
self.particulator.observers.append(self)
|
|
22
|
+
|
|
23
|
+
assert (
|
|
24
|
+
"Condensation" in self.particulator.dynamics
|
|
25
|
+
), "It seems the Condensation dynamic was not added when building particulator"
|
|
22
26
|
self.condensation = self.particulator.dynamics["Condensation"]
|
|
23
27
|
self.RH_max = np.full_like(self.buffer, np.nan)
|
|
24
28
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PySDM
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.45
|
|
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
|
|
@@ -181,7 +181,7 @@ PySDM/initialisation/impl/__init__.py,sha256=vejuF9ebIGXb7l9zEiBBbNjs1Qct1KZuZRP
|
|
|
181
181
|
PySDM/initialisation/impl/spectrum.py,sha256=mnhodIKZUReelgxgT3GwT8FH9LnyaUigmr1GaQIJkv8,1138
|
|
182
182
|
PySDM/initialisation/sampling/__init__.py,sha256=zVwv6m1lrC4moviau-rL-tdGNL1pjx9KujEfEAmLe-Y,42
|
|
183
183
|
PySDM/initialisation/sampling/spatial_sampling.py,sha256=HPDEEjTN_CWU9KX2Fw_7wMMKzQRMqi1tKVhzZ1KLcWY,1000
|
|
184
|
-
PySDM/initialisation/sampling/spectral_sampling.py,sha256
|
|
184
|
+
PySDM/initialisation/sampling/spectral_sampling.py,sha256=9Nd38R06EnbPLnpucu8occ-u1qmCGO6xD6PSSx8PYZY,4358
|
|
185
185
|
PySDM/initialisation/sampling/spectro_glacial_sampling.py,sha256=Wtq-NvZGX3-hFzRe_2LI2Ab8vi1BAcHNtdrC5gk3Rfo,1662
|
|
186
186
|
PySDM/initialisation/spectra/__init__.py,sha256=jU86INl3-p7HPOroJ5kGy7k43U4bxbXkfvffmvlIHz0,309
|
|
187
187
|
PySDM/initialisation/spectra/exponential.py,sha256=bF61am70p4KJsU910SamlY_PO-rXVs9yErKXQIZ2LGE,364
|
|
@@ -192,18 +192,21 @@ PySDM/initialisation/spectra/sum.py,sha256=SaxepweOdCozWlUkxCfr6Udo-KjGKWXgrdS0a
|
|
|
192
192
|
PySDM/initialisation/spectra/top_hat.py,sha256=xmBr_IrctsnguPNgX-jR7JnQnQl1qzIaEyz75fvAJho,563
|
|
193
193
|
PySDM/physics/__init__.py,sha256=FLer5MXgu69MztiUN91rpVVRV75SX-_YCRZohTF3y-U,1745
|
|
194
194
|
PySDM/physics/constants.py,sha256=wrIR-prH5ougsrL7jmpaIdmdmGZ5BejjmIEf5yFQpZs,1293
|
|
195
|
-
PySDM/physics/constants_defaults.py,sha256=
|
|
195
|
+
PySDM/physics/constants_defaults.py,sha256=kha03ZhX3ZewG1L6CaHQJsWJhoxeOO8WU8V2J1NvQAc,10892
|
|
196
196
|
PySDM/physics/dimensional_analysis.py,sha256=6_myMgc_eKhcbuNr7RqiQGj0OKNQ1TNqEMRb6Kzsqj0,688
|
|
197
|
-
PySDM/physics/trivia.py,sha256=
|
|
197
|
+
PySDM/physics/trivia.py,sha256=8fWqTP2G2jbnuK9xqpAIo-gfZ5ORx7In-b7AEUFAhBQ,3762
|
|
198
198
|
PySDM/physics/condensation_coordinate/__init__.py,sha256=LlSg1TLiLRQ46tfsKA1Khg7SaVPd2wg-MF0Syk5O7ng,151
|
|
199
199
|
PySDM/physics/condensation_coordinate/volume.py,sha256=DvkuOTHEq_vLFnJMjfEr0K0OUxTvcBBgFPlBb606sk8,410
|
|
200
200
|
PySDM/physics/condensation_coordinate/volume_logarithm.py,sha256=92xFq-qSIN8llu9HM59DQvbwawzbeRBIZ5hi7KEs7gc,512
|
|
201
|
-
PySDM/physics/diffusion_kinetics/__init__.py,sha256=
|
|
201
|
+
PySDM/physics/diffusion_kinetics/__init__.py,sha256=CWyIRClhDMzTLeNORHbg1izb-aGz00T6yORefVjwMsY,318
|
|
202
202
|
PySDM/physics/diffusion_kinetics/fuchs_sutugin.py,sha256=6HSMZoyKzCa1Vl-CkIOFJalGNnQB5Cl5MFFVsRtibFc,1025
|
|
203
|
+
PySDM/physics/diffusion_kinetics/grabowski_et_al_2011.py,sha256=_-bvXLcSfjPH2KEnRpSxyxG0olGi-hxkV2-nLBN4SwE,197
|
|
204
|
+
PySDM/physics/diffusion_kinetics/jensen_and_nugent_2017.py,sha256=YVUVyLhwjs_i1LQ40ULXZri2--t41I0otzTEGj4UJQ0,424
|
|
203
205
|
PySDM/physics/diffusion_kinetics/lowe_et_al_2019.py,sha256=mIR5jH00SNurVzKEgWk0e3-KKq65NbFqTHo3ZBDqzjY,621
|
|
204
206
|
PySDM/physics/diffusion_kinetics/neglect.py,sha256=QCiLZwQo7VW29dftNuwQjLdOePz0kZSvjepGmqr_Ar8,500
|
|
205
|
-
PySDM/physics/diffusion_kinetics/pruppacher_and_klett_2005.py,sha256=
|
|
206
|
-
PySDM/physics/diffusion_thermics/__init__.py,sha256=
|
|
207
|
+
PySDM/physics/diffusion_kinetics/pruppacher_and_klett_2005.py,sha256=1GVoKpZ9sw5se-uxvnyjcOc4khLJ64hYTPoztMM5nz0,686
|
|
208
|
+
PySDM/physics/diffusion_thermics/__init__.py,sha256=0m8nbzap79JQDOa6NOKaKX6issZi76KoBib9qxDV65Q,279
|
|
209
|
+
PySDM/physics/diffusion_thermics/grabowski_et_al_2011.py,sha256=_JRfeYa_Bo9ylYbGPWKPVaNGJUNm5M4YJL4cm6c5zoI,695
|
|
207
210
|
PySDM/physics/diffusion_thermics/lowe_et_al_2019.py,sha256=JkzhyHQwRHgui3M_fh3-QqXPlzjgtNrfHrcYFzAtl4Y,452
|
|
208
211
|
PySDM/physics/diffusion_thermics/neglect.py,sha256=m_yXkbDMb_bnMlfQR2qjteTQ9cmbE3E6tDRC3M2DtUM,312
|
|
209
212
|
PySDM/physics/diffusion_thermics/seinfeld_and_pandis_2010.py,sha256=Efz20-SZzbapGaxXlywj26BtGU3zATDMk9FkbYA9MTw,316
|
|
@@ -234,7 +237,7 @@ PySDM/physics/hygroscopicity/__init__.py,sha256=Iu3uM5NzjY9RCffhguD_hHrRy4DoVlz-
|
|
|
234
237
|
PySDM/physics/hygroscopicity/kappa_koehler.py,sha256=cTuuShyG7v9PbTTjRc9Xp6Wua_5YZS6XycTMXOwb6Ok,606
|
|
235
238
|
PySDM/physics/hygroscopicity/kappa_koehler_leading_terms.py,sha256=PzKLb9fPeR1jH872jtY5unNKGrmpLrFquXaT9WkCFu0,712
|
|
236
239
|
PySDM/physics/impl/__init__.py,sha256=M0WoRoBIUk2fXAL2GKv4AS8QTIcOJQ5fzE1x53X1YHI,154
|
|
237
|
-
PySDM/physics/impl/fake_unit_registry.py,sha256=
|
|
240
|
+
PySDM/physics/impl/fake_unit_registry.py,sha256=3Iv5vbMde_pTncJVQO51lzmnqGR1905oOjIPVG-NlFk,1728
|
|
238
241
|
PySDM/physics/impl/flag.py,sha256=zjTKmfWEKY60AiNUWbxLVy3DBzXFMy-YaMxKnUjMap8,192
|
|
239
242
|
PySDM/physics/isotope_equilibrium_fractionation_factors/__init__.py,sha256=BNh6k8VAqAX8BKH0LsVVTH1662wpvpIoGfbXbT5XQSg,681
|
|
240
243
|
PySDM/physics/isotope_equilibrium_fractionation_factors/barkan_and_luz_2005.py,sha256=W_GaRPlA905UpoS4OYG7uIrBxSAb5UXwK2TyBZd-gHY,350
|
|
@@ -312,7 +315,7 @@ PySDM/products/condensation/__init__.py,sha256=4Trl0rt4f2j3XFnBMooMDIPaq2pjl86hF
|
|
|
312
315
|
PySDM/products/condensation/activable_fraction.py,sha256=YoGJH7jTL2P6NH9-9E4og8ZUGb0sHpZTRs9pj1MZcxM,891
|
|
313
316
|
PySDM/products/condensation/condensation_timestep.py,sha256=7vi2V0BwVXZDngVwY2u-zFpgN42_Dd_ykYg_NhjYyj0,1540
|
|
314
317
|
PySDM/products/condensation/event_rates.py,sha256=-djWcPHbsO2V0tv9NoGp98y1MU-qHjFyceGm1I75P98,1812
|
|
315
|
-
PySDM/products/condensation/peak_supersaturation.py,sha256=
|
|
318
|
+
PySDM/products/condensation/peak_supersaturation.py,sha256=e0AwMjooCueuQ3YLrUZ6AxahGQLJdh5ocOE1SVMYyaE,1274
|
|
316
319
|
PySDM/products/displacement/__init__.py,sha256=dHAXQ2b7jmQVMYdWkIuGjGz56EU0UyJMRDyKV0meo1w,315
|
|
317
320
|
PySDM/products/displacement/averaged_terminal_velocity.py,sha256=h2JBUmYkTeyGwGdVJoGsYeY0XJStg2pwGcuDpZVT-mk,1172
|
|
318
321
|
PySDM/products/displacement/flow_velocity_component.py,sha256=I5K8gpKeMDYlCeIYuwF3W7hGsHHSKLp-my-OPcwYb0k,1383
|
|
@@ -361,8 +364,8 @@ PySDM/products/size_spectral/size_standard_deviation.py,sha256=ikW_BefV27gwUlDPo
|
|
|
361
364
|
PySDM/products/size_spectral/total_particle_concentration.py,sha256=stDEn67KGhxEkrOC4CCfCFVgjtQPMphZTfJ1Vy_H5aw,454
|
|
362
365
|
PySDM/products/size_spectral/total_particle_specific_concentration.py,sha256=z6SfknIoXgT2XbVeuswrwBew9yTlmbW7qWFRmD4rqUg,460
|
|
363
366
|
PySDM/products/size_spectral/water_mixing_ratio.py,sha256=i2g2s8Hj_ZTmggZvXuGRWnqyxutSknncY8Imzw_Vfhk,1301
|
|
364
|
-
PySDM-2.
|
|
365
|
-
PySDM-2.
|
|
366
|
-
PySDM-2.
|
|
367
|
-
PySDM-2.
|
|
368
|
-
PySDM-2.
|
|
367
|
+
PySDM-2.45.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
368
|
+
PySDM-2.45.dist-info/METADATA,sha256=8azh6MqIvPeMTMBcvLKqPIOH5pi-ETHBMnqzXfm-GDM,45361
|
|
369
|
+
PySDM-2.45.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
370
|
+
PySDM-2.45.dist-info/top_level.txt,sha256=6NYaDAhUnaYMD7ebD_dQ7HlhiJS7NMuKEXb0ck7Wcsg,6
|
|
371
|
+
PySDM-2.45.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|