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
Rain season index #1256
Rain season index #1256
Conversation
for more information, see https://pre-commit.ci
Co-authored-by: Pascal Bourgault <bourgault.pascal@ouranos.ca>
… into rain_season_index
Co-authored-by: Pascal Bourgault <bourgault.pascal@ouranos.ca>
for more information, see https://pre-commit.ci
… into rain_season_index
Ok, I tried to get a closer notation to what is already used in xclim. e.g. imagine a season with window=3 With this in mind, should I change the name of |
I'm much more a fan of function names that clearly signal what it is that they do. |
Ok sounds good. I just realize, one difference compared with Here, [5,NaN,NaN,NaN,NaN,0,0,0, 3,NaN,NaN, ...] Is this type of output ok for something we would call |
Good point. For a function called events = event_lengths(da, ...)
events.mean()
events.min()
events.mode(), etc. But given the structure, we would be performing operations on |
Yes. In the end,
I thought of We could do without it (at least for now) if that simplifies things |
There's utility in having something at that level, but it would be better to have an issue with a clear justification for it, maybe? It would also potentially affect a number of existing indexes, so knowing which ones before we start implementing it would also be good to know. You could open an issue to discuss it further; I think we have more than covered the features we want to within the scope of this PR. |
Sounds good, I'm dropping it for now and referring this PR in a new issue EDIT: Hmm the tests are explicitly for EDIT2: I re-wrote the tests, they're better like this anyways. Waiting for green arrow |
@coxipi @aulemahal Thanks so much for the work here! |
Pull Request Checklist:
number
) and pull request (:pull:number
) has been addedWhat kind of change does this PR introduce?
Does this PR introduce a breaking change?
No
Other information: