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
- timeSeriesFileNamestr
a file produced by
MpasTimeSeriesTask
containing variables, the anomaly and rolling mean of which is to be computed- variableListlist of str
variable names to include in the resulting data set
- simulationStartTimestr
the start date of the simulation
- startDate, endDatestr
the start and end dates of the time series
- calendar{‘gregorian’, ‘gregoraian_noleap’}
The calendar used in the MPAS run
- movingAveragePointsint, optional
The number of points (months) over which to perform the rolling average of the data set
- alter_datasetfunction
A function for manipulating the data set (e.g. computing new variables), taking an
xarray.Dataset
as input argument and returning anxarray.Dataset
- Returns
- ds
xarray.Dataset
The anomaly of the rolling time mean from the start of the simulation
- ds