pysteps.nowcasts.extrapolation.forecast

Contents

pysteps.nowcasts.extrapolation.forecast#

pysteps.nowcasts.extrapolation.forecast(dataset: Dataset, timesteps, extrap_method='semilagrangian', extrap_kwargs=None, measure_time=False)#

Generate a nowcast by applying a simple advection-based extrapolation to the given precipitation field.

Parameters:
  • dataset (xarray.Dataset) – Input dataset as described in the documentation of pysteps.io.importers. It has to contain the velocity_x and velocity_y data variables, as well as any pecipitation data variable. It should contain a time dimension of size 1.

  • timesteps (int or list of floats) – Number of time steps to forecast or a list of time steps for which the forecasts are computed (relative to the input time step). The elements of the list are required to be in ascending order.

  • extrap_method (str, optional) – Name of the extrapolation method to use. See the documentation of pysteps.extrapolation.interface.

  • extrap_kwargs (dict, optional) – Optional dictionary that is expanded into keyword arguments for the extrapolation method.

  • measure_time (bool, optional) – If True, measure, print, and return the computation time.

Returns:

out – If return_output is True, a dataset as described in the documentation of pysteps.io.importers is returned containing a time series of forecast precipitation fields. Otherwise, a None value is returned. The time series starts from t0+timestep, where timestep is taken from the metadata of the time coordinate. If measure_time is True, the return value is a three-element tuple containing the nowcast dataset, the initialization time of the nowcast generator and the time used in the main loop (seconds).

Return type:

xarray.Dataset