cloudnetpy-qc 1.26.0__py3-none-any.whl → 1.26.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_qc/coverage.py +1 -1
- cloudnetpy_qc/data/data_quality_config.ini +1 -1
- cloudnetpy_qc/quality.py +41 -20
- cloudnetpy_qc/version.py +1 -1
- {cloudnetpy_qc-1.26.0.dist-info → cloudnetpy_qc-1.26.2.dist-info}/METADATA +4 -4
- {cloudnetpy_qc-1.26.0.dist-info → cloudnetpy_qc-1.26.2.dist-info}/RECORD +9 -9
- {cloudnetpy_qc-1.26.0.dist-info → cloudnetpy_qc-1.26.2.dist-info}/WHEEL +0 -0
- {cloudnetpy_qc-1.26.0.dist-info → cloudnetpy_qc-1.26.2.dist-info}/licenses/LICENSE +0 -0
- {cloudnetpy_qc-1.26.0.dist-info → cloudnetpy_qc-1.26.2.dist-info}/top_level.txt +0 -0
cloudnetpy_qc/coverage.py
CHANGED
|
@@ -22,7 +22,7 @@ DEFAULT_RESOLUTION = datetime.timedelta(seconds=30)
|
|
|
22
22
|
|
|
23
23
|
def data_coverage(
|
|
24
24
|
nc: netCDF4.Dataset,
|
|
25
|
-
) -> tuple[float, datetime.timedelta, datetime.timedelta] | None:
|
|
25
|
+
) -> tuple[float | np.floating, datetime.timedelta, datetime.timedelta] | None:
|
|
26
26
|
time = np.array(nc["time"][:])
|
|
27
27
|
time_unit = datetime.timedelta(hours=1)
|
|
28
28
|
try:
|
cloudnetpy_qc/quality.py
CHANGED
|
@@ -291,10 +291,10 @@ class TestZenithAngle(Test):
|
|
|
291
291
|
if key not in self.nc.variables:
|
|
292
292
|
self._add_error(f"Zenith angle, '{key}', is missing.")
|
|
293
293
|
return
|
|
294
|
-
|
|
295
|
-
if
|
|
294
|
+
mean_angle = np.mean(self.nc[key][:])
|
|
295
|
+
if np.abs(mean_angle) < 1:
|
|
296
296
|
self._add_info(
|
|
297
|
-
f"Zenith angle {
|
|
297
|
+
f"Zenith angle {mean_angle} degrees – risk of specular reflection."
|
|
298
298
|
)
|
|
299
299
|
|
|
300
300
|
|
|
@@ -914,7 +914,7 @@ class TestCFConvention(Test):
|
|
|
914
914
|
description = "Test compliance with the CF metadata conventions."
|
|
915
915
|
|
|
916
916
|
def run(self):
|
|
917
|
-
from cfchecker import cfchecks
|
|
917
|
+
from cfchecker import cfchecks # noqa: PLC0415
|
|
918
918
|
|
|
919
919
|
cf_version = "1.8"
|
|
920
920
|
inst = cfchecks.CFChecker(
|
|
@@ -1005,23 +1005,44 @@ class TestInstrumentPid(Test):
|
|
|
1005
1005
|
received = str(getattr(self.nc, key))
|
|
1006
1006
|
except AttributeError:
|
|
1007
1007
|
return
|
|
1008
|
-
|
|
1009
|
-
if
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1008
|
+
expected = self._get_serial_number()
|
|
1009
|
+
if expected is None:
|
|
1010
|
+
self._add_warning(
|
|
1011
|
+
f"No serial number was defined in instrument PID "
|
|
1012
|
+
f"but found '{received}' in the file."
|
|
1013
|
+
)
|
|
1014
|
+
elif received != expected:
|
|
1015
|
+
msg = self._create_message(expected, received, "serial number")
|
|
1016
|
+
self._add_error(msg)
|
|
1017
|
+
|
|
1018
|
+
def _get_serial_number(self) -> str | None:
|
|
1019
|
+
# Exception for L'Aquila LPM whose serial number changed when wind
|
|
1020
|
+
# sensors were added.
|
|
1021
|
+
if (
|
|
1022
|
+
self.nc.instrument_pid
|
|
1023
|
+
== "https://hdl.handle.net/21.12132/3.7cd404bd07d74e93"
|
|
1024
|
+
):
|
|
1025
|
+
return "3629" if self._get_date() <= datetime.date(2023, 10, 23) else "3778"
|
|
1026
|
+
idents = self._get_value("21.T11148/eb3c713572f681e6c4c3")
|
|
1027
|
+
if not isinstance(idents, list):
|
|
1028
|
+
return None
|
|
1029
|
+
model = self._get_value("21.T11148/c1a0ec5ad347427f25d6")
|
|
1030
|
+
if not isinstance(model, dict):
|
|
1031
|
+
return None
|
|
1032
|
+
model_name = model["modelName"]
|
|
1033
|
+
for ident in idents:
|
|
1034
|
+
if (
|
|
1035
|
+
ident["alternateIdentifier"]["alternateIdentifierType"]
|
|
1036
|
+
== "SerialNumber"
|
|
1037
|
+
):
|
|
1038
|
+
serial_number = ident["alternateIdentifier"]["alternateIdentifierValue"]
|
|
1015
1039
|
if "StreamLine" in model_name:
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
self.
|
|
1022
|
-
f"No serial number was defined in instrument PID "
|
|
1023
|
-
f"but found '{received}' in the file."
|
|
1024
|
-
)
|
|
1040
|
+
serial_number = serial_number.split("-")[-1]
|
|
1041
|
+
return serial_number
|
|
1042
|
+
return None
|
|
1043
|
+
|
|
1044
|
+
def _get_date(self):
|
|
1045
|
+
return datetime.date(int(self.nc.year), int(self.nc.month), int(self.nc.day))
|
|
1025
1046
|
|
|
1026
1047
|
def _check_model_name(self):
|
|
1027
1048
|
key = "source"
|
cloudnetpy_qc/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloudnetpy_qc
|
|
3
|
-
Version: 1.26.
|
|
3
|
+
Version: 1.26.2
|
|
4
4
|
Summary: Quality control routines for CloudnetPy products
|
|
5
5
|
Author-email: Finnish Meteorological Institute <actris-cloudnet@fmi.fi>
|
|
6
6
|
License: MIT License
|
|
@@ -28,12 +28,12 @@ License: MIT License
|
|
|
28
28
|
Project-URL: Homepage, https://github.com/actris-cloudnet/cloudnetpy-qc
|
|
29
29
|
Project-URL: Repository, https://github.com/actris-cloudnet/cloudnetpy-qc
|
|
30
30
|
Project-URL: Changelog, https://github.com/actris-cloudnet/cloudnetpy-qc/blob/main/CHANGELOG.md
|
|
31
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
31
32
|
Classifier: Intended Audience :: Science/Research
|
|
32
33
|
Classifier: License :: OSI Approved :: MIT License
|
|
33
34
|
Classifier: Operating System :: OS Independent
|
|
34
|
-
Classifier: Programming Language :: Python :: 3
|
|
35
|
-
Classifier:
|
|
36
|
-
Classifier: Topic :: Scientific/Engineering
|
|
35
|
+
Classifier: Programming Language :: Python :: 3
|
|
36
|
+
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
|
|
37
37
|
Requires-Python: >=3.10
|
|
38
38
|
Description-Content-Type: text/markdown
|
|
39
39
|
License-File: LICENSE
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
cloudnetpy_qc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
cloudnetpy_qc/coverage.py,sha256=
|
|
2
|
+
cloudnetpy_qc/coverage.py,sha256=s4ILSFHlD5-pHG9QiKE4leinUjWmLRib61QQ70Q1IJA,2305
|
|
3
3
|
cloudnetpy_qc/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
cloudnetpy_qc/quality.py,sha256=
|
|
4
|
+
cloudnetpy_qc/quality.py,sha256=BCSXoTYclXULM2Vanff4mTHy5mqt8AXI5Q6sFK2UVZg,39581
|
|
5
5
|
cloudnetpy_qc/utils.py,sha256=zFVryl56le2cyfDSCyGCzMHACcsjK7AJZknii1fgfgg,5393
|
|
6
6
|
cloudnetpy_qc/variables.py,sha256=GIbVYxPyN_X5d5HWR_eV1g6X_8GHCarRWz3nhWkpF3Q,51181
|
|
7
|
-
cloudnetpy_qc/version.py,sha256=
|
|
7
|
+
cloudnetpy_qc/version.py,sha256=dxpu9McdmIO6PnXOWjmokuhXttsX3O0S7OtQnlkIblU,102
|
|
8
8
|
cloudnetpy_qc/data/area-type-table.xml,sha256=LQGp6rk8d-jZVjeFWPK_NjG2Kk1atvLlQXmV4UXggKI,17788
|
|
9
9
|
cloudnetpy_qc/data/cf-standard-name-table.xml,sha256=MGqs7uPH62jVpiN6as3jc5gswQvywjJzU_jzHtQOArA,4455853
|
|
10
|
-
cloudnetpy_qc/data/data_quality_config.ini,sha256=
|
|
10
|
+
cloudnetpy_qc/data/data_quality_config.ini,sha256=YEZQuaRCLMamLypsL7hx1aSixZTq5avpX6Xdey2wGP4,1243
|
|
11
11
|
cloudnetpy_qc/data/standardized-region-list.xml,sha256=gLRE2G7RQLD9hmvW5dTzyK7XPhORxWv2bfbrvAp5Uto,6426
|
|
12
|
-
cloudnetpy_qc-1.26.
|
|
13
|
-
cloudnetpy_qc-1.26.
|
|
14
|
-
cloudnetpy_qc-1.26.
|
|
15
|
-
cloudnetpy_qc-1.26.
|
|
16
|
-
cloudnetpy_qc-1.26.
|
|
12
|
+
cloudnetpy_qc-1.26.2.dist-info/licenses/LICENSE,sha256=P0wszB7Cq2M390SKaqT4DGvECfwGOMdTTdxsWBpEUUc,1094
|
|
13
|
+
cloudnetpy_qc-1.26.2.dist-info/METADATA,sha256=MkCw6kPHiHvbTec-4ZV6HtRBhXAtKpAyAyrGyrkJSSU,8340
|
|
14
|
+
cloudnetpy_qc-1.26.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
15
|
+
cloudnetpy_qc-1.26.2.dist-info/top_level.txt,sha256=shrf8A1KyrrnhbHocc4gHmTl38YY-DHflgf-gXiKnKs,14
|
|
16
|
+
cloudnetpy_qc-1.26.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|