API reference#
This page provides an auto-generated summary of mesmers’ API.
Statistical functions#
Linear regression#
Ordinary least squares Linear Regression for xr.DataArray objects. |
|
|
Fit a linear model |
|
Predict using the linear model. |
|
Calculate the residuals of the fitted linear model |
|
save params to a netCDF file |
|
read params from a netCDF file |
Auto regression#
|
Select the order of an autoregressive process and potentially calculate the median over ensemble members and scenarios |
|
fit an auto regression and potentially calculate the mean over ensemble members and scenarios |
|
Select the order of an autoregressive process |
|
fit an auto regression |
|
draw time series of an auto regression process |
|
draw time series of an auto regression process with spatially-correlated innovations |
Localized covariance#
|
adjust localized empirical covariance matrix for autoregressive process of order one |
|
determine localized empirical covariance by cross validation |
Smoothing#
|
LOWESS (Locally Weighted Scatterplot Smoothing) for xarray objects |
Gaspari-Cohn correlation matrix#
|
Gaspari-Cohn correlation matrices for a range of localisation radii |
|
smooth, exponentially decaying Gaspari-Cohn correlation function |
Data handling#
Grid manipulation#
|
wrap array with longitude to [-180..180) |
|
wrap array with longitude to [0..360) |
|
Stack a regular lat-lon grid to a 1D (unstructured) grid |
|
unstack an 1D grid to a regular lat-lon grid and align with original coords |
|
unstack an 1D grid to a regular lat-lon grid but do not align |
|
align an unstacked lat-lon grid with its original coords |
Masking regions#
|
mask out ocean using fractional overlap |
|
mask out ocean |
|
mask out ocean |
|
3D mask of the fractional overlap of a set of regions for the given lat/ lon grid |
Weighted operations: calculate global mean#
|
calculate global weighted mean |
|
area weights based on the cosine of the latitude |
|
weighted mean - convenience function which ignores data_vars missing dims |
Geospatial#
|
exact great circle distance based on WSG 84 |
Emulator functions#
Volcanic influence#
|
estimate volcanic influence on temperature residuals using aerosol optical depth observations as proxy |
|
superimpose volcanic influence on smooth temperature anomalies using aerosol optical depth observations as proxy |