climpred.stats.autocorr

climpred.stats.autocorr(ds, lag=1, dim='time', return_p=False)[source]

Calculate the lagged correlation of time series.

Parameters:
  • ds (xarray object) – Time series or grid of time series.
  • lag (optional int) – Number of time steps to lag correlate to.
  • dim (optional str) – Name of dimension to autocorrelate over.
  • return_p (optional bool) – If True, return correlation coefficients and p values.
Returns:

Pearson correlation coefficients.

If return_p, also returns their associated p values.