cloudnetpy-qc 1.26.0__tar.gz → 1.26.2__tar.gz

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.
Files changed (24) hide show
  1. {cloudnetpy_qc-1.26.0/cloudnetpy_qc.egg-info → cloudnetpy_qc-1.26.2}/PKG-INFO +4 -4
  2. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/cloudnetpy_qc/coverage.py +1 -1
  3. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/cloudnetpy_qc/data/data_quality_config.ini +1 -1
  4. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/cloudnetpy_qc/quality.py +41 -20
  5. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/cloudnetpy_qc/version.py +1 -1
  6. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2/cloudnetpy_qc.egg-info}/PKG-INFO +4 -4
  7. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/pyproject.toml +3 -3
  8. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/LICENSE +0 -0
  9. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/MANIFEST.in +0 -0
  10. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/README.md +0 -0
  11. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/cloudnetpy_qc/__init__.py +0 -0
  12. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/cloudnetpy_qc/data/area-type-table.xml +0 -0
  13. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/cloudnetpy_qc/data/cf-standard-name-table.xml +0 -0
  14. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/cloudnetpy_qc/data/standardized-region-list.xml +0 -0
  15. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/cloudnetpy_qc/py.typed +0 -0
  16. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/cloudnetpy_qc/utils.py +0 -0
  17. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/cloudnetpy_qc/variables.py +0 -0
  18. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/cloudnetpy_qc.egg-info/SOURCES.txt +0 -0
  19. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/cloudnetpy_qc.egg-info/dependency_links.txt +0 -0
  20. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/cloudnetpy_qc.egg-info/requires.txt +0 -0
  21. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/cloudnetpy_qc.egg-info/top_level.txt +0 -0
  22. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/setup.cfg +0 -0
  23. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/tests/test_qc.py +0 -0
  24. {cloudnetpy_qc-1.26.0 → cloudnetpy_qc-1.26.2}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudnetpy_qc
3
- Version: 1.26.0
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.10
35
- Classifier: Programming Language :: Python :: 3.11
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
@@ -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:
@@ -52,7 +52,7 @@ visibility = 0, 100000
52
52
  radar_reflectivity = -10, 100
53
53
  T_laser_driver = 273.15, 353.15
54
54
  V_control = 4005, 4015
55
- zenith_angle = -1, 15
55
+ zenith_angle = -15, 15
56
56
  T_sensor = 174, 373
57
57
  air_temperature = 184.0, 329.85
58
58
  relative_humidity = 0, 1.05
@@ -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
- max_value = np.max(self.nc[key][:])
295
- if max_value < 1:
294
+ mean_angle = np.mean(self.nc[key][:])
295
+ if np.abs(mean_angle) < 1:
296
296
  self._add_info(
297
- f"Zenith angle {max_value} degrees – risk of specular reflection."
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
- items = self._get_value("21.T11148/eb3c713572f681e6c4c3")
1009
- if not isinstance(items, list):
1010
- return
1011
- model_name = self._get_value("21.T11148/c1a0ec5ad347427f25d6")["modelName"]
1012
- for item in items:
1013
- if item["alternateIdentifier"]["alternateIdentifierType"] == "SerialNumber":
1014
- expected = item["alternateIdentifier"]["alternateIdentifierValue"]
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
- expected = expected.split("-")[-1]
1017
- if received != expected:
1018
- msg = self._create_message(expected, received, "serial number")
1019
- self._add_error(msg)
1020
- return
1021
- self._add_warning(
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"
@@ -2,5 +2,5 @@
2
2
 
3
3
  MAJOR = 1
4
4
  MINOR = 26
5
- PATCH = 0
5
+ PATCH = 2
6
6
  __version__ = f"{MAJOR}.{MINOR}.{PATCH}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudnetpy_qc
3
- Version: 1.26.0
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.10
35
- Classifier: Programming Language :: Python :: 3.11
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
@@ -6,12 +6,12 @@ authors = [{name = "Finnish Meteorological Institute", email = "actris-cloudnet@
6
6
  license = {file = "LICENSE"}
7
7
  requires-python = ">=3.10"
8
8
  classifiers = [
9
+ "Development Status :: 5 - Production/Stable",
9
10
  "Intended Audience :: Science/Research",
10
11
  "License :: OSI Approved :: MIT License",
11
12
  "Operating System :: OS Independent",
12
- "Programming Language :: Python :: 3.10",
13
- "Programming Language :: Python :: 3.11",
14
- "Topic :: Scientific/Engineering",
13
+ "Programming Language :: Python :: 3",
14
+ "Topic :: Scientific/Engineering :: Atmospheric Science",
15
15
  ]
16
16
  dependencies = ["cfchecker", "netCDF4", "numpy", "requests", "scipy"]
17
17
  dynamic = ["version"]
File without changes
File without changes
File without changes