cloudnetpy 1.71.6__tar.gz → 1.72.1__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.
- {cloudnetpy-1.71.6/cloudnetpy.egg-info → cloudnetpy-1.72.1}/PKG-INFO +2 -2
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/cloudnetarray.py +15 -8
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/cloudnet_instrument.py +52 -16
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/hatpro.py +2 -2
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/rpg.py +6 -1
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/version.py +2 -2
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1/cloudnetpy.egg-info}/PKG-INFO +2 -2
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy.egg-info/requires.txt +1 -1
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/pyproject.toml +1 -1
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/LICENSE +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/MANIFEST.in +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/README.md +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/atmos_utils.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/attenuation.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/attenuations/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/attenuations/gas_attenuation.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/attenuations/liquid_attenuation.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/attenuations/melting_attenuation.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/attenuations/rain_attenuation.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/categorize.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/classify.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/containers.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/disdrometer.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/droplet.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/falling.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/freezing.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/insects.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/itu.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/lidar.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/melting.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/model.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/mwr.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/radar.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/cli.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/concat_lib.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/constants.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/datasource.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/exceptions.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/basta.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/ceilo.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/ceilometer.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/cl61d.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/copernicus.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/disdrometer/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/disdrometer/common.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/disdrometer/parsivel.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/disdrometer/thies.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/galileo.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/instruments.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/lufft.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/mira.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/mrr.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/nc_lidar.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/nc_radar.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/pollyxt.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/radiometrics.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/rain_e_h3.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/rpg_reader.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/toa5.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/vaisala.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/instruments/weather_station.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/metadata.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/file_handler.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/metadata.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/model_metadata.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/plotting/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/plotting/plot_meta.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/plotting/plot_tools.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/plotting/plotting.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/products/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/products/advance_methods.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/products/grid_methods.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/products/model_products.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/products/observation_products.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/products/product_resampling.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/products/tools.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/statistics/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/statistics/statistical_methods.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/conftest.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/process_cf/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/process_cf/main.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/process_cf/tests.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/process_iwc/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/process_iwc/main.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/process_iwc/tests.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/process_lwc/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/process_lwc/main.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/process_lwc/tests.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/unit/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/unit/conftest.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/unit/test_advance_methods.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/unit/test_grid_methods.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/unit/test_model_products.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/unit/test_observation_products.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/unit/test_plot_tools.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/unit/test_plotting.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/unit/test_statistical_methods.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/unit/test_tools.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/utils.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/output.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/plotting/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/plotting/plot_meta.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/plotting/plotting.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/products/__init__.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/products/classification.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/products/der.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/products/drizzle.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/products/drizzle_error.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/products/drizzle_tools.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/products/epsilon.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/products/ier.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/products/iwc.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/products/lwc.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/products/mie_lu_tables.nc +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/products/mwr_tools.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/products/product_tools.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/py.typed +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/utils.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy.egg-info/SOURCES.txt +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy.egg-info/dependency_links.txt +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy.egg-info/entry_points.txt +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy.egg-info/top_level.txt +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/docs/source/conf.py +0 -0
- {cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: cloudnetpy
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.72.1
|
4
4
|
Summary: Python package for Cloudnet processing
|
5
5
|
Author: Simo Tukiainen
|
6
6
|
License: MIT License
|
@@ -39,7 +39,6 @@ Requires-Python: >=3.10
|
|
39
39
|
Description-Content-Type: text/markdown
|
40
40
|
License-File: LICENSE
|
41
41
|
Requires-Dist: ceilopyter
|
42
|
-
Requires-Dist: cloudnetpy_qc>=1.15.0
|
43
42
|
Requires-Dist: doppy>=0.5.0
|
44
43
|
Requires-Dist: matplotlib
|
45
44
|
Requires-Dist: mwrpy>=1.2.0
|
@@ -49,6 +48,7 @@ Requires-Dist: rpgpy>=0.14.5
|
|
49
48
|
Requires-Dist: scikit-image
|
50
49
|
Requires-Dist: scipy
|
51
50
|
Provides-Extra: test
|
51
|
+
Requires-Dist: cloudnetpy_qc; extra == "test"
|
52
52
|
Requires-Dist: mypy; extra == "test"
|
53
53
|
Requires-Dist: pytest; extra == "test"
|
54
54
|
Requires-Dist: pytest-flakefinder; extra == "test"
|
@@ -21,6 +21,7 @@ class CloudnetArray:
|
|
21
21
|
units_from_user: Explicit units, optional.
|
22
22
|
dimensions: Explicit dimension names, optional.
|
23
23
|
data_type: Explicit data type, optional.
|
24
|
+
source: Source attribute, optional.
|
24
25
|
|
25
26
|
"""
|
26
27
|
|
@@ -31,6 +32,7 @@ class CloudnetArray:
|
|
31
32
|
units_from_user: str | None = None,
|
32
33
|
dimensions: Sequence[str] | None = None,
|
33
34
|
data_type: str | None = None,
|
35
|
+
source: str | None = None,
|
34
36
|
):
|
35
37
|
self.variable = variable
|
36
38
|
self.name = name
|
@@ -38,6 +40,7 @@ class CloudnetArray:
|
|
38
40
|
self.units = units_from_user or self._init_units()
|
39
41
|
self.data_type = data_type or self._init_data_type()
|
40
42
|
self.dimensions = dimensions
|
43
|
+
self.source = source
|
41
44
|
|
42
45
|
def lin2db(self) -> None:
|
43
46
|
"""Converts linear units to log."""
|
@@ -83,15 +86,19 @@ class CloudnetArray:
|
|
83
86
|
def fetch_attributes(self) -> list:
|
84
87
|
"""Returns list of user-defined attributes."""
|
85
88
|
attributes = []
|
86
|
-
for
|
87
|
-
if
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
89
|
+
for key, value in self.__dict__.items():
|
90
|
+
if (
|
91
|
+
key
|
92
|
+
not in (
|
93
|
+
"variable",
|
94
|
+
"name",
|
95
|
+
"data",
|
96
|
+
"data_type",
|
97
|
+
"dimensions",
|
98
|
+
)
|
99
|
+
and value is not None
|
93
100
|
):
|
94
|
-
attributes.append(
|
101
|
+
attributes.append(key)
|
95
102
|
return attributes
|
96
103
|
|
97
104
|
def set_attributes(self, attributes: MetaData) -> None:
|
@@ -7,6 +7,7 @@ from numpy import ma
|
|
7
7
|
from cloudnetpy import utils
|
8
8
|
from cloudnetpy.cloudnetarray import CloudnetArray
|
9
9
|
from cloudnetpy.exceptions import ValidTimeStampError
|
10
|
+
from cloudnetpy.instruments.instruments import BASTA, FMCW35, FMCW94, HATPRO, Instrument
|
10
11
|
|
11
12
|
|
12
13
|
class CloudnetInstrument:
|
@@ -16,37 +17,72 @@ class CloudnetInstrument:
|
|
16
17
|
self.site_meta: dict = {}
|
17
18
|
self.data: dict = {}
|
18
19
|
self.serial_number: str | None = None
|
20
|
+
self.instrument: Instrument | None = None
|
19
21
|
|
20
22
|
def add_site_geolocation(self) -> None:
|
21
23
|
for key in ("latitude", "longitude", "altitude"):
|
22
24
|
value = None
|
23
|
-
|
24
|
-
|
25
|
+
source = None
|
26
|
+
# From source data (BASTA, RPG-FMCW, HATPRO).
|
27
|
+
# Should be the accurate GPS coordinates.
|
28
|
+
if (
|
29
|
+
value is None
|
30
|
+
and self.instrument is not None
|
31
|
+
and self.instrument in (BASTA, FMCW94, FMCW35, HATPRO)
|
32
|
+
):
|
33
|
+
data = None
|
34
|
+
if (
|
35
|
+
hasattr(self, "dataset")
|
36
|
+
and isinstance(self.dataset, netCDF4.Dataset)
|
37
|
+
and key in self.dataset.variables
|
38
|
+
):
|
39
|
+
data = self.dataset[key][:]
|
40
|
+
elif key in self.data:
|
41
|
+
data = self.data[key].data
|
42
|
+
if data is not None and not np.all(ma.getmaskarray(data)):
|
43
|
+
value = data
|
44
|
+
source = "GPS"
|
45
|
+
# User-supplied site coordinate.
|
46
|
+
if value is None and key in self.site_meta:
|
25
47
|
value = self.site_meta[key]
|
26
|
-
|
27
|
-
|
28
|
-
|
48
|
+
source = "site coordinates"
|
49
|
+
# From source data (CHM15k, CL61, MRR-PRO, Copernicus, Galileo...).
|
50
|
+
# Assume value is manually set, so cannot trust it.
|
51
|
+
if (
|
52
|
+
value is None
|
53
|
+
and hasattr(self, "dataset")
|
54
|
+
and isinstance(self.dataset, netCDF4.Dataset)
|
55
|
+
and key in self.dataset.variables
|
56
|
+
and not np.all(ma.getmaskarray(self.dataset[key][:]))
|
57
|
+
):
|
58
|
+
value = self.dataset[key][:]
|
59
|
+
source = "raw file"
|
60
|
+
# From source global attributes (MIRA).
|
61
|
+
# Seems to be manually set, so cannot trust it.
|
62
|
+
if (
|
63
|
+
value is None
|
64
|
+
and hasattr(self, "dataset")
|
29
65
|
and isinstance(self.dataset, netCDF4.Dataset)
|
30
66
|
and hasattr(
|
31
67
|
self.dataset,
|
32
68
|
key.capitalize(),
|
33
69
|
)
|
34
70
|
):
|
35
|
-
value = self.
|
36
|
-
|
37
|
-
elif (
|
38
|
-
hasattr(self, "dataset")
|
39
|
-
and isinstance(self.dataset, netCDF4.Dataset)
|
40
|
-
and key in self.dataset.variables
|
41
|
-
):
|
42
|
-
value = self.dataset.variables[key][:]
|
71
|
+
value = self._parse_global_attribute_numeral(key.capitalize())
|
72
|
+
source = "raw file"
|
43
73
|
if value is not None:
|
44
74
|
value = float(ma.mean(value))
|
45
|
-
|
75
|
+
# Convert from 0...360 to -180...180
|
76
|
+
if key == "longitude" and value > 180:
|
77
|
+
value -= 360
|
78
|
+
self.data[key] = CloudnetArray(value, key, source=source)
|
46
79
|
|
47
|
-
def
|
80
|
+
def _parse_global_attribute_numeral(self, key: str) -> float | None:
|
48
81
|
new_str = ""
|
49
|
-
|
82
|
+
attr = getattr(self.dataset, key)
|
83
|
+
if attr == "Unknown":
|
84
|
+
return None
|
85
|
+
for char in attr:
|
50
86
|
if char.isdigit() or char == ".":
|
51
87
|
new_str += char
|
52
88
|
return float(new_str)
|
@@ -107,8 +107,8 @@ def hatpro2l1c(
|
|
107
107
|
hatpro.data["irt"].dimensions = ("time", "ir_channel")
|
108
108
|
|
109
109
|
for key in ("latitude", "longitude", "altitude"):
|
110
|
-
|
111
|
-
|
110
|
+
value = float(ma.mean(hatpro.data[key].data))
|
111
|
+
hatpro.data[key] = CloudnetArray(value, key)
|
112
112
|
|
113
113
|
attrs_copy = ATTRIBUTES_1B01.copy()
|
114
114
|
attributes = output.add_time_attribute(attrs_copy, hatpro.date)
|
@@ -157,8 +157,13 @@ def _mask_invalid_data(data_in: dict) -> dict:
|
|
157
157
|
"""Masks zeros and other fill values from data."""
|
158
158
|
data = data_in.copy()
|
159
159
|
fill_values = (-999, 1e-10)
|
160
|
+
extra_keys = ("air_temperature", "air_pressure")
|
160
161
|
for name in data:
|
161
|
-
if
|
162
|
+
if (
|
163
|
+
np.issubdtype(data[name].dtype, np.integer)
|
164
|
+
or data[name].ndim < 2
|
165
|
+
and name not in extra_keys
|
166
|
+
):
|
162
167
|
continue
|
163
168
|
data[name] = ma.masked_equal(data[name], 0)
|
164
169
|
for value in fill_values:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: cloudnetpy
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.72.1
|
4
4
|
Summary: Python package for Cloudnet processing
|
5
5
|
Author: Simo Tukiainen
|
6
6
|
License: MIT License
|
@@ -39,7 +39,6 @@ Requires-Python: >=3.10
|
|
39
39
|
Description-Content-Type: text/markdown
|
40
40
|
License-File: LICENSE
|
41
41
|
Requires-Dist: ceilopyter
|
42
|
-
Requires-Dist: cloudnetpy_qc>=1.15.0
|
43
42
|
Requires-Dist: doppy>=0.5.0
|
44
43
|
Requires-Dist: matplotlib
|
45
44
|
Requires-Dist: mwrpy>=1.2.0
|
@@ -49,6 +48,7 @@ Requires-Dist: rpgpy>=0.14.5
|
|
49
48
|
Requires-Dist: scikit-image
|
50
49
|
Requires-Dist: scipy
|
51
50
|
Provides-Extra: test
|
51
|
+
Requires-Dist: cloudnetpy_qc; extra == "test"
|
52
52
|
Requires-Dist: mypy; extra == "test"
|
53
53
|
Requires-Dist: pytest; extra == "test"
|
54
54
|
Requires-Dist: pytest-flakefinder; extra == "test"
|
@@ -15,7 +15,6 @@ classifiers = [
|
|
15
15
|
]
|
16
16
|
dependencies = [
|
17
17
|
"ceilopyter",
|
18
|
-
"cloudnetpy_qc>=1.15.0",
|
19
18
|
"doppy>=0.5.0",
|
20
19
|
"matplotlib",
|
21
20
|
"mwrpy>=1.2.0",
|
@@ -29,6 +28,7 @@ dynamic = ["version"]
|
|
29
28
|
|
30
29
|
[project.optional-dependencies]
|
31
30
|
test = [
|
31
|
+
"cloudnetpy_qc",
|
32
32
|
"mypy",
|
33
33
|
"pytest",
|
34
34
|
"pytest-flakefinder",
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/attenuations/gas_attenuation.py
RENAMED
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/attenuations/liquid_attenuation.py
RENAMED
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/attenuations/melting_attenuation.py
RENAMED
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/categorize/attenuations/rain_attenuation.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/products/advance_methods.py
RENAMED
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/products/grid_methods.py
RENAMED
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/products/model_products.py
RENAMED
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/products/observation_products.py
RENAMED
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/products/product_resampling.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/process_cf/__init__.py
RENAMED
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/process_cf/main.py
RENAMED
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/process_cf/tests.py
RENAMED
File without changes
|
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/process_iwc/main.py
RENAMED
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/process_iwc/tests.py
RENAMED
File without changes
|
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/process_lwc/main.py
RENAMED
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/e2e/process_lwc/tests.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/unit/test_grid_methods.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/unit/test_plot_tools.py
RENAMED
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/unit/test_plotting.py
RENAMED
File without changes
|
File without changes
|
{cloudnetpy-1.71.6 → cloudnetpy-1.72.1}/cloudnetpy/model_evaluation/tests/unit/test_tools.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|