diagnostic.functions.time_series_trend#
- time_series_trend(ds: Dataset, window_size, min_periods: int = None, center: bool = True, **window_kwargs)[source]#
- Calculate the trend of the time series data. If lat and lon are present, the data is averaged over the spatial dimensions lat and lon. - Parameters:
- ds (xr.Dataset) – The data to calculate the trend of. 
- window_size (int) – The size - in number of time steps - of the window to use for the rolling average. 
- min_periods (int, optional) – The minimum number of periods required for a value to be considered valid, by default None 
- center (bool, optional) – If True, the value is placed in the center of the window, by default True 
 
- Returns:
- The trend of the data. 
- Return type:
- xr.Dataset