-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add glob to create_ensembles and mention flox in doc. #1081
Conversation
Oh! Well @dcherian, it looks like I'll test in more details on my side. |
Yeah I had to make some tests a little looser w.r.t precision. The other failures look real :( NaNs in the wrong place; grouping by cftime; |
I noticed in some places you're using
|
Co-authored-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com>
Some errors are caused by the resampling of |
Most other errors seem to be because of pydata/xarray#6615: Xclim extensively resamples and sums over boolean values. The older xclim code usually explicitly casted those boolean arrays to int by multiplying by 1. But the newer code assumes the implicit behaviour from numpy/xarray and these parts are now broken. |
@tlogan2000 This is ready for review. |
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.
This looks good to me! @dcherian thank-you for this addition to xarray I think xclim peformance will benefit a lot from this change.
@aulemahal @dcherian just so it's clear in my mind : what is expected behavior going forward on something like (xr.DataArray() > thresh).resample(time='YS').sum(dim='time')
? Will the booleans be cast to ints in the end with flox
?
Yes it will promote bool to int before aggregating. (xarray-contrib/flox@01b1afe). You could require |
@dcherian Thanks again for your work and considerations! |
Pull Request Checklist:
number
) and pull request (:pull:number
) has been addedbumpversion patch
has been called on this branch.zenodo.json
What kind of change does this PR introduce?
create_ensemble
instead of a list of path.flox
to the upstream test suite.flox
in the installation instructions.clisops
to the extra section.Does this PR introduce a breaking change?
No.
Other information:
This is a very minor change, more like a reason to trigger the github actions and run all tests, including the one against xarray's main branch.