mesmer.stats.draw_auto_regression_monthly#
- mesmer.stats.draw_auto_regression_monthly(ar_params, covariance, *, time, n_realisations, seed, buffer, time_dim='time', realisation_dim='realisation')#
draw time series of a cyclo-stationary auto-regressive process of lag one (AR(1)) using individual parameters for each month including spatially-correlated innovations. For more information on the cyclo-stationary AR(1) process please refer to
fit_auto_regression_monthly
.- Parameters:
ar_params (xr.Dataset) – Dataset containing the estimated parameters of the AR1 process. Must contain the following DataArray objects:
intercept
slope
both of shape (12, n_gridpoints).
covariance (xr.DataArray of shape (12, n_gridpoints, n_gridpoints)) – The covariance matrix representing the spatially correlated driving white noise process for each month. Must be symmetric and at least positive-semidefinite. Used to draw spatially-correlated innovations using a multivariate normal.
time (xr.DataArray) – The time coordinates that determines the length of the predicted timeseries and that will be the assigned time dimension of the predictions.
n_realisations (int) – The number of realisations to draw.
seed (int) – Seed used to initialize the pseudo-random number generator.
buffer (int) – Buffer to initialize the autoregressive process (ensures that start at 0 does not influence overall result).
time_dim (str, default “time”) – Name of the time dimension for the output data.
realisation_dim (str, default “realisation”) – Name of the realisation dimension for the output data.
- Returns:
result (xr.DataArray of shape (n_realisations, n_timesteps, n_gridpoints)) – Predicted time series of the specified AR(1) process including spatially correlated innovations. The array has shape n_timesteps x n_gridpoints.