cloudnetpy 1.78.4__py3-none-any.whl → 1.79.1__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/exceptions.py +7 -0
- cloudnetpy/instruments/ceilo.py +7 -5
- cloudnetpy/instruments/ceilometer.py +17 -12
- cloudnetpy/instruments/cl61d.py +5 -0
- cloudnetpy/version.py +2 -2
- {cloudnetpy-1.78.4.dist-info → cloudnetpy-1.79.1.dist-info}/METADATA +1 -1
- {cloudnetpy-1.78.4.dist-info → cloudnetpy-1.79.1.dist-info}/RECORD +11 -11
- {cloudnetpy-1.78.4.dist-info → cloudnetpy-1.79.1.dist-info}/WHEEL +0 -0
- {cloudnetpy-1.78.4.dist-info → cloudnetpy-1.79.1.dist-info}/entry_points.txt +0 -0
- {cloudnetpy-1.78.4.dist-info → cloudnetpy-1.79.1.dist-info}/licenses/LICENSE +0 -0
- {cloudnetpy-1.78.4.dist-info → cloudnetpy-1.79.1.dist-info}/top_level.txt +0 -0
cloudnetpy/exceptions.py
CHANGED
@@ -23,6 +23,13 @@ class RadarDataError(CloudnetException):
|
|
23
23
|
super().__init__(msg)
|
24
24
|
|
25
25
|
|
26
|
+
class LidarDataError(CloudnetException):
|
27
|
+
"""Internal exception class."""
|
28
|
+
|
29
|
+
def __init__(self, msg: str):
|
30
|
+
super().__init__(msg)
|
31
|
+
|
32
|
+
|
26
33
|
class PlottingError(CloudnetException):
|
27
34
|
"""Internal exception class."""
|
28
35
|
|
cloudnetpy/instruments/ceilo.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
"""Module for reading and processing Vaisala / Lufft ceilometers."""
|
2
2
|
|
3
|
+
import logging
|
3
4
|
from itertools import islice
|
4
5
|
|
5
6
|
import netCDF4
|
@@ -71,6 +72,8 @@ def ceilo2nc(
|
|
71
72
|
ceilo_obj = _initialize_ceilo(full_path, site_meta, date)
|
72
73
|
calibration_factor = site_meta.get("calibration_factor")
|
73
74
|
range_corrected = site_meta.get("range_corrected", True)
|
75
|
+
if range_corrected is False:
|
76
|
+
logging.warning("Raw data not range-corrected.")
|
74
77
|
ceilo_obj.read_ceilometer_file(calibration_factor)
|
75
78
|
ceilo_obj.check_beta_raw_shape()
|
76
79
|
n_negatives = _get_n_negatives(ceilo_obj)
|
@@ -117,11 +120,10 @@ def _get_n_negatives(ceilo_obj: ClCeilo | Ct25k | LufftCeilo | Cl61d | Cs135) ->
|
|
117
120
|
is_old_chm_version = (
|
118
121
|
hasattr(ceilo_obj, "is_old_version") and ceilo_obj.is_old_version
|
119
122
|
)
|
120
|
-
|
121
|
-
ceilo_obj.instrument
|
122
|
-
|
123
|
-
|
124
|
-
if is_old_chm_version or is_ct25k:
|
123
|
+
is_old_vaisala_model = ceilo_obj.instrument is not None and getattr(
|
124
|
+
ceilo_obj.instrument, "model", ""
|
125
|
+
).lower() in ("ct25k", "cl31")
|
126
|
+
if is_old_chm_version or is_old_vaisala_model:
|
125
127
|
return 20
|
126
128
|
return 5
|
127
129
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import logging
|
2
|
-
from typing import
|
2
|
+
from typing import NamedTuple
|
3
3
|
|
4
4
|
import numpy as np
|
5
5
|
from numpy import ma
|
@@ -8,11 +8,9 @@ from scipy.ndimage import gaussian_filter
|
|
8
8
|
from cloudnetpy import utils
|
9
9
|
from cloudnetpy.cloudnetarray import CloudnetArray
|
10
10
|
from cloudnetpy.exceptions import ValidTimeStampError
|
11
|
+
from cloudnetpy.instruments.instruments import Instrument
|
11
12
|
from cloudnetpy.utils import Epoch
|
12
13
|
|
13
|
-
if TYPE_CHECKING:
|
14
|
-
from cloudnetpy.instruments.instruments import Instrument
|
15
|
-
|
16
14
|
|
17
15
|
class NoiseParam(NamedTuple):
|
18
16
|
"""Noise parameters. Values are weakly instrument-dependent."""
|
@@ -47,6 +45,7 @@ class Ceilometer:
|
|
47
45
|
self.data,
|
48
46
|
self.noise_param,
|
49
47
|
range_corrected=range_corrected,
|
48
|
+
instrument=self.instrument,
|
50
49
|
)
|
51
50
|
return noisy_data.screen_data(
|
52
51
|
array,
|
@@ -66,6 +65,7 @@ class Ceilometer:
|
|
66
65
|
self.data,
|
67
66
|
self.noise_param,
|
68
67
|
range_corrected=range_corrected,
|
68
|
+
instrument=self.instrument,
|
69
69
|
)
|
70
70
|
beta_raw = ma.copy(self.data["beta_raw"])
|
71
71
|
cloud_ind, cloud_values, cloud_limit = _estimate_clouds_from_beta(beta)
|
@@ -145,10 +145,12 @@ class NoisyData:
|
|
145
145
|
noise_param: NoiseParam,
|
146
146
|
*,
|
147
147
|
range_corrected: bool = True,
|
148
|
+
instrument: Instrument | None = None,
|
148
149
|
):
|
149
150
|
self.data = data
|
150
151
|
self.noise_param = noise_param
|
151
152
|
self.range_corrected = range_corrected
|
153
|
+
self.instrument = instrument
|
152
154
|
|
153
155
|
def screen_data(
|
154
156
|
self,
|
@@ -268,14 +270,17 @@ class NoisyData:
|
|
268
270
|
data[:, ind] = data[:, ind] * self._get_range_squared()[ind]
|
269
271
|
|
270
272
|
def _get_altitude_ind(self) -> tuple:
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
273
|
+
alt_limit = 1e12 # All altitudes
|
274
|
+
if (
|
275
|
+
self.range_corrected is False
|
276
|
+
and self.instrument is not None
|
277
|
+
and self.instrument.model is not None
|
278
|
+
):
|
279
|
+
model = self.instrument.model.lower()
|
280
|
+
if model == "ct25k":
|
281
|
+
alt_limit = 0.0
|
282
|
+
elif model in ("cl31", "cl51"):
|
283
|
+
alt_limit = 2400.0
|
279
284
|
return np.where(self.data["range"] < alt_limit)
|
280
285
|
|
281
286
|
def _get_range_squared(self) -> np.ndarray:
|
cloudnetpy/instruments/cl61d.py
CHANGED
@@ -4,6 +4,8 @@ import logging
|
|
4
4
|
|
5
5
|
import netCDF4
|
6
6
|
|
7
|
+
from cloudnetpy import utils
|
8
|
+
from cloudnetpy.exceptions import LidarDataError
|
7
9
|
from cloudnetpy.instruments import instruments
|
8
10
|
from cloudnetpy.instruments.nc_lidar import NcLidar
|
9
11
|
|
@@ -39,6 +41,9 @@ class Cl61d(NcLidar):
|
|
39
41
|
msg = "No dataset found"
|
40
42
|
raise RuntimeError(msg)
|
41
43
|
beta_raw = self.dataset.variables["beta_att"][:]
|
44
|
+
if utils.is_all_masked(beta_raw):
|
45
|
+
msg = "All beta_raw values are masked. Check the input file(s)."
|
46
|
+
raise LidarDataError(msg)
|
42
47
|
if calibration_factor is None:
|
43
48
|
logging.warning("Using default calibration factor")
|
44
49
|
calibration_factor = 1
|
cloudnetpy/version.py
CHANGED
@@ -4,12 +4,12 @@ cloudnetpy/cloudnetarray.py,sha256=uOYgpQ8hHh5fuHyip1HjnhsEda9_7dg7orYnbCRkTtI,4
|
|
4
4
|
cloudnetpy/concat_lib.py,sha256=XQ5Sk8kfXqI0Q5HoomKWWhdZ1-m2thYDKGL7SKapITE,12851
|
5
5
|
cloudnetpy/constants.py,sha256=YnoSzZm35NDooJfhlulSJBc7g0eSchT3yGytRaTaJEI,845
|
6
6
|
cloudnetpy/datasource.py,sha256=Vx_I8S14nFAWKI0VbsW_-sllbVCRjTYxB7XH9b9PedQ,6268
|
7
|
-
cloudnetpy/exceptions.py,sha256=
|
7
|
+
cloudnetpy/exceptions.py,sha256=GBrqCkGxX7qD78LPUxwHpJrEfIeVzbvhs6peWQSBmhM,1723
|
8
8
|
cloudnetpy/metadata.py,sha256=lO7BCbVAzFoH3Nq-VuezYX0f7MnbG1Zp11g5GSiuQwM,6189
|
9
9
|
cloudnetpy/output.py,sha256=gupxt4f_-eUrFsWMto8tnknoV-p9QauC9L6CJAqBILU,15988
|
10
10
|
cloudnetpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
cloudnetpy/utils.py,sha256=WczDeGN408XSgGeaRLXFmlLjgAS67lK1osV0YEuKmwo,32027
|
12
|
-
cloudnetpy/version.py,sha256=
|
12
|
+
cloudnetpy/version.py,sha256=l8L_HNpJqIkeEmJ8zUGir5O1urLeyDtTP8h6HO2_SFY,72
|
13
13
|
cloudnetpy/categorize/__init__.py,sha256=s-SJaysvVpVVo5kidiruWQO6p3gv2TXwY1wEHYO5D6I,44
|
14
14
|
cloudnetpy/categorize/atmos_utils.py,sha256=RcmbKxm2COkE7WEya0mK3yX5rzUbrewRVh3ekm01RtM,10598
|
15
15
|
cloudnetpy/categorize/attenuation.py,sha256=Y_-fzmQTltWTqIZTulJhovC7a6ifpMcaAazDJcnMIOc,990
|
@@ -35,9 +35,9 @@ cloudnetpy/categorize/attenuations/rain_attenuation.py,sha256=qazJzRyXf9vbjJhh4y
|
|
35
35
|
cloudnetpy/instruments/__init__.py,sha256=PEgrrQNoiOuN_ctYilmt4LV2QCLg1likPjJdWtuGlLs,528
|
36
36
|
cloudnetpy/instruments/basta.py,sha256=Lb_EhQTI93S5Bd9osDbCE_tC8gZreRsHz7D2_dFOjmE,3793
|
37
37
|
cloudnetpy/instruments/bowtie.py,sha256=EyE8HAE8rjO7JelJDbQte_rnwE3VoVJVc6TBpSNK3IU,3930
|
38
|
-
cloudnetpy/instruments/ceilo.py,sha256=
|
39
|
-
cloudnetpy/instruments/ceilometer.py,sha256=
|
40
|
-
cloudnetpy/instruments/cl61d.py,sha256=
|
38
|
+
cloudnetpy/instruments/ceilo.py,sha256=QQ4pK_GmvQVUgTj1Wc3w8kM6VMKgOxO28pCPrrN1Avg,9664
|
39
|
+
cloudnetpy/instruments/ceilometer.py,sha256=XS2hVJ7rn9WOUKq19wpNL5MJr59fKSEWHC_1pOE_Bm4,12323
|
40
|
+
cloudnetpy/instruments/cl61d.py,sha256=0QMqXHIy0hn2mksAwTdaKMOaEWjsZmj7QZ8hCbcHwxE,2225
|
41
41
|
cloudnetpy/instruments/cloudnet_instrument.py,sha256=SGPsRYYoGPoRoDY7hHJcKUVX0A23X0Telc00Fu01PnY,4495
|
42
42
|
cloudnetpy/instruments/copernicus.py,sha256=hCphEKyFCc3f1uLRdjL2435kuh64M5q-V1bI68bzGbA,6528
|
43
43
|
cloudnetpy/instruments/fd12p.py,sha256=aGYpkczdSl7FSmK1bByMnpUBD5GAl7RTKkopt0cpWas,6822
|
@@ -117,10 +117,10 @@ cloudnetpy/products/lwc.py,sha256=sl6Al2tuH3KkCBrPbWTmuz3jlD5UQJ4D6qBsn1tt2CQ,18
|
|
117
117
|
cloudnetpy/products/mie_lu_tables.nc,sha256=It4fYpqJXlqOgL8jeZ-PxGzP08PMrELIDVe55y9ob58,16637951
|
118
118
|
cloudnetpy/products/mwr_tools.py,sha256=8HPZpQMTojKZP1JS1S83IE0sxmbDE9bxlaWoqmGnUZE,6199
|
119
119
|
cloudnetpy/products/product_tools.py,sha256=uu4l6reuGbPcW3TgttbaSrqIKbyYGhBVTdnC7opKvmg,11101
|
120
|
-
cloudnetpy-1.
|
120
|
+
cloudnetpy-1.79.1.dist-info/licenses/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
|
121
121
|
docs/source/conf.py,sha256=IKiFWw6xhUd8NrCg0q7l596Ck1d61XWeVjIFHVSG9Og,1490
|
122
|
-
cloudnetpy-1.
|
123
|
-
cloudnetpy-1.
|
124
|
-
cloudnetpy-1.
|
125
|
-
cloudnetpy-1.
|
126
|
-
cloudnetpy-1.
|
122
|
+
cloudnetpy-1.79.1.dist-info/METADATA,sha256=JtMnhiVSz-jUPZS17gY4BKPyUjYqhvuYl9YB7KC7lxU,5796
|
123
|
+
cloudnetpy-1.79.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
124
|
+
cloudnetpy-1.79.1.dist-info/entry_points.txt,sha256=HhY7LwCFk4qFgDlXx_Fy983ZTd831WlhtdPIzV-Y3dY,51
|
125
|
+
cloudnetpy-1.79.1.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
|
126
|
+
cloudnetpy-1.79.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|