In multiple functions, we use a periods argument to subset the Dataset. However we simply do ds_subset = ds.sel(time=slice(period[0], period[1])), which never checks that the entire period is contained within ds.
Potential Solution
A wrapper function in xs.utils that checks that the entire period is contained within ds, and raises an error if it doesn't.
Additional context
Linked to an issue in #360.
Contribution
[ ] I would be willing/able to open a Pull Request to contribute this feature.
Addressing a Problem?
In multiple functions, we use a
periods
argument to subset the Dataset. However we simply dods_subset = ds.sel(time=slice(period[0], period[1]))
, which never checks that the entire period is contained withinds
.Potential Solution
A wrapper function in
xs.utils
that checks that the entire period is contained withinds
, and raises an error if it doesn't.Additional context
Linked to an issue in #360.
Contribution