cloudnetpy 1.62.0__py3-none-any.whl → 1.63.0__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.
- cloudnetpy/categorize/containers.py +18 -3
- cloudnetpy/categorize/insects.py +1 -14
- cloudnetpy/instruments/weather_station.py +5 -2
- cloudnetpy/version.py +1 -1
- {cloudnetpy-1.62.0.dist-info → cloudnetpy-1.63.0.dist-info}/METADATA +1 -1
- {cloudnetpy-1.62.0.dist-info → cloudnetpy-1.63.0.dist-info}/RECORD +9 -9
- {cloudnetpy-1.62.0.dist-info → cloudnetpy-1.63.0.dist-info}/LICENSE +0 -0
- {cloudnetpy-1.62.0.dist-info → cloudnetpy-1.63.0.dist-info}/WHEEL +0 -0
- {cloudnetpy-1.62.0.dist-info → cloudnetpy-1.63.0.dist-info}/top_level.txt +0 -0
@@ -74,13 +74,28 @@ class ClassData:
|
|
74
74
|
|
75
75
|
def _find_rain_from_radar_echo(self) -> np.ndarray:
|
76
76
|
gate_number = 3
|
77
|
-
threshold = 0
|
77
|
+
threshold = {"z": 3, "v": 0, "ldr": -15}
|
78
78
|
z = self.z[:, gate_number]
|
79
|
-
|
79
|
+
v = self.v[:, gate_number]
|
80
|
+
if hasattr(self, "ldr"):
|
81
|
+
ldr = self.ldr[:, gate_number]
|
82
|
+
elif hasattr(self, "sldr"):
|
83
|
+
ldr = self.sldr[:, gate_number]
|
84
|
+
else:
|
85
|
+
ldr = np.full(self.time.shape, threshold["ldr"] - 1)
|
86
|
+
|
87
|
+
return np.where(
|
88
|
+
(~ma.getmaskarray(z))
|
89
|
+
& (z > threshold["z"])
|
90
|
+
& (v < threshold["v"])
|
91
|
+
& (ldr < threshold["ldr"]),
|
92
|
+
1,
|
93
|
+
0,
|
94
|
+
)
|
80
95
|
|
81
96
|
def _find_rain_from_disdrometer(self) -> ma.MaskedArray:
|
82
97
|
threshold_mm_h = 0.25 # Standard threshold for drizzle -> rain
|
83
|
-
threshold_particles =
|
98
|
+
threshold_particles = 30 # This is arbitrary and should be better tested
|
84
99
|
threshold_rate = threshold_mm_h * MM_H_TO_M_S
|
85
100
|
try:
|
86
101
|
rainfall_rate = self.data["disdrometer"].data["rainfall_rate"].data
|
cloudnetpy/categorize/insects.py
CHANGED
@@ -148,8 +148,7 @@ def _screen_insects(
|
|
148
148
|
prob[(above_liquid == 1) & (insect_prob_no_ldr > 0)] = 0
|
149
149
|
|
150
150
|
def _screen_rainy_profiles() -> None:
|
151
|
-
|
152
|
-
prob[rain_smoothed == 1, :] = 0
|
151
|
+
prob[obs.is_rain == 1, :] = 0
|
153
152
|
|
154
153
|
prob = np.copy(insect_prob)
|
155
154
|
_screen_liquid_layers()
|
@@ -157,15 +156,3 @@ def _screen_insects(
|
|
157
156
|
_screen_above_liquid()
|
158
157
|
_screen_rainy_profiles()
|
159
158
|
return prob
|
160
|
-
|
161
|
-
|
162
|
-
def _smooth_rain(time: np.ndarray, is_rain: np.ndarray) -> np.ndarray:
|
163
|
-
is_rain_smoothed = np.copy(is_rain)
|
164
|
-
time_buffer = 5 # minutes
|
165
|
-
n_profiles = len(is_rain)
|
166
|
-
n_steps = utils.n_elements(time, time_buffer, "time")
|
167
|
-
for rain_idx in np.where(is_rain)[0]:
|
168
|
-
idx_start = max(0, rain_idx - n_steps)
|
169
|
-
idx_end = min(rain_idx + n_steps, n_profiles)
|
170
|
-
is_rain_smoothed[idx_start : idx_end + 1] = True
|
171
|
-
return is_rain_smoothed
|
@@ -288,9 +288,12 @@ class GranadaWS(WS):
|
|
288
288
|
continue
|
289
289
|
parsed = value
|
290
290
|
if keymap[key] != "time":
|
291
|
-
|
291
|
+
try:
|
292
|
+
parsed = float(value)
|
293
|
+
except ValueError:
|
294
|
+
parsed = math.nan
|
292
295
|
data[keymap[key]].append(parsed)
|
293
|
-
return data
|
296
|
+
return self.format_data(data)
|
294
297
|
|
295
298
|
|
296
299
|
class KenttarovaWS(WS):
|
cloudnetpy/version.py
CHANGED
@@ -8,18 +8,18 @@ cloudnetpy/metadata.py,sha256=v_VDo2vbdTxB0zIsfP69IcrwSKiRlLpsGdq6JPI4CoA,5306
|
|
8
8
|
cloudnetpy/output.py,sha256=YkCaxVkG_Mt2hng_IVnhygHteV4UMKzKALkeFZwFJL8,14822
|
9
9
|
cloudnetpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
cloudnetpy/utils.py,sha256=JV0Fawnme1HoZgoiidV3eIzsn6vx0AEjBNmI1CcrBsA,28517
|
11
|
-
cloudnetpy/version.py,sha256=
|
11
|
+
cloudnetpy/version.py,sha256=GhxxijGZ9PY_rQPI6Ua2oP0ZPSns0Itu-guZ-RIqT2Q,72
|
12
12
|
cloudnetpy/categorize/__init__.py,sha256=gP5q3Vis1y9u9OWgA_idlbjfWXYN_S0IBSWdwBhL_uU,69
|
13
13
|
cloudnetpy/categorize/atmos.py,sha256=G4DmEJCt1FAPYyt7oXzBH47JTeb5lUOGDakkviOXblE,12390
|
14
14
|
cloudnetpy/categorize/atmos_utils.py,sha256=64uenj2uxj3P3Blaq_pBN1pBjcF-X4LYNt-uTOjvevg,3778
|
15
15
|
cloudnetpy/categorize/categorize.py,sha256=aoIxbBEwUFO-Xx_oofKM68aL0KEJuGi3OaWMKCCuUK8,17827
|
16
16
|
cloudnetpy/categorize/classify.py,sha256=a-0bVCtynGfORnDGTsPuzqkuDeOOR_OMz5ai9NsMuic,9870
|
17
|
-
cloudnetpy/categorize/containers.py,sha256=
|
17
|
+
cloudnetpy/categorize/containers.py,sha256=L4UaihDfeMCADZiKdII5NCP49ZNlodCoM9X3yxEfJ_A,4748
|
18
18
|
cloudnetpy/categorize/disdrometer.py,sha256=keU3pFvKtk840A0oLwAyNDuqOCswBPJEKf2bV0YWyA8,2004
|
19
19
|
cloudnetpy/categorize/droplet.py,sha256=894VHdL9ScaB8f1oxXwM2la4ShXd-uWywQDINoaoiD8,8687
|
20
20
|
cloudnetpy/categorize/falling.py,sha256=aI09_6H24x34lYr3vnKIgjWB0wzTkxOA6wE-gkdf6bs,4386
|
21
21
|
cloudnetpy/categorize/freezing.py,sha256=c4k5AIgfBpvw64EaVVVYPi2Fx4SpHk1cyfceE1ydD28,3755
|
22
|
-
cloudnetpy/categorize/insects.py,sha256=
|
22
|
+
cloudnetpy/categorize/insects.py,sha256=9J5agmktit8Or66GGNue-bThiaG9rB2SuPNZBXI7FCE,5243
|
23
23
|
cloudnetpy/categorize/lidar.py,sha256=YQrM_LOz8NQrrD9l9HyujV1GSGwkQ8LMqXN13bEJRW4,2605
|
24
24
|
cloudnetpy/categorize/melting.py,sha256=mYdOKxfTC2InB8NdOPwr_7NpbouQMm-9f2Q1kfTqIJE,6262
|
25
25
|
cloudnetpy/categorize/model.py,sha256=hSmE-3hCzbpA26AcMtSeDUVlLHvtmODy_37b2kJO2eA,5536
|
@@ -47,7 +47,7 @@ cloudnetpy/instruments/rpg.py,sha256=siPmiyOGdB_OtlnIiP0PAt_cySnped0clLLGnyzw02o
|
|
47
47
|
cloudnetpy/instruments/rpg_reader.py,sha256=2eYu-tBd0QyreUKqJT726aIMbA29aIxXK-UJCkOXMLM,11356
|
48
48
|
cloudnetpy/instruments/toa5.py,sha256=CfmmBMv5iMGaWHIGBK01Rw24cuXC1R1RMNTXkmsm340,1760
|
49
49
|
cloudnetpy/instruments/vaisala.py,sha256=GGuA_v4S7kR9yApSr1-d0ETzNj4ehEZ7-pD1-AdPYRE,14662
|
50
|
-
cloudnetpy/instruments/weather_station.py,sha256=
|
50
|
+
cloudnetpy/instruments/weather_station.py,sha256=F5G_hbmkS4WgORS5oRVLxvKHuYBuef4MC_cZDu4lu_Y,17499
|
51
51
|
cloudnetpy/instruments/disdrometer/__init__.py,sha256=lyjwttWvFvuwYxEkusoAvgRcbBmglmOp5HJOpXUqLWo,93
|
52
52
|
cloudnetpy/instruments/disdrometer/common.py,sha256=g52iK2aNp3Z88kovUmGVpC54NZomPa9D871gzO0AmQ4,9267
|
53
53
|
cloudnetpy/instruments/disdrometer/parsivel.py,sha256=HJZrEysQkx9MiIVPDV25CYHpXi_SjgZlgO-otoaKK34,25640
|
@@ -108,8 +108,8 @@ cloudnetpy/products/mie_lu_tables.nc,sha256=It4fYpqJXlqOgL8jeZ-PxGzP08PMrELIDVe5
|
|
108
108
|
cloudnetpy/products/mwr_tools.py,sha256=3esU5cG5GI2WVmOENqrJ0FbMuxLegADv7q8TB0RorGg,4674
|
109
109
|
cloudnetpy/products/product_tools.py,sha256=VNw2diJj30POz68-3qNVkJP7r9AUspT_d1Fp0BbeIx8,10414
|
110
110
|
docs/source/conf.py,sha256=IKiFWw6xhUd8NrCg0q7l596Ck1d61XWeVjIFHVSG9Og,1490
|
111
|
-
cloudnetpy-1.
|
112
|
-
cloudnetpy-1.
|
113
|
-
cloudnetpy-1.
|
114
|
-
cloudnetpy-1.
|
115
|
-
cloudnetpy-1.
|
111
|
+
cloudnetpy-1.63.0.dist-info/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
|
112
|
+
cloudnetpy-1.63.0.dist-info/METADATA,sha256=fGcMgVg7krXMQBLH8jQdmj4uzyaHdW-aLvwpLny-R50,5784
|
113
|
+
cloudnetpy-1.63.0.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
114
|
+
cloudnetpy-1.63.0.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
|
115
|
+
cloudnetpy-1.63.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|