- geocat.comp.climatologies._calculate_center_of_time_bounds(dset, time_dim, freq, calendar, start, end, keep_attrs=None)#
Helper function to determine the time bounds based on the given dataset and frequency and then calculate the averages of them.
Returns the dataset with the time coordinate changed to the center of the time bounds.
str) – Name of the time coordinate for xarray objects
str) – Alias for the frequency of the adjusted timestamps (i.e. daily, monthly)
str) – Alias for the calendar the time stamps are in (i.e. gregorian, no leap years)
bool, optional) – If True, attrs will be copied from the original object to the new one. If False, the new object will be returned without attributes. Defaults to None which means the attrs will only be kept in unambiguous circumstances.
See xarray.cftime_range for accepted values for freq and calendar.