cloudnetpy 1.78.1__py3-none-any.whl → 1.78.3__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/categorize/containers.py +3 -1
- cloudnetpy/categorize/radar.py +11 -0
- cloudnetpy/instruments/bowtie.py +17 -0
- cloudnetpy/version.py +1 -1
- {cloudnetpy-1.78.1.dist-info → cloudnetpy-1.78.3.dist-info}/METADATA +1 -1
- {cloudnetpy-1.78.1.dist-info → cloudnetpy-1.78.3.dist-info}/RECORD +10 -10
- {cloudnetpy-1.78.1.dist-info → cloudnetpy-1.78.3.dist-info}/WHEEL +0 -0
- {cloudnetpy-1.78.1.dist-info → cloudnetpy-1.78.3.dist-info}/entry_points.txt +0 -0
- {cloudnetpy-1.78.1.dist-info → cloudnetpy-1.78.3.dist-info}/licenses/LICENSE +0 -0
- {cloudnetpy-1.78.1.dist-info → cloudnetpy-1.78.3.dist-info}/top_level.txt +0 -0
@@ -89,7 +89,9 @@ class ClassData:
|
|
89
89
|
rain_from_disdrometer = self._find_rain_from_disdrometer()
|
90
90
|
ind = ~rain_from_disdrometer.mask
|
91
91
|
is_rain[ind] = rain_from_disdrometer[ind]
|
92
|
-
|
92
|
+
mask = ma.getmaskarray(self.tw)
|
93
|
+
first_valid_ind = np.nonzero(np.all(~mask, axis=0))[0][0]
|
94
|
+
is_positive_temp = self.tw[:, first_valid_ind] > T0 + 5 # Filter snowfall
|
93
95
|
return is_rain & is_positive_temp
|
94
96
|
|
95
97
|
def _find_rain_from_radar_echo(self) -> np.ndarray:
|
cloudnetpy/categorize/radar.py
CHANGED
@@ -357,6 +357,16 @@ class Radar(DataSource):
|
|
357
357
|
)
|
358
358
|
# store this in the file
|
359
359
|
self.append_data(max_folding_binned, "nyquist_velocity")
|
360
|
+
|
361
|
+
if "correction_bits" in self.dataset.variables:
|
362
|
+
bits = self.dataset.variables["correction_bits"][:]
|
363
|
+
dealiasing_bit = utils.isbit(bits, 0)
|
364
|
+
if ma.all(dealiasing_bit):
|
365
|
+
return utils.rebin_2d(self.time, data, time_new, "mean")[0]
|
366
|
+
if ma.any(dealiasing_bit):
|
367
|
+
msg = "Data are only party dealiased. Deal with this later."
|
368
|
+
raise NotImplementedError(msg)
|
369
|
+
|
360
370
|
# with original shape (repeat maximum value for each point in every bin)
|
361
371
|
max_folding_full, _ = utils.rebin_2d(
|
362
372
|
self.time,
|
@@ -365,6 +375,7 @@ class Radar(DataSource):
|
|
365
375
|
"max",
|
366
376
|
keepdim=True,
|
367
377
|
)
|
378
|
+
|
368
379
|
data_scaled = data * (np.pi / max_folding_full)
|
369
380
|
vel_x = ma.cos(data_scaled)
|
370
381
|
vel_y = ma.sin(data_scaled)
|
cloudnetpy/instruments/bowtie.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
from os import PathLike
|
2
2
|
|
3
3
|
import numpy as np
|
4
|
+
from numpy import ma
|
4
5
|
|
5
6
|
from cloudnetpy import output
|
6
7
|
from cloudnetpy.constants import G_TO_KG, MM_H_TO_M_S
|
@@ -8,6 +9,7 @@ from cloudnetpy.exceptions import ValidTimeStampError
|
|
8
9
|
from cloudnetpy.instruments.instruments import FMCW94
|
9
10
|
from cloudnetpy.instruments.nc_radar import NcRadar
|
10
11
|
from cloudnetpy.metadata import MetaData
|
12
|
+
from cloudnetpy.utils import bit_field_definition
|
11
13
|
|
12
14
|
|
13
15
|
def bowtie2nc(
|
@@ -63,6 +65,7 @@ def bowtie2nc(
|
|
63
65
|
bowtie.convert_units()
|
64
66
|
bowtie.fix_chirp_start_indices()
|
65
67
|
bowtie.test_if_all_masked()
|
68
|
+
bowtie.add_correction_bits()
|
66
69
|
attributes = output.add_time_attribute(ATTRIBUTES, bowtie.date)
|
67
70
|
output.update_attributes(bowtie.data, attributes)
|
68
71
|
return output.save_level1b(bowtie, output_file, uuid)
|
@@ -84,6 +87,11 @@ class Bowtie(NcRadar):
|
|
84
87
|
self.data["chirp_start_indices"].data = np.array(array, dtype=np.int32)
|
85
88
|
self.data["chirp_start_indices"].data_type = "int32"
|
86
89
|
|
90
|
+
def add_correction_bits(self):
|
91
|
+
bits = ma.ones(self.data["v"].data.shape, dtype=np.uint32)
|
92
|
+
bits.mask = self.data["v"].data.mask
|
93
|
+
self.append_data(bits, "correction_bits")
|
94
|
+
|
87
95
|
def check_date(self, date: str):
|
88
96
|
if "-".join(self.date) != date:
|
89
97
|
raise ValidTimeStampError
|
@@ -100,4 +108,13 @@ ATTRIBUTES: dict = {
|
|
100
108
|
"applied to it."
|
101
109
|
),
|
102
110
|
),
|
111
|
+
"correction_bits": MetaData(
|
112
|
+
long_name="Correction bits",
|
113
|
+
units="1",
|
114
|
+
definition=bit_field_definition({0: """Doppler velocity is dealiased."""}),
|
115
|
+
comment=(
|
116
|
+
"This parameter is a bit field that indicates which corrections have\n"
|
117
|
+
"been applied to radar measurements."
|
118
|
+
),
|
119
|
+
),
|
103
120
|
}
|
cloudnetpy/version.py
CHANGED
@@ -9,13 +9,13 @@ 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=HdcSNIgdxoZlP_jHl66ItheHLw_cDYZb7u6mZ5dfMNE,31952
|
12
|
-
cloudnetpy/version.py,sha256=
|
12
|
+
cloudnetpy/version.py,sha256=pYMEbxEa9ahzrcn_G9DIIY9enBLmzjF9ZpI-AB73HTw,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
|
16
16
|
cloudnetpy/categorize/categorize.py,sha256=PzkgQ63MtEHlz_0govFkoM6F41OKgQLsxDh7GLQHyrs,20777
|
17
17
|
cloudnetpy/categorize/classify.py,sha256=qovHgHsMku5kpl3cJxKteNBsG8GAkfI3Zo8QhJwZSFQ,8512
|
18
|
-
cloudnetpy/categorize/containers.py,sha256=
|
18
|
+
cloudnetpy/categorize/containers.py,sha256=9nAmI1OnR_uANyTZS1cD4do6NrC90EqliEMVrFnQY24,5398
|
19
19
|
cloudnetpy/categorize/disdrometer.py,sha256=sRSt2B932lrrkvycKoSaKEIaDVfq9Z7uU-4iHRr-fC0,1893
|
20
20
|
cloudnetpy/categorize/droplet.py,sha256=t49KEsH5ZM68JQ4NvAf9kGgQ-evic1T4de2-jgJ2f4M,8683
|
21
21
|
cloudnetpy/categorize/falling.py,sha256=lok0HMi1ewf9pS70mq62nRKL6wJzMyWbYmv1cdwrwnA,4404
|
@@ -26,7 +26,7 @@ cloudnetpy/categorize/lidar.py,sha256=YQrM_LOz8NQrrD9l9HyujV1GSGwkQ8LMqXN13bEJRW
|
|
26
26
|
cloudnetpy/categorize/melting.py,sha256=ZnLeL_qWmiCdjXVOm9iBYHdo29Brqxu_DEErZPqUloQ,6217
|
27
27
|
cloudnetpy/categorize/model.py,sha256=QFRCY0TvM2fzGRyP8BNkqbvu13XcQjt7TsN5fhjI_Uc,6654
|
28
28
|
cloudnetpy/categorize/mwr.py,sha256=F7cquERWL6mBkgboqeaCIPf9gOlKI-NWUQIBdQXGT_I,1635
|
29
|
-
cloudnetpy/categorize/radar.py,sha256=
|
29
|
+
cloudnetpy/categorize/radar.py,sha256=Bc-JkMpU3_wFBo7eMMtlF5oiyTaIwbs_BsAn4dufTsE,15953
|
30
30
|
cloudnetpy/categorize/attenuations/__init__.py,sha256=CWFHVWeTIe2hrZtgkJaX2HGftbuffsFc39Mzv5B0Lw0,1037
|
31
31
|
cloudnetpy/categorize/attenuations/gas_attenuation.py,sha256=emr-RCxQT0i2N8k6eBNhRsmsCBPHJzQsWJfjC4fVSTo,975
|
32
32
|
cloudnetpy/categorize/attenuations/liquid_attenuation.py,sha256=0p0G79BPkw1itCXHMwbvkNHtJGBocJzow3gNHAirChI,3036
|
@@ -34,7 +34,7 @@ cloudnetpy/categorize/attenuations/melting_attenuation.py,sha256=9c9xoZHtGUbjFYJ
|
|
34
34
|
cloudnetpy/categorize/attenuations/rain_attenuation.py,sha256=qazJzRyXf9vbjJhh4yiFmABI4L57j5W_6YZ-6qjRiBI,2839
|
35
35
|
cloudnetpy/instruments/__init__.py,sha256=PEgrrQNoiOuN_ctYilmt4LV2QCLg1likPjJdWtuGlLs,528
|
36
36
|
cloudnetpy/instruments/basta.py,sha256=Lb_EhQTI93S5Bd9osDbCE_tC8gZreRsHz7D2_dFOjmE,3793
|
37
|
-
cloudnetpy/instruments/bowtie.py,sha256=
|
37
|
+
cloudnetpy/instruments/bowtie.py,sha256=EyE8HAE8rjO7JelJDbQte_rnwE3VoVJVc6TBpSNK3IU,3930
|
38
38
|
cloudnetpy/instruments/ceilo.py,sha256=qM3AkQKHUblhRCD42HsB6lr82giBH-0g_VzoWHZDgeA,9535
|
39
39
|
cloudnetpy/instruments/ceilometer.py,sha256=ati9-fUQ54K9tvynIPB-nlBYwtvBVaQtUCjVCLNB67w,12059
|
40
40
|
cloudnetpy/instruments/cl61d.py,sha256=g6DNBFju3wYhLFl32DKmC8pUup7y-EupXoUU0fuoGGA,1990
|
@@ -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.78.
|
120
|
+
cloudnetpy-1.78.3.dist-info/licenses/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
|
121
121
|
docs/source/conf.py,sha256=IKiFWw6xhUd8NrCg0q7l596Ck1d61XWeVjIFHVSG9Og,1490
|
122
|
-
cloudnetpy-1.78.
|
123
|
-
cloudnetpy-1.78.
|
124
|
-
cloudnetpy-1.78.
|
125
|
-
cloudnetpy-1.78.
|
126
|
-
cloudnetpy-1.78.
|
122
|
+
cloudnetpy-1.78.3.dist-info/METADATA,sha256=rwmnbibL2ih6Bub0PwnyBbDzEYoSFQLS_IAuERyxDb0,5796
|
123
|
+
cloudnetpy-1.78.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
124
|
+
cloudnetpy-1.78.3.dist-info/entry_points.txt,sha256=HhY7LwCFk4qFgDlXx_Fy983ZTd831WlhtdPIzV-Y3dY,51
|
125
|
+
cloudnetpy-1.78.3.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
|
126
|
+
cloudnetpy-1.78.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|