cloudnetpy 1.69.1__py3-none-any.whl → 1.69.3__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/lufft.py +13 -2
- cloudnetpy/instruments/vaisala.py +18 -17
- cloudnetpy/version.py +1 -1
- {cloudnetpy-1.69.1.dist-info → cloudnetpy-1.69.3.dist-info}/METADATA +1 -1
- {cloudnetpy-1.69.1.dist-info → cloudnetpy-1.69.3.dist-info}/RECORD +9 -9
- {cloudnetpy-1.69.1.dist-info → cloudnetpy-1.69.3.dist-info}/LICENSE +0 -0
- {cloudnetpy-1.69.1.dist-info → cloudnetpy-1.69.3.dist-info}/WHEEL +0 -0
- {cloudnetpy-1.69.1.dist-info → cloudnetpy-1.69.3.dist-info}/entry_points.txt +0 -0
- {cloudnetpy-1.69.1.dist-info → cloudnetpy-1.69.3.dist-info}/top_level.txt +0 -0
cloudnetpy/instruments/lufft.py
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
import logging
|
4
4
|
|
5
5
|
import netCDF4
|
6
|
+
import numpy as np
|
6
7
|
from numpy import ma
|
7
8
|
|
8
9
|
from cloudnetpy import utils
|
@@ -61,9 +62,19 @@ class LufftCeilo(NcLidar):
|
|
61
62
|
msg = "No dataset found"
|
62
63
|
raise RuntimeError(msg)
|
63
64
|
version = self.dataset.software_version
|
64
|
-
|
65
|
+
# In old files, the version is a single integer.
|
66
|
+
if isinstance(version, np.integer):
|
67
|
+
return str(version)
|
68
|
+
# In newer files, the version is a space-separated list: Operating
|
69
|
+
# system, FPGA, firmware, CloudDetectionMode (added in firmware 0.747).
|
70
|
+
if isinstance(version, str):
|
71
|
+
parts = version.split()
|
72
|
+
firmware = parts[2]
|
73
|
+
if firmware < "0.702":
|
74
|
+
return firmware
|
65
75
|
return None
|
66
|
-
|
76
|
+
msg = f"Cannot determine version: {version}"
|
77
|
+
raise RuntimeError(msg)
|
67
78
|
|
68
79
|
def _get_nn(self) -> float | ma.MaskedArray:
|
69
80
|
nn1 = self._getvar("nn1", "NN1")
|
@@ -224,6 +224,23 @@ class VaisalaCeilo(Ceilometer):
|
|
224
224
|
values = [[line[0], line[1], line[3:20], line[21:].strip()] for line in lines]
|
225
225
|
return values_to_dict(fields, values)
|
226
226
|
|
227
|
+
def _sort_time(self) -> None:
|
228
|
+
"""Sorts timestamps and removes duplicates."""
|
229
|
+
time = np.copy(self.data["time"][:])
|
230
|
+
ind_sorted = np.argsort(time)
|
231
|
+
ind_valid: list[int] = []
|
232
|
+
for ind in ind_sorted:
|
233
|
+
if time[ind] not in time[ind_valid]:
|
234
|
+
ind_valid.append(ind)
|
235
|
+
n_time = len(time)
|
236
|
+
for key, array in self.data.items():
|
237
|
+
if not hasattr(array, "shape"):
|
238
|
+
continue
|
239
|
+
if array.ndim == 1 and array.shape[0] == n_time:
|
240
|
+
self.data[key] = self.data[key][ind_valid]
|
241
|
+
if array.ndim == 2 and array.shape[0] == n_time:
|
242
|
+
self.data[key] = self.data[key][ind_valid, :]
|
243
|
+
|
227
244
|
|
228
245
|
class ClCeilo(VaisalaCeilo):
|
229
246
|
"""Base class for Vaisala CL31/CL51 ceilometers."""
|
@@ -253,23 +270,6 @@ class ClCeilo(VaisalaCeilo):
|
|
253
270
|
self._store_ceilometer_info()
|
254
271
|
self._sort_time()
|
255
272
|
|
256
|
-
def _sort_time(self) -> None:
|
257
|
-
"""Sorts timestamps and removes duplicates."""
|
258
|
-
time = np.copy(self.data["time"][:])
|
259
|
-
ind_sorted = np.argsort(time)
|
260
|
-
ind_valid: list[int] = []
|
261
|
-
for ind in ind_sorted:
|
262
|
-
if time[ind] not in time[ind_valid]:
|
263
|
-
ind_valid.append(ind)
|
264
|
-
n_time = len(time)
|
265
|
-
for key, array in self.data.items():
|
266
|
-
if not hasattr(array, "shape"):
|
267
|
-
continue
|
268
|
-
if array.ndim == 1 and array.shape[0] == n_time:
|
269
|
-
self.data[key] = self.data[key][ind_valid]
|
270
|
-
if array.ndim == 2 and array.shape[0] == n_time:
|
271
|
-
self.data[key] = self.data[key][ind_valid, :]
|
272
|
-
|
273
273
|
def _store_ceilometer_info(self) -> None:
|
274
274
|
n_gates = self.data["beta_raw"].shape[1]
|
275
275
|
if n_gates < 1540:
|
@@ -335,6 +335,7 @@ class Ct25k(VaisalaCeilo):
|
|
335
335
|
self.data["calibration_factor"] = calibration_factor or 1.0
|
336
336
|
self.data["beta_raw"] *= self.data["calibration_factor"]
|
337
337
|
self.data["zenith_angle"] = np.median(self.metadata["zenith_angle"])
|
338
|
+
self._sort_time()
|
338
339
|
|
339
340
|
@staticmethod
|
340
341
|
def _parse_hex_profiles(lines: list) -> list:
|
cloudnetpy/version.py
CHANGED
@@ -9,7 +9,7 @@ cloudnetpy/metadata.py,sha256=gEHwqEMY9gfaqVxx2_CobLg3i5gFXAumXLwnnW4BqtU,5840
|
|
9
9
|
cloudnetpy/output.py,sha256=lq4YSeMT_d-j4rlQkKm9KIZ8boupTBBBKV1eUawpmCI,15672
|
10
10
|
cloudnetpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
cloudnetpy/utils.py,sha256=U0iMIKPiKLrLVAfs_u9pPuoWYW1RJHcM8dbLF9a4yIA,29796
|
12
|
-
cloudnetpy/version.py,sha256=
|
12
|
+
cloudnetpy/version.py,sha256=s3qS3MvUe9BkH1YWIU_aE7D5my0nvAXQg8WL0GhkNrM,72
|
13
13
|
cloudnetpy/categorize/__init__.py,sha256=s-SJaysvVpVVo5kidiruWQO6p3gv2TXwY1wEHYO5D6I,44
|
14
14
|
cloudnetpy/categorize/atmos_utils.py,sha256=RcmbKxm2COkE7WEya0mK3yX5rzUbrewRVh3ekm01RtM,10598
|
15
15
|
cloudnetpy/categorize/attenuation.py,sha256=Y_-fzmQTltWTqIZTulJhovC7a6ifpMcaAazDJcnMIOc,990
|
@@ -43,7 +43,7 @@ cloudnetpy/instruments/copernicus.py,sha256=99idcn6-iKOSvSslNjwFRng3gwlTLFjKPiT1
|
|
43
43
|
cloudnetpy/instruments/galileo.py,sha256=BjWE15_S3tTCOmAM5k--oicI3wghKaO0hv9EUBxtbl8,4830
|
44
44
|
cloudnetpy/instruments/hatpro.py,sha256=DzCWzTJxTc5BSOgoeyM8RjYkSXX6NDi3QXgKRp0uxlI,8759
|
45
45
|
cloudnetpy/instruments/instruments.py,sha256=97hHMjp8fp2IKihr0XJYY3BrOlBArU7gYwYmt3OxqvU,4124
|
46
|
-
cloudnetpy/instruments/lufft.py,sha256=
|
46
|
+
cloudnetpy/instruments/lufft.py,sha256=nIoEKuuFGKq2dLqkX7zW-HpAifefG472tZhKfXE1yoA,4212
|
47
47
|
cloudnetpy/instruments/mira.py,sha256=RQGJHP00Co_23UocsBw70afX-VqtM9pXQcsGgzj_n2s,11206
|
48
48
|
cloudnetpy/instruments/mrr.py,sha256=eeAzCp3CiHGauywjwvMUAFwZ4vBOZMcd3IlF8KsrLQo,5711
|
49
49
|
cloudnetpy/instruments/nc_lidar.py,sha256=5gQG9PApnNPrHmS9_zanl8HEYIQuGRpbnzC3wfTcOyQ,1705
|
@@ -54,7 +54,7 @@ cloudnetpy/instruments/rain_e_h3.py,sha256=IY-ytMjQUV94qMQgIXMJsPXe6oF3yk-d9LIbN
|
|
54
54
|
cloudnetpy/instruments/rpg.py,sha256=vfs_eGahPOxFjOIBczNywRwtdutOsJpSNeXZm99SIOo,17438
|
55
55
|
cloudnetpy/instruments/rpg_reader.py,sha256=ThztFuVrWxhmWVAfZTfQDeUiKK1XMTbtv08IBe8GK98,11364
|
56
56
|
cloudnetpy/instruments/toa5.py,sha256=CfmmBMv5iMGaWHIGBK01Rw24cuXC1R1RMNTXkmsm340,1760
|
57
|
-
cloudnetpy/instruments/vaisala.py,sha256=
|
57
|
+
cloudnetpy/instruments/vaisala.py,sha256=MA6hAlanFrxJlF4suDxLt5FyjcSSzJg-SWRnkLQpu3E,14688
|
58
58
|
cloudnetpy/instruments/weather_station.py,sha256=jSu9sY2LYV1ssWcuLr6kiF8EEqGW29mywE9UUZccac0,18720
|
59
59
|
cloudnetpy/instruments/disdrometer/__init__.py,sha256=lyjwttWvFvuwYxEkusoAvgRcbBmglmOp5HJOpXUqLWo,93
|
60
60
|
cloudnetpy/instruments/disdrometer/common.py,sha256=g52iK2aNp3Z88kovUmGVpC54NZomPa9D871gzO0AmQ4,9267
|
@@ -116,9 +116,9 @@ cloudnetpy/products/mie_lu_tables.nc,sha256=It4fYpqJXlqOgL8jeZ-PxGzP08PMrELIDVe5
|
|
116
116
|
cloudnetpy/products/mwr_tools.py,sha256=rd7UC67O4fsIE5SaHVZ4qWvUJTj41ZGwgQWPwZzOM14,5377
|
117
117
|
cloudnetpy/products/product_tools.py,sha256=uu4l6reuGbPcW3TgttbaSrqIKbyYGhBVTdnC7opKvmg,11101
|
118
118
|
docs/source/conf.py,sha256=IKiFWw6xhUd8NrCg0q7l596Ck1d61XWeVjIFHVSG9Og,1490
|
119
|
-
cloudnetpy-1.69.
|
120
|
-
cloudnetpy-1.69.
|
121
|
-
cloudnetpy-1.69.
|
122
|
-
cloudnetpy-1.69.
|
123
|
-
cloudnetpy-1.69.
|
124
|
-
cloudnetpy-1.69.
|
119
|
+
cloudnetpy-1.69.3.dist-info/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
|
120
|
+
cloudnetpy-1.69.3.dist-info/METADATA,sha256=B6Kfj96CtRWS992YcKBtEfb2jJjo9LjqE4SF7mCpW0c,5793
|
121
|
+
cloudnetpy-1.69.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
122
|
+
cloudnetpy-1.69.3.dist-info/entry_points.txt,sha256=HhY7LwCFk4qFgDlXx_Fy983ZTd831WlhtdPIzV-Y3dY,51
|
123
|
+
cloudnetpy-1.69.3.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
|
124
|
+
cloudnetpy-1.69.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|