-
Notifications
You must be signed in to change notification settings - Fork 61
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
Thresholded events - Quantified rate2amount #1778
Conversation
@coxipi So I added the ability to find events for each resampling period. I merged in I edited to the comment with some more info. |
After discussion with Mrs Verglas herself, I decided that implementing a freezing rain indicator here was not worth the hassle:
But I did add an application for |
@aulemahal approved (can't approve this PR, I started it) |
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.
Some minor modifs, but looks good from my perspective
Co-authored-by: Éric Dupuis <[email protected]> Co-authored-by: Trevor James Smith <[email protected]>
Pull Request Checklist:
number
) and pull request (:pull:number
) has been addedWhat kind of change does this PR introduce?
thresholded_events
generic compute andfind_events
inrun_length
. The idea is to find all runs defined by a start and a stop condition and return them along an "event" dimension.run_length
that can compute the run_length of sequence determined by two conditions. A first condition determines when runs should start, and a second one determines when they stop. This is calledruns_with_holes
as one possibility with the addtition of the second condition is this: consider a normal run_length, but the second condition allows for holes in thoses sequences, where those holes cannot exceed a given thresholdwindow_stop
.runs_with_holes
is in fact more general, so perhaps another name should be found.rate2amount
andamount2rate
can now accept Quantified (str and Quantities), which then requires passing the time coordinate in as thedim
argument.Does this PR introduce a breaking change?
No
Other information:
For the time being, I removed the references to "freezing rain" as I'm not sure I will need the function in xclim. If I do, then, I'll add it back.