min

earthkit.transforms.temporal.min(*_args, **kwargs)[source]

Calculate the minimum 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 (xarray.DataArray or xarray.Dataset) – Data object to reduce

  • 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”. If you do not want to aggregate along the time dimension use earthkit.transforms.aggregate.reduce

  • weights (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 _min

  • 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 of the minimum value in the time dimensions

Return type:

xarray.Dataset | xarray.DataArray