Implementation of deterministic and ensemble nowcasting methods.


Interface for the nowcasts module. It returns a callable function for computing nowcasts.

The methods in the nowcasts module implement the following interface:

forecast(precip, velocity, timesteps, **keywords)

where 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 can be an integer or a list. An integer specifies the number of time steps to forecast, where the output time step is taken from the inputs. Irregular time steps can be given in a list. The interface accepts optional keyword arguments specific to the given method.

The output depends on the type of the method. For deterministic methods, the output is a three-dimensional array of shape (num_timesteps,m,n) containing a time series of nowcast precipitation fields. For stochastic methods that produce an ensemble, the output is a four-dimensional array of shape (num_ensemble_members,num_timesteps,m,n). The time step of the output is taken from the inputs.


Return a callable function for computing nowcasts.


Implementation of the autoregressive nowcasting using VIL (ANVIL) nowcasting method developed in [PCvLH20]. Compared to S-PROG, the main improvements are using an autoregressive integrated (ARI) model and the option to use vertically integrated liquid (VIL) as the input variable. Using the ARI model avoids biasedness and loss of small-scale features in the forecast field, and no statistical post-processing is needed. In addition, the model allows localization of parameter estimates. It was shown in [PCvLH20] that due to the above improvements, ANVIL produces more reliable deterministic nowcasts than S-PROG.

forecast(vil, velocity, timesteps[, ...])

Generate a nowcast by using the autoregressive nowcasting using VIL (ANVIL) method.


Implementation of extrapolation-based nowcasting methods.

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

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


This module implements the Lagrangian INtegro-Difference equation model with Autoregression (LINDA). The model combines extrapolation, S-PROG, STEPS, ANVIL, integro-difference equation (IDE) and cell tracking methods. It can produce both deterministic and probabilistic nowcasts. LINDA is specifically designed for nowcasting intense localized rainfall. For this purpose, it is expected to give better forecast skill than S-PROG or STEPS.

The model consists of the following components:

  1. feature detection to identify rain cells

  2. advection-based extrapolation

  3. autoregressive integrated ARI(p,1) process for growth and decay of rainfall

  4. convolution to account for loss of predictability

  5. stochastic perturbations to simulate forecast errors

LINDA utilizes a sparse feature-based representation of the input rain rate fields. This allows localization to cells containing intense rainfall. Building on extrapolation nowcast, the temporal evolution of rainfall is modeled in the Lagrangian coordinates. Using the ARI process is adapted from ANVIL [PCvLH20], and the convolution is adapted from the integro-difference equation (IDE) models proposed in [FW05] and [XWF05]. The combination of these two approaches essentially replaces the cascade-based autoregressive process used in S-PROG and STEPS. Using the convolution gives several advantages such as the ability to handle anisotropic structure, domain boundaries and missing data. Based on the marginal distribution and covariance structure of forecast errors, localized perturbations are generated by adapting the short-space Fourier transform (SSFT) methodology developed in [NBS+17].

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

Generate a deterministic or ensemble nowcast by using the Lagrangian INtegro-Difference equation model with Autoregression (LINDA) model.


Implementation of the local Lagrangian probability nowcasting technique described in [GZ04].

forecast(precip, velocity, timesteps, threshold)

Generate a probability nowcast by a local lagrangian approach.


Implementation of the S-PROG method described in [See03]

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

Generate a nowcast by using the Spectral Prognosis (S-PROG) method.


Implementation of the Short-space ensemble prediction system (SSEPS) method. Essentially, SSEPS is a localized version of STEPS.

For localization we intend the use of a subset of the observations in order to estimate model parameters that are distributed in space. The short-space approach used in [NBS+17] is generalized to the whole nowcasting system. This essentially boils down to a moving window localization of the nowcasting procedure, whereby all parameters are estimated over a subdomain of prescribed size.

forecast(precip, metadata, velocity, timesteps)

Generate a nowcast ensemble by using the Short-space ensemble prediction system (SSEPS) method.


Implementation of the STEPS stochastic nowcasting method as described in [See03], [BPS06] and [SPN13].

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

Generate a nowcast ensemble by using the Short-Term Ensemble Prediction System (STEPS) method.


Module with common utilities used by nowcasts methods.


Compute a binning of the given irregular time steps.

compute_dilated_mask(input_mask, kr, r)

Buffer the input rain mask using the given kernel.

compute_percentile_mask(precip, pct)

Compute a precipitation mask, where True/False values are assigned for pixels above/below the given percentile.

nowcast_main_loop(precip, velocity, state, ...)

Utility method for advection-based nowcast models that are applied in the Lagrangian coordinates.


Print the parameters of an AR(p) model.


Print the parameters of an AR(p) model.

stack_cascades(precip_decomp, n_levels[, ...])

Stack the given cascades into a larger array.