pysteps.nowcasts.lagrangian_probability.forecast(precip, velocity, timesteps, threshold, extrap_method='semilagrangian', extrap_kwargs=None, slope=5)#

Generate a probability nowcast by a local lagrangian approach. The ouput is the probability of exceeding a given intensity threshold, i.e. P(precip>=threshold).

  • precip (array_like) – Two-dimensional array of shape (m,n) containing the input precipitation field.

  • velocity (array_like) – Array of shape (2,m,n) containing the x- and y-components of the advection field. The velocities are assumed to represent one time step between the inputs.

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

  • threshold (float) – Intensity threshold for which the exceedance probabilities are computed.

  • slope (float, optional) – The slope of the relationship between optimum scale and lead time in pixels / timestep. Germann and Zawadzki (2004) found the optimal slope to be equal to 1 km / minute.


out – Three-dimensional array of shape (num_timesteps, m, n) containing a time series of nowcast exceedence probabilities. The time series starts from t0 + timestep, where timestep is taken from the advection field velocity.

Return type



Germann, U. and I. Zawadzki, 2004: Scale Dependence of the Predictability of Precipitation from Continental Radar Images. Part II: Probability Forecasts. Journal of Applied Meteorology, 43(1), 74-89.