cloudnetpy 1.95.1__tar.gz → 1.95.3__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.95.1/cloudnetpy.egg-info → cloudnetpy-1.95.3}/PKG-INFO +1 -1
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/model.py +2 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/kazr.py +52 -1
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/plotting/plotting.py +1 -0
- cloudnetpy-1.95.3/cloudnetpy/products/iwc_weather_radar.py +106 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/version.py +1 -1
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3/cloudnetpy.egg-info}/PKG-INFO +1 -1
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy.egg-info/SOURCES.txt +1 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/LICENSE +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/MANIFEST.in +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/README.md +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/arm.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/atmos_utils.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/attenuation.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/attenuations/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/attenuations/gas_attenuation.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/attenuations/liquid_attenuation.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/attenuations/melting_attenuation.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/attenuations/rain_attenuation.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/categorize.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/classify.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/containers.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/disdrometer.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/droplet.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/falling.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/freezing.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/insects.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/lidar.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/melting.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/mwr.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/radar.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/cli.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/cloudnetarray.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/concat_lib.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/constants.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/datasource.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/disdronator/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/disdronator/lpm.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/disdronator/parsivel.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/disdronator/process.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/disdronator/rd80.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/disdronator/utils.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/exceptions.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/arm_ceilo.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/arm_ld.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/arm_utils.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/basta.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/bowtie.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/ceilo.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/ceilometer.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/cl61d.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/cloudnet_instrument.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/copernicus.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/da10.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/dealias.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/disdrometer.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/fd12p.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/galileo.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/hatpro.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/instruments.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/lufft.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/mira.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/mmcr.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/mrr.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/mwr3c.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/mwrlos.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/nc_lidar.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/nc_radar.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/pollyxt.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/radiometrics.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/rain_e_h3.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/rpg.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/rpg_reader.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/toa5.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/vaisala.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/weather_radar.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/instruments/weather_station.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/metadata.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/file_handler.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/metadata.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/model_metadata.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/plotting/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/plotting/plot_meta.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/plotting/plot_tools.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/plotting/plotting.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/products/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/products/advance_methods.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/products/grid_methods.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/products/model_products.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/products/observation_products.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/products/product_resampling.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/products/tools.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/statistics/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/statistics/statistical_methods.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/conftest.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/process_cf/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/process_cf/main.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/process_cf/tests.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/process_iwc/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/process_iwc/main.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/process_iwc/tests.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/process_lwc/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/process_lwc/main.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/process_lwc/tests.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/unit/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/unit/conftest.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/unit/test_advance_methods.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/unit/test_grid_methods.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/unit/test_model_products.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/unit/test_observation_products.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/unit/test_plot_tools.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/unit/test_plotting.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/unit/test_statistical_methods.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/unit/test_tools.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/utils.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/output.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/plotting/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/plotting/plot_meta.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/products/__init__.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/products/classification.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/products/der.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/products/drizzle.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/products/drizzle_error.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/products/drizzle_tools.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/products/epsilon_lidar.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/products/epsilon_radar.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/products/ier.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/products/iwc.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/products/lwc.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/products/mie_lu_tables.nc +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/products/mwr_tools.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/products/product_tools.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/py.typed +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/utils.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy.egg-info/dependency_links.txt +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy.egg-info/entry_points.txt +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy.egg-info/requires.txt +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy.egg-info/top_level.txt +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/docs/source/conf.py +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/pyproject.toml +0 -0
- {cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/setup.cfg +0 -0
|
@@ -101,6 +101,8 @@ class Model(DataSource):
|
|
|
101
101
|
"""
|
|
102
102
|
half_height = height_grid - np.diff(height_grid, prepend=self.alt_site) / 2
|
|
103
103
|
for key in self.fields_dense + self.fields_atten:
|
|
104
|
+
if key not in self.data_sparse:
|
|
105
|
+
continue
|
|
104
106
|
array = self.data_sparse[key][:]
|
|
105
107
|
valid_profiles = _find_number_of_valid_profiles(array)
|
|
106
108
|
if valid_profiles < 2:
|
|
@@ -39,6 +39,13 @@ KEYMAP_CFR = {
|
|
|
39
39
|
"signal_to_noise_ratio_crosspolar_v": "SNRx",
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
# Same format with short SNR names (e.g. olikazrgeM1.a1)
|
|
43
|
+
KEYMAP_CFR_SHORT = {
|
|
44
|
+
**{k: v for k, v in KEYMAP_CFR.items() if v not in ("SNR", "SNRx")},
|
|
45
|
+
"snr_copol": "SNR",
|
|
46
|
+
"snr_xpol": "SNRx",
|
|
47
|
+
}
|
|
48
|
+
|
|
42
49
|
# KAZR moments (e.g. sgpkazrgeC1.a1) and corrected moments (sgpkazrcorgeC1.c1)
|
|
43
50
|
KEYMAP_COR = {
|
|
44
51
|
"reflectivity_copol": "Zh",
|
|
@@ -66,7 +73,8 @@ def kazr2nc(
|
|
|
66
73
|
screened using the ARM significant detection mask and LDR is calculated
|
|
67
74
|
from the cross- and co-polar reflectivities. LDR is screened using the
|
|
68
75
|
cross-polar SNR and removed completely if the cross-polar channel is found
|
|
69
|
-
unreliable.
|
|
76
|
+
unreliable. Stationary clutter layers (zero velocity and spectral width)
|
|
77
|
+
are removed. Velocities of the non-corrected formats are dealiased using
|
|
70
78
|
velocity continuity.
|
|
71
79
|
|
|
72
80
|
Args:
|
|
@@ -105,6 +113,7 @@ def kazr2nc(
|
|
|
105
113
|
kazr.screen_ldr()
|
|
106
114
|
kazr.correct_ldr_leakage()
|
|
107
115
|
kazr.screen_noise(snr_limit)
|
|
116
|
+
kazr.screen_stationary_clutter()
|
|
108
117
|
kazr.dealias_velocity()
|
|
109
118
|
kazr.add_correction_bits()
|
|
110
119
|
kazr.mask_invalid_data()
|
|
@@ -187,6 +196,46 @@ class Kazr(CloudnetInstrument):
|
|
|
187
196
|
if cloudnet_array.data.ndim == 2:
|
|
188
197
|
cloudnet_array.mask_indices(is_noise)
|
|
189
198
|
|
|
199
|
+
def screen_stationary_clutter(
|
|
200
|
+
self,
|
|
201
|
+
v_lim: float = 0.03,
|
|
202
|
+
width_lim: float = 0.05,
|
|
203
|
+
min_fraction: float = 0.05,
|
|
204
|
+
) -> None:
|
|
205
|
+
"""Masks stationary clutter layers.
|
|
206
|
+
|
|
207
|
+
Some KAZRs (e.g. Oliktok 2015-2019) show persistent echoes with zero
|
|
208
|
+
Doppler velocity and minimal spectral width in fixed range gates, also
|
|
209
|
+
well above the ground (1.5-2 km at Oliktok). Pixels with near-zero
|
|
210
|
+
velocity and width are masked in range gates where such pixels are
|
|
211
|
+
found in at least `min_fraction` of the profiles. Real hydrometeors
|
|
212
|
+
with zero velocity have larger spectral width due to turbulence.
|
|
213
|
+
"""
|
|
214
|
+
if "width" not in self.data:
|
|
215
|
+
return
|
|
216
|
+
v = self.data["v"][:]
|
|
217
|
+
width = self.data["width"][:]
|
|
218
|
+
is_stationary = ma.filled(
|
|
219
|
+
(ma.abs(v) < v_lim) & (width < width_lim), fill_value=False
|
|
220
|
+
)
|
|
221
|
+
fraction = np.mean(is_stationary, axis=0)
|
|
222
|
+
is_clutter = is_stationary & (fraction >= min_fraction)
|
|
223
|
+
if not np.any(is_clutter):
|
|
224
|
+
return
|
|
225
|
+
gates = np.nonzero(fraction >= min_fraction)[0]
|
|
226
|
+
height = self.data["range"].data
|
|
227
|
+
logging.info(
|
|
228
|
+
"Masking stationary clutter in %s range gates (%.0f-%.0f m)",
|
|
229
|
+
len(gates),
|
|
230
|
+
height[gates[0]],
|
|
231
|
+
height[gates[-1]],
|
|
232
|
+
)
|
|
233
|
+
is_valid = ~ma.getmaskarray(self.data["Zh"][:]) & ~is_clutter
|
|
234
|
+
is_valid = utils.remove_small_objects(is_valid, max_size=20, connectivity=2)
|
|
235
|
+
for cloudnet_array in self.data.values():
|
|
236
|
+
if cloudnet_array.data.ndim == 2:
|
|
237
|
+
cloudnet_array.mask_indices(~is_valid)
|
|
238
|
+
|
|
190
239
|
def dealias_velocity(self) -> None:
|
|
191
240
|
"""Unfolds aliased Doppler velocities using continuity."""
|
|
192
241
|
if self.corrected:
|
|
@@ -282,6 +331,8 @@ class Kazr(CloudnetInstrument):
|
|
|
282
331
|
def _init_metadata(self, nc: netCDF4.Dataset) -> None:
|
|
283
332
|
if "reflectivity" in nc.variables:
|
|
284
333
|
self.keymap = KEYMAP_CFR
|
|
334
|
+
if "snr_copol" in nc.variables:
|
|
335
|
+
self.keymap = KEYMAP_CFR_SHORT
|
|
285
336
|
elif "reflectivity_copol" in nc.variables:
|
|
286
337
|
self.keymap = KEYMAP_COR
|
|
287
338
|
self.corrected = "significant_detection_mask" in nc.variables
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
from os import PathLike
|
|
2
|
+
from uuid import UUID
|
|
3
|
+
|
|
4
|
+
import numpy as np
|
|
5
|
+
from numpy import ma
|
|
6
|
+
|
|
7
|
+
from cloudnetpy import output, utils
|
|
8
|
+
from cloudnetpy.categorize.disdrometer import DataSource
|
|
9
|
+
from cloudnetpy.categorize.model import Model
|
|
10
|
+
from cloudnetpy.cloudnetarray import CloudnetArray
|
|
11
|
+
from cloudnetpy.constants import T0
|
|
12
|
+
from cloudnetpy.metadata import COMMON_ATTRIBUTES, MetaData
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def generate_iwc_from_weather_radar(
|
|
16
|
+
weather_radar_file: str | PathLike,
|
|
17
|
+
model_file: str | PathLike,
|
|
18
|
+
output_file: str | PathLike,
|
|
19
|
+
uuid: str | UUID | None = None,
|
|
20
|
+
) -> UUID:
|
|
21
|
+
uuid = utils.get_uuid(uuid)
|
|
22
|
+
radar = WrRadar(weather_radar_file)
|
|
23
|
+
if radar.altitude is None:
|
|
24
|
+
msg = "Altitude is missing"
|
|
25
|
+
raise ValueError(msg)
|
|
26
|
+
if radar.height is None or radar.height_agl is None:
|
|
27
|
+
msg = "Height is missing"
|
|
28
|
+
raise ValueError(msg)
|
|
29
|
+
model = Model(model_file, radar.altitude)
|
|
30
|
+
model.interpolate_to_common_height()
|
|
31
|
+
model.interpolate_to_grid(radar.time, radar.height)
|
|
32
|
+
|
|
33
|
+
height_agl = radar.height_agl
|
|
34
|
+
z = radar.data["Z"][:]
|
|
35
|
+
v = radar.data["v"][:]
|
|
36
|
+
rho_hv = radar.data["rho_hv"][:]
|
|
37
|
+
temp = model.data_dense["temperature"]
|
|
38
|
+
|
|
39
|
+
is_noise = (height_agl < 3000) & (rho_hv < 0.8) & (z < -20)
|
|
40
|
+
is_ice = (z > -30) & (np.abs(v) < 2) & (temp < T0)
|
|
41
|
+
is_rain = (z > 10) & (v < 0) & (temp > T0 - 10)
|
|
42
|
+
|
|
43
|
+
output_data = {
|
|
44
|
+
"time": CloudnetArray(radar.time, "time"),
|
|
45
|
+
"height": CloudnetArray(radar.height, "height"),
|
|
46
|
+
"radar_frequency": CloudnetArray(radar.radar_frequency, "radar_frequency"),
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
z_rain = ma.masked_where(is_noise | ~is_rain, z)
|
|
50
|
+
rainfall_rate = (utils.db2lin(z_rain) / 200) ** 0.625 # Marshall-Palmer
|
|
51
|
+
output_data["rainfall_rate"] = CloudnetArray(
|
|
52
|
+
rainfall_rate * 1e-3 / 3600, "rainfall_rate"
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
z_ice = ma.masked_where(is_noise | is_rain | ~is_ice, z)
|
|
56
|
+
iwc = ma.power(10, 0.060 * z_ice - 0.0197 * temp - 1.70) # Hogan et al. (2006)
|
|
57
|
+
output_data["iwc"] = CloudnetArray(1000 * iwc, "iwc")
|
|
58
|
+
|
|
59
|
+
date = radar.get_date()
|
|
60
|
+
attributes = output.add_time_attribute(WEATHER_RADAR_RET_ATTRIBUTES, date)
|
|
61
|
+
output.update_attributes(output_data, attributes)
|
|
62
|
+
|
|
63
|
+
dimensions = {"time": len(radar.time), "height": len(radar.height)}
|
|
64
|
+
with output.init_file(output_file, dimensions, output_data, uuid) as nc:
|
|
65
|
+
nc.cloudnet_file_type = "iwc-weather-radar"
|
|
66
|
+
vars_from_source = (
|
|
67
|
+
"altitude",
|
|
68
|
+
"latitude",
|
|
69
|
+
"longitude",
|
|
70
|
+
)
|
|
71
|
+
output.copy_variables(radar.dataset, nc, vars_from_source)
|
|
72
|
+
output.copy_global(radar.dataset, nc, ("year", "month", "day", "location"))
|
|
73
|
+
nc.title = f"Ice water content (weather radar) retrieval from {radar.location}"
|
|
74
|
+
nc.source = "\n".join(sorted([radar.source, model.source]))
|
|
75
|
+
nc.source_file_uuids = output.get_source_uuids([radar, model])
|
|
76
|
+
output.merge_history(nc, nc.cloudnet_file_type, radar, (model,))
|
|
77
|
+
|
|
78
|
+
return uuid
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class WrRadar(DataSource):
|
|
82
|
+
def __init__(self, full_path: str | PathLike) -> None:
|
|
83
|
+
super().__init__(full_path, radar=True)
|
|
84
|
+
self.radar_frequency = float(self.getvar("radar_frequency"))
|
|
85
|
+
self.location = getattr(self.dataset, "location", "")
|
|
86
|
+
self._init_data()
|
|
87
|
+
|
|
88
|
+
def _init_data(self) -> None:
|
|
89
|
+
self.append_data(self.getvar("Zh"), "Z", units="dBZ")
|
|
90
|
+
self.append_data(self.getvar("v"), "v")
|
|
91
|
+
self.append_data(self.getvar("rho_hv"), "rho_hv")
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
WEATHER_RADAR_RET_ATTRIBUTES = {
|
|
95
|
+
"height": COMMON_ATTRIBUTES["height"]._replace(dimensions=("height",)),
|
|
96
|
+
"iwc": MetaData(
|
|
97
|
+
long_name="Ice water content",
|
|
98
|
+
units="kg m-3",
|
|
99
|
+
dimensions=("time", "height"),
|
|
100
|
+
),
|
|
101
|
+
"rainfall_rate": MetaData(
|
|
102
|
+
long_name="Rainfall rate",
|
|
103
|
+
units="m s-1",
|
|
104
|
+
dimensions=("time", "height"),
|
|
105
|
+
),
|
|
106
|
+
}
|
|
@@ -137,6 +137,7 @@ cloudnetpy/products/epsilon_lidar.py
|
|
|
137
137
|
cloudnetpy/products/epsilon_radar.py
|
|
138
138
|
cloudnetpy/products/ier.py
|
|
139
139
|
cloudnetpy/products/iwc.py
|
|
140
|
+
cloudnetpy/products/iwc_weather_radar.py
|
|
140
141
|
cloudnetpy/products/lwc.py
|
|
141
142
|
cloudnetpy/products/mie_lu_tables.nc
|
|
142
143
|
cloudnetpy/products/mwr_tools.py
|
|
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.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/attenuations/gas_attenuation.py
RENAMED
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/attenuations/liquid_attenuation.py
RENAMED
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/categorize/attenuations/melting_attenuation.py
RENAMED
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/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
|
|
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.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/products/advance_methods.py
RENAMED
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/products/grid_methods.py
RENAMED
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/products/model_products.py
RENAMED
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/products/observation_products.py
RENAMED
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/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.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/process_cf/__init__.py
RENAMED
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/process_cf/main.py
RENAMED
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/process_cf/tests.py
RENAMED
|
File without changes
|
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/process_iwc/main.py
RENAMED
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/process_iwc/tests.py
RENAMED
|
File without changes
|
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/process_lwc/main.py
RENAMED
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/e2e/process_lwc/tests.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/unit/test_grid_methods.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/unit/test_plot_tools.py
RENAMED
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/cloudnetpy/model_evaluation/tests/unit/test_plotting.py
RENAMED
|
File without changes
|
|
File without changes
|
{cloudnetpy-1.95.1 → cloudnetpy-1.95.3}/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
|
|
File without changes
|