cloudnetpy-qc 1.26.3__py3-none-any.whl → 1.27.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.
@@ -1,4 +1,4 @@
1
- [limits]
1
+ [defaults]
2
2
  Z = -100, 50
3
3
  Zh = -100, 50
4
4
  v = -20, 20
@@ -58,3 +58,9 @@ air_temperature = 184.0, 329.85
58
58
  relative_humidity = 0, 1.05
59
59
  wind_speed = 0, 100
60
60
  wind_direction = 0, 360
61
+ [mwr-single]
62
+ relative_humidity = -0.2, 2
63
+ [mwr-multi]
64
+ relative_humidity = -0.2, 2
65
+ [radar]
66
+ wind_direction = -0.1, 360.1
cloudnetpy_qc/quality.py CHANGED
@@ -165,11 +165,6 @@ class Test:
165
165
  def _add_error(self, message: str | list):
166
166
  self._add_message(message, ErrorLevel.ERROR)
167
167
 
168
- def _read_config_keys(self, config_section: str) -> np.ndarray:
169
- field = "all" if "attr" in config_section else self.product.value
170
- keys = METADATA_CONFIG[config_section][field].split(",")
171
- return np.char.strip(keys)
172
-
173
168
  def _get_required_variables(self) -> dict:
174
169
  return {
175
170
  name: var
@@ -241,9 +236,13 @@ class FindVariableOutliers(Test):
241
236
  pressure = utils.calc_pressure(np.mean(self.nc["altitude"][:]))
242
237
  max_diff = pressure * 0.05
243
238
  return (pressure - max_diff, pressure + max_diff)
244
- if not DATA_CONFIG.has_option("limits", key):
239
+ if DATA_CONFIG.has_option(self.product.value, key):
240
+ section = self.product.value
241
+ elif DATA_CONFIG.has_option("defaults", key):
242
+ section = "defaults"
243
+ else:
245
244
  return None
246
- limit_min, limit_max = DATA_CONFIG.get("limits", key).split(",", maxsplit=1)
245
+ limit_min, limit_max = DATA_CONFIG.get(section, key).split(",", maxsplit=1)
247
246
  return (float(limit_min), float(limit_max))
248
247
 
249
248
  def _get_data(self, key: str) -> np.ndarray:
@@ -455,6 +454,7 @@ class TestGlobalAttributes(Test):
455
454
  and name in ("initialization_time", "institution")
456
455
  )
457
456
  or (self._instrument_product(product) and name == "serial_number")
457
+ or (product == Product.MWR_L1C and name in ("source_file_uuids",))
458
458
  )
459
459
 
460
460
  def run(self):
@@ -815,7 +815,7 @@ class TestCoordinates(Test):
815
815
 
816
816
  def run(self):
817
817
  required_vars = {"latitude", "longitude"}
818
- if self.nc.cloudnet_file_type != "model":
818
+ if self.product != Product.MODEL and LEVELS[self.product] != "3":
819
819
  required_vars.add("altitude")
820
820
  for key in required_vars:
821
821
  if key not in self.nc.variables:
@@ -891,7 +891,7 @@ class TestCoordinates(Test):
891
891
  return np.array(naive_dt, dtype="datetime64[s]")
892
892
 
893
893
  def _calc_max_dist(self, latitude, longitude):
894
- if self.nc.cloudnet_file_type == "model":
894
+ if self.product == Product.MODEL:
895
895
  mean_lat = np.mean(latitude)
896
896
  mean_lon = np.mean(longitude)
897
897
  angle = 1 # Model resolution should be at least 1 degrees.
cloudnetpy_qc/version.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """Cloudnetpy-QC version."""
2
2
 
3
3
  MAJOR = 1
4
- MINOR = 26
5
- PATCH = 3
4
+ MINOR = 27
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.26.3
3
+ Version: 1.27.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
@@ -1,16 +1,16 @@
1
1
  cloudnetpy_qc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
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=QI0CzT4CWmaybX0GoN02yUuFrk25aHvIrHppvns9kxA,39590
4
+ cloudnetpy_qc/quality.py,sha256=P5S3YnhE7XV8iS2o_uq_gdeZDH_ayZi1K7iXoPkIyV0,39589
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=OBF3AiI0Zm1S3CSLltvH0JVU8JcLvuPln1S9E4TyaZc,102
7
+ cloudnetpy_qc/version.py,sha256=sUel1DFNLcqZ3JywGT68Dg49UsPibUerxk_FzIq0FCk,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=YEZQuaRCLMamLypsL7hx1aSixZTq5avpX6Xdey2wGP4,1243
10
+ cloudnetpy_qc/data/data_quality_config.ini,sha256=IR3-4xOwcOhriH0ai296xLlWVEU24rSZpPhwqYYtnzs,1363
11
11
  cloudnetpy_qc/data/standardized-region-list.xml,sha256=gLRE2G7RQLD9hmvW5dTzyK7XPhORxWv2bfbrvAp5Uto,6426
12
- cloudnetpy_qc-1.26.3.dist-info/licenses/LICENSE,sha256=P0wszB7Cq2M390SKaqT4DGvECfwGOMdTTdxsWBpEUUc,1094
13
- cloudnetpy_qc-1.26.3.dist-info/METADATA,sha256=cVc_WVaqzVJxjjYrvSFcubDUus3Y5u07-ikuFU03bBA,8340
14
- cloudnetpy_qc-1.26.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
- cloudnetpy_qc-1.26.3.dist-info/top_level.txt,sha256=shrf8A1KyrrnhbHocc4gHmTl38YY-DHflgf-gXiKnKs,14
16
- cloudnetpy_qc-1.26.3.dist-info/RECORD,,
12
+ cloudnetpy_qc-1.27.0.dist-info/licenses/LICENSE,sha256=P0wszB7Cq2M390SKaqT4DGvECfwGOMdTTdxsWBpEUUc,1094
13
+ cloudnetpy_qc-1.27.0.dist-info/METADATA,sha256=kSMs_Lxxd_JVFKn9DYIeVdbuhSpwbl9_cCG9knVRiss,8340
14
+ cloudnetpy_qc-1.27.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
+ cloudnetpy_qc-1.27.0.dist-info/top_level.txt,sha256=shrf8A1KyrrnhbHocc4gHmTl38YY-DHflgf-gXiKnKs,14
16
+ cloudnetpy_qc-1.27.0.dist-info/RECORD,,