mesmer.stats.predict_harmonic_model#
- mesmer.stats.predict_harmonic_model(yearly_predictor, coeffs, time, time_dim='time')#
construct a Fourier Series from yearly predictors with fitted coeffs.
- Parameters:
yearly_predictor (xr.DataArray of shape (n_years, n_gridcells)) – Predictor containing one value per year.
coeffs (xr.DataArray of shape (n_gridcells, n_coeffs)) – coefficients of Fourier Series for each gridcell. Note that coeffs may contain nans (for higher orders, that have not been fit).
time (xr.DataArray of shape (n_years * 12)) – A
xr.DataArray
containing cftime objects which will be used as coordinates for the monthly output valuestime_dim (str, default: “time”) – Name for the time dimension of the output
xr.DataArray
.
- Returns:
predictions (xr.DataArray of shape (n_years * 12, n_gridcells)) – Fourier Series calculated over yearly_predictor with coeffs.