Configuration Reference
HydroRaVENS is configured entirely through a YAML file. This page documents all available options.
Configuration File Structure
timeseries:
# Data input section
initial_conditions:
# Starting state of reservoirs and snowpack
catchment:
# Basin properties
general:
# Simulation settings
reservoirs:
# Reservoir cascade configuration
snowmelt:
# Required section; snowpack processes are only active if
# Mean Temperature [C] is present in the input CSV
The timeseries section
Option |
Type |
Description |
|---|---|---|
|
string |
Path to CSV input file with daily time series |
Example:
timeseries:
datafile: data/streamflow_2010_2020.csv
The initial_conditions section
Option |
Type |
Description |
|---|---|---|
|
list of floats |
Initial water depth (mm) in each reservoir, listed top to bottom |
|
float |
Initial snowpack depth in mm snow-water equivalent (SWE) |
Example:
initial_conditions:
water_reservoir_effective_depths__mm:
- 150 # Top (soil) reservoir starts at 150 mm
- 400 # Bottom (groundwater) starts at 400 mm
snowpack__mm_SWE: 50 # 50 mm SWE initially
The catchment section
Option |
Type |
Description |
|---|---|---|
|
float |
Basin area (km²); used for discharge-to-depth conversion |
|
string |
|
|
int |
Month (1–12) when water year begins (10 = October for USGS) |
|
float |
Constant regional groundwater import (mm/day). Added to modeled
discharge after routing; not mass-balanced against P or ET.
Default |
Note
ThorntwaiteChang2019 requires long-term monthly temperature
normals to compute the Thornthwaite heat index \(I\) and
exponent \(a\). If normals are not supplied via
T_monthly_normals in the Buckets
constructor, they are computed automatically from the mean monthly
temperatures in the input record. A UserWarning is raised when
the record is shorter than 20 years, as a short period may not
represent long-term climatology. For best results, supply normals
from a 30-year reference period (e.g. WMO 1991–2020 normals).
Water years with no discharge observations receive an ET multiplier
of 1.0 (raw ET, no water-balance correction) with a UserWarning
naming the affected years.
Example:
catchment:
drainage_basin_area__km2: 3800
evapotranspiration_method: datafile
water_year_start_month: 10
baseflow_Q: 0.0 # disabled; set > 0 for regional groundwater import
The general section
Option |
Type |
Description |
|---|---|---|
|
int or |
Number of complete passes through data before the main run. Use 0 to
skip spin-up (e.g. when supplying |
|
float |
Fraction (0–1) of potential ET drawn from the top (soil) reservoir
when |
|
float |
Fast-bypass fraction (0–1) of positive daily recharge that exits
directly as runoff, bypassing the reservoir cascade. Active only
when |
|
string |
Controls how ET is scaled to close the water balance.
Default
Legacy boolean values are accepted: |
Example:
general:
spin_up_cycles: 2 # Run through data twice to initialize
enforce_water_balance: water-year # default; omit to accept the default
et_alpha: 1.0 # fraction of ET from top reservoir (et_reservoir_draw only)
direct_runoff_fraction: 0.0 # fast-bypass fraction (direct_runoff module only)
The reservoirs section
This section defines the cascade of linear reservoirs (1 or more). All lists must have the same length.
Option |
Type |
Description |
|---|---|---|
|
list of floats |
Drainage time constant (days) for each reservoir |
|
list of floats |
Fraction (0–1) of drainage exiting as discharge |
|
list of floats |
Storage capacity (mm) per reservoir; use |
|
list of floats or |
PDM characteristic depth (mm) per reservoir. When set for a
reservoir, a fraction \(f_\text{sat} = 1 - e^{-H / H_0}\) of
incoming recharge becomes saturation-excess runoff. |
|
list of floats |
Fraction (0–1) of infiltrating water diverted to a fast tile-drain
sub-reservoir, per main reservoir. Default: all |
|
list of floats or |
E-folding residence time (days) of the tile-drain sub-reservoir per
main reservoir. Required when the corresponding |
|
list of floats |
Power-law recession exponent \(b\) per reservoir. \(b = 1\)
recovers the standard linear reservoir; \(b > 1\) produces
concave recession limbs consistent with subsurface flow theory
(Brutsaert & Nieber 1977; Kirchner 2009). The theoretical value
for catchment-integrated baseflow recession is \(b \approx 2.2\)
(Brutsaert & Nieber 1977); calibrated soil-zone values are typically
larger (\(b \approx 3\)–5). Default: all |
Example:
reservoirs:
e_folding_residence_times__days:
- 16 # Interflow: fast lateral drainage, days to weeks
- 200 # Soil zone: seasonal storage, months
- 3650 # Groundwater: multi-year storage
exfiltration_fractions:
- 0.8 # 80% to stream, 20% percolates to soil zone
- 0.1 # 10% to stream, 90% recharges groundwater
- 1.0 # All exits as baseflow
maximum_effective_depths__mm:
- .inf
- .inf
- .inf
No reservoir is fixed to a particular process; physical meaning is set by the parameters. Successive reservoirs naturally span progressively longer storage timescales — from interflow (days) to soil moisture (months) to groundwater (years) — but that mapping is the user’s choice.
The snowmelt section
This section is always required in the configuration file. Snowpack
processes are only activated when Mean Temperature [C] is present in
the input CSV, but the PDD_melt_factor key must be present regardless.
Option |
Type |
Description |
|---|---|---|
|
float |
Melt rate (mm SWE per °C per day) |
|
float |
Maximum daily FGI decay rate \(A_0\) (default |
|
float |
Frozen ground index (FGI) threshold (°C·day) above which the top
reservoir’s lateral drainage is blocked and all water exits as
direct runoff (Molnau & Bissell 1983). The FGI accumulates freezing
degree-days and decays during thaw; when it exceeds this threshold
the soil is considered frozen. Default |
|
float |
Snow insulation decay constant (mm⁻¹ SWE). Scales effective air
temperature reaching the soil as
\(T_\text{eff} = T \cdot e^{-k \cdot \text{SWE}}\), reducing
FGI accumulation under deep snowpack. Default |
Example:
snowmelt:
PDD_melt_factor: 1.0 # 1 mm SWE melts per °C per day
fdd_threshold: 83.0 # °C·day; calibrate or fix from soil data
snow_insulation_k: 0.057 # LISFLOOD default; set 0.0 to disable
The modules section
Optional process modules can be enabled or disabled through the modules
block. All keys default to the values shown below if the block is absent.
Key |
Type |
Default |
Description |
|---|---|---|---|
|
bool |
|
Accumulation, melt (PDD), and rain-on-snow. Requires
|
|
bool |
|
Frozen ground index (FGI; Molnau & Bissell 1983). Accumulates
freezing degree-days; blocks shallow-to-soil infiltration when
the index exceeds |
|
bool |
|
Sensible-heat contribution of warm rain falling on snowpack.
Only active when |
|
bool |
|
Hortonian-inspired fast-bypass fraction. A fixed fraction
( |
|
bool |
|
DTR-based FGI decay coefficient. When enabled and
|
|
bool |
|
Soil-moisture-dependent ET. Actual ET is multiplied by
\(1 - e^{-H_0 / H_{\text{pdm}}}\), where \(H_0\) is
the current storage in the top reservoir and
\(H_{\text{pdm}}\) is its PDM characteristic depth
( |
|
bool |
|
Post-cascade reservoir ET extraction. Instead of subtracting
ET from precipitation before it enters the reservoir cascade,
ET is drawn directly from reservoir storage after drainage.
Partitioned between the top two reservoirs by |
Example:
modules:
snowpack: true
frozen_ground: true
rain_on_snow: true
direct_runoff: false # off by default
dtr_fgi_decay: true # on by default; disable for continental climates with A=1
et_water_stress: false # off by default; enable for soil-moisture-limited ET
et_reservoir_draw: false # off by default; enable for post-cascade reservoir ET
When a module is disabled, its associated parameter (e.g.
PDD_melt_factor when snowpack: false) has no effect and need not
be calibrated.
ET Module Parameters
The parameters below are calibration parameters associated with the ET
modules. They are passed to run_and_score()
rather than read directly from the YAML file (except et_alpha, which
may also be set in the general block).
Parameter |
Type |
Description |
|---|---|---|
|
float |
Global ET multiplier. Scales potential ET up or down uniformly
across the entire record. Active (calibrated) only when
|
|
float |
Fraction (0–1) of potential ET extracted from the top (soil)
reservoir; |
|
float |
Wilting-point threshold (mm water depth) for the soil reservoir
when |
|
float |
Standard deviation (mm) of the spatially distributed wilting-point
threshold. When |
Complete Example
timeseries:
datafile: data/input.csv
initial_conditions:
water_reservoir_effective_depths__mm: [2, 400]
snowpack__mm_SWE: 0
catchment:
drainage_basin_area__km2: 3800
evapotranspiration_method: ThorntwaiteChang2019 # normals auto-computed if not supplied
water_year_start_month: 10
baseflow_Q: 0.0 # mm/day regional groundwater import; 0 = disabled
general:
spin_up_cycles: null # auto: ceil(tau_max / record_length)
reservoirs:
e_folding_residence_times__days: [16, 2000]
exfiltration_fractions: [0.8, 1.0]
maximum_effective_depths__mm: [.inf, .inf]
snowmelt:
PDD_melt_factor: 1.0
fgi_decay_coeff: 0.97 # default; Molnau & Bissell (1983)
fdd_threshold: .inf # °C·day; .inf = frozen ground never triggers
snow_insulation_k: 0.0 # mm⁻¹ SWE; 0 = disabled
modules:
snowpack: true
frozen_ground: true
rain_on_snow: true
direct_runoff: false
dtr_fgi_decay: true
et_water_stress: false # soil-moisture-dependent ET
et_reservoir_draw: false # post-cascade reservoir ET extraction
Illustrative Starting Points
These are rough starting points only, not calibrated or validated parameter sets. Actual values depend strongly on the specific catchment.
Alpine watershed with snowpack:
reservoirs:
e_folding_residence_times__days: [8, 1500]
exfiltration_fractions: [0.7, 1.0]
snowmelt:
PDD_melt_factor: 1.5
catchment:
evapotranspiration_method: ThorntwaiteChang2019
Humid lowland catchment:
reservoirs:
e_folding_residence_times__days: [25, 3000]
exfiltration_fractions: [0.9, 1.0]
catchment:
evapotranspiration_method: datafile
Arid/semi-arid watershed:
reservoirs:
e_folding_residence_times__days: [3, 500]
exfiltration_fractions: [0.5, 1.0]
snowmelt:
PDD_melt_factor: 0.5