transforms.ensemble =================== .. py:module:: transforms.ensemble .. autoapi-nested-parse:: Ensemble transformations for earthkit data objects. Typically this is done with an xarray representation of data. Attributes ---------- .. autoapisummary:: transforms.ensemble.standard_deviation Functions --------- .. autoapisummary:: transforms.ensemble.max transforms.ensemble.mean transforms.ensemble.min transforms.ensemble.reduce transforms.ensemble.std transforms.ensemble.sum Package Contents ---------------- .. py:function:: max(*args, **kwargs) Calculate the ensemble maximum. :param dataarray: The DataArray over which to calculate the climatological mean. Must contain a `time` dimension. :type dataarray: :py:class:`xr.DataArray | xr.Dataset` :param dim: Name of the ensemble dimension in the data object, default behaviour is to detect the ensemble dimension from the input object. :type dim: :py:class:`str (optional)` :param \*args: Additional arguments and keyword arguments to pass to the underlying reduce function. :param \*\*kwargs: Additional arguments and keyword arguments to pass to the underlying reduce function. .. py:function:: mean(*args, **kwargs) Calculate the ensemble mean. :param dataarray: The DataArray over which to calculate the climatological mean. Must contain a `time` dimension. :type dataarray: :py:class:`xr.DataArray | xr.Dataset` :param dim: Name of the ensemble dimension in the data object, default behaviour is to detect the ensemble dimension from the input object. :type dim: :py:class:`str (optional)` :param \*args: Additional arguments and keyword arguments to pass to the underlying reduce function. :param \*\*kwargs: Additional arguments and keyword arguments to pass to the underlying reduce function. .. py:function:: min(*args, **kwargs) Calculate the ensemble minimum. :param dataarray: The DataArray over which to calculate the climatological mean. Must contain a `time` dimension. :type dataarray: :py:class:`xr.DataArray | xr.Dataset` :param dim: Name of the ensemble dimension in the data object, default behaviour is to detect the ensemble dimension from the input object. :type dim: :py:class:`str (optional)` :param \*args: Additional arguments and keyword arguments to pass to the underlying reduce function. :param \*\*kwargs: Additional arguments and keyword arguments to pass to the underlying reduce function. .. py:function:: reduce(dataarray, how = 'mean', dim = None) Reduce data over the ensemble dimension. :param dataarray: The DataArray over which to calculate the climatological mean. Must contain a `time` dimension. :type dataarray: :py:class:`xr.DataArray | xr.Dataset` :param how: 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, an 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 np.ndarray over an integer valued axis. :type how: :py:class:`str` or :py:class:`callable` :param dim: Name of the ensemble dimension in the data object, default behaviour is to detect the ensemble dimension from the input object. :type dim: :py:class:`str (optional)` .. py:function:: std(*args, **kwargs) Calculate the ensemble standard deviation. :param dataarray: The DataArray over which to calculate the climatological mean. Must contain a `time` dimension. :type dataarray: :py:class:`xr.DataArray | xr.Dataset` :param dim: Name of the ensemble dimension in the data object, default behaviour is to detect the ensemble dimension from the input object. :type dim: :py:class:`str (optional)` :param \*args: Additional arguments and keyword arguments to pass to the underlying reduce function. :param \*\*kwargs: Additional arguments and keyword arguments to pass to the underlying reduce function. .. py:function:: sum(*args, **kwargs) Calculate the ensemble sum. :param dataarray: The DataArray over which to calculate the climatological sum. Must contain a `time` dimension. :type dataarray: :py:class:`xr.DataArray | xr.Dataset` :param dim: Name of the ensemble dimension in the data object, default behaviour is to detect the ensemble dimension from the input object. :type dim: :py:class:`str (optional)` :param \*args: Additional arguments and keyword arguments to pass to the underlying reduce function. :param \*\*kwargs: Additional arguments and keyword arguments to pass to the underlying reduce function. .. py:data:: standard_deviation