cloudnetpy-qc 1.27.5__tar.gz → 1.28.0__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.27.5/cloudnetpy_qc.egg-info → cloudnetpy_qc-1.28.0}/PKG-INFO +1 -1
  2. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/cloudnetpy_qc/quality.py +26 -0
  3. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/cloudnetpy_qc/version.py +2 -2
  4. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0/cloudnetpy_qc.egg-info}/PKG-INFO +1 -1
  5. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/LICENSE +0 -0
  6. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/MANIFEST.in +0 -0
  7. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/README.md +0 -0
  8. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/cloudnetpy_qc/__init__.py +0 -0
  9. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/cloudnetpy_qc/coverage.py +0 -0
  10. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/cloudnetpy_qc/data/area-type-table.xml +0 -0
  11. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/cloudnetpy_qc/data/cf-standard-name-table.xml +0 -0
  12. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/cloudnetpy_qc/data/data_quality_config.ini +0 -0
  13. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/cloudnetpy_qc/data/standardized-region-list.xml +0 -0
  14. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/cloudnetpy_qc/py.typed +0 -0
  15. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/cloudnetpy_qc/utils.py +0 -0
  16. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/cloudnetpy_qc/variables.py +0 -0
  17. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/cloudnetpy_qc.egg-info/SOURCES.txt +0 -0
  18. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/cloudnetpy_qc.egg-info/dependency_links.txt +0 -0
  19. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/cloudnetpy_qc.egg-info/requires.txt +0 -0
  20. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/cloudnetpy_qc.egg-info/top_level.txt +0 -0
  21. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/pyproject.toml +0 -0
  22. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/setup.cfg +0 -0
  23. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/tests/test_qc.py +0 -0
  24. {cloudnetpy_qc-1.27.5 → cloudnetpy_qc-1.28.0}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudnetpy_qc
3
- Version: 1.27.5
3
+ Version: 1.28.0
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
@@ -494,6 +494,8 @@ class TestMedianLwp(Test):
494
494
  if median_lwp < limits[0] or median_lwp > limits[1]:
495
495
  msg = utils.create_out_of_bounds_msg(key, *limits, median_lwp)
496
496
  self._add_warning(msg)
497
+ if ma.all(data == 0):
498
+ self._add_error(f"All unmasked '{key}' values are zero.")
497
499
 
498
500
 
499
501
  class FindAttributeOutliers(Test):
@@ -648,6 +650,30 @@ class TestRainfallConsistency(Test):
648
650
  # -------------------- #
649
651
 
650
652
 
653
+ class TestRangeAndHeight(Test):
654
+ name = "Range and height"
655
+ description = "Test that range and height data are valid."
656
+ products = Product.all() - {
657
+ Product.RAIN_GAUGE,
658
+ Product.WEATHER_STATION,
659
+ Product.MODEL,
660
+ Product.DISDROMETER,
661
+ Product.MWR_L1C,
662
+ Product.MWR,
663
+ }
664
+
665
+ def run(self):
666
+ if "range" in self.nc.variables:
667
+ range_var = self.nc["range"][:]
668
+ if ma.min(range_var) < 0:
669
+ self._add_error("Range variable contains negative values.")
670
+ if "height" in self.nc.variables and "altitude" in self.nc.variables:
671
+ altitude = ma.median(self.nc["altitude"][:])
672
+ height_var = self.nc["height"][:]
673
+ if ma.min(height_var) < altitude:
674
+ self._add_error("Height variable contains values below ground.")
675
+
676
+
651
677
  class TestDataModel(Test):
652
678
  name = "Data model"
653
679
  description = "Test netCDF data model."
@@ -1,6 +1,6 @@
1
1
  """Cloudnetpy-QC version."""
2
2
 
3
3
  MAJOR = 1
4
- MINOR = 27
5
- PATCH = 5
4
+ MINOR = 28
5
+ PATCH = 0
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.27.5
3
+ Version: 1.28.0
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
File without changes
File without changes
File without changes