Skip to content

Commit 428647b

Browse files
committed
Marginal text improvements
1 parent a9f3da3 commit 428647b

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

examples/plot_ensemble_verification.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Ensemble verification
44
=====================
55
6-
This tutorial shows how to compute and plot an extrapolation nowcast using
7-
MeteoSwiss radar data.
6+
In this tutorial we perform a verification of a probabilistic extrapolation nowcast
7+
using MeteoSwiss radar data.
88
99
"""
1010

@@ -37,6 +37,9 @@
3737
###############################################################################
3838
# Load the data from the archive
3939
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40+
#
41+
# The data are upscaled to 2 km resolution to limit the memory usage and thus
42+
# be able to afford a larger number of ensemble members.
4043

4144
root_path = data_source["root_path"]
4245
path_fmt = data_source["path_fmt"]
@@ -58,7 +61,7 @@
5861
# Convert to rain rate
5962
R, metadata = conversion.to_rainrate(R, metadata)
6063

61-
# Upscale data to 2 km to limit memory usage
64+
# Upscale data to 2 km
6265
R, metadata = dimension.aggregate_fields_space(R, metadata, 2000)
6366

6467
# Plot the rainfall field
@@ -84,7 +87,7 @@
8487
# Estimate the motion field
8588
V = dense_lucaskanade(R)
8689

87-
# The STEPES nowcast
90+
# Perform the ensemble nowcast with STEPS
8891
nowcast_method = nowcasts.get_method("steps")
8992
R_f = nowcast_method(
9093
R[-3:, :, :],
@@ -119,10 +122,10 @@
119122
# Verification
120123
# ------------
121124
#
122-
# Pysteps includes a number of verification metrics to help users to analyze
123-
# the general characteristics of the nowcasts in terms of consistency and
124-
# quality (or goodness).
125-
# Here, we will verify our probabilistic forecasts using the ROC curve,
125+
# Pysteps includes a number of verification metrics to help users to analyze
126+
# the general characteristics of the nowcasts in terms of consistency and
127+
# quality (or goodness).
128+
# Here, we will verify our probabilistic forecasts using the ROC curve,
126129
# reliability diagrams, and rank histograms, as implemented in the verification
127130
# module of pysteps.
128131

@@ -160,7 +163,7 @@
160163
verification.ROC_curve_accum(roc, P_f, R_o[-1, :, :])
161164
fig, ax = plt.subplots()
162165
verification.plot_ROC(roc, ax, opt_prob_thr=True)
163-
ax.set_title("ROC curve (+ %i min)" % (n_leadtimes * timestep))
166+
ax.set_title("ROC curve (+%i min)" % (n_leadtimes * timestep))
164167
plt.show()
165168

166169
###############################################################################
@@ -171,7 +174,7 @@
171174
verification.reldiag_accum(reldiag, P_f, R_o[-1, :, :])
172175
fig, ax = plt.subplots()
173176
verification.plot_reldiag(reldiag, ax)
174-
ax.set_title("Reliability diagram (+ %i min)" % (n_leadtimes * timestep))
177+
ax.set_title("Reliability diagram (+%i min)" % (n_leadtimes * timestep))
175178
plt.show()
176179

177180
###############################################################################
@@ -182,7 +185,7 @@
182185
verification.rankhist_accum(rankhist, R_f[:, -1, :, :], R_o[-1, :, :])
183186
fig, ax = plt.subplots()
184187
verification.plot_rankhist(rankhist, ax)
185-
ax.set_title("Rank histogram (+ %i min)" % (n_leadtimes * timestep))
188+
ax.set_title("Rank histogram (+%i min)" % (n_leadtimes * timestep))
186189
plt.show()
187190

188191
# sphinx_gallery_thumbnail_number = 5

pysteps/motion/lucaskanade.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def dense_lucaskanade(R, **kwargs):
113113
the Mahalanobis distance. If false, the outlier detection is simply
114114
computed in terms of velocity.
115115
116-
k_outlier : int, optinal
116+
k_outlier : int, optional
117117
The number of nearest neighbours used to localize the outlier detection.
118118
If set equal to 0, it employs all the data points.
119119
The default is 30.
@@ -366,7 +366,7 @@ def dense_lucaskanade(R, **kwargs):
366366
return np.zeros((2, domain_size[0], domain_size[1]))
367367

368368
if verbose:
369-
print("--- %i sparse vectors left for interpolation ---" % x.size)
369+
print("--- %i sparse vectors left after declustering ---" % x.size)
370370

371371
# kernel interpolation
372372
_, _, UV = _interpolate_sparse_vectors(

0 commit comments

Comments
 (0)