ocetrac.measures.get_duration

ocetrac.measures.get_duration(one_obj)

Gets the duration of the time coordinate in an xarray object.

Parameters

one_objxarray.DataArray or xarray.Dataset

The xarray object containing a ‘time’ coordinate.

Returns

int

The number of time steps in the time coordinate.