current version 2.0 - 4th March 2025
version | date | comment |
---|---|---|
1.0 | 05/Oct/2016 | Original code |
1.1 | 08/Feb/2023 | OutReservoirsInit and OutReservoirs added |
1.2 | 17/Mar/2023 | bypass channel simulation included |
1.3 | 28/Nov/2023 | manage reservoir when level is high |
1.4 | 12/Dec/2023 | eflow is a vector of 365 daily value |
1.5 | 26/Mar/2024 | reservoir volume written to output |
1.6 | 10/Apr/2024 | observed reservoir downstream discharge read from file |
1.7 | 11/Apr/2024 | observed reservoir diverted discharge read from file |
1.8 | 05/May/2024 | Qin and Qout channel written even in reservoir without diversion |
1.9 | 04/Sep/2024 | modified code to save and read reservoir state variables |
2.0 | 04/Mar/2025 | one outlet discharge rule can be assigned for every day of the year |
license: GNU GPL http://www.gnu.org/licenses/
This module includes data and routines to manage
reservoirs within the distributed hydrological model
Two types of reservoirs are available, on-stream and
off-stream reservoirs.
On-stream reservoirs are the ones that are located
across a river. An off-stream reservoir is a reservoir
that is not located on a streambed, and is supplied by
an artificial canal or pipeline. In case of off-stream
reservoir, the water stored can be released in a
downstream section of the same river from which water
was withdrawn, or in a different water course.
A diversion channel can be associated to a given
reservoir. In this case, the diversion channel
diverts water from the reservoir and conveys it
to a downstream section of the same river (bypass)
or to a different river. The diversion channel
is an hydraulic structure typically used to
diverts flow to hydroelectric power plant.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=short), | public | :: | dtReservoir | ||||
type(Reservoir), | public, | POINTER | :: | pools | |||
integer, | private, | parameter | :: | QIN | = | 1 | |
integer(kind=short), | private | :: | nReservoirs | ||||
integer(kind=short), | private | :: | nReservoirsWithDiversion |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=float), | public | :: | Pout_off | ||||
real(kind=float), | public | :: | Qout | ||||
real(kind=float), | public | :: | Qout_off | ||||
type(Diversion), | public | :: | bypass |
diversion channel |
|||
logical, | public | :: | bypassIsPresent | ||||
integer(kind=short), | public | :: | c |
cell column j |
|||
integer(kind=short), | public | :: | cout |
cell column where off-stream pool outflow is discharged |
|||
logical, | public | :: | dischargeDiverted |
read observed diverted discharge when true |
|||
logical, | public | :: | dischargeDownstream |
read observed downstream discharge when true |
|||
real(kind=float), | public | :: | eFlow(365) | ||||
integer(kind=short), | public | :: | fileunit_out |
file unit for writing results |
|||
real(kind=float), | public | :: | freeFlow | ||||
real(kind=float), | public | :: | freeFlowElevation | ||||
real(kind=float), | public | :: | fullReservoirLevel |
full reservoir level (m) |
|||
type(Table), | public | :: | geometry | ||||
integer(kind=short), | public | :: | geometryDOY(365) | ||||
logical, | public | :: | highLevel |
true when reservoir is managed for high level |
|||
integer(kind=short), | public | :: | id | ||||
character(len=100), | public | :: | name | ||||
type(ObservationalNetwork), | public | :: | network | ||||
type(ObservationalNetwork), | public | :: | networkDischargeDiverted | ||||
type(ObservationalNetwork), | public | :: | networkDischargeDownstream | ||||
type(Reservoir), | public, | POINTER | :: | next | |||
integer, | public | :: | qoutRule |
determines how to compute Qout |
|||
integer(kind=short), | public | :: | r |
cell row i |
|||
logical, | public | :: | rising |
override Qout calculation only when Qin discharge is rising |
|||
integer(kind=short), | public | :: | rk |
runge-kutta order |
|||
integer(kind=short), | public | :: | rout |
cell row where off-stream pool outflow is discharged |
|||
real(kind=float), | public | :: | stage |
current stage [m] |
|||
real(kind=float), | public | :: | stageMax |
maximum stage [m] |
|||
real(kind=float), | public | :: | stageTarget |
follow a target (observed) stage [m] |
|||
type(DateTime), | public | :: | tReadNewDischargeDiverted | ||||
type(DateTime), | public | :: | tReadNewDischargeDownstream | ||||
type(DateTime), | public | :: | tReadNewStage | ||||
character(len=10), | public | :: | typ |
on-stream off-stream by-pass |
|||
integer(kind=short), | public | :: | typOut |
type ofoutflow: 1=free flow 2=target level |
|||
integer(kind=short), | public | :: | unit |
file unit target stage |
|||
integer(kind=short), | public | :: | unitDischargeDiverted |
file unit of observed diverted discharge |
|||
integer(kind=short), | public | :: | unitDischargeDownstream |
file unit of observed downstream discharge |
|||
type(Table), | public | :: | weir | ||||
integer(kind=short), | public | :: | weirDOY(365) | ||||
real(kind=float), | public | :: | xout |
x coordinate where outflow from reservoir is discharged |
|||
type(Coordinate), | public | :: | xyz |
easting, northing and elevation in real world |
|||
real(kind=float), | public | :: | yout |
y coordinate where outflow from reservoir is discharged |
count number of reservoirs in a list
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Reservoir), | intent(in), | POINTER | :: | list |
populate array of daily values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*) | :: | value |
Initialize reservoirs
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | filename_ini | |||
type(DateTime), | intent(in) | :: | tbegin | |||
type(grid_integer), | intent(in) | :: | mask | |||
type(Reservoir), | intent(out), | POINTER | :: | list |
initialise files for output
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Reservoir), | intent(in), | POINTER | :: | list | ||
character(len=*), | intent(in) | :: | path_out |
Save reservoirs status into file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | pathOut | |||
type(DateTime), | intent(in), | optional | :: | time |
Read reservoir stage and diversion discharge from file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | filename |