cloudnetpy 1.59.2__py3-none-any.whl → 1.59.4__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/plotting/plot_meta.py +23 -1
- cloudnetpy/plotting/plotting.py +12 -0
- cloudnetpy/version.py +1 -1
- {cloudnetpy-1.59.2.dist-info → cloudnetpy-1.59.4.dist-info}/METADATA +1 -1
- {cloudnetpy-1.59.2.dist-info → cloudnetpy-1.59.4.dist-info}/RECORD +8 -8
- {cloudnetpy-1.59.2.dist-info → cloudnetpy-1.59.4.dist-info}/LICENSE +0 -0
- {cloudnetpy-1.59.2.dist-info → cloudnetpy-1.59.4.dist-info}/WHEEL +0 -0
- {cloudnetpy-1.59.2.dist-info → cloudnetpy-1.59.4.dist-info}/top_level.txt +0 -0
cloudnetpy/plotting/plot_meta.py
CHANGED
@@ -18,6 +18,9 @@ class PlotMeta(NamedTuple):
|
|
18
18
|
log_scale: Whether to plot data values in a logarithmic scale.
|
19
19
|
moving_average: Whether to plot a moving average in a 1d plot.
|
20
20
|
contour: Whether to plot contours on top of a filled colormap.
|
21
|
+
zero_line: Whether to plot a zero line in a 1d plot.
|
22
|
+
time_smoothing_duration: The duration of the time smoothing window
|
23
|
+
(in 2d plots) in minutes.
|
21
24
|
"""
|
22
25
|
|
23
26
|
cmap: str = "viridis"
|
@@ -26,6 +29,8 @@ class PlotMeta(NamedTuple):
|
|
26
29
|
log_scale: bool = False
|
27
30
|
moving_average: bool = True
|
28
31
|
contour: bool = False
|
32
|
+
zero_line: bool = False
|
33
|
+
time_smoothing_duration: int = 0
|
29
34
|
|
30
35
|
|
31
36
|
_COLORS = {
|
@@ -122,6 +127,9 @@ _CLABEL = {
|
|
122
127
|
}
|
123
128
|
|
124
129
|
|
130
|
+
_MWR_SINGLE_SMOOTHING = 10
|
131
|
+
_MWR_MULTI_SMOOTHING = 30
|
132
|
+
|
125
133
|
ATTRIBUTES = {
|
126
134
|
"rain-radar": {
|
127
135
|
"rainfall_rate": PlotMeta(
|
@@ -134,25 +142,30 @@ ATTRIBUTES = {
|
|
134
142
|
cmap="coolwarm",
|
135
143
|
plot_range=(223.15, 323.15),
|
136
144
|
contour=True,
|
145
|
+
time_smoothing_duration=_MWR_SINGLE_SMOOTHING,
|
137
146
|
),
|
138
147
|
"potential_temperature": PlotMeta(
|
139
148
|
cmap="coolwarm",
|
140
149
|
plot_range=(260, 320),
|
141
150
|
contour=True,
|
151
|
+
time_smoothing_duration=_MWR_SINGLE_SMOOTHING,
|
142
152
|
),
|
143
153
|
"equivalent_potential_temperature": PlotMeta(
|
144
154
|
cmap="coolwarm",
|
145
155
|
plot_range=(260, 320),
|
146
156
|
contour=True,
|
157
|
+
time_smoothing_duration=_MWR_SINGLE_SMOOTHING,
|
147
158
|
),
|
148
159
|
"relative_humidity": PlotMeta(
|
149
160
|
plot_range=(0, 120),
|
150
161
|
contour=True,
|
162
|
+
time_smoothing_duration=_MWR_SINGLE_SMOOTHING,
|
151
163
|
),
|
152
164
|
"absolute_humidity": PlotMeta(
|
153
165
|
plot_range=(1e-4, 1e-2),
|
154
166
|
log_scale=True,
|
155
167
|
contour=True,
|
168
|
+
time_smoothing_duration=_MWR_SINGLE_SMOOTHING,
|
156
169
|
),
|
157
170
|
},
|
158
171
|
"mwr-multi": {
|
@@ -160,18 +173,24 @@ ATTRIBUTES = {
|
|
160
173
|
cmap="coolwarm",
|
161
174
|
plot_range=(223.15, 323.15),
|
162
175
|
contour=True,
|
176
|
+
time_smoothing_duration=_MWR_MULTI_SMOOTHING,
|
163
177
|
),
|
164
178
|
"potential_temperature": PlotMeta(
|
165
179
|
cmap="coolwarm",
|
166
180
|
plot_range=(260, 320),
|
167
181
|
contour=True,
|
182
|
+
time_smoothing_duration=_MWR_MULTI_SMOOTHING,
|
168
183
|
),
|
169
184
|
"equivalent_potential_temperature": PlotMeta(
|
170
|
-
cmap="coolwarm",
|
185
|
+
cmap="coolwarm",
|
186
|
+
plot_range=(260, 320),
|
187
|
+
contour=True,
|
188
|
+
time_smoothing_duration=_MWR_MULTI_SMOOTHING,
|
171
189
|
),
|
172
190
|
"relative_humidity": PlotMeta(
|
173
191
|
plot_range=(0, 120),
|
174
192
|
contour=True,
|
193
|
+
time_smoothing_duration=_MWR_MULTI_SMOOTHING,
|
175
194
|
),
|
176
195
|
},
|
177
196
|
"fallback": {
|
@@ -521,5 +540,8 @@ ATTRIBUTES = {
|
|
521
540
|
"pia": PlotMeta(
|
522
541
|
plot_range=(0, 3),
|
523
542
|
),
|
543
|
+
"lwp": PlotMeta(
|
544
|
+
zero_line=True,
|
545
|
+
),
|
524
546
|
},
|
525
547
|
}
|
cloudnetpy/plotting/plotting.py
CHANGED
@@ -17,8 +17,10 @@ from matplotlib.ticker import AutoMinorLocator
|
|
17
17
|
from matplotlib.transforms import Affine2D, Bbox
|
18
18
|
from mpl_toolkits.axes_grid1 import make_axes_locatable
|
19
19
|
from numpy import ma, ndarray
|
20
|
+
from scipy.ndimage import uniform_filter
|
20
21
|
|
21
22
|
from cloudnetpy.exceptions import PlottingError
|
23
|
+
from cloudnetpy.instruments.ceilometer import calc_sigma_units
|
22
24
|
from cloudnetpy.plotting.plot_meta import ATTRIBUTES, PlotMeta
|
23
25
|
|
24
26
|
|
@@ -480,6 +482,14 @@ class Plot2D(Plot):
|
|
480
482
|
|
481
483
|
alt = self._screen_data_by_max_y(figure_data)
|
482
484
|
|
485
|
+
if (duration := self._plot_meta.time_smoothing_duration) > 0:
|
486
|
+
sigma_units = calc_sigma_units(
|
487
|
+
figure_data.time, alt * 1e3, sigma_minutes=duration, sigma_metres=0
|
488
|
+
)
|
489
|
+
valid_time_ind = ~np.all(self._data.mask, axis=1)
|
490
|
+
smoothed_data = uniform_filter(self._data[valid_time_ind, :], sigma_units)
|
491
|
+
self._data[valid_time_ind, :] = smoothed_data
|
492
|
+
|
483
493
|
image = self._ax.pcolorfast(
|
484
494
|
figure_data.time_including_gaps,
|
485
495
|
alt,
|
@@ -539,6 +549,8 @@ class Plot1D(Plot):
|
|
539
549
|
)
|
540
550
|
if self._plot_meta.moving_average:
|
541
551
|
self._plot_moving_average(figure_data)
|
552
|
+
if self._plot_meta.zero_line:
|
553
|
+
self._ax.axhline(0, color="black", alpha=0.5)
|
542
554
|
self._fill_between_data_gaps(figure_data)
|
543
555
|
self.sub_plot.set_yax(ylabel=units, y_limits=self._get_y_limits())
|
544
556
|
pos = self._ax.get_position()
|
cloudnetpy/version.py
CHANGED
@@ -8,7 +8,7 @@ cloudnetpy/metadata.py,sha256=v_VDo2vbdTxB0zIsfP69IcrwSKiRlLpsGdq6JPI4CoA,5306
|
|
8
8
|
cloudnetpy/output.py,sha256=WoVTNuxni0DUr163vZ-_mDr1brXhY15XSlGMrq9Aoqw,14700
|
9
9
|
cloudnetpy/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
cloudnetpy/utils.py,sha256=0TlHm71YtSrKXBsRKctitnhQrvZPE-ulEVeAQW-oK58,27398
|
11
|
-
cloudnetpy/version.py,sha256=
|
11
|
+
cloudnetpy/version.py,sha256=Ek-ltBpir522jGt9XlS2hHrcIB47W2_qNJ8Umx09pAA,72
|
12
12
|
cloudnetpy/categorize/__init__.py,sha256=gP5q3Vis1y9u9OWgA_idlbjfWXYN_S0IBSWdwBhL_uU,69
|
13
13
|
cloudnetpy/categorize/atmos.py,sha256=fWW8ye_8HZASRAiYwURFKWzcGOYIA2RKeVxCq0lVOuM,12389
|
14
14
|
cloudnetpy/categorize/atmos_utils.py,sha256=wndpwJxc2-QnNTkV8tc8I11Vs_WkNz9sVMX1fuGgUC4,3777
|
@@ -92,8 +92,8 @@ cloudnetpy/model_evaluation/tests/unit/test_plotting.py,sha256=h9V8JKmrO4v9bOvv-
|
|
92
92
|
cloudnetpy/model_evaluation/tests/unit/test_statistical_methods.py,sha256=Ra3r4V0qbqkpDuaTYvEIbaasl0nZ5gmTLR4eGC0glBQ,9724
|
93
93
|
cloudnetpy/model_evaluation/tests/unit/test_tools.py,sha256=Ia_VrLdV2NstX5gbx_3AZTOAlrgLAy_xFZ8fHYVX0xI,3817
|
94
94
|
cloudnetpy/plotting/__init__.py,sha256=lg9Smn4BI0dVBgnDLC3JVJ4GmwoSnO-qoSd4ApvwV6Y,107
|
95
|
-
cloudnetpy/plotting/plot_meta.py,sha256=
|
96
|
-
cloudnetpy/plotting/plotting.py,sha256=
|
95
|
+
cloudnetpy/plotting/plot_meta.py,sha256=cLdCZrhbP-gaobS_zjcf8d2xVALzl7zh2qpttxCHyrg,15983
|
96
|
+
cloudnetpy/plotting/plotting.py,sha256=LwTAHAdu3tFc-rnspTx3jfvNvmK54A-bRE8B3ty2-L8,32408
|
97
97
|
cloudnetpy/products/__init__.py,sha256=2hRb5HG9hNrxH1if5laJkLeFeaZCd5W1q3hh4ewsX0E,273
|
98
98
|
cloudnetpy/products/classification.py,sha256=0E9OUGR3uLCsS1nORwQu0SqW0_8uX7n6LlRcVhtzKw4,7845
|
99
99
|
cloudnetpy/products/der.py,sha256=mam6jWV7A2h8V5WC3DIeFp6ou7UD1JOw9r7h2B0su-s,12403
|
@@ -107,8 +107,8 @@ cloudnetpy/products/mie_lu_tables.nc,sha256=It4fYpqJXlqOgL8jeZ-PxGzP08PMrELIDVe5
|
|
107
107
|
cloudnetpy/products/mwr_tools.py,sha256=PRm5aCULccUehU-Byk55wYhhEHseMjoAjGBu5TSyHao,4621
|
108
108
|
cloudnetpy/products/product_tools.py,sha256=rhx_Ru9FLlQqCNM-awoiHx18-Aq1eBwL9LiUaQoJs6k,10412
|
109
109
|
docs/source/conf.py,sha256=IKiFWw6xhUd8NrCg0q7l596Ck1d61XWeVjIFHVSG9Og,1490
|
110
|
-
cloudnetpy-1.59.
|
111
|
-
cloudnetpy-1.59.
|
112
|
-
cloudnetpy-1.59.
|
113
|
-
cloudnetpy-1.59.
|
114
|
-
cloudnetpy-1.59.
|
110
|
+
cloudnetpy-1.59.4.dist-info/LICENSE,sha256=wcZF72bdaoG9XugpyE95Juo7lBQOwLuTKBOhhtANZMM,1094
|
111
|
+
cloudnetpy-1.59.4.dist-info/METADATA,sha256=G2Zctni6oT3Nr7TbNTuMDMcTnCAvBdH9Qn5IWS32GtE,5784
|
112
|
+
cloudnetpy-1.59.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
113
|
+
cloudnetpy-1.59.4.dist-info/top_level.txt,sha256=ibSPWRr6ojS1i11rtBFz2_gkIe68mggj7aeswYfaOo0,16
|
114
|
+
cloudnetpy-1.59.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|