xarray.Dataset.cf.differentiate

Dataset.cf.differentiate(coord, *xr_args, positive_upward=False, **xr_kwargs)

Differentiate an xarray object.

Parameters:
coordHashable

The coordinate used to compute the gradient.

positive_upwardoptional, bool

Change sign of the derivative based on the "positive" attribute of coord so that positive values indicate increasing upward. If positive=="down", then multiplied by -1.

Returns:
DataArray or Dataset

Differentiated object.

Notes

xr_args, xr_kwargs are passed directly to the underlying xarray function.