As Sem noticed (#79), having data of the type pd.Interval will prevent users from saving their xr.Dataset to netCDF. Therefore we decided on converting the intervals to bounds, following CF conventions.
This PR adds a utility function that will convert the intervals of the resampled data to bounds, and this function is called at the end of the resample_xarray routine.
To ensure that the calendar-resampled data can always be written to a netcdf file, a test was added for this functionality.
The resampled data will now look like the following. Changes are in bold.
As Sem noticed (#79), having data of the type
pd.Interval
will prevent users from saving theirxr.Dataset
to netCDF. Therefore we decided on converting the intervals to bounds, following CF conventions.This PR adds a utility function that will convert the intervals of the resampled data to bounds, and this function is called at the end of the
resample_xarray
routine.To ensure that the calendar-resampled data can always be written to a netcdf file, a test was added for this functionality.
The resampled data will now look like the following. Changes are in bold.