Duration
Definition
Peak flow duration is the median number of days that a flow event stays over the flow thresholds for the 10, 5, and 2 year recurrence intervals (2nd, 5th, 10th, and 20th percentile exceedance) of annual peak flow over the period of record. This metric is measured in number of days.
Steps
Convert raw data from a single column of dates and a single column of flows into a matrix with columns organized by water year. Each column starts with the beginning of the water year (i.e. 10/1) and ends with the end of water year (9/30).
Calculate the 10%, 20%, and 50% exeedance values of annual peak flow over the entire period of record.
In each water year, create an object each time the flow passes the exceedance value.
For each day flow value is over the exceedance value, the object adds the flow value to an array using the
add_flow
method. Duration is then calculated by finding the length offlow
attribute.
Last updated