Skip to content

Commit 4567643

Browse files
committed
Fix incorrect description of R_thr as an optional argument
1 parent 20a844c commit 4567643

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

pysteps/nowcasts/sprog.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ def forecast(R, V, n_timesteps, n_cascade_levels=6, R_thr=None,
5151
Number of time steps to forecast.
5252
n_cascade_levels : int, optional
5353
The number of cascade levels to use.
54-
R_thr : float, optional
55-
Specifies the threshold value for minimum observable precipitation
56-
intensity. Required if mask_method is not None or conditional is True.
54+
R_thr : float
55+
The threshold value for minimum observable precipitation intensity.
5756
extrap_method : str, optional
5857
Name of the extrapolation method to use. See the documentation of
5958
pysteps.extrapolation.interface.
@@ -126,9 +125,6 @@ def forecast(R, V, n_timesteps, n_cascade_levels=6, R_thr=None,
126125
if np.any(~np.isfinite(V)):
127126
raise ValueError("V contains non-finite values")
128127

129-
if conditional and R_thr is None:
130-
raise ValueError("conditional=True but R_thr is not set")
131-
132128
print("Computing S-PROG nowcast:")
133129
print("-------------------------")
134130
print("")
@@ -154,9 +150,7 @@ def forecast(R, V, n_timesteps, n_cascade_levels=6, R_thr=None,
154150
print("parallel threads: %d" % num_workers)
155151
print("number of cascade levels: %d" % n_cascade_levels)
156152
print("order of the AR(p) model: %d" % ar_order)
157-
158-
if conditional:
159-
print("precip. intensity threshold: %g" % R_thr)
153+
print("precip. intensity threshold: %g" % R_thr)
160154

161155
if measure_time:
162156
starttime_init = time.time()

0 commit comments

Comments
 (0)