cloudnetpy-qc 1.28.2__py3-none-any.whl → 1.30.0__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/quality.py CHANGED
@@ -224,7 +224,7 @@ class FindVariableOutliers(Test):
224
224
  self._add_info(msg)
225
225
 
226
226
  def _get_limits(self, key: str) -> tuple[float, float] | None:
227
- if key == "height" and self.product == Product.CPR:
227
+ if key == "height" and self.product in (Product.CPR, Product.CPR_VALIDATION):
228
228
  return None
229
229
  if key == "air_pressure":
230
230
  pressure = utils.calc_pressure(np.mean(self.nc["altitude"][:]))
@@ -294,6 +294,7 @@ class TestZenithAngle(Test):
294
294
  class TestDataCoverage(Test):
295
295
  name = "Data coverage"
296
296
  description = "Test that file contains enough data."
297
+ products = Product.all() - {Product.CPR_VALIDATION}
297
298
 
298
299
  def run(self):
299
300
  coverage, expected_res, actual_res = data_coverage(self.nc)
@@ -449,6 +450,10 @@ class TestGlobalAttributes(Test):
449
450
  )
450
451
  or (self._instrument_product(product) and name == "serial_number")
451
452
  or (product == Product.MWR_L1C and name in ("source_file_uuids",))
453
+ or (
454
+ product == Product.CPR_VALIDATION
455
+ and name in ("cpr_l1b_baseline", "cpr_l1b_filename")
456
+ )
452
457
  )
453
458
 
454
459
  def run(self):
@@ -661,6 +666,7 @@ class TestRangeAndHeight(Test):
661
666
  Product.MWR_L1C,
662
667
  Product.MWR,
663
668
  Product.CPR,
669
+ Product.CPR_VALIDATION,
664
670
  }
665
671
 
666
672
  def run(self):
@@ -686,6 +692,22 @@ class TestDataModel(Test):
686
692
  self._add_error(utils.create_expected_received_msg(expected, received))
687
693
 
688
694
 
695
+ class TestCompression(Test):
696
+ name = "Compression"
697
+ description = "Test netCDF compression."
698
+
699
+ def run(self):
700
+ for key, var in self.nc.variables.items():
701
+ # Skip scalars.
702
+ if not var.dimensions:
703
+ continue
704
+ filters = var.filters()
705
+ if not filters["shuffle"]:
706
+ self._add_warning(f"Variable '{key}' is not shuffled.")
707
+ if not filters["zlib"]:
708
+ self._add_warning(f"Variable '{key}' is not compressed.")
709
+
710
+
689
711
  class TestBrightnessTemperature(Test):
690
712
  name = "Brightness temperature"
691
713
  description = "Test that brightness temperature data are valid."
@@ -41,6 +41,7 @@ class Product(Enum):
41
41
  L3_IWC = "l3-iwc"
42
42
  L3_LWC = "l3-lwc"
43
43
  CPR = "cpr-simulation"
44
+ CPR_VALIDATION = "cpr-validation"
44
45
 
45
46
  @classmethod
46
47
  def all(cls) -> set[Product]:
@@ -77,6 +78,7 @@ LEVELS: dict[Product, Level] = {
77
78
  Product.L3_IWC: "3",
78
79
  Product.L3_LWC: "3",
79
80
  Product.CPR: "3",
81
+ Product.CPR_VALIDATION: "3",
80
82
  }
81
83
 
82
84
 
@@ -905,6 +907,55 @@ VARIABLES = {
905
907
  required=[Product.CPR],
906
908
  ),
907
909
  # ----------------------------------------
