cloudnetpy 1.69.0__py3-none-any.whl → 1.69.2__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/copernicus.py +1 -1
- cloudnetpy/instruments/galileo.py +1 -1
- cloudnetpy/instruments/mira.py +13 -1
- cloudnetpy/instruments/nc_radar.py +9 -0
- cloudnetpy/instruments/vaisala.py +18 -17
- cloudnetpy/version.py +1 -1
- {cloudnetpy-1.69.0.dist-info → cloudnetpy-1.69.2.dist-info}/METADATA +1 -1
- {cloudnetpy-1.69.0.dist-info → cloudnetpy-1.69.2.dist-info}/RECORD +12 -12
- {cloudnetpy-1.69.0.dist-info → cloudnetpy-1.69.2.dist-info}/LICENSE +0 -0
- {cloudnetpy-1.69.0.dist-info → cloudnetpy-1.69.2.dist-info}/WHEEL +0 -0
- {cloudnetpy-1.69.0.dist-info → cloudnetpy-1.69.2.dist-info}/entry_points.txt +0 -0
- {cloudnetpy-1.69.0.dist-info → cloudnetpy-1.69.2.dist-info}/top_level.txt +0 -0
@@ -97,7 +97,7 @@ def copernicus2nc(
|
|
97
97
|
copernicus.add_nyquist_velocity(keymap)
|
98
98
|
copernicus.add_site_geolocation()
|
99
99
|
valid_indices = copernicus.add_zenith_and_azimuth_angles(
|
100
|
-
elevation_threshold=1,
|
100
|
+
elevation_threshold=1.1,
|
101
101
|
elevation_diff_threshold=0.1,
|
102
102
|
azimuth_diff_threshold=0.1,
|
103
103
|
)
|
@@ -93,7 +93,7 @@ def galileo2nc(
|
|
93
93
|
galileo.add_nyquist_velocity(keymap)
|
94
94
|
galileo.add_site_geolocation()
|
95
95
|
valid_indices = galileo.add_zenith_and_azimuth_angles(
|
96
|
-
elevation_threshold=1,
|
96
|
+
elevation_threshold=1.1,
|
97
97
|
elevation_diff_threshold=0.1,
|
98
98
|
azimuth_diff_threshold=0.1,
|
99
99
|
)
|
cloudnetpy/instruments/mira.py
CHANGED
@@ -87,9 +87,11 @@ def mira2nc(
|
|
87
87
|
mira.add_site_geolocation()
|
88
88
|
mira.add_radar_specific_variables()
|
89
89
|
valid_indices = mira.add_zenith_and_azimuth_angles(
|
90
|
-
elevation_threshold=1,
|
90
|
+
elevation_threshold=1.1,
|
91
91
|
elevation_diff_threshold=1e-6,
|
92
92
|
azimuth_diff_threshold=1e-3,
|
93
|
+
zenith_offset=site_meta.get("zenith_offset"),
|
94
|
+
azimuth_offset=site_meta.get("azimuth_offset"),
|
93
95
|
)
|
94
96
|
mira.screen_time_indices(valid_indices)
|
95
97
|
mira.add_height()
|
@@ -298,4 +300,14 @@ ATTRIBUTES = {
|
|
298
300
|
long_name="Pulse Repetition Frequency",
|
299
301
|
units="Hz",
|
300
302
|
),
|
303
|
+
"zenith_offset": MetaData(
|
304
|
+
long_name="Zenith offset of the instrument",
|
305
|
+
units="degrees",
|
306
|
+
comment="Zenith offset applied.",
|
307
|
+
),
|
308
|
+
"azimuth_offset": MetaData(
|
309
|
+
long_name="Azimuth offset of the instrument (positive clockwise from north)",
|
310
|
+
units="degrees",
|
311
|
+
comment="Azimuth offset applied.",
|
312
|
+
),
|
301
313
|
}
|
@@ -95,12 +95,21 @@ class NcRadar(DataSource, CloudnetInstrument):
|
|
95
95
|
elevation_threshold: float,
|
96
96
|
elevation_diff_threshold: float,
|
97
97
|
azimuth_diff_threshold: float,
|
98
|
+
zenith_offset: float | None = None,
|
99
|
+
azimuth_offset: float | None = None,
|
98
100
|
) -> list:
|
99
101
|
"""Adds non-varying instrument zenith and azimuth angles and returns valid
|
100
102
|
time indices.
|
101
103
|
"""
|
102
104
|
elevation = self.data["elevation"].data
|
105
|
+
if zenith_offset is not None:
|
106
|
+
self.append_data(zenith_offset, "zenith_offset")
|
107
|
+
elevation -= zenith_offset
|
108
|
+
|
103
109
|
azimuth = self.data["azimuth_angle"].data
|
110
|
+
if azimuth_offset is not None:
|
111
|
+
self.append_data(azimuth_offset, "azimuth_offset")
|
112
|
+
azimuth += azimuth_offset
|
104
113
|
|
105
114
|
elevation_diff = ma.diff(elevation, prepend=elevation[1])
|
106
115
|
azimuth_diff = ma.diff(azimuth, prepend=azimuth[1])
|
@@ -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=kxk8PWJBfD_V00eDZ4TB8QpJ5of0aDtwt7yHrIjjZeU,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
|
@@ -39,22 +39,22 @@ cloudnetpy/instruments/ceilo.py,sha256=xrI7iYNftKvGZf-3C_ESUNsu-QhXV43iWkDuKp3bi
|
|
39
39
|
cloudnetpy/instruments/ceilometer.py,sha256=pdmLVljsuciyKpaGxWxJ_f1IrJK-UrkBC0lSeuirLlU,12095
|
40
40
|
cloudnetpy/instruments/cl61d.py,sha256=g6DNBFju3wYhLFl32DKmC8pUup7y-EupXoUU0fuoGGA,1990
|
41
41
|
cloudnetpy/instruments/cloudnet_instrument.py,sha256=086GJ6Nfp7sK9ZK8UygJOn-aiVPreez674_gbrOZj4I,5183
|
42
|
-
cloudnetpy/instruments/copernicus.py,sha256=
|
43
|
-
cloudnetpy/instruments/galileo.py,sha256=
|
42
|
+
cloudnetpy/instruments/copernicus.py,sha256=99idcn6-iKOSvSslNjwFRng3gwlTLFjKPiT1tnVytpQ,6613
|
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
46
|
cloudnetpy/instruments/lufft.py,sha256=ugXF6pssHAAz1Y_hqPdpKuluAjxxHSR88xBmQuS6RlI,3705
|
47
|
-
cloudnetpy/instruments/mira.py,sha256=
|
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
|
50
|
-
cloudnetpy/instruments/nc_radar.py,sha256=
|
50
|
+
cloudnetpy/instruments/nc_radar.py,sha256=vCk616cHDZPctcn42d2I21YUnlYEqBkK1y2tY1A9dkA,7279
|
51
51
|
cloudnetpy/instruments/pollyxt.py,sha256=ra7sYQ_cmkC0T9TBYrMN6iiQEZimmWGdW9Ilv61JB-Q,10027
|
52
52
|
cloudnetpy/instruments/radiometrics.py,sha256=ySG4a042XkgjMTG8d20oAPNvFvw9bMwwiqS3zv-JF_w,11825
|
53
53
|
cloudnetpy/instruments/rain_e_h3.py,sha256=IY-ytMjQUV94qMQgIXMJsPXe6oF3yk-d9LIbN19ogv0,5376
|
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.2.dist-info/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
|
120
|
+
cloudnetpy-1.69.2.dist-info/METADATA,sha256=CPzESCxmNHXYoaTXc39qwMDmK8n_edhp7Q7zDeTN1KQ,5793
|
121
|
+
cloudnetpy-1.69.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
122
|
+
cloudnetpy-1.69.2.dist-info/entry_points.txt,sha256=HhY7LwCFk4qFgDlXx_Fy983ZTd831WlhtdPIzV-Y3dY,51
|
123
|
+
cloudnetpy-1.69.2.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
|
124
|
+
cloudnetpy-1.69.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|