nctoolkit.DataSet.annual_anomaly

DataSet.annual_anomaly(self, baseline=None, metric='absolute', window=1)

Calculate annual anomalies for each variable based on a baseline period The anomaly is derived by first calculating the climatological annual mean for the given baseline period. Annual means are then calculated for each year and the anomaly is calculated compared with the baseline mean. This will be calculated on a per-file basis in a multi-file dataset.

Parameters
  • baseline (list) – Baseline years. This needs to be the first and last year of the climatological period. Example: a baseline of [1980,1999] will result in anomalies against the 20 year climatology from 1980 to 1999.

  • metric (str) – Set to “absolute” or “relative”, depending on whether you want the absolute or relative anomaly to be calculated.

  • window (int) – A window for the anomaly. By default window = 1, i.e. the annual anomaly is calculated. If, for example, window = 20, the 20 year rolling means will be used to calculate the anomalies.