-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparams.py
More file actions
91 lines (86 loc) · 5.67 KB
/
params.py
File metadata and controls
91 lines (86 loc) · 5.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
winter_params = {
'max_zero_allowed_per_year': 270,
'max_nan_allowed_per_year': 36,
'max_consecutive_nan_allowed_per_year': 7
}
fall_params = {
'max_zero_allowed_per_year': 270,
'max_nan_allowed_per_year': 36,
'max_consecutive_nan_allowed_per_year': 7,
'min_flow_rate': 1, # Don't calculate flow metrics if max flow is below this value.
'sigma': 0.2, # Smaller filter to find fall flush peak
'broad_sigma': 15, # Larger filter to find wet season peak
'wet_season_sigma': 12, # Medium sigma to find wet season initiation peak
'peak_sensitivity': 0.005, # smaller value detects more peaks
'peak_sensitivity_wet': .005, # larger value used for detection of wet season initiation
'max_flush_duration': 40, # Maximum duration from start to end, for fall flush peak
'min_flush_percentage': 0.10, # minimum flush, to satisfy the min required to be called a flush
'wet_threshold_perc': 0.2, # Return to wet season flow must be certain percentage of that year's max flow
'peak_detect_perc': 0.30, # The peak identified to search after for wet season initiation
'flush_threshold_perc': 0.30, # Size of flush peak, from rising limb to top of peak, has great enough change
'min_flush_threshold': 1, # minimum allowable magnitude threshold for fall flush flow
'date_cutoff': 75, # Latest accepted date for fall flush, in Julian Date counting from Oct 1st = 0. (i.e. Dec 15th = 75)
'slope_sensitivity': 500 # Sets sensitivity of slope requirement for wet season start time.
# Increasing sensitivity decreases the slope value threshold, which can push the start time earlier.
}
spring_params = {
'max_zero_allowed_per_year': 270,
'max_nan_allowed_per_year': 36,
'max_consecutive_nan_allowed_per_year': 7,
'max_peak_flow_date': 350, # max search date for the peak flow date
'search_window_left': 20, # left side of search window set around max peak
'search_window_right': 50, # right side of search window set around max peak
'peak_sensitivity': 0.1, # smaller':> more peaks detection
# Relative flow (Q-Qmin) of start of spring must be certain percentage of peak relative flow (Qmax-Qmin)
'peak_filter_percentage': 0.5,
# If filtered max flow is below this, automatically set spring timing to max flow
'min_max_flow_rate': .1,
'window_sigma': 10, # Heavy filter to identify major peaks in entire water year
# Smaller filter to identify small peaks in windowed data (smaller sigma val => less filter)
'fit_sigma': 1.3,
'sensitivity': 0.2, # 0.1 - 10, 10 being the most sensitive
# the detected date's flow has be certain percentage of the max flow in that region
'min_percentage_of_max_flow': 0.5,
'lag_time': 4,
# Earliest accepted date for spring timing, in Julian Date counting from Oct 1st = 0 (i.e. February 15 = 138)
'timing_cutoff': 138,
# Don't calculate flow metrics if max flow is below this value.
'min_flow_rate': 1
}
summer_params = {
'max_zero_allowed_per_year': 270,
'max_nan_allowed_per_year': 36,
'max_consecutive_nan_allowed_per_year': 7,
'sigma': 7, # scalar to set amount of smoothing
'sensitivity': 900, # increased sensitivity returns smaller threshold for derivative
# identifies last major peak after which to search for start date
'peak_sensitivity': 0.2,
'max_peak_flow_date': 325, # max search date for the peak flow date
# require that summer start is below this flow threshold. Represents percentage of the flow difference between annual max flow and summer minimum.
'min_summer_flow_percent': 0.125,
# Don't calculate flow metrics if max flow is below this value.
'min_flow_rate': 1
}
general_params = {
'annual_result_low_Percentille_filter': 0,
'annual_result_high_Percentille_filter': 100,
'max_zero_allowed_per_year': 270,
'max_nan_allowed_per_year': 36,
'max_consecutive_nan_allowed_per_year': 7,
'min_flow_rate': 1
}
flashy_params = {
'max_nan_allowed_per_year': 36, # max nan days allowed in a year for metrics to still attempt to be calculated (missing or bad data eg: -99999)
'max_zero_allowed_per_year': 360, # max no flow days (< 0.1 cfs) allowed in a year for metrics to still attempt to be calculated
'max_consecutive_nan_allowed_per_year': 7, # max allowed unbroken streak of consecutive nan data days (missing or bad data eg: -99999)
'rel_height': 1, # relative height compared to the top of the peak for surrounding data do be considered a plateau rather then no longer part of the peak
'dry_min_flow_percent': 0.125, # a min flow threshold for the dry season to start based on the spring and min dry season baseflow
'dry_min_peak_height': 15, # minimum peak height for a peak to be considered eligible for dry season recession (next param also affects this)
'dry_min_peak_scaling_factor': 0.15, # factor to multiply the water year median by when calculating the min size of an elidible peak the min of min_peak_height_dry (above param) and Median*min_peak_scaling_factor_dry is used
'dry_season_smoothing_window': 4, # window size for gaussian smoothing
'dry_season_smoothing_alpha': 1.3, # smoothing alpha for gaussian smoothing, higher value = more aggressive smoothing
'wet_min_peak_height': 10, # same as "dry_min_peak_height" but for peaks used by the wet timing metric
'wet_min_peak_scaling_factor': 0.1, # same as "dry_min_peak_scaling_factor" but for peaks used by the wet timing metric
'fall_min_height': 1, # min height for a peak to be considered for fall pulse flow
'fall_median_scaling_factor': 1.5, # within the peak detection for fall pulse flow and wet timings the median is regularly multiplied by this factor for eligibility of peaks
}