pysteps.extrapolation#

Extrapolation module functions and interfaces.

pysteps.extrapolation.interface#

The functions in the extrapolation module implement the following interface:

``extrapolate(extrap, precip, velocity, timesteps, outval=np.nan, **keywords)``

where extrap is an extrapolator object returned by the initialize function, precip is a (m,n) array with input precipitation field to be advected and velocity is a (2,m,n) array containing the x- and y-components of the m x n advection field. timesteps is an integer or list specifying the time steps to extrapolate. If an integer is given, a range of uniformly spaced steps 1,2,…,timesteps is created. If a list is given, it is assumed to represent a sequence of monotonously increasing time steps. One time unit is assumed to represent the time step of the advection field. The optional argument outval specifies the value for pixels advected from outside the domain. Optional keyword arguments that are specific to a given extrapolation method are passed as a dictionary.

The output of each method is an array that contains the time series of extrapolated fields of shape (num_timesteps, m, n).

get_method(name)

Return two-element tuple for the extrapolation method corresponding to the given name.

eulerian_persistence(precip, velocity, timesteps)

A dummy extrapolation method to apply Eulerian persistence to a two-dimensional precipitation field.

pysteps.extrapolation.semilagrangian#

Implementation of the semi-Lagrangian method described in [GZ02].

extrapolate(precip, velocity, timesteps[, ...])

Apply semi-Lagrangian backward extrapolation to a two-dimensional precipitation field.