anomaly¶
- earthkit.transforms.climatology.anomaly(dataarray: Dataset | DataArray, climatology: Dataset | DataArray, **_kwargs) Dataset | DataArray[source]¶
Calculate the anomaly from a reference climatology.
- Parameters:
dataarray (xarray.DataArray) – The DataArray over which to calculate the anomaly from the reference climatology. Must contain a time dimension indicated by time_dim.
climatology ((xarray.DataArray, optional)) – Reference climatology data against which the anomaly is to be calculated. If not provided then the climatological mean is calculated from dataarray.
frequency (str (optional)) – Valid options are day, week and month.
bin_widths (int or list (optional)) – If bin_widths is an int, it defines the width of each group bin on the frequency provided by frequency. If bin_widths is a sequence it defines the edges of each bin, allowing for non-uniform bin widths.
time_dim (str (optional)) – Name of the time dimension in the data object, default behaviour is to detect the time dimension from the input object
relative (bool (optional)) – Return the relative anomaly, i.e. the percentage change w.r.t the climatological period
**reduce_kwargs – Any other kwargs that are accepted by earthkit.transforms.aggregate.climatology.mean
- Return type: