cloudnetpy 1.66.8__py3-none-any.whl → 1.66.10__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/instruments/cloudnet_instrument.py +8 -3
- cloudnetpy/instruments/weather_station.py +28 -11
- cloudnetpy/version.py +1 -1
- {cloudnetpy-1.66.8.dist-info → cloudnetpy-1.66.10.dist-info}/METADATA +1 -1
- {cloudnetpy-1.66.8.dist-info → cloudnetpy-1.66.10.dist-info}/RECORD +9 -9
- {cloudnetpy-1.66.8.dist-info → cloudnetpy-1.66.10.dist-info}/LICENSE +0 -0
- {cloudnetpy-1.66.8.dist-info → cloudnetpy-1.66.10.dist-info}/WHEEL +0 -0
- {cloudnetpy-1.66.8.dist-info → cloudnetpy-1.66.10.dist-info}/entry_points.txt +0 -0
- {cloudnetpy-1.66.8.dist-info → cloudnetpy-1.66.10.dist-info}/top_level.txt +0 -0
@@ -78,11 +78,16 @@ class CloudnetInstrument:
|
|
78
78
|
self.screen_time_indices(ind)
|
79
79
|
|
80
80
|
def screen_time_indices(self, valid_indices: list | np.ndarray) -> None:
|
81
|
-
if len(valid_indices) == 0:
|
82
|
-
msg = "All timestamps screened"
|
83
|
-
raise ValidTimeStampError(msg)
|
84
81
|
time = self._get_time()
|
85
82
|
n_time = len(time)
|
83
|
+
if len(valid_indices) == 0 or (
|
84
|
+
isinstance(valid_indices, np.ndarray)
|
85
|
+
and valid_indices.dtype == np.bool_
|
86
|
+
and valid_indices.shape == time.shape
|
87
|
+
and not np.any(valid_indices)
|
88
|
+
):
|
89
|
+
msg = "All timestamps screened"
|
90
|
+
raise ValidTimeStampError(msg)
|
86
91
|
for cloudnet_array in self.data.values():
|
87
92
|
array = cloudnet_array.data
|
88
93
|
if not utils.isscalar(array) and array.shape[0] == n_time:
|
@@ -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,7 +9,7 @@ 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=y6mBVI00nak74QkrnJRk-arOU8OyMHhHQYJxEn3nh00,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
|
@@ -38,7 +38,7 @@ cloudnetpy/instruments/campbell_scientific.py,sha256=2WHfBKQjtRSl0AqvtPeX7G8Hdi3
|
|
38
38
|
cloudnetpy/instruments/ceilo.py,sha256=xrI7iYNftKvGZf-3C_ESUNsu-QhXV43iWkDuKp3biZU,9552
|
39
39
|
cloudnetpy/instruments/ceilometer.py,sha256=pdmLVljsuciyKpaGxWxJ_f1IrJK-UrkBC0lSeuirLlU,12095
|
40
40
|
cloudnetpy/instruments/cl61d.py,sha256=g6DNBFju3wYhLFl32DKmC8pUup7y-EupXoUU0fuoGGA,1990
|
41
|
-
cloudnetpy/instruments/cloudnet_instrument.py,sha256=
|
41
|
+
cloudnetpy/instruments/cloudnet_instrument.py,sha256=6qQSyQXHBTdOvzqTxOXtx6RYDm7vLVcwNYTx1nV_kM8,3885
|
42
42
|
cloudnetpy/instruments/copernicus.py,sha256=nmgqGOjVQFngj7BNbpcuCwA-W3yksvBbqn__iq7MyDk,6469
|
43
43
|
cloudnetpy/instruments/galileo.py,sha256=yQBedd7dmDnwuWi1MtXOsg4-RyRx0uRAXumCY4YuH9k,4686
|
44
44
|
cloudnetpy/instruments/hatpro.py,sha256=DzCWzTJxTc5BSOgoeyM8RjYkSXX6NDi3QXgKRp0uxlI,8759
|
@@ -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.10.dist-info/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
|
119
|
+
cloudnetpy-1.66.10.dist-info/METADATA,sha256=Vx3pgajb43-nUPGuinTNL5-7O1XPhC1rHttQTGm7Bv0,5785
|
120
|
+
cloudnetpy-1.66.10.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
121
|
+
cloudnetpy-1.66.10.dist-info/entry_points.txt,sha256=HhY7LwCFk4qFgDlXx_Fy983ZTd831WlhtdPIzV-Y3dY,51
|
122
|
+
cloudnetpy-1.66.10.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
|
123
|
+
cloudnetpy-1.66.10.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|