910
+ # Required in cpr-validation Level 3 file
911
+ # ----------------------------------------
912
+ "time_cpr": Variable(
913
+ long_name="Time UTC",
914
+ units=time_units,
915
+ required=[Product.CPR_VALIDATION],
916
+ dtype=Dtype.DOUBLE,
917
+ ),
918
+ "echo_cpr": Variable(
919
+ long_name="Radar reflectivity factor",
920
+ required=[Product.CPR_VALIDATION],
921
+ units="dBZ",
922
+ ),
923
+ "v_cpr": Variable(
924
+ long_name="Doppler velocity",
925
+ units="m s-1",
926
+ required=[Product.CPR_VALIDATION],
927
+ ),
928
+ "latitude_cpr": Variable(
929
+ long_name="Latitude of CPR ground track",
930
+ units="degree_north",
931
+ required=[Product.CPR_VALIDATION],
932
+ ),
933
+ "longitude_cpr": Variable(
934
+ long_name="Longitude of CPR ground track",
935
+ units="degree_east",
936
+ required=[Product.CPR_VALIDATION],
937
+ ),
938
+ "distance": Variable(
939
+ long_name="Distance between site and CPR ground track",
940
+ units="km",
941
+ required=[Product.CPR_VALIDATION],
942
+ ),
943
+ "latitude_msi": Variable(
944
+ long_name="Latitude of MSI ground track",
945
+ units="degree_north",
946
+ required=[Product.CPR_VALIDATION],
947
+ ),
948
+ "longitude_msi": Variable(
949
+ long_name="Longitude of MSI ground track",
950
+ units="degree_east",
951
+ required=[Product.CPR_VALIDATION],
952
+ ),
953
+ "cloud_top_height": Variable(
954
+ long_name="Cloud top height",
955
+ units="m",
956
+ required=[Product.CPR_VALIDATION],
957
+ ),
958
+ # ----------------------------------------
908
959
  # Required in Epsilon (lidar)
909
960
  # ----------------------------------------
