-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More extract features for RDRS #182
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that clisops_subset
is a bit misnamed. I would support a renaming, and may be a move to xscen.spatial
?
We could lower the breakingness of this change by keeping a clisops_wrapper
that emits a FutureWarning for one version.
xscen/extract.py
Outdated
@@ -157,6 +169,7 @@ def extract_dataset( | |||
xr_combine_kwargs: dict = None, | |||
preprocess: Callable = None, | |||
resample_methods: Optional[dict] = None, | |||
mask: Union[bool, xr.Dataset] = False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we also accept a DataArray
?
I don't find the "bool" option very useful, but I see that #183 would complete this feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure for DataArray.
I guess it is only useful for me now that I already have a mask that is in the catalogue.
I just saw that
So as not to duplicate the code twice and have an outdated version, especially since the new function should work perfectly well with the old arguments. |
done! |
In |
Pull Request Checklist:
number
) and pull request (:pull:number
) has been addedWhat kind of change does this PR introduce?
sel
: Instead of cutting on lat-lon (for ERA5-Land), I want to cut in rlat-rlon (for RDRS). I want this to be only defined in the config. I know it is a bit weird to put a non-clisops method in theclisops_subset
function, but I also call this function in my workflow and I need it to cut the region regardless of if it is defined in rlat-rlon or lat-lon. Would it be too much of a breaking change to change the name of the function ?Does this PR introduce a breaking change?
not, if we don't change the name of
clisops_subset
Other information: