Skip to content

Commit 0dd626b

Browse files
committed
Update anvil.forecast to comply with the interface
1 parent 9252f15 commit 0dd626b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

examples/anvil_nowcast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
forecast_sprog[~np.isfinite(forecast_extrap)] = np.nan
9393
forecast_sprog[forecast_sprog < 0.5] = 0.0
9494

95-
forecast_anvil = anvil.forecast(rainrate_field[-4:], None, velocity, 3,
95+
forecast_anvil = anvil.forecast(rainrate_field[-4:], velocity, 3,
9696
ar_window_radius=25, ar_order=2)
9797
forecast_anvil[forecast_anvil < 0.5] = 0.0
9898

pysteps/nowcasts/anvil.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
DASK_IMPORTED = False
3434

3535

36-
def forecast(vil, rainrate, velocity, n_timesteps, n_cascade_levels=8,
36+
def forecast(vil, velocity, n_timesteps, rainrate=None, n_cascade_levels=8,
3737
extrap_method="semilagrangian", ar_order=2, ar_window_radius=50,
3838
r_vil_window_radius=5, fft_method="numpy", num_workers=1,
3939
extrap_kwargs=None, filter_kwargs=None, measure_time=False):
@@ -58,16 +58,16 @@ def forecast(vil, rainrate, velocity, n_timesteps, n_cascade_levels=8,
5858
Array of shape (ar_order+2,m,n) containing the input fields ordered by
5959
timestamp from oldest to newest. The time steps between the inputs are
6060
assumed to be regular.
61-
rainrate : array_like
62-
Array of shape (m,n) containing the most recently observed rain rate
63-
field. If set to None, no R(VIL) conversion is done and the outputs
64-
are in the same units as the inputs.
6561
velocity : array_like
6662
Array of shape (2,m,n) containing the x- and y-components of the
6763
advection field. The velocities are assumed to represent one time step
6864
between the inputs. All values are required to be finite.
6965
n_timesteps : int
7066
Number of time steps to forecast.
67+
rainrate : array_like
68+
Array of shape (m,n) containing the most recently observed rain rate
69+
field. If set to None, no R(VIL) conversion is done and the outputs
70+
are in the same units as the inputs.
7171
n_cascade_levels : int, optional
7272
The number of cascade levels to use.
7373
extrap_method : str, optional

0 commit comments

Comments
 (0)