910
961
  "epsilon": Variable(
cloudnetpy_qc/version.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """Cloudnetpy-QC version."""
2
2
 
3
3
  MAJOR = 1
4
- MINOR = 28
5
- PATCH = 2
4
+ MINOR = 30
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.28.2
3
+ Version: 1.30.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
@@ -138,6 +138,7 @@ print(json_object)
138
138
  | `TestBrightnessTemperature` | Test that brightness temperature data are valid. |
139
139
  | `TestCFConvention` | Test compliance with the CF metadata conventions. |
140
140
  | `TestComment` | Check that variables have expected comments. |
141
+ | `TestCompression` | Test netCDF compression. |
141
142
  | `TestCoordinateVariables` | Test dimensions of coordinate variables are correct. |
142
143
  | `TestCoordinates` | Check that file coordinates match site coordinates. |
143
144
  | `TestDataCoverage` | Test that file contains enough data. |
@@ -157,6 +158,7 @@ print(json_object)
157
158
  | `TestMedianLwp` | Test that LWP data are valid. |
158
159
  | `TestModelData` | Test that model data are valid. |
159
160
  | `TestRainfallConsistency` | Test that precipitation rate and amount are consistent. |
161
+ | `TestRangeAndHeight` | Test that range and height data are valid. |
160
162
  | `TestStandardNames` | Check that variable have expected standard names. |
161
163
  | `TestTimeVector` | Test that time vector is continuous. |
162
164
  | `TestUnexpectedMask` | Test if data contain unexpected masked values. |
@@ -0,0 +1,16 @@
1
+ cloudnetpy_qc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ cloudnetpy_qc/coverage.py,sha256=sU7MJzoUIdhCAG-SIP4JM1ZVS8IqPgGXAdiwB-cfLqw,2478
3
+ cloudnetpy_qc/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ cloudnetpy_qc/quality.py,sha256=BidJBwZ7z5C2xaq2QE_NO4AfN2KwxL7nQ18MGEjmgOs,41534
5
+ cloudnetpy_qc/utils.py,sha256=zFVryl56le2cyfDSCyGCzMHACcsjK7AJZknii1fgfgg,5393
6
+ cloudnetpy_qc/variables.py,sha256=h_cH0F0nsJZeBWMV-atVDYiRqqaL2Ix2-gfTmhh61V4,53293
7
+ cloudnetpy_qc/version.py,sha256=ieMligj3v0rmHPpYnL73-XoFidwNLUIs7_5NNl_SsEw,102
8
+ cloudnetpy_qc/data/area-type-table.xml,sha256=LQGp6rk8d-jZVjeFWPK_NjG2Kk1atvLlQXmV4UXggKI,17788
9
+ cloudnetpy_qc/data/cf-standard-name-table.xml,sha256=uk6Y5OVRh_2PV_OQe3KITHaRB_rIYh513b31gnPGNXU,4467326
10
+ cloudnetpy_qc/data/data_quality_config.ini,sha256=deAQzo3eMclgIaQTGYGdwLaD_AM9vGDGaf4VvJ_ZQrs,1449
11
+ cloudnetpy_qc/data/standardized-region-list.xml,sha256=gLRE2G7RQLD9hmvW5dTzyK7XPhORxWv2bfbrvAp5Uto,6426
12
+ cloudnetpy_qc-1.30.0.dist-info/licenses/LICENSE,sha256=P0wszB7Cq2M390SKaqT4DGvECfwGOMdTTdxsWBpEUUc,1094
13
+ cloudnetpy_qc-1.30.0.dist-info/METADATA,sha256=jMvwlccPaZVF_GUvli33N7D7L2rmDs-fYX7Fd6t9Yms,8584
14
+ cloudnetpy_qc-1.30.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
+ cloudnetpy_qc-1.30.0.dist-info/top_level.txt,sha256=shrf8A1KyrrnhbHocc4gHmTl38YY-DHflgf-gXiKnKs,14
16
+ cloudnetpy_qc-1.30.0.dist-info/RECORD,,
@@ -1,16 +0,0 @@
1
- cloudnetpy_qc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- cloudnetpy_qc/coverage.py,sha256=21QPbwGX1dvMY0NXmj9Pny1CxzlqUbgeK4wi-X8M9h0,2412
3
- cloudnetpy_qc/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- cloudnetpy_qc/quality.py,sha256=4QJkKEWqm27oHix5F3PPd22_We5hYZv_FfETCyByMT8,40753
5
- cloudnetpy_qc/utils.py,sha256=zFVryl56le2cyfDSCyGCzMHACcsjK7AJZknii1fgfgg,5393
6
- cloudnetpy_qc/variables.py,sha256=BFWOVyXT1abidN8-lL5JFinzptx2R0mRVUwAikeGWHU,51701
7
- cloudnetpy_qc/version.py,sha256=ErkQ6uK8qZI7akJwRKemxlCZ_rdRh3qds6TvTvLQUxs,102
8
- cloudnetpy_qc/data/area-type-table.xml,sha256=LQGp6rk8d-jZVjeFWPK_NjG2Kk1atvLlQXmV4UXggKI,17788
9
- cloudnetpy_qc/data/cf-standard-name-table.xml,sha256=MGqs7uPH62jVpiN6as3jc5gswQvywjJzU_jzHtQOArA,4455853
10
- cloudnetpy_qc/data/data_quality_config.ini,sha256=deAQzo3eMclgIaQTGYGdwLaD_AM9vGDGaf4VvJ_ZQrs,1449
11
- cloudnetpy_qc/data/standardized-region-list.xml,sha256=gLRE2G7RQLD9hmvW5dTzyK7XPhORxWv2bfbrvAp5Uto,6426
12
- cloudnetpy_qc-1.28.2.dist-info/licenses/LICENSE,sha256=P0wszB7Cq2M390SKaqT4DGvECfwGOMdTTdxsWBpEUUc,1094
13
- cloudnetpy_qc-1.28.2.dist-info/METADATA,sha256=r4v2uxZntdL-fMBzQ2phFmtI6OHeZcmjle9d6sKxuXE,8340
14
- cloudnetpy_qc-1.28.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
- cloudnetpy_qc-1.28.2.dist-info/top_level.txt,sha256=shrf8A1KyrrnhbHocc4gHmTl38YY-DHflgf-gXiKnKs,14
16
- cloudnetpy_qc-1.28.2.dist-info/RECORD,,