cloudnetpy 1.66.9__py3-none-any.whl → 1.66.11__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 +3 -2
- cloudnetpy/instruments/weather_station.py +28 -11
- cloudnetpy/version.py +1 -1
- {cloudnetpy-1.66.9.dist-info → cloudnetpy-1.66.11.dist-info}/METADATA +1 -1
- {cloudnetpy-1.66.9.dist-info → cloudnetpy-1.66.11.dist-info}/RECORD +9 -9
- {cloudnetpy-1.66.9.dist-info → cloudnetpy-1.66.11.dist-info}/WHEEL +1 -1
- {cloudnetpy-1.66.9.dist-info → cloudnetpy-1.66.11.dist-info}/LICENSE +0 -0
- {cloudnetpy-1.66.9.dist-info → cloudnetpy-1.66.11.dist-info}/entry_points.txt +0 -0
- {cloudnetpy-1.66.9.dist-info → cloudnetpy-1.66.11.dist-info}/top_level.txt +0 -0
@@ -4,7 +4,7 @@ import numpy as np
|
|
4
4
|
from numpy import ma
|
5
5
|
|
6
6
|
from cloudnetpy import utils
|
7
|
-
from cloudnetpy.constants import MM_H_TO_M_S
|
7
|
+
from cloudnetpy.constants import MM_H_TO_M_S, T0
|
8
8
|
from cloudnetpy.products.product_tools import CategoryBits
|
9
9
|
|
10
10
|
from .disdrometer import Disdrometer
|
@@ -89,7 +89,8 @@ class ClassData:
|
|
89
89
|
rain_from_disdrometer = self._find_rain_from_disdrometer()
|
90
90
|
ind = ~rain_from_disdrometer.mask
|
91
91
|
is_rain[ind] = rain_from_disdrometer[ind]
|
92
|
-
|
92
|
+
is_positive_temp = self.tw[:, 0] > T0 + 5 # Filter snowfall
|
93
|
+
return is_rain & is_positive_temp
|
93
94
|
|
94
95
|
def _find_rain_from_radar_echo(self) -> np.ndarray:
|
95
96
|
first_gate_with_data = np.argmin(self.z.mask.all(axis=0))
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import csv
|
2
2
|
import datetime
|
3
3
|
import math
|
4
|
+
from collections.abc import Iterable
|
4
5
|
|
5
6
|
import numpy as np
|
6
7
|
from numpy import ma
|
@@ -109,14 +110,12 @@ class WS(CloudnetInstrument):
|
|
109
110
|
self.data["rainfall_amount"] = CloudnetArray(rainfall_amount, "rainfall_amount")
|
110
111
|
|
111
112
|
def screen_timestamps(self, date: str) -> None:
|
112
|
-
dates = [str(d.date()) for d in self._data["time"]]
|
113
|
-
|
114
|
-
if not
|
113
|
+
dates = np.array([str(d.date()) for d in self._data["time"]])
|
114
|
+
valid_mask = dates == date
|
115
|
+
if not valid_mask.any():
|
115
116
|
raise ValidTimeStampError
|
116
117
|
for key in self._data:
|
117
|
-
self._data[key] = [
|
118
|
-
x for ind, x in enumerate(self._data[key]) if ind in valid_ind
|
119
|
-
]
|
118
|
+
self._data[key] = self._data[key][valid_mask]
|
120
119
|
|
121
120
|
@staticmethod
|
122
121
|
def format_data(data: dict) -> dict:
|
@@ -436,15 +435,33 @@ class GalatiWS(WS):
|
|
436
435
|
except ValueError:
|
437
436
|
parsed_value = math.nan
|
438
437
|
raw_data[key].append(parsed_value)
|
438
|
+
|
439
|
+
def read_value(keys: Iterable[str]):
|
440
|
+
for key in keys:
|
441
|
+
if key in raw_data:
|
442
|
+
return raw_data[key]
|
443
|
+
raise KeyError("Didn't find any keys: " + ", ".join(keys))
|
444
|
+
|
439
445
|
data = {
|
440
|
-
"time":
|
441
|
-
"air_temperature":
|
442
|
-
"relative_humidity":
|
443
|
-
"air_pressure":
|
444
|
-
|
446
|
+
"time": read_value(["TimeStamp"]),
|
447
|
+
"air_temperature": read_value(["Temperature", "Temperatura"]),
|
448
|
+
"relative_humidity": read_value(["RH", "Umiditate_relativa"]),
|
449
|
+
"air_pressure": read_value(
|
450
|
+
["Atmospheric_pressure", "Presiune_atmosferica"]
|
451
|
+
),
|
452
|
+
"rainfall_rate": read_value(["Precipitations", "Precipitatii"]),
|
453
|
+
"wind_speed": read_value(["Wind_speed", "Viteza_vant"]),
|
454
|
+
"wind_direction": read_value(["Wind_direction", "Directie_vant"]),
|
445
455
|
}
|
446
456
|
return self.format_data(data)
|
447
457
|
|
458
|
+
def add_data(self) -> None:
|
459
|
+
# Skip wind measurements where range was limited to 0-180 degrees
|
460
|
+
if datetime.date(*map(int, self.date)) < datetime.date(2024, 10, 29):
|
461
|
+
del self._data["wind_speed"]
|
462
|
+
del self._data["wind_direction"]
|
463
|
+
return super().add_data()
|
464
|
+
|
448
465
|
def convert_pressure(self) -> None:
|
449
466
|
mmHg2Pa = 133.322
|
450
467
|
self.data["air_pressure"].data = self.data["air_pressure"][:] * mmHg2Pa
|
cloudnetpy/version.py
CHANGED
@@ -9,13 +9,13 @@ cloudnetpy/metadata.py,sha256=v_VDo2vbdTxB0zIsfP69IcrwSKiRlLpsGdq6JPI4CoA,5306
|
|
9
9
|
cloudnetpy/output.py,sha256=YrWRBEZg0QNZRVnd9ziAziH-eJSh7O5JuWiH4ZxM0_s,15584
|
10
10
|
cloudnetpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
cloudnetpy/utils.py,sha256=JksYOwf9ORiR_QpoKrTe1JJwXpPYJj-wlwaZKCHoh3o,29744
|
12
|
-
cloudnetpy/version.py,sha256=
|
12
|
+
cloudnetpy/version.py,sha256=KuWR2VQg1sIo8y3SB0GYbGXZ3CoWJEYQBF8aeQNB6cY,73
|
13
13
|
cloudnetpy/categorize/__init__.py,sha256=s-SJaysvVpVVo5kidiruWQO6p3gv2TXwY1wEHYO5D6I,44
|
14
14
|
cloudnetpy/categorize/atmos_utils.py,sha256=9-ymI6i1xASf-XAFyO87FaTfvq6bF89N1i_27OkUp-M,10104
|
15
15
|
cloudnetpy/categorize/attenuation.py,sha256=Y_-fzmQTltWTqIZTulJhovC7a6ifpMcaAazDJcnMIOc,990
|
16
16
|
cloudnetpy/categorize/categorize.py,sha256=UQdgLHTNc-J4-CRK3P1mrGNUMal2cKE6nwE5JYlFMcc,20644
|
17
17
|
cloudnetpy/categorize/classify.py,sha256=qovHgHsMku5kpl3cJxKteNBsG8GAkfI3Zo8QhJwZSFQ,8512
|
18
|
-
cloudnetpy/categorize/containers.py,sha256=
|
18
|
+
cloudnetpy/categorize/containers.py,sha256=evqVQOoUycBtaFeKpms7_NuM9z8jKWq37nLIhoDxa8k,5278
|
19
19
|
cloudnetpy/categorize/disdrometer.py,sha256=keU3pFvKtk840A0oLwAyNDuqOCswBPJEKf2bV0YWyA8,2004
|
20
20
|
cloudnetpy/categorize/droplet.py,sha256=t49KEsH5ZM68JQ4NvAf9kGgQ-evic1T4de2-jgJ2f4M,8683
|
21
21
|
cloudnetpy/categorize/falling.py,sha256=lok0HMi1ewf9pS70mq62nRKL6wJzMyWbYmv1cdwrwnA,4404
|
@@ -54,7 +54,7 @@ cloudnetpy/instruments/rpg.py,sha256=IozvBJ8_qXTPqtp58FQwRsoI5_aI3-kycpXugZkS0d4
|
|
54
54
|
cloudnetpy/instruments/rpg_reader.py,sha256=ThztFuVrWxhmWVAfZTfQDeUiKK1XMTbtv08IBe8GK98,11364
|
55
55
|
cloudnetpy/instruments/toa5.py,sha256=CfmmBMv5iMGaWHIGBK01Rw24cuXC1R1RMNTXkmsm340,1760
|
56
56
|
cloudnetpy/instruments/vaisala.py,sha256=GGuA_v4S7kR9yApSr1-d0ETzNj4ehEZ7-pD1-AdPYRE,14662
|
57
|
-
cloudnetpy/instruments/weather_station.py,sha256=
|
57
|
+
cloudnetpy/instruments/weather_station.py,sha256=p0JoKuh0Rce9WcQNtvwaxehieBoGWnE1cKotx_ClXPs,18259
|
58
58
|
cloudnetpy/instruments/disdrometer/__init__.py,sha256=lyjwttWvFvuwYxEkusoAvgRcbBmglmOp5HJOpXUqLWo,93
|
59
59
|
cloudnetpy/instruments/disdrometer/common.py,sha256=g52iK2aNp3Z88kovUmGVpC54NZomPa9D871gzO0AmQ4,9267
|
60
60
|
cloudnetpy/instruments/disdrometer/parsivel.py,sha256=HJZrEysQkx9MiIVPDV25CYHpXi_SjgZlgO-otoaKK34,25640
|
@@ -115,9 +115,9 @@ cloudnetpy/products/mie_lu_tables.nc,sha256=It4fYpqJXlqOgL8jeZ-PxGzP08PMrELIDVe5
|
|
115
115
|
cloudnetpy/products/mwr_tools.py,sha256=rd7UC67O4fsIE5SaHVZ4qWvUJTj41ZGwgQWPwZzOM14,5377
|
116
116
|
cloudnetpy/products/product_tools.py,sha256=01Zc6xV8CSuYcIcLpchFf5POL3_c629-YMNDZJ51udA,10853
|
117
117
|
docs/source/conf.py,sha256=IKiFWw6xhUd8NrCg0q7l596Ck1d61XWeVjIFHVSG9Og,1490
|
118
|
-
cloudnetpy-1.66.
|
119
|
-
cloudnetpy-1.66.
|
120
|
-
cloudnetpy-1.66.
|
121
|
-
cloudnetpy-1.66.
|
122
|
-
cloudnetpy-1.66.
|
123
|
-
cloudnetpy-1.66.
|
118
|
+
cloudnetpy-1.66.11.dist-info/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
|
119
|
+
cloudnetpy-1.66.11.dist-info/METADATA,sha256=14B95U6O3KWVBIbYuZC15wLgnLukKu_0gzZ749S9ddQ,5785
|
120
|
+
cloudnetpy-1.66.11.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
121
|
+
cloudnetpy-1.66.11.dist-info/entry_points.txt,sha256=HhY7LwCFk4qFgDlXx_Fy983ZTd831WlhtdPIzV-Y3dY,51
|
122
|
+
cloudnetpy-1.66.11.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
|
123
|
+
cloudnetpy-1.66.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|