relative_anomaly¶
- earthkit.transforms.climatology.relative_anomaly(*_args, **_kwargs)[source]¶
Calculate the relative anomaly from a reference climatology, i.e. percentage change.
- Parameters:
dataarray (xarray.DataArray) – The DataArray over which to calculate the anomaly from the reference climatology. Must contain a time dimension.
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.
climatology_range ((list or tuple, optional)) – Start and end year of the period to be used for the reference climatology. Default is to use the entire time-series.
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
**reduce_kwargs – Any other kwargs that are accepted by earthkit.transforms.aggregate.climatology.mean
- Return type: