mpas_analysis.shared.time_series.compute_moving_avg_anomaly_from_start

mpas_analysis.shared.time_series.compute_moving_avg_anomaly_from_start(timeSeriesFileName, variableList, anomalyStartTime, anomalyEndTime, startDate, endDate, calendar, movingAveragePoints=12, alter_dataset=None)[source]

Compute the rolling mean of the anomaly of a quantity from the beginning of the simulation (such that the rolling mean starts at zero by definition)

Parameters
  • timeSeriesFileName (str) – a file produced by MpasTimeSeriesTask containing variables, the anomaly and rolling mean of which is to be computed

  • variableList (list of str) – variable names to include in the resulting data set

  • simulationStartTime (str) – the start date of the simulation

  • endDate (startDate,) – the start and end dates of the time series

  • calendar ({'gregorian', 'gregoraian_noleap'}) – The calendar used in the MPAS run

  • movingAveragePoints (int, optional) – The number of points (months) over which to perform the rolling average of the data set

  • alter_dataset (function) – A function for manipulating the data set (e.g. computing new variables), taking an xarray.Dataset as input argument and returning an xarray.Dataset

Returns

ds (xarray.Dataset) – The anomaly of the rolling time mean from the start of the simulation