|
8 | 8 | from xclim.core.indicator import (
|
9 | 9 | ReducingIndicator,
|
10 | 10 | ResamplingIndicator,
|
| 11 | + StandardizedIndexes, |
11 | 12 | )
|
12 | 13 | from xclim.core.units import declare_units
|
13 | 14 | from xclim.indices import (
|
|
17 | 18 | high_flow_frequency,
|
18 | 19 | low_flow_frequency,
|
19 | 20 | rb_flashiness_index,
|
| 21 | + standardized_groundwater_index, |
| 22 | + standardized_streamflow_index, |
20 | 23 | )
|
21 | 24 |
|
22 | 25 | __all__ = [
|
|
27 | 30 | "high_flow_frequency",
|
28 | 31 | "low_flow_frequency",
|
29 | 32 | "rb_flashiness_index",
|
| 33 | + "standardized_groundwater_index", |
| 34 | + "standardized_streamflow_index", |
30 | 35 | ]
|
31 | 36 |
|
32 | 37 |
|
@@ -97,6 +102,7 @@ def cfcheck(q: DataArray):
|
97 | 102 | parameters={"op": generic.doymin, "out_units": None},
|
98 | 103 | )
|
99 | 104 |
|
| 105 | + |
100 | 106 | flow_index = ReducingIndicator(
|
101 | 107 | realm="land",
|
102 | 108 | context="hydro",
|
@@ -130,3 +136,36 @@ def cfcheck(q: DataArray):
|
130 | 136 | units="days",
|
131 | 137 | compute=low_flow_frequency,
|
132 | 138 | )
|
| 139 | + |
| 140 | +standardized_streamflow_index = StandardizedIndexes( |
| 141 | + realm="land", |
| 142 | + title="Standardized Streamflow Index (SSI)", |
| 143 | + identifier="ssi", |
| 144 | + units="", |
| 145 | + standard_name="ssi", |
| 146 | + long_name="Standardized Streamflow Index (SSI)", |
| 147 | + description="Streamflow over a moving {window}-X window, normalized such that SSI averages to 0 for " |
| 148 | + "calibration data. The window unit `X` is the minimal time period defined by resampling frequency {freq}.", |
| 149 | + abstract="Streamflow over a moving window, normalized such that SSI averages to 0 for the calibration data. " |
| 150 | + "The window unit `X` is the minimal time period defined by the resampling frequency.", |
| 151 | + cell_methods="", |
| 152 | + keywords="streamflow", |
| 153 | + compute=standardized_streamflow_index, |
| 154 | +) |
| 155 | + |
| 156 | + |
| 157 | +standardized_groundwater_index = StandardizedIndexes( |
| 158 | + realm="land", |
| 159 | + title="Standardized Groundwater Index (SGI)", |
| 160 | + identifier="sgi", |
| 161 | + units="", |
| 162 | + standard_name="sgi", |
| 163 | + long_name="Standardized Groundwater Index (SGI)", |
| 164 | + description="Groundwater over a moving {window}-X window, normalized such that SGI averages to 0 for " |
| 165 | + "calibration data. The window unit `X` is the minimal time period defined by resampling frequency {freq}.", |
| 166 | + abstract="Groundwater over a moving window, normalized such that SGI averages to 0 for the calibration data. " |
| 167 | + "The window unit `X` is the minimal time period defined by the resampling frequency.", |
| 168 | + cell_methods="", |
| 169 | + keywords="groundwater", |
| 170 | + compute=standardized_groundwater_index, |
| 171 | +) |
0 commit comments