xcdat.center_times#

xcdat.center_times(dataset)[source]#

Centers time coordinates using the midpoint between time bounds.

Time coordinates can be recorded using different intervals, including the beginning, middle, or end of the interval. Centering time coordinates, ensures calculations using these values are performed reliably regardless of the recorded interval.

Parameters

dataset (xr.Dataset) – The Dataset with original time coordinates.

Returns

xr.Dataset – The Dataset with centered time coordinates.