transforms.tools
Attributes
Functions
|
|
|
|
|
|
|
|
|
A merge of the functionality of np.nanmean and np.average. |
|
Implement any standard weights functions included in earthkit-transforms. |
|
xarray.DataArray wrapper for latitude_weights. |
|
|
|
Return the key of the dimension. |
|
|
|
|
|
Module Contents
- transforms.tools.ensure_list(thing)
- transforms.tools.time_dim_decorator(func)
- transforms.tools.GROUPBY_KWARGS = ['frequency', 'bin_widths', 'squeeze']
- transforms.tools.groupby_kwargs_decorator(func)
- transforms.tools.season_order_decorator(func)
A merge of the functionality of np.nanmean and np.average.
- Parameters:
data (
numpy array)weights (
Weightstoapplytothe data for averaging.) – Weights will be normalised and must correspond to the shape of the numpy data array and axis/axes that is/are averaged over.axis (
axis/axestocompute the nanaverage over.)kwargs (
any other np.nansum kwargs)
- Returns:
numpy array meanofdata (along axis) where nan-values are ignoredand weights applied if provided.
- transforms.tools.standard_weights(dataarray, weights, **kwargs)
Implement any standard weights functions included in earthkit-transforms.
- transforms.tools.latitude_weights(dataarray, lat_key=None)
xarray.DataArray wrapper for latitude_weights.
Detects the spatial dimensions latitude must be a coordinate of the dataarray.
- transforms.tools.HOW_METHODS
- transforms.tools.WEIGHTED_HOW_METHODS
- transforms.tools.ALLOWED_LIBS
- transforms.tools.WEIGHTS_DICT
- transforms.tools.get_how(how, how_methods=HOW_METHODS)
- transforms.tools.STANDARD_AXIS_KEYS: dict[str, list[str]]
- transforms.tools.get_dim_key(dataarray, axis)
Return the key of the dimension.
- transforms.tools.get_spatial_info(dataarray, lat_key=None, lon_key=None)
- transforms.tools.groupby_time(dataarray, frequency=None, bin_widths=None, squeeze=False, time_dim='time')
- transforms.tools.groupby_bins(dataarray, frequency, bin_widths=1, squeeze=False, time_dim='time')