std

earthkit.transforms.temporal.std(*_args, **kwargs) Dataset | DataArray[source]

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 (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 _std

  • 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 standard deviation in the time dimensions

Return type:

xarray.Dataset | xarray.DataArray