API Reference - Estimate Module
method_numba(Q, b_LH, a, p, return_exceed=False)
Applies a method to estimate baseflow from the given flow data (Q) and baseflow data (b_LH), using the provided parameter (p) and additional parameter (a).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
Q |
ndarray
|
The flow data. |
required |
b_LH |
ndarray
|
The baseflow data. |
required |
a |
float
|
An additional parameter for the method. |
required |
p |
float
|
The parameter value to use for the method. |
required |
return_exceed |
bool
|
If True, also returns the exceeded baseflow ratio. Defaults to False. |
False
|
Returns:
| Type | Description |
|---|---|
ndarray
|
The estimated baseflow. |
float(optional)
|
The exceeded baseflow ratio, if return_exceed is True. |
Source code in baseflow/estimate.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
param_calibrate_jit(param_range, method, Q, b_LH, a, idx_rec, idx_oth)
Calibrate the parameters of a method using the given parameter range, flow data (Q), baseflow data (b_LH), and other parameters (a).
This function separates the flow data into recession and non-recession periods, and calculates the Nash-Sutcliffe Efficiency (NSE) for each part. It then combines the NSE values to get the overall loss function, and returns the parameter value that minimizes this loss.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
param_range |
ndarray
|
The range of parameter values to test. |
required |
method |
callable
|
The method to use for calculating the baseflow. |
required |
Q |
ndarray
|
The flow data. |
required |
b_LH |
ndarray
|
The baseflow data. |
required |
a |
float
|
Additional parameter for the method. |
required |
idx_rec |
ndarray
|
Boolean array indicating the recession periods. |
required |
idx_oth |
ndarray
|
Boolean array indicating the non-recession periods. |
required |
Returns:
| Type | Description |
|---|---|
float
|
The optimal parameter value. |
Source code in baseflow/estimate.py
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 | |
recession_period(Q)
Identifies the recession periods in the given flow data (Q) by calculating the moving average and finding the start and end indices of the recession periods.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
Q |
ndarray
|
The flow data. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
A boolean array indicating the recession periods. |
Source code in baseflow/estimate.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | |