modelRunOff
Extends from OpenHPL.Icons.RunOff (Run off model icon).
Information
Similar to many other hydrological models, the HBV model is based on the land phase of the hydrological (water) cycle. The figure shows that the HBV model consists of four main water storage components connected in a cascade form. Using a variety of weather information, such as air temperature, precipitation and potential evapotranspiration, the dynamics and the balances of the water in the presented water storages are calculated. Hence, the runoff/inflow from some of the defined catchment areas can be found.
Figure: Structure of the HBV model.
The model is developed for each water storage component to define the dynamics and balances of the water. In addition, the catchment area is divided into elevation zones (usually not more than ten) where each zone has the same area. The air temperature and the precipitation are provided for each elevation zone. Hence, all calculations within each water storage component are performed for each elevation zone.
Snow Routine
In the snow routine segment, the snow storage, as well as snowmelt are computed. This computation is performed for each elevation zone. Using the mass balance, the change in the dry snow storage volume \(V_\mathrm{s,d}\), is found as follows:
$$ \frac{\mathrm{d}V_\mathrm{s,d}}{\mathrm{d}t}=\dot{V}_\mathrm{p,s}-\dot{V}_\mathrm{d2w} $$
Here, the flow of the precipitation in the form of snow is denoted as \(\dot{V}_\mathrm{p,s}\). This precipitation in the form of snow is defined from the input precipitation flow, \(\dot{V}_\mathrm{p}\), based on the information about the air temperature, T, a threshold temperature for snowmelt, TT, and for the area that is not covered by lakes (the fractional area covered by the lakes, aL, is used):
$$ \dot{V}_\mathrm{p,s}=\begin{cases} \dot{V}_\mathrm{p}K_\mathrm{CR}K_\mathrm{CS}(1 - a_\mathrm{L}), & \mbox{if } T\leq T_\mathrm{T}\\ 0, & \mbox{if } T>T_\mathrm{T} \end{cases} $$
Precipitation correction coefficients KCR and KCS are also used here, for the rainfall and snowfall precipitations, respectively. Then, the flow of precipitation in the form of rain is defined as follows:
$$ \dot{V}_\mathrm{p,r}=\begin{cases} \dot{V}_\mathrm{p}K_\mathrm{CR}(1 - a_\mathrm{L}), & \mbox{if } T>T_\mathrm{T}\\ 0, & \mbox{if } T\leq T_\mathrm{T} \end{cases} $$
The flow of the melting snow (melting of snow from dry form to water form), \(\dot{V}_\mathrm{d2w}\), can be found using the following expression based on the degree-day factor Kdd and the area of the elevation zone Ae:
$$ \dot{V}_\mathrm{d2w}=\begin{cases} A_\mathrm{e}K_\mathrm{dd}(T - T_\mathrm{T})(1 - a_\mathrm{L}), & \mbox{if }T>T_\mathrm{T}\mbox{ and }V_\mathrm{s,d}>0\\ 0, & \mbox{otherwise} \end{cases} $$
Finally, the flow out of the snow routine to the next soil moisture segment, \(\dot{V}_\mathrm{s2s}\), is found as a sum of flows of precipitation in the form of rain, and the melted snow:
$$ \dot{V}_\mathrm{s2s}=\dot{V}_\mathrm{p,r}+\dot{V}_\mathrm{d2w} $$
It should be noted that a simplification related to the threshold temperature, TT, is assumed here. This threshold temperature describes both the snow melt and the rainfall to snowfall transition temperatures in the presented model. In reality, this threshold temperature might differ for each of these processes. In addition, the storage of snow in water form is not considered here, mostly due to the simplification with the threshold temperature.
Soil Moisture Routine
In the soil moisture segment, the water storage in the ground (soil) is found together with actual evapotranspiration from the snow-free areas. The net runoff to the next segment (upper zone) is also defined here. Using the mass balance, the volume of the soil moisture storage, \(V_\mathrm{s,m}\), is found as follows:
$$ \frac{\mathrm{d}V_\mathrm{s,m}}{\mathrm{d}t}=\dot{V}_\mathrm{s2s}-\dot{V}_\mathrm{s2u}-\alpha_\mathrm{e}\dot{V}_\mathrm{s,e} $$
Here, \(\dot{V}_\mathrm{s2u}\) is the net runoff to the next segment (the upper zone). \(\dot{V}_\mathrm{s,e}\) is the actual evapotranspiration from the soil, that is taken into account only for the snow-free areas (zones). To define these snow-free zones, coefficient αe is used and equals one for snow-free areas and zero for covered-by-snow areas. The actual evapotranspiration can be found from the potential evapotranspiration, \(\dot{V}_\mathrm{e}\), the volume of the soil moisture storage, \(V_\mathrm{s,m}\), the area of the elevation zone Ae, and the field capacity — threshold soil (ground) moisture storage, gT:
$$ \dot{V}_\mathrm{s,e}=\begin{cases} \frac{V_\mathrm{s,m}}{A_\mathrm{e}g_\mathrm{T}}\dot{V}_\mathrm{e}, & \mbox{if } V_\mathrm{s,m}< A_\mathrm{e}g_\mathrm{T}\\ \dot{V}_\mathrm{e}, & \mbox{if } V_\mathrm{s,m}\geq A_\mathrm{e}g_\mathrm{T} \end{cases} $$
The potential evapotranspiration, \(\dot{V}_\mathrm{e}\), is defined as the input to the hydrology model, similarly to the air temperature and precipitations.
The output of the soil moisture segment — the net runoff to the next segment, \(\dot{V}_\mathrm{s2u}\), can be found based on the field capacity, gT, as follows:
$$ \dot{V}_\mathrm{s2u}=\begin{cases} \Big(\frac{V_\mathrm{s,m}}{A_\mathrm{e}g_\mathrm{T}}\Big)^{\beta}\dot{V}_\mathrm{s2s}, & \mbox{if } 0\leq V_\mathrm{s,m}< A_\mathrm{e}g_\mathrm{T}\\ \dot{V}_\mathrm{s2s}, & \mbox{if } V_\mathrm{s,m}\geq A_\mathrm{e}g_\mathrm{T} \end{cases} $$
Here, β is an empirical parameter for specifying the relationship between the flow out of the snow routine, the soil moisture storage, and the net runoff from the soil moisture. Typically, β ∈ [2,3], which leads to nonlinearity in this equation.
Runoff Routine
The upper and lower zones are combined into one segment — the runoff routine. In this segment, the runoff from the catchment area is found based on the outflow from the soil moisture. The effects of the precipitation to, and evapotranspiration from the lakes in the catchment area are also taken into account here.
The upper zone characterises components with quick runoff. The following mass balance is used for the upper zone description:
$$ \frac{\mathrm{d}V_\mathrm{u,w}}{\mathrm{d}t}=\dot{V}_\mathrm{s2u}-\dot{V}_\mathrm{u2l}-\dot{V}_\mathrm{u2s}-\dot{V}_\mathrm{u2q} $$
Here, \(V_\mathrm{u,w}\) is the water volume in the upper zone that depends on the saturation threshold, sT, which defines the surface (fast) runoff, \(\dot{V}_\mathrm{u2s}\), and the fast runoff, \(\dot{V}_\mathrm{u2q}\). \(\dot{V}_\mathrm{u2l}\) is the runoff to the lower zone and is defined by the percolation capacity, KPC, for the area that is not covered by lakes:
$$ \dot{V}_\mathrm{u2l}=A_\mathrm{e}(1-a_\mathrm{L})K_\mathrm{PC} $$
The surface runoff, \(\dot{V}_\mathrm{u2s}\), can be found using the saturation threshold, sT, and the water volume in the upper zone, \(V_\mathrm{u,w}\):
$$ \dot{V}_\mathrm{u2s}=\begin{cases} a_1(V_\mathrm{u,w}-A_\mathrm{e}s_\mathrm{T}), & \mbox{if } V_\mathrm{u,w}>A_\mathrm{e}s_\mathrm{T}\\ 0, & \mbox{if } V_\mathrm{u,w}\leq A_\mathrm{e}s_\mathrm{T} \end{cases} $$
Here, a₁ is a parameter that represents the recession constant for the surface runoff. A similar recession constant, a₂, is used for the fast runoff, \(\dot{V}_\mathrm{u2q}\), calculations:
$$ \dot{V}_\mathrm{u2q}=a_2\min{(V_\mathrm{u,w},A_\mathrm{e}s_\mathrm{T})} $$
The lower zone characterises the lake and the groundwater storages and defines the base runoff from the catchment area. The following mass balance equation is used for the lower zone description:
$$ \frac{\mathrm{d}V_\mathrm{l,w}}{\mathrm{d}t}=\dot{V}_\mathrm{u2l}+a_\mathrm{L}\dot{V}_\mathrm{p}-\dot{V}_\mathrm{l2b}-a_\mathrm{L}\dot{V}_\mathrm{e} $$
The water volume in the lower zone is denoted as \(V_\mathrm{l,w}\). As mentioned previously, \(\dot{V}_\mathrm{p}\) and \(\dot{V}_\mathrm{e}\) are the precipitation and the potential evapotranspiration flows, respectively. aL is the fractional area covered by lakes. \(\dot{V}_\mathrm{l2b}\) is the base runoff from the lower zone that can be found as follows:
$$ \dot{V}_\mathrm{l2b}=a_3V_\mathrm{l,w} $$
Here, a₃ is the recession constant similar to a₁ and a₂.
The total runoff from the catchment, \(\dot{V}_\mathrm{tot}\), is a sum of the base, quick, surface runoffs for each elevation zones, and is defined as follows:
$$ \dot{V}_\mathrm{tot}=\sum\limits_{i=1}^n(\dot{V}_{\mathrm{l2b},i}+\dot{V}_{\mathrm{u2s},i}+\dot{V}_{\mathrm{u2q},i}) $$
Here, the base \(\dot{V}_{\mathrm{l2b},i}\), quick \(\dot{V}_{\mathrm{u2q},i}\), and surface \(\dot{V}_{\mathrm{u2s},i}\) runoffs are first summed up for each of the n elevation zones and then these sums of the base, quick and surface runoffs are added together.
Implementation
This hydrology model is encoded in the OpenHPL library as the RunOff unit where the main
defined variable is the total runoff from the catchment. This unit uses the standard Modelica connector RealOutput
connector as an output from the model that can be connected to, for example, simple reservoir model Reservoir unit.
Meteorological inputs (air temperature, precipitation, potential evapotranspiration, and monthly average temperature for
each elevation zone) can be provided in two ways, controlled by the boolean parameter useInput:
- When
useInput = false(default), historic data is read from text files using the standard ModelicaCombiTimeTablesource models. The file names and table names are specified via the parameters in the Input data tab. - When
useInput = true, the inputs are supplied throughinput Realconnectors (temp_input,prec_input,evap_input,month_temp_input, andflow_input), allowing the model to be driven by external signals at runtime.
Parameters
When the RunOff unit is in use, the user can specify the required geometry parameters for the catchment:
the number of elevation zones, all hydrology parameters such as threshold temperatures, degree-day factor, precipitation
correction coefficients, field capacity and β parameter in soil moisture routine, threshold level for quick runoff in upper
zone, percolation from upper zone to lower zone, recession constants for the surface and quick runoffs in upper zone, and
recession constant for the base runoff in lower zone. The boolean parameter useInput selects whether
meteorological data is read from files (false) or supplied via input connectors (true). When
useInput = false, the user can also specify the text files where the data for the
CombiTimeTable models are stored.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Geometry | |||
| Integer | N | 10 | Number of height zones |
| SI.Area[N] | A | ones(N)*41.3e6 | Catchment area |
| SI.PerUnit[N] | a_L | {15.43, 3.97, 1.79, 0.81, 1.27, 1.44, 1.03, 2.32, 1.31, 0.57}.*1e6./A | Fractional area covered by lakes |
| Physically-based parameters | |||
| Modelica.Units.NonSI.Temperature_degC | T_t | 1 | Threshold temperature |
| Real | k_m | 4e-3/86400 | Melting factor |
| SI.Length | g_T | 150e-3 | Ground saturation threshold |
| Empirical parameters | |||
| SI.Length | s_T | 20e-3 | Soil zone saturation threshold |
| SI.Frequency | a_1 | 0.547/86400 | Discharge frequency for surface runoff |
| SI.Frequency | a_2 | 0.489/86400 | Discharge frequency for fast runoff |
| SI.Frequency | a_3 | 0.0462/86400 | Discharge frequency for base runoff |
| SI.Velocity | PERC | 0.6e-3/86400 | Percolation from soil zone to base zone |
| Real | beta | 2 | Ground zone shape coefficient |
| Real | PCORR | 1.05 | Precipitation correction - Rainfall |
| Real | SCORR | 1.2 | Precipitation correction - Snowfall |
| Real | CE | 0.04 | Model parameter for adjusted evapotranspiration |
| Input data | |||
| Boolean | useInput | false | If true, meteorological data is provided via input variables instead of data files |
| Input data › Temperature | |||
| String | fileName_temp | Modelica.Utilities.Files.loadResource("modelica://OpenHPL/Resources/Tables/Temp_var.txt") | File with temperature variations in different height zones |
| String | tableName_temp | "zones_temp" | Table with temperature variations in different height zones |
| Integer[:] | columns_temp | 2:N + 1 | Columns with temperature variations for different height zones |
| Input data › Precipitation | |||
| String | fileName_prec | Modelica.Utilities.Files.loadResource("modelica://OpenHPL/Resources/Tables/Prec_var.txt") | File with precipitation variations in different height zones |
| String | tableName_prec | "zones_prec" | Table with precipitation variations in different height zones |
| Integer[:] | columns_prec | 2:N + 1 | Columns with precipitation variations for different height zones |
| Input data › Evapotranspiration | |||
| String | fileName_evap | Modelica.Utilities.Files.loadResource("modelica://OpenHPL/Resources/Tables/Evap_var.txt") | File with evapotranspiration variations during the year |
| String | tableName_evap | "evap" | Table with evapotranspiration variations during the year |
| Integer[:] | columns_evap | {2} | Column with evapotranspiration variations during the year |
| String | fileName_month_temp | Modelica.Utilities.Files.loadResource("modelica://OpenHPL/Resources/Tables/Month_av_temp.txt") | File with monthly average temperature for evapotranspiration calculation |
| String | tableName_month_temp | "month_temp" | Table with monthly average temperature |
| Integer[:] | columns_month_temp | 2:N + 1 | Columns with monthly average temperature variations for different height zones |
| Input data › Real run off | |||
| String | fileName_flow | Modelica.Utilities.Files.loadResource("modelica://OpenHPL/Resources/Tables/Flow_var_d.txt") | File with real observed run off |
| String | tableName_flow | "flow" | Table with real observed run off |
| Integer[:] | columns_flow | {2} | Column with real observed run off |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput[N] | temp_input | Zone temperature [degC] | |
| Modelica.Blocks.Interfaces.RealInput[N] | prec_input | Zone precipitation [mm/day] | |
| Modelica.Blocks.Interfaces.RealInput | evap_input | Potential evapotranspiration [mm/day] | |
| Modelica.Blocks.Interfaces.RealInput[N] | month_temp_input | Monthly average zone temperature [degC] | |
| Modelica.Blocks.Interfaces.RealInput | flow_input | Observed flow for R2 calculation [m3/s] | |
| Modelica.Blocks.Interfaces.RealOutput | Vdot_runoff | Output connector |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| SI.Length[N] | V_s_w | Water content in soil zone per Area | |
| SI.Length[N] | V_b_w | Water content in base zone per Area | |
| SI.Length[N] | V_g_w | Water content in ground zone per Area | |
| SI.Length[N] | V_s_d | Dry snow | |
| SI.VolumeFlowRate | Vdot_tot | Total runoff | |
| SI.Velocity[N] | Vdot_s2b | Runoff rate from soil zone to base zone | |
| SI.Velocity[N] | Vdot_pl | Precipitation in lake | |
| SI.Velocity[N] | Vdot_b2br | Runoff rate from base zone to base runoff | |
| SI.Velocity[N] | Vdot_l_e | Rate of evapotranspiration from lake | |
| SI.Velocity[N] | Vdot_g2s | Runoff rate from ground zone to soil zone | |
| SI.Velocity[N] | Vdot_s2sr | Runoff rate from soil zone to surface runoff | |
| SI.Velocity[N] | Vdot_s2fr | Runoff rate from soil zone to fast runoff | |
| SI.Velocity[N] | Vdot_s2g | Runoff rate from snow zone to ground zone | |
| SI.Velocity[N] | Vdot_g_e | Evapotranspiration rate from ground zone | |
| SI.Velocity[N] | Vdot_p_r | Precipitation in mainland in the form of snow | |
| SI.Velocity[N] | Vdot_d2w | Melting rate from dry snow form to water snow form | |
| SI.Velocity[N] | Vdot_p_s | Precipitation in mainland in the form of snow | |
| SI.Velocity[N] | Vdot_epot | Evapotranspiration | |
| Modelica.Units.NonSI.Temperature_degC[N] | T | Ambient temperature | |
| SI.Velocity[N] | Vdot_p | Precipitation | |
| Real[N] | a_e | ||
| Real[N] | a_sw | ||
| Real | F_o | ||
| Real | F_e | ||
| Real | R2 | ||
| Real | err | 0.5e-3 | Small error, m |
| Modelica.Blocks.Sources.CombiTimeTable | temp_var | ||
| Modelica.Blocks.Sources.CombiTimeTable | prec_var | ||
| Modelica.Blocks.Sources.CombiTimeTable | evap_var | ||
| Modelica.Blocks.Sources.CombiTimeTable | month_temp | ||
| Modelica.Blocks.Sources.CombiTimeTable | flow_var |