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
MpasTimeSeriesTaskcontaining variables, the anomaly and rolling mean of which is to be computedvariableList (list of str) – variable names to include in the resulting data set
simulationStartTime (str) – the start date of the simulation
startDate (str) – the start and end dates of the time series
endDate (str) – 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.Datasetas input argument and returning anxarray.Dataset
- Returns
 ds (
xarray.Dataset) – The anomaly of the rolling time mean from the start of the simulation