Timing
Definition
The timing of the start of the spring recession is identified as the point in which an overall decrease in flow occurs, following the water year's high flows during winter. The start date of the spring recession period is meant to capture the beginning of the period during which winter baseflow gradually recedes down to summer baseflow. This metric is measured in Julian days, where January 1st = 1 and December 31st = 365.
Steps
Convert raw date and flow data columns into a flow matrix based on water year. Each column starts with the beginning of the water year (e.g. 10/1) and ends with the end of the water year (e.g. 9/30).
Check if the data contains more than the maximum allowed
None
andzero
data:Apply a heavy Gaussian filter to smooth the raw flow input:
Find the peaks and valleys of the filtered data, and use these to identify the last (rightmost) major peak event.
Set a search window (default 20 days before and 50 days after) around the identified peak event and apply a smaller Gaussian filter (less smoothing) to the windowed data.
Fit a spline curve to the filtered data in this region, then calculate the first derivative of the spline and find all points where the derivative crosses zero. This identifies an array of local peaks based on timing of the sign change from positive to negative.
Loop through the array of peaks found in step 6 to identify the last (rightmost) peak which fills the following requirements:
The 4 preceding days are increasing continuously, with a certain degree of increase.
The relative flow (Q-Qmin) magnitude must be at least 50% of peak relative flow magnitude (Qmax-Qmin). Qmin and Qmax are calculated as the smoothed minimum and maximum flows within the search window.
Timing occurs before a user-defined cutoff set near the end of the water year, and timing is set before that year's dry season start timing.
Search the unfiltered data 4 days before and 7 days after the identified start date. Change the start of spring date to the highest flow date within this range.
Finally, shift the start date 4 days after the date just identified. This is meant to eliminate the flow effects of isolated storms as much as possible.
Last updated