cmip6_downscaling.data.utils.to_standard_calendar

cmip6_downscaling.data.utils.to_standard_calendar#

cmip6_downscaling.data.utils.to_standard_calendar(obj: T_Xarray) T_Xarray[source]#

Convert a Dataset’s calendar to the “standard calendar”

When necessary, “missing” time points are filled in using linear interpolation.

Valid input dataset calendars include: noleap, 365_day, 366_day, and all_leap.

Parameters:
objxr.Dataset or xr.DataArray

Xarray object with a CFTimeIndex.

Returns:
obj_newxr.Dataset or xr.DataArray

Xarray object with standard calendar.

Raises:
ValueError

If an invalid calendar is supplied.