transforms.temporal
Temporal transformations for earthkit data objects.
Typically this is done with an xarray representation of data. Some pandas methods are used for indexing and selecting data.
Functions
|
Calculate the daily maximum. |
|
Return the daily mean of the datacube. |
|
Return the daily median of the datacube. |
|
Calculate the daily minimum. |
|
Group data by day and reduce using the given how method. |
|
Calculate the daily standard deviation. |
|
Calculate the daily sum (accumulation). |
|
Calculate the max of an xarray.dataarray or xarray.dataset along the time/date dimension. |
|
Calculate the mean of an xarray.dataarray or xarray.dataset along the time/date dimension. |
|
Calculate the median of an xarray.dataarray or xarray.dataset along the time/date dimension. |
|
Calculate the mn of an xarray.dataarray or xarray.dataset along the time/date dimension. |
|
Calculate the monthly max. |
|
Calculate the monthly mean. |
|
Calculate the monthly median. |
|
Calculate the monthly min. |
|
Group data by day and reduce using the given how method. |
|
Calculate the monthly standard deviation. |
|
Calculate the monthly sum/accumulation along the time dimension. |
|
Reduce an xarray.dataarray/dataset along the time/date dimension using a specified how method. |
|
Return reduced data using a moving window over the time dimension. |
|
Convert time coordinates to a standard format using the Gregorian calendar. |
|
Calculate the standard deviation of an xarray.dataarray/dataset along the time/date dimension. |
|
Calculate the standard deviation of an xarray.dataarray/dataset along the time/date dimension. |
Package Contents
- transforms.temporal.daily_max(*_args, **kwargs)
Calculate the daily maximum.
- Parameters:
dataarray (
xr.DataArray) – DataArray containing a time dimension.time_dim (
str) – Name of the time dimension, or coordinate, in the xarray object to use for the calculation, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”.time_shift (
(optional) None,timedeltaordict) – A time shift to apply to the data prior to calculation, e.g. to change the local time zone. It can be provided as any object that can be understood by pandas.Timedelta, a dictionary is passed as kwargs to pandas.Timedelta. Default is None.remove_partial_periods (
bool) – If True and a time_shift has been applied, the first and last time steps are removed to ensure equality in sampling periods. Default is False.**kwargs – Keyword arguments to be passed to
reduce().
- Returns:
A dataarray reduced to daily max values
- Return type:
xr.DataArray | xr.Dataset
- transforms.temporal.daily_mean(*_args, **kwargs)
Return the daily mean of the datacube.
- Parameters:
dataarray (
xr.DataArray) – DataArray containing a time dimension.time_dim (
str) – Name of the time dimension, or coordinate, in the xarray object to use for the calculation, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”.time_shift (
(optional) None,timedeltaordict) – A time shift to apply to the data prior to calculation, e.g. to change the local time zone. It can be provided as any object that can be understood by pandas.Timedelta, a dictionary is passed as kwargs to pandas.Timedelta. Default is None.remove_partial_periods (
bool) – If True and a time_shift has been applied, the first and last time steps are removed to ensure equality in sampling periods. Default is False.**kwargs – Keyword arguments to be passed to
reduce().
- Returns:
A dataarray reduced to daily mean values
- Return type:
xr.DataArray | xr.Dataset
- transforms.temporal.daily_median(*_args, **kwargs)
Return the daily median of the datacube.
- Parameters:
dataarray (
xr.DataArray) – DataArray containing a time dimension.time_dim (
str) – Name of the time dimension, or coordinate, in the xarray object to use for the calculation, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”.time_shift (
(optional) None,timedeltaordict) – A time shift to apply to the data prior to calculation, e.g. to change the local time zone. It can be provided as any object that can be understood by pandas.Timedelta, a dictionary is passed as kwargs to pandas.Timedelta. Default is None.remove_partial_periods (
bool) – If True and a time_shift has been applied, the first and last time steps are removed to ensure equality in sampling periods. Default is False.**kwargs – Keyword arguments to be passed to
reduce().
- Returns:
A dataarray reduced to daily median values
- Return type:
xr.DataArray | xr.Dataset
- transforms.temporal.daily_min(*_args, **kwargs)
Calculate the daily minimum.
- Parameters:
dataarray (
xr.DataArray) – DataArray containing a time dimension.time_dim (
str) – Name of the time dimension, or coordinate, in the xarray object to use for the calculation, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”.time_shift (
(optional) None,timedeltaordict) – A time shift to apply to the data prior to calculation, e.g. to change the local time zone. It can be provided as any object that can be understood by pandas.Timedelta, a dictionary is passed as kwargs to pandas.Timedelta. Default is None.remove_partial_periods (
bool) – If True and a time_shift has been applied, the first and last time steps are removed to ensure equality in sampling periods. Default is False.**kwargs – Keyword arguments to be passed to
reduce().
- Returns:
A dataarray reduced to daily min values
- Return type:
xr.DataArray | xr.Dataset
- transforms.temporal.daily_reduce(dataarray, how='mean', time_dim=None, **kwargs)
Group data by day and reduce using the given how method.
- Parameters:
dataarray (
xr.DataArray) – DataArray containing a time dimension.how (
strorcallable) – Method used to reduce data. Default=’mean’, which will implement the xarray in-built mean. If string, it must be an in-built xarray reduce method, a earthkit how method or any numpy method. In the case of duplicate names, method selection is first in the order: xarray, earthkit, numpy. Otherwise it can be any function which can be called in the form f(x, axis=axis, **kwargs) to return the result of reducing an array over an integer valued axistime_dim (
str) – Name of the time dimension, or coordinate, in the xarray object, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”.time_shift (
(optional) None,timedeltaordict) – A time shift to apply to the data prior to calculation, e.g. to change the local time zone. It can be provided as any object that can be understood by pandas.Timedelta, a dictionary is passed as kwargs to pandas.Timedelta. Default is None.remove_partial_periods (
bool) – If True and a time_shift has been applied, the first and last time steps are removed to ensure equality in sampling periods. Default is False.how_label (
str) – Label to append to the name of the variable in the reduced object, default is _daily_{how}**kwargs – Keyword arguments to be passed to
reduce().
- Returns:
A dataarray reduced to daily values using the specified method
- Return type:
xr.DataArray | xr.Dataset
- transforms.temporal.daily_std(*_args, **kwargs)
Calculate the daily standard deviation.
- Parameters:
dataarray (
xr.DataArray) – DataArray containing a time dimension.time_dim (
str) – Name of the time dimension, or coordinate, in the xarray object to use for the calculation, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”.time_shift (
(optional) None,timedeltaordict) – A time shift to apply to the data prior to calculation, e.g. to change the local time zone. It can be provided as any object that can be understood by pandas.Timedelta, a dictionary is passed as kwargs to pandas.Timedelta. Default is None.remove_partial_periods (
bool) – If True and a time_shift has been applied, the first and last time steps are removed to ensure equality in sampling periods. Default is False.**kwargs – Keyword arguments to be passed to
reduce().
- Returns:
A dataarray reduced to daily standard deviation values
- Return type:
xr.DataArray | xr.Dataset
- transforms.temporal.daily_sum(*_args, **kwargs)
Calculate the daily sum (accumulation).
- Parameters:
dataarray (
xr.DataArray) – DataArray containing a time dimension.time_dim (
str) – Name of the time dimension, or coordinate, in the xarray object to use for the calculation, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”.time_shift (
(optional) None,timedeltaordict) – A time shift to apply to the data prior to calculation, e.g. to change the local time zone. It can be provided as any object that can be understood by pandas.Timedelta, a dictionary is passed as kwargs to pandas.Timedelta. Default is None.remove_partial_periods (
bool) – If True and a time_shift has been applied, the first and last time steps are removed to ensure equality in sampling periods. Default is False.**kwargs – Keyword arguments to be passed to
reduce().
- Returns:
A dataarray reduced to daily sum values
- Return type:
xr.DataArray | xr.Dataset
- transforms.temporal.max(*_args, **kwargs)
Calculate the max of an xarray.dataarray or xarray.dataset along the time/date dimension.
With the option to apply weights either directly or using a specified weights method.
- Parameters:
dataarray (
xr.DataArrayorxr.Dataset) – Data object to reducetime_dim (
str) – Name of the time dimension, or coordinate, in the xarray object, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”. If you do not want to aggregate along the time dimension use earthkit.transforms.aggregate.reduceweights (
str) – Choose a recognised method to apply weighting. Currently available methods are; ‘latitude’how_label (
str) – Label to append to the name of the variable in the reduced object, default is _meanhow_dropna (
str) – Choose how to drop nan values. Default is None and na values are preserved. Options are ‘any’ and ‘all’.**kwargs – kwargs recognised by the how :func: earthkit.transforms.aggregate.reduce
- Returns:
A dataarray of the maximum value in the time dimensions
- Return type:
xr.Dataset | xr.DataArray
- transforms.temporal.mean(*_args, **kwargs)
Calculate the mean of an xarray.dataarray or xarray.dataset along the time/date dimension.
With the option to apply weights either directly or using a specified weights method.
- Parameters:
dataarray (
xr.DataArrayorxr.Dataset) – Data object to reducetime_dim (
str) – Name of the time dimension, or coordinate, in the xarray object, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”. If you do not want to aggregate along the time dimension use earthkit.transforms.aggregate.reduceweights (
str) – Choose a recognised method to apply weighting. Currently available methods are; ‘latitude’how_label (
str) – Label to append to the name of the variable in the reduced object, default is _meanhow_dropna (
str) – Choose how to drop nan values. Default is None and na values are preserved. Options are ‘any’ and ‘all’.**kwargs – kwargs recognised by the how :func: earthkit.transforms.aggregate.reduce
- Returns:
A dataarray of the mean value in the time dimensions
- Return type:
xr.Dataset | xr.DataArray
- transforms.temporal.median(*_args, **kwargs)
Calculate the median of an xarray.dataarray or xarray.dataset along the time/date dimension.
With the option to apply weights either directly or using a specified weights method.
- Parameters:
dataarray (
xr.DataArrayorxr.Dataset) – Data object to reducetime_dim (
str) – Name of the time dimension, or coordinate, in the xarray object, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”. If you do not want to aggregate along the time dimension use earthkit.transforms.aggregate.reduceweights (
str) – Choose a recognised method to apply weighting. Currently available methods are; ‘latitude’how_label (
str) – Label to append to the name of the variable in the reduced object, default is _meanhow_dropna (
str) – Choose how to drop nan values. Default is None and na values are preserved. Options are ‘any’ and ‘all’.**kwargs – kwargs recognised by the how :func: earthkit.transforms.aggregate.reduce
- Returns:
A dataarray of the median value in the time dimensions
- Return type:
xr.Dataset | xr.DataArray
- transforms.temporal.min(*_args, **kwargs)
Calculate the mn of an xarray.dataarray or xarray.dataset along the time/date dimension.
With the option to apply weights either directly or using a specified weights method.
- Parameters:
dataarray (
xr.DataArrayorxr.Dataset) – Data object to reducetime_dim (
str) – Name of the time dimension, or coordinate, in the xarray object, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”. If you do not want to aggregate along the time dimension use earthkit.transforms.aggregate.reduceweights (
str) – Choose a recognised method to apply weighting. Currently available methods are; ‘latitude’how_label (
str) – Label to append to the name of the variable in the reduced object, default is _meanhow_dropna (
str) – Choose how to drop nan values. Default is None and na values are preserved. Options are ‘any’ and ‘all’.**kwargs – kwargs recognised by the how :func: earthkit.transforms.aggregate.reduce
- Returns:
A dataarray of the minimum value in the time dimensions
- Return type:
xr.Dataset | xr.DataArray
- transforms.temporal.monthly_max(*_args, **kwargs)
Calculate the monthly max.
- Parameters:
dataarray (
xr.DataArray) – DataArray containing a time dimension.time_dim (
str) – Name of the time dimension, or coordinate, in the xarray object to use for the calculation, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”.time_shift (
(optional) None,timedeltaordict) – A time shift to apply to the data prior to calculation, e.g. to change the local time zone. It can be provided as any object that can be understood by pandas.Timedelta, a dictionary is passed as kwargs to pandas.Timedelta. Default is None.remove_partial_periods (
bool) – If True and a time_shift has been applied, the first and last time steps are removed to ensure equality in sampling periods. Default is False.**kwargs – Keyword arguments to be passed to
resample().
- Returns:
A dataarray reduced to monthly maximum values
- Return type:
xr.DataArray | xr.Dataset
- transforms.temporal.monthly_mean(*_args, **kwargs)
Calculate the monthly mean.
- Parameters:
dataarray (
xr.DataArray) – DataArray containing a time dimension.time_dim (
str) – Name of the time dimension, or coordinate, in the xarray object to use for the calculation, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”.time_shift (
(optional) None,timedeltaordict) – A time shift to apply to the data prior to calculation, e.g. to change the local time zone. It can be provided as any object that can be understood by pandas.Timedelta, a dictionary is passed as kwargs to pandas.Timedelta. Default is None.remove_partial_periods (
bool) – If True and a time_shift has been applied, the first and last time steps are removed to ensure equality in sampling periods. Default is False.**kwargs – Keyword arguments to be passed to
resample().
- Returns:
A dataarray reduced to monthly mean values
- Return type:
xr.DataArray | xr.Dataset
- transforms.temporal.monthly_median(*_args, **kwargs)
Calculate the monthly median.
- Parameters:
dataarray (
xr.DataArray) – DataArray containing a time dimension.time_dim (
str) – Name of the time dimension, or coordinate, in the xarray object to use for the calculation, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”.time_shift (
(optional) None,timedeltaordict) – A time shift to apply to the data prior to calculation, e.g. to change the local time zone. It can be provided as any object that can be understood by pandas.Timedelta, a dictionary is passed as kwargs to pandas.Timedelta. Default is None.remove_partial_periods (
bool) – If True and a time_shift has been applied, the first and last time steps are removed to ensure equality in sampling periods. Default is False.**kwargs – Keyword arguments to be passed to
resample().
- Returns:
A dataarray reduced to monthly median values
- Return type:
xr.DataArray | xr.Dataset
- transforms.temporal.monthly_min(*_args, **kwargs)
Calculate the monthly min.
- Parameters:
dataarray (
xr.DataArray) – DataArray containing a time dimension.time_dim (
str) – Name of the time dimension, or coordinate, in the xarray object to use for the calculation, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”.time_shift (
(optional) None,timedeltaordict) – A time shift to apply to the data prior to calculation, e.g. to change the local time zone. It can be provided as any object that can be understood by pandas.Timedelta, a dictionary is passed as kwargs to pandas.Timedelta. Default is None.remove_partial_periods (
bool) – If True and a time_shift has been applied, the first and last time steps are removed to ensure equality in sampling periods. Default is False.**kwargs – Keyword arguments to be passed to
resample().
- Returns:
A dataarray reduced to monthly minimum values
- Return type:
xr.DataArray | xr.Dataset
- transforms.temporal.monthly_reduce(dataarray, how='mean', time_dim=None, **kwargs)
Group data by day and reduce using the given how method.
- Parameters:
dataarray (
xr.DataArray) – DataArray containing a time dimension.how (
strorcallable) – Method used to reduce data. Default=’mean’, which will implement the xarray in-built mean. If string, it must be an in-built xarray reduce method, a earthkit how method or any numpy method. In the case of duplicate names, method selection is first in the order: xarray, earthkit, numpy. Otherwise it can be any function which can be called in the form f(x, axis=axis, **kwargs) to return the result of reducing an array over an integer valued axistime_dim (
str) – Name of the time dimension, or coordinate, in the xarray object to use for the calculation, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”.time_shift (
(optional) None,timedeltaordict) – A time shift to apply to the data prior to calculation, e.g. to change the local time zone. It can be provided as any object that can be understood by pandas.Timedelta, a dictionary is passed as kwargs to pandas.Timedelta. Default is None.remove_partial_periods (
bool) – If True and a time_shift has been applied, the first and last time steps are removed to ensure equality in sampling periods. Default is False.how_label (
str) – Label to append to the name of the variable in the reduced object, default is _monthly_{how}**kwargs – Keyword arguments to be passed to
reduce().
- Returns:
A dataarray reduced to monthly values using the specified method
- Return type:
xr.DataArray | xr.Dataset
- transforms.temporal.monthly_std(*_args, **kwargs)
Calculate the monthly standard deviation.
- Parameters:
dataarray (
xr.DataArray) – DataArray containing a time dimension.time_dim (
str) – Name of the time dimension, or coordinate, in the xarray object to use for the calculation, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”.time_shift (
(optional) None,timedeltaordict) – A time shift to apply to the data prior to calculation, e.g. to change the local time zone. It can be provided as any object that can be understood by pandas.Timedelta, a dictionary is passed as kwargs to pandas.Timedelta. Default is None.remove_partial_periods (
bool) – If True and a time_shift has been applied, the first and last time steps are removed to ensure equality in sampling periods. Default is False.**kwargs – Keyword arguments to be passed to
resample().
- Returns:
A dataarray reduced to monthly standard deviation values
- Return type:
xr.DataArray | xr.Dataset
- transforms.temporal.monthly_sum(*_args, **kwargs)
Calculate the monthly sum/accumulation along the time dimension.
- Parameters:
dataarray (
xr.DataArray) – DataArray containing a time dimension.time_dim (
str) – Name of the time dimension, or coordinate, in the xarray object to use for the calculation, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”.time_shift (
(optional) None,timedeltaordict) – A time shift to apply to the data prior to calculation, e.g. to change the local time zone. It can be provided as any object that can be understood by pandas.Timedelta, a dictionary is passed as kwargs to pandas.Timedelta. Default is None.remove_partial_periods (
bool) – If True and a time_shift has been applied, the first and last time steps are removed to ensure equality in sampling periods. Default is False.**kwargs – Keyword arguments to be passed to
resample().
- Returns:
A dataarray reduced to monthly sum values
- Return type:
xr.DataArray | xr.Dataset
- transforms.temporal.reduce(dataarray, *_args, time_dim=None, **kwargs)
Reduce an xarray.dataarray/dataset along the time/date dimension using a specified how method.
With the option to apply weights either directly or using a specified weights method.
- Parameters:
dataarray (
xr.DataArrayorxr.Dataset) – Data object to reducetime_dim (
str) – Name of the time dimension, or coordinate, in the xarray object, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”. If you do not want to aggregate along the time dimension use earthkit.transforms.aggregate.reducehow (
strorcallable) – Method used to reduce data. Default=’mean’, which will implement the xarray in-built mean. If string, it must be an in-built xarray reduce method, a earthkit how method or any numpy method. In the case of duplicate names, method selection is first in the order: xarray, earthkit, numpy. Otherwise it can be any function which can be called in the form f(x, axis=axis, **kwargs) to return the result of reducing an array over an integer valued axisweights (
str) – Choose a recognised method to apply weighting. Currently available methods are; ‘latitude’how_label (
str) – Label to append to the name of the variable in the reduced object, default is _{how}how_dropna (
str) – Choose how to drop nan values. Default is None and na values are preserved. Options are ‘any’ and ‘all’.**kwargs – kwargs recognised by the how :func: earthkit.transforms.aggregate.reduce
- Returns:
A dataarray reduced in the time dimension using the specified method
- Return type:
xr.Dataset | xr.DataArray
- transforms.temporal.rolling_reduce(dataarray, window_length=None, time_dim=None, **kwargs)
Return reduced data using a moving window over the time dimension.
- Parameters:
dataarray (
xr.DataArrayorxr.Dataset) – Data over which the moving window is applied according to the reduction method.window_length – Length of window for the rolling groups along the time dimension. see documentation for xarray.dataarray.rolling.
time_dim (
str) – Name of the time dimension, or coordinate, in the xarray object, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”.min_periods (
integer) – The minimum number of observations in the window required to have a value (otherwise result is NaN). Default is to set min_periods equal to the size of the window. see documentation for xarray.dataarray.rollingcenter (
bool) – Set the labels at the centre of the window, see documentation for xarray.dataarray.rolling.how_reduce (
str,) – Function to be applied for reduction. Default is ‘mean’.how_dropna (
str) – Determine if dimension is removed from the output when we have at least one NaN or all NaN. how_dropna can be ‘None’, ‘any’ or ‘all’. Default is ‘any’.windows (
dict[str,int]) – Any other windows to apply to other dimensions in the dataset/dataarray**kwargs – Any kwargs that are compatible with the select how_reduce method.
- Returns:
A dataarray reduced values with a rolling window applied along the time dimension.
- Return type:
xr.DataArray | xr.Dataset
- transforms.temporal.standardise_time(dataarray, target_format='%Y-%m-%d %H:%M:%S', time_dim=None)
Convert time coordinates to a standard format using the Gregorian calendar.
This function is helpful when combining data from different sources with different time standards or calendars - for example, when combining data which uses a 360-day calendar with data which uses a Gregorian calendar. All data passed into this function will be converted to a standard Gregorian calendar format.
- Parameters:
dataarray (
xr.Datasetorxr.DataArray) – Data object with a time coordinate to be standardised.target_format (
str, optional) – Datetime format to use when creating the standardised datetime object. This can be used to change the resolution of the datetime object - for example, “%Y-%m-%d” will reduce to daily resolution - or to fix elements of the datetime object - for example, “%Y-%m-15” would reduce to monthly resolution and fix the date to the 15th of each month.time_dim (
str, optional) – Name of the time dimension, or coordinate, in the xarray object to use for the calculation, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”. If you do not want to aggregate along the time dimension use earthkit.transforms.aggregate.reduce
- Returns:
Data object with the time coordinate standardised to the specified format
- Return type:
xr.Dataset | xr.DataArray
- transforms.temporal.std(*_args, **kwargs)
Calculate the standard deviation of an xarray.dataarray/dataset along the time/date dimension.
With the option to apply weights either directly or using a specified weights method.
- Parameters:
dataarray (
xr.DataArrayorxr.Dataset) – Data object to reducetime_dim (
str) – Name of the time dimension, or coordinate, in the xarray object, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”. If you do not want to aggregate along the time dimension use earthkit.transforms.aggregate.reduceweights (
str) – Choose a recognised method to apply weighting. Currently available methods are; ‘latitude’how_label (
str) – Label to append to the name of the variable in the reduced object, default is _meanhow_dropna (
str) – Choose how to drop nan values. Default is None and na values are preserved. Options are ‘any’ and ‘all’.**kwargs – kwargs recognised by the how :func: earthkit.transforms.aggregate.reduce
- Returns:
A dataarray of the standard deviation in the time dimensions
- Return type:
xr.Dataset | xr.DataArray
- transforms.temporal.sum(*_args, **kwargs)
Calculate the standard deviation of an xarray.dataarray/dataset along the time/date dimension.
With the option to apply weights either directly or using a specified weights method.
- Parameters:
dataarray (
xr.DataArrayorxr.Dataset) – Data object to reducetime_dim (
str) – Name of the time dimension, or coordinate, in the xarray object, default behaviour is to deduce time dimension from attributes of coordinates, then fall back to “time”. If you do not want to aggregate along the time dimension use earthkit.transforms.aggregate.reduceweights (
str) – Choose a recognised method to apply weighting. Currently available methods are; ‘latitude’how_label (
str) – Label to append to the name of the variable in the reduced object, default is _meanhow_dropna (
str) – Choose how to drop nan values. Default is None and na values are preserved. Options are ‘any’ and ‘all’.**kwargs – kwargs recognised by the how :func: earthkit.transforms.aggregate.reduce
- Returns:
A dataarray summed in the time dimensions
- Return type:
xr.Dataset | xr.DataArray