User Tools

Site Tools


start:hype_model_description:hype_routing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
start:hype_model_description:hype_routing [2018/06/12 10:05]
cpers [Bifurcations]
start:hype_model_description:hype_routing [2020/04/30 09:03]
cpers [Links to relevant modules in the code]
Line 4: Line 4:
  
  
-The HYPE model can contain two types of rivers, local stream and main river, and two types of lakes, local lakes and outlet lakes (Figure 1). Local and main rivers are present in all subbasins and the length of each is calculated as the square root of the subbasin area. For main rivers, the length of the watercourse in each subbasin ​can be given as input (>0). The river can be a SLC class and is then given an area, but rivers can also be one-dimensional (i.e. no part of subbasin area are occupied by the river and no precipitation added to the river). All local runoff is entering the local river. If there are upstream subbasins ​the flow is added to the local runoff and two both flow through ​the main river. Outlet lakes (olake) receive all upstream and local waters. Local lakes (ilake) receive a portion of the local runoff.+The HYPE model can contain two types of rivers, local stream and main river, and two types of lakes, local lakes and outlet lakes (Figure 1). Local and main rivers are present in all subbasins and the length of each is calculated as the square root of the subbasin area. The length of the watercourses ​can be given as input. The river can be a SLC class and is then given an area, but rivers can also be one-dimensional (i.e. no fraction ​of the subbasin area are occupied by the river and no precipitation added to the river). All local runoff is entering the local river. Local lakes (ilake) receive a portion of the local runoff. The flow leaving the local river (including flow from local lake) goes to the main river of the same subbasin. If there are upstream subbasins ​their flow is added to the local flow when both flows flow into the main river. Outlet lakes (olake) receive ​the outflow from the main river, i.e. all upstream and local flows.
  
 |{{:​start:​hype_model_description:​lakeriveroverview.png?​400|}}| |{{:​start:​hype_model_description:​lakeriveroverview.png?​400|}}|
 |Figure 1: Schematic representation of streams and lakes i HYPE, and the link between them.| |Figure 1: Schematic representation of streams and lakes i HYPE, and the link between them.|
  
-The two lake types are separate classes. ​Which land use and soil type that are coupled to each lake type are listed ​in GeoClass.txt. Precipitation,​ atmospheric deposition and evaporation of rivers and lakes are calculated first, while river flow and inflow, transformation processes and the outflow of the lakes is calculated thereafter. Lakes and rivers are calculated in the model’s routing part after all classes are calculated for the subbasin. ​+The two lake types are separate classes. ​The lake classes have characteristics such as land use and soil type, which are defined together with the other classes'​ characteristics (in GeoClass.txt). Precipitation,​ atmospheric deposition and evaporation of rivers and lakes are calculated first, while river flow and inflow, transformation processes and the outflow of the lakes is calculated thereafter. Lakes and rivers are calculated in the model’s routing part after all classes are calculated for the subbasin. ​
  
-An outlet lake can be part of a larger lake. It is then called a lake basin. Lake basins are olakes in nearby subbasins. Outlet lakes that are not lake basins are referred to below as simple outlet lakes+An outlet lake can be part of a larger lake. It is then called a lake basin. Lake basins are olakes in nearby subbasins. ​
  
-A simple outlet lake has a threshold. The outflow ends if the water level drops below the threshold. Lake mean depth below the threshold is specified in GeoData.txt or LakeData.txt as lake_depth in meters. Lake depth can also be set by parameters, i.e general parameter //gldepo// or olake region parameter //​olldepth//​. The threshold is also the the water level of the lake at the start of a simulation. The current water level is denoted as //wlm// in Fig. 2. For printing, the outlet lake water level (output variable //wcom//) is calculated in meters and you can set a reference level (//w0ref//) in LakeData.txt to get the same height system as any observations of the lake's water level. The lake’s //w0ref// is added to the water level above the threshold. It is possible to adjust the output //wcom// for the actual amplitude of the regulation volume (//wamp//), this may be useful because ​the lake is assumed to have vertical sides in the calculations.+A simple outlet lake has a threshold. The outflow ends if the water level drops below the threshold. Lake mean depth below the threshold is specified in GeoData.txt or LakeData.txt as //lake_depth// in meters. Lake depth can also be set by parameters, i.e general parameter //gldepo// or olake region parameter //​olldepth//​. The threshold is also the the water level of the lake at the start of a simulation. The current water level is denoted as //wlm// in Fig. 2. For printing, the outlet lake water level (output variable //wcom//) is calculated in meters and you can set a reference level (//w0ref//) in LakeData.txt to get the same height system as any observations of the lake's water level. The lake’s //w0ref// is added to the water level above the threshold. A regulated lake (dam) has two thresholds. One, same as for a simple lake, is used for spill, and one lower threshold were outflow ends completely. The distance between the thresholds are determined by the regulation volume. HYPE assumes the lake/dam has vertical sides in the calculations,​ thus the observed variation in water level may be larger than the simulated variation. It is therefore ​possible to adjust the output //​wcom// ​(and //​wcav//​) ​for the actual amplitude of the regulation volume (//wamp//). This will make the simulated and recorded water stage comparable below the threshold for a regulated ​lake. 
  
 |{{:​start:​hype_model_description:​outletlakewithvariables2.png?​400|}}| |{{:​start:​hype_model_description:​outletlakewithvariables2.png?​400|}}|
 |Figure 2: An outlet lake with some variables.| |Figure 2: An outlet lake with some variables.|
  
-A local lake also has a threshold depth that is used as start value. The depth is given by general parameter gldepi and is then the same for all the local lakes, or by ilake region parameter illdepth. It is measured in meters. A percentage of flow from the local stream flows into the local lake. The rest of the local flow runs directly to main river watercourse. ​+A local lake also has a threshold depth that is used as start value. The depth is given by general parameter ​//gldepi// and is then the same for all the local lakes, or by ilake region parameter ​//illdepth//. It is measured in meters. A percentage of flow from the local stream flows into the local lake. The rest of the local flow runs directly to main river watercourse. ​
  
-Using parameters, you can divide the lake into two parts, one with faster flows (FLP) and one with slower flows (SLP) (Figure 3). This function is used for the simulation ​of nutrients to simulate stratification,​ strangulation or other phenomena that may limit the mixing of a lake. With this feature, the flows through the lake follow the schedule below. The split is determined by the parameter //​deeplake//​which is the fraction of the lake's initial volume SLP, the remaining (varying) ​volume in the lake is the FLP. The parameter //​fastlake//​ determines where the outflow will be coming from. Default is that outflow is taken from the slow lake part. Increasing //​fastlake//​ will let the FLP contribute ​to outflow. //​Fastlake//​ equal to one gives the maximum contribution of FLP, and the outflow will be taken proportionally from the two lake parts according to their volume.+The streams may have a delay and an attenuation ​of the flow. The former shifts ​the peaksbut leaves them otherwise untouchedwhile the attenuation both delays and smooths out peaks. The streams have a dead volume in which the residence time of solutes ​is increased relative ​to the water and the concentration smoothed out further over time.
  
-|{{:​start:​hype_model_description:​division_of_lake.png?​400|}}| 
-|Figure 3: Division of a lake in two parts and water flows regarding lake.| 
  
-The streams may have a delay and an attenuation of the flow. The former shifts the peaks, but leaves them otherwise untouched, while the attenuation both delays and smooths out peaks. The streams have a dead volume in which the residence time of solutes is increased relative ​to the water and the concentration smoothed out further over time.+==== Links to file reference ====
  
 +^Parameter/​Data ^File ^
 +|//rivlen, loc_rivlen, slc_nn//​|[[start:​hype_file_reference:​geodata.txt|GeoData.txt]]|
 +|special class code 1,2,11 and 12|[[start:​hype_file_reference:​geoclass.txt|GeoClass.txt]]|
 +|//​lake_depth//​|[[start:​hype_file_reference:​geodata.txt|GeoData.txt]] or [[start:​hype_file_reference:​lakedata.txt|LakeData.txt]] or [[start:​hype_file_reference:​damdata.txt|DamData.txt]]|
 +|//gldepo, olldepth, gldepi, illdepth//​|[[start:​hype_file_reference:​par.txt|par.txt]]|
 +|//w0ref, wamp//​|[[start:​hype_file_reference:​lakedata.txt|LakeData.txt]] or [[start:​hype_file_reference:​damdata.txt|DamData.txt]]|
  
 ==== Links to relevant modules in the code ==== ==== Links to relevant modules in the code ====
Line 33: Line 37:
 | [[http://​hype.sourceforge.net/​doxy-html/​namespacemodelmodule.html|modelmodule (model_hype.f90)]]|initiate_model_state| | [[http://​hype.sourceforge.net/​doxy-html/​namespacemodelmodule.html|modelmodule (model_hype.f90)]]|initiate_model_state|
 | ::: |initiate_model | | ::: |initiate_model |
-| [[http://​hype.sourceforge.net/​doxy-html/​namespacesurfacewater__processes.html|surfacewater_processes (sw_proc.f90)]]|calculate_landarea_riverlength+| ::: |calculate_flow_from_undivided_lake| 
-| ::: |calculate_outflow_from_outlet_lake|+| ::: |calculate_flow_for_lakebasin_lake | 
 +| [[http://​hype.sourceforge.net/​doxy-html/​namespacesurfacewater__processes.html|surfacewater_processes (sw_proc.f90)]]| ​calculate_riverlength| 
 +| ::: | calculate_ilake_outflow ​
 +| ::: | calculate_outflow_from_outlet_lake ​
 +| ::: | calculate_outflow_from_lakebasin_lake ​|
 | ::: |remove_outflow_from_lake| | ::: |remove_outflow_from_lake|
-| ::: |calculate_flow_within_lake| 
 | ::: |calculate_branched_flow| | ::: |calculate_branched_flow|
-|[[http://​hype.sourceforge.net/​doxy-html/​namespacenpc__surfacewater__processes.html|npc_surfacewater_processes (npc_sw_proc.f90)]]|set_lake_slowwater_maxvolume |+
  
  
Line 47: Line 54:
 === Precipitation === === Precipitation ===
  
-Daily precipitation is added to the river if it has an area and a new concentration is calculated. Precipitation is divided between river water in damping box and queue according to the respective volumes.+Daily precipitation is added to the river if it has an area (is a class) ​and a new concentration is calculated. Precipitation is divided between river water in damping box and queue according to the respective volumes.
  
 === Evaporation === === Evaporation ===
  
-If the river has an area (is a class), it evaporates and a new concentration is calculated. Normally the river area is constant over time, but with parameters ​can a reduction of riverarea be simulated for low volume/​flow. The reduced river area is also used for heat exchange calculations.+If the river has an area (is a class), it evaporates and a new concentration is calculated. Normally the river area is constant over time, but with parameters a reduction of riverarea ​can be simulated for low volume/​flow. The reduced river area is also used for heat exchange calculations.
  
 <m> frac_area = delim{lbrace}{ ​ <m> frac_area = delim{lbrace}{ ​
Line 60: Line 67:
     }}{} </m>     }}{} </m>
        
-The parameters //fraxe// and //fraxm// are general, and //fraxe// is (minimum) mean river depth (m) where fractional river area = 1 and //fraxm// is mean river depth (m) where the slope of the fractional river area has its maximum (must be in the range between 0 and //fraxe//).+The parameters //fraxe// and //fraxm// are general, and //fraxe// is (minimum) mean river depth (m) where fractional river area = 1 and //fraxm// is mean river depth (m) where the slope of the fractional river area has its maximum (must be in the range between 0 and //fraxe//). //x// is the current mean river depth (based on full area extention).
  
 === Pure delay === === Pure delay ===
  
-The delay in the watercourse (//​transtime//​) in days is determined by the length of the watercourse (//​rivlen//​) and the water’s maximum velocity (//​rivvel//​). The maximum velocity is a general parameter with unit //m/s//. The delay in the local river is dependent on subbasin ​size, as stream length calculated from its area. The delay is a pure translation. The delay is divided into whole days (//ttday//) and parts of the day (//​ttpart//​).+The delay in the watercourse (//​transtime//​) in days is determined by the length of the watercourse (//​rivlen//​) and the water’s maximum velocity (//​rivvel//​). The maximum velocity is a general parameter with unit //m/s//. The delay in the river is dependent on subbasin ​land area if the default river length is used. The delay is a pure translation. The delay is divided into whole days (//ttday//) and parts of the day (//​ttpart//​) ​(if the time step is daily, other wise the division is made into whole and fractions of that time step). In the following description daily time step is assumed.
  
-<m> transtime = rivlen/​{rivvel~8.64~10^4} </m>+<m> transtime = rivlen/​{rivvel*8.64*10^4} </m>
  
 <m> ttday = INT(transtime) </m> <m> ttday = INT(transtime) </m>
Line 72: Line 79:
 <m> ttpart = transtime - REAL(ttday) </m> <m> ttpart = transtime - REAL(ttday) </m>
  
-The inflow of the river is stored in two arrays (//riverq// and //riverc//) until it is time for it to drain out. The outflow is weighted by using the parts of the day that are during the time step.+The inflow of the river is stored in two arrays (//riverq// and //riverc//) until it is time for it to flow out of the river stretch. The outflow is weighted by using the parts of the time step (//​ttpart//​) ​that are to flow out during the time step.
  
   transq = (1-ttpart)*riverq(ttday) + ttpart*riverq(ttday+1)   transq = (1-ttpart)*riverq(ttday) + ttpart*riverq(ttday+1)
Line 82: Line 89:
   ENDIF   ENDIF
  
-After the calculation of outflow the values in the arrays are shifted forward one day+After the calculation of outflow the values in the arrays are shifted forward one time step
  
 === Delay and attenuation === === Delay and attenuation ===
  
-If the delay in the watercourse also includes a damping of the peaks then part of the delay is considered as translation,​ while some of the delay lies in damping. The translation is calculated first and then the flow goes through a linear box that creates ​damping. The parameter damp indicates how much of the delay that will occur in the attenuation box, and translation time is reduced accordingly. Otherwise the translation is calculated in the same manner as above.+If the delay in the watercourse also includes a damping of the peaks then only part of the delay is considered as translation,​ while the rest of the delay lies in damping. The translation is calculated first and then the flow goes through a linear box that creates ​attenuation. The parameter damp indicates how much of the delay that will occur in the attenuation box (or damping box), and translation time is reduced accordingly. Otherwise the translation is calculated in the same manner as above.
  
-<m> totaltime=rivlen/​{rivvel~8.64~10^4} </m>+<m> totaltime=rivlen/​{rivvel*8.64~10^4} </m>
  
 <m> transtime=(1-damp)*totaltime </m> <m> transtime=(1-damp)*totaltime </m>
  
-The result from the translation (//transq// and //​transc//​) ​goes into the damping box. Translation flow is added to the suppression ​box, which is assumed to be completely mixed. The delay time in the attenuation ​box (//kt//) is translated ​to a corresponding recession coefficient (//​riverrc//​). The recession coefficient used to calculate the outflow from the box (//dampq//) is a function of volume in the box (//​riverbox//​).+The result from the translation ​of water (//transq// and //​transc//​) ​flows into the attenuation ​box, which is assumed to be completely mixed. The delay time in the box (//kt//) is recalculated ​to a corresponding recession coefficient (//​riverrc//​). The recession coefficient ​(//​riverrc//​) ​used to calculate the outflow from the box (//dampq//) is a function of volume in the box (//​riverbox//​).
  
 <m> kt = damp * totaltime </m> <m> kt = damp * totaltime </m>
Line 173: Line 180:
  
  
-Bank-full flow is used for erosion of particulate phosphorus in rivers (see Sedimentation). It is approximated by the second highest daily flow during the last year.+Bank-full flow is used for erosion of particulate phosphorus in rivers (see [[start:​hype_model_description:​hype_np_riv_lake#​sedimentation_resuspension|Sedimentation/​Resuspension]]). It is approximated by the second highest daily flow during the last year.
  
  
Line 179: Line 186:
 ==== Local river ==== ==== Local river ====
  
-The local river has a length equal to the square root of the subbasin area. Subbasin runoff ​forms the inflow to the local river. The flow in the local river is delayed and attenuated as described above. Of the resulting flow from the stream a constant percentage goes to the local lake, and the rest directly to the main river. ​+The local river has a length equal to the square root of the subbasin area, if not specified as inputRunoff from the land area of the subbasin ​forms the inflow to the local river. The flow in the local river is delayed and attenuated as described above. Of the resulting flow from the stream a constant percentage goes to the local lake (//​icatch//​), and the rest directly to the main river. ​
  
 ==== Main river ==== ==== Main river ====
  
-A main river is present in all subbasins. The length is equal to the square root of the subbasin area, if it is not specified ​in GeoData.txt. In areas without incoming water from upstream there is still a main river, but it receives only local river flow after the local lake. In subbasins with upstream incoming water, the flow to the main river will be the sum of outflow from the local lake, the proportion of flow in the local river not flowing into the local lake and the water from upstream.+A main river is present in all subbasins. The length is equal to the square root of the subbasin area, if it is not specified ​as input. In areas without incoming water from upstream there is still a main river, but it receives only local river flow after the local lake. In subbasins with upstream incoming water, the flow to the main river will be the sum of outflow from the local lake, the proportion of flow in the local river not flowing into the local lake and the water from upstream.
  
 The return flow from an aquifer is added to the inflow of the main river. The return flow from an aquifer is added to the inflow of the main river.
Line 189: Line 196:
 The flow in the main river is delayed and attenuated as described above. ​ The flow in the main river is delayed and attenuated as described above. ​
 The resulting effluent from the river flows to the outlet lake or to the next subbasin if there is no outlet lake.  The resulting effluent from the river flows to the outlet lake or to the next subbasin if there is no outlet lake. 
 +
 +If the main river length is zero, the inflows to the main river is added to form the main river outflow.
  
 === Inflow from upstream subbasins === === Inflow from upstream subbasins ===
  
-In GeoData.txt ​it is given to which subbasin(s) the (main) ​outflow from each subbasin flows. The upstream flow enters the main river of the downstream subbasin. Inflow into the main river of a subbasin is calculated by adding outflows from upstream areas. Concentrations are flow-weighted by their relative share. ​+In input files it is given to which subbasin(s) the outflow from each subbasin flows. The upstream flow enters the main river of the downstream subbasin. Inflow into the main river of a subbasin is calculated by adding outflows from upstream areas. Concentrations are flow-weighted by their relative share. ​The upstream flow enters the main river, except if the upstream subbasin has a lakebasin that is part of the downstream subbasin'​s lake. In this case the upstream lakebasin outflow goes directly into the downstream lakebasin.  
 + 
 +=== Hydraulic geometry and river rating curve === 
 + 
 +River diagnostic variables can be calculated for the main river. A river water depth (//d//) and river velocity (//u//) can be calculated from hydraulic geometry for the main river. The equation coefficients are general (//​c,​f,​k,​m//​). 
 + 
 +<m> d=c*q^f </​m>​ 
 + 
 +<m> u=k*q^m </​m>​ 
 + 
 +where //c,f,k// and //m// are given by general parameters.  
 + 
 +With a given rating curve for main river flow, the water level of the river (//wr//) can be calculated by the inverse of the rating curve. Basin dependent values for reference level (//w0//) and the rating curve coefficients are input. Two rating curves may be given for each  main river, one for general and ice free condition and one for use with ice on the river. The rating curve for ice conditions are only used if one is given for no ice conditions. 
 + 
 +<m> wr = wl + w0 </​m>​ 
 + 
 +<m> q=k*(wl-w0)^p </​m>​ 
 + 
 +give coefficients //c// and //f// for the inverse equation: 
 + 
 +<m> c={1/​k}^{1/​p} ​ f=1/p </​m>​ 
 + 
 +<m> wr = c*q^f+w0 </​m>​. 
 + 
 + 
 +==== Links to file reference ==== 
 + 
 +^Section ^Symbol ^Parameter/​Data ^File ^ 
 +|Common rivers processes|//​rivlen//​|//​rivlen,​ loc_rivlen//​|[[start:​hype_file_reference:​geodata.txt|GeoData.txt]]| 
 +|:::​|//​fraxe,​ fraxm, rivvel, damp//​|//​fraxe,​ fraxm, rivvel, damp//​|[[start:​hype_file_reference:​par.txt|par.txt]]| 
 +|:::​|//​dead//​|//​deadm,​ deadl//​|:::​| 
 +|Local river| |//​icatch//​|[[start:​hype_file_reference:​geodata.txt|GeoData.txt]]| 
 +|:::| |//gicatch, illicatch//​|[[start:​hype_file_reference:​par.txt|par.txt]]| 
 +|Main river| |//​maindown//​|[[start:​hype_file_reference:​geodata.txt|GeoData.txt]]| 
 +|:::| |//​branchid//​|[[start:​hype_file_reference:​branchdata.txt|BranchData.txt]]| 
 +|:::|//c, f, k, m// |//hygeomc, hygeomf, hygeomk, hygeomm//​|[[start:​hype_file_reference:​par.txt|par.txt]]| 
 +|:::|//k, p, w0// |//​mrrivck_noi,​ mrrivck_ice,​ mrrivcp_noi,​ mrrivcp_ice,​ mrrivcw0//​|[[start:​hype_file_reference:​geodata.txt|GeoData.txt]]|
  
 ==== Links to relevant modules in the code ==== ==== Links to relevant modules in the code ====
Line 206: Line 251:
 |:::​|calc_qbank|bank-full flow| |:::​|calc_qbank|bank-full flow|
 |:::​|update_qbank |:::| |:::​|update_qbank |:::|
 +|:::​|river_water_level |main river| 
 +|:::​|ice_on_river|:::​|
  
  
Line 215: Line 261:
 === Precipitation === === Precipitation ===
  
-Daily precipitation is added to the lake and a new concentration is calculated. Lakes are assumed to be completely mixed if the parameter //​deeplake//​ is not set to a value greater than zero.+Daily precipitation is added to the lake and a new concentration is calculated. Lakes are assumed to be completely mixed.
  
 === Evaporation === === Evaporation ===
  
-The lake is assumed to evaporate and a new concentration calculated.+The lake is assumed to evaporate ​at potential evaporation rate (see [[start:​hype_model_description:​processes_above_ground#​evaporation|Processes above ground - Evaporation]]) ​and a new concentration calculated. The actual evaporating area is reduced if the lake is (partly) ice covered. Ice is calculated in case water temperature (substance T2) is simulated.
  
 === Outflow with rating curve ==== === Outflow with rating curve ====
Line 232: Line 278:
 The local lake has an initial volume which is determined by its area and threshold depth. The lake depth is determined by model parameters (//gldepi// or //​illdepth//​)). ​ The local lake has an initial volume which is determined by its area and threshold depth. The lake depth is determined by model parameters (//gldepi// or //​illdepth//​)). ​
  
-The inflow to the lake is a percentage of the flow in the local stream. The percentage is determined by the percentage of the subbasin area that drain to the lake. This percentage can be given as a fraction in GeoData.txt ​(//​icatch//​) ​for each subbasin with an internal lake, or be given by a regional parameter //​ilicatch//,​ or be given by a general parameter //​gicatch//​. If not set at all the default value is 1, i.e. the local river runs through the loacal ​lake. The flow from the local river is added to the lake. The lake water is assumed completely mixed if //deeplake = 0//+The inflow to the lake is a percentage of the flow in the local stream ​(//​icatch//​). The percentage is determined by the percentage of the subbasin area that drain to the lake. This percentage can be given as a fraction in GeoData.txt for each subbasin with an internal lake, or be given by a regional parameter //​ilicatch//,​ or be given by a general parameter //​gicatch//​. If not set at all the default value is 1, i.e. the local river runs through the local lake. The flow from the local river is added to the lake. The lake water is assumed completely mixed. ​
  
 Water outflow is calculated with the universal rating curve using general or region specific model parameters. Water outflow is calculated with the universal rating curve using general or region specific model parameters.
Line 255: Line 301:
 In LakeData.txt a specific rating curve may be set instead of the general parameters. This is done by setting the //rate// and //exp// larger than zero in LakeData.txt. In LakeData.txt a specific rating curve may be set instead of the general parameters. This is done by setting the //rate// and //exp// larger than zero in LakeData.txt.
  
-<m> outflow = rate * (wlm – lake_depth) ^ {exp} </m>+<m> outflow = rate * (wlm - lake_{depth}) ^ {exp} </m>
  
 === Regulated lake === === Regulated lake ===
Line 266: Line 312:
  
 |{{:​start:​hype_model_description:​illustraion_of_regulation_flow.png?​400|}}| |{{:​start:​hype_model_description:​illustraion_of_regulation_flow.png?​400|}}|
-|Figure ​4: Illustration of regulation flow and variables.|+|Figure ​3: Illustration of regulation flow and variables.|
  
 For water levels above the threshold, the flow is calculated with a rating curve (typically flow through spillways) or all the water is discharged, but it is at least equal to the production flow (//​qprod//​). Compiled together as one equation, the outflow from a regulated lake is: For water levels above the threshold, the flow is calculated with a rating curve (typically flow through spillways) or all the water is discharged, but it is at least equal to the production flow (//​qprod//​). Compiled together as one equation, the outflow from a regulated lake is:
Line 274: Line 320:
 Input variables //rate, exp, qprod, regvol, w0, qamp// and //qpha// can be found in LakeData.txt. The variable //wmin// is calculated by the program from //regvol// and lake area: Input variables //rate, exp, qprod, regvol, w0, qamp// and //qpha// can be found in LakeData.txt. The variable //wmin// is calculated by the program from //regvol// and lake area:
  
-<​m> ​ wmin = w0 – regvol * 1000000 / area </m>+<​m> ​ wmin = w0 regvol * 1000000 / area </m>
  
 Production flow can have two different values during the year, which depends on the day of the year. This is determined by the input variables //qprod1, qprod2, datum1// and //datum2//. Regulation period 1 between //datum1// and //datum2// has production flow //qprod1//, while the rest of the year has production flow //qprod2//. Not setting the dates gives the same production flow the whole year (//​qprod1//​). Production flow can alternatively be made to vary sinusoidal over the years, with a peak in December, when power output is normally high, and a minimum in June. This is done with the input variable //qamp//. If you want a different seasonal variation set //qpha// (default = 102). Production flow can have two different values during the year, which depends on the day of the year. This is determined by the input variables //qprod1, qprod2, datum1// and //datum2//. Regulation period 1 between //datum1// and //datum2// has production flow //qprod1//, while the rest of the year has production flow //qprod2//. Not setting the dates gives the same production flow the whole year (//​qprod1//​). Production flow can alternatively be made to vary sinusoidal over the years, with a peak in December, when power output is normally high, and a minimum in June. This is done with the input variable //qamp//. If you want a different seasonal variation set //qpha// (default = 102).
Line 336: Line 382:
 == 4 - Hydropower dam == == 4 - Hydropower dam ==
  
-Dams for hydropower uses the general preferred production flow, but it may be adjusted with a seasonal factor. The factor is sinusoidal over the year, with a peak in December, when power output is normally high, and a minimum in June. This is done with the input variable //qamp//. If you want a different seasonal phase set //qpha// to another value (default = 102).+Dams for hydropower uses the general preferred production flow, but it may be adjusted with a seasonal factor. The factor is sinusoidal over the year, with a peak in December, when power output is normally high, and a minimum in June. If you want a different seasonal phase set //qpha// to another value (default = 102). The seasonal adjustment is set with the input variable //qamp// (>​0,<​1) for each dam
  
 <m> qprod = qprod*(1 + qamp * sin(2*pi*(dayno+qpha)/​365)) </m> <m> qprod = qprod*(1 + qamp * sin(2*pi*(dayno+qpha)/​365)) </m>
  
 +Alternatively the seasonal variation adjustment can be determined by the climate. If this option is used //qamp// is set to zero (or left out) in the file, and the value used in the calculations is determined by the fraction of snow fall (//​snowfrac//​) for each lake. If the snow fall fraction is above 0.35, a //qamp// of 0.71 is used.
  
 ==== Outlet lake with two outlets ==== ==== Outlet lake with two outlets ====
  
-An outlet lake that is not part of a lake composed of lakebasins, may have two defined outlets in [[start:​hype_file_reference:​lakedata.txt|LakeData.txt]]. The outlets can be divided into different outlet types depending on method for determining the outflow. HYPE will define an outlet'​s type based on variables present in [[start:​hype_file_reference:​lakedata.txt|LakeData.txt]]. Below the defining (necessary) variables are given for each outlet type.+An outlet lake that is not part of a lake composed of lakebasins, may have two defined outlets in [[start:​hype_file_reference:​lakedata.txt|LakeData.txt]]. The outlets can be divided into different outlet types depending on method for determining the outflow. HYPE will define an outlet'​s type based on variables present in [[start:​hype_file_reference:​lakedata.txt|LakeData.txt]]. Below the defining (necessary) variables are given for each outlet type. Note: The threshold (w0ref) is given for first outlet. For the second outlet this variable instead is given relative to the threshold of outlet 1 (i.e usually zero)
  
 === Outlet types === === Outlet types ===
Line 384: Line 430:
  
  
-Many other combinations can be used, but not all outlet types are natural to combine. The following are not allowed:+Many other combinations can be used, but not all outlet types are natural to combine. The following are **not allowed**:
  
 ^ Outlet 1 ^ Outlet 2 ^ ^ Outlet 1 ^ Outlet 2 ^
Line 405: Line 451:
  
  
-==== Outlet lake (olake) ​as a lake basin ====+==== Outlet lake as a multi-basin lake composed of lake basins ​====
  
-An olake can be part of a larger lake. It is then called a lake basin of the larger lake. Lake basins ​are treated differently if they are located within the lake or if they are the last onei.e. the one with the lake outflow+An olake can be part of a larger lake. It is then called a lake basin of the larger ​multi-basin ​lake. A multi-basin lake is assumed to have equal water level in all lake basins. The lake basins can have different depths below the outflow thresholdand they all use the same threshold when the water level output is calculated (same reference).
  
 === Inflow === === Inflow ===
  
-A lake basin can get local inflow from upstream areas and from the regional groundwater. Inflow works in the same way as for a simple olake (see above).+A lake basin can get local inflow, ​inflow from upstream areas (that are not in the same multi-basin lake) and from the regional groundwater. Inflow works in the same way as for a simple olake (see above).
  
 === Flow between lake basins === === Flow between lake basins ===
  
-Flow through a lake divided into lake basins occurs ​only in one direction according to the //maindown// (and possibly ​//branchdown//), no two-way exchange between lake basins is implementedFor upstream ​lake basins ​that run into another ​lake basin, all the water above the threshold is drained. The threshold ​of the lake (same as last lake basin) ​is used, not any internal threshold ​between lake basins. If the lake water level (//​wlm//​) ​is higher than the threshold ​(//w0// or //wmin//) outflow is obtained.+Flow through a lake divided into lake basins ​can occurs in both direction according to the maindown (and possibly branchdown). ​The implementation prioritize flow from nearby ​lake basins ​and flow in the downstream direction when calculation the flow betweeen ​lake basins to reach the equal water level. No internal ​threshold ​between lake basins ​is considered when the flows are calculated 
 + 
 +The flow out of a lakebasin is determined in several steps: 
 +  - First the net outflow of each lakebasin ​is calculated. It is calculated as the difference ​between ​the current water level of the lakebasin and the water level of the whole lake after outflow from the lake. Thus the average ​water level of the lake is calculated and from this the outflow(sof the lake. Considering these outflows leaving the lake, a new average water level is calculated that the lake will have after all flows between lakebasins have been moved.  
 +  - The flow out of a lakebasin is the netflow plus all inflows from other lakebasins. The inflows are outflows of other lakebasins. Starting upstream in the lake the inflows are added to the outflow ​to give the flow out of every lakebasin. Note that these can be negative.  
 +  - The last step is to actually move the water. Preferably we want water to move from one lakebasin to the next, without mixing with water incoming from lakebasins further upstream. This we want so that substances do not travel all the way to the lake outlet on one time step. Therefore we try to remove all outflows from the lakebasins before we add the removed water into the downstream lakebasins. This might not be possible so we keep track of how much we can't move and repeat the third step if necessary 
  
 === Outflow of lake composed of lake basins === === Outflow of lake composed of lake basins ===
  
  
-For the last lake basin outflow is estimated by a rating curve, either a specific equation or with the general equation, or by regulation routine. ​Since all the water (above threshold) in the lake (from all lake basins) accumulates in the last lake basin the water level cannot be used directly, but it is recalculated to calculate the outflow from the lake. The last lake basin water level (//wlm//) is scaled by the subbasin lake area (//area//) to the whole lake area (//​lakearea//​). If the calculated lake water level (//wlake//) is higher than the threshold (//​wthresh//​) the outflow is estimated by the rating curve. +The main outflow of the lake is assumed to be located in the last lake basin. Here outflow is estimated by a rating curve, either a specific equation or with the general equation, or by regulation routine. The threshold may be changing over the year as described in Section Two rating curves above. If the water level is below the threshold then the outflow is zero or if the production flow regulation is used there is production flow. See Section Production flow above. ​In addition the lake can have branched outflows out of the multi-basin lake from other lakebasins. The branched outflows ​is specified in LakeData and can be a rating curve or a production flow that uses the same thresholds as the main outlet
- +
-  wlake = (wlm – wthresh) * area / lakearea + wthresh +
-  outflow = rate * (wlake – wthresh)**exp +
- +
-The threshold may be changing over the year as described in Section Two rating curves above. If the water level is below the threshold then the outflow is zero or if the production flow regulation is used there is production flow. See Section Production flow above. ​Production flow is also applied on the recalculated water stage.+
  
 ==== Initalisation of lake volume ==== ==== Initalisation of lake volume ====
  
-Unless a starting state is given from a file, the lakes start the simulation filled with water to their outflow threshold. That means for ilakes and simple olakes ​a water level equal to //​lake_depth//​. Dams are filled to the dam's maximum elevation (equal to //​lake_depth//​),​ except for flood control dams which are initializied with an empty regulation volume. ​+Unless a starting state is given from a file, the lakes start the simulation filled with water to their outflow threshold. That means for most lakes a water level equal to //​lake_depth//​. Dams are filled to the dam's maximum elevation (equal to //​lake_depth//​),​ except for flood control dams which are initializied with an empty regulation volume. ​
  
 For lakes with outflow determined by a rating curve, the water level of the lake will be higher than the outflow threshold level. The equilibrium level will depend on the size of the inflow and the outflow rating curve parameters. Depending on the residence time of water in the lake it may take time for this level to be established,​ and until then the outflow of the lake will be simulated lower than it should be. Thus a spin-up time is needed for a model simulation. For lakes with outflow determined by a rating curve, the water level of the lake will be higher than the outflow threshold level. The equilibrium level will depend on the size of the inflow and the outflow rating curve parameters. Depending on the residence time of water in the lake it may take time for this level to be established,​ and until then the outflow of the lake will be simulated lower than it should be. Thus a spin-up time is needed for a model simulation.
 +
 +
 +==== Links to file reference ====
 +
 +^Section ^Symbol ^Parameter/​Data ^File ^
 +|Local lake (ilake)| |//gldepi, illdepth, gratk, gratp, grata, ilratk, ilratp//​|[[start:​hype_file_reference:​par.txt|par.txt]]|
 +|:::​|//​icatch//​|//​icatch//​|[[start:​hype_file_reference:​geodata.txt|GeoData.txt]]|
 +|:::|::: |or //gicatch, illicatch//​|[[start:​hype_file_reference:​par.txt|par.txt]]|
 +|Simple outlet lake or dam (olake)|//​lake<​sub>​depth</​sub>//​|//​lake_depth//​|[[start:​hype_file_reference:​geodata.txt|GeoData.txt]] or [[start:​hype_file_reference:​lakedata.txt|LakeData.txt]] or [[start:​hype_file_reference:​damdata.txt|DamData.txt]]|
 +|:::​|:::​|//​gldepo,​ olldepth//​|[[start:​hype_file_reference:​par.txt|par.txt]]|
 +|:::| |//ratcorr, olratk, olratp, kthr, klow, krel//|:::|
 +|:::​|//​wmin//​|calculated from //​regvol//​|[[start:​hype_file_reference:​lakedata.txt|LakeData.txt]] or [[start:​hype_file_reference:​damdata.txt|DamData.txt]]|
 +|:::| |//rate, exp, qamp, qpha//|:::|
 +|:::​|//​qprod//​|//​qprod1,​ qprod2, datum1, datum2//​|:::​|
 +|:::| |//​limqprod//​|[[start:​hype_file_reference:​lakedata.txt|LakeData.txt]] or [[start:​hype_file_reference:​par.txt|par.txt]]|
 +|:::| |//​deltaw0//​|[[start:​hype_file_reference:​lakedata.txt|LakeData.txt]]|
 +|:::| |//purpose, snowfrac//​|[[start:​hype_file_reference:​damdata.txt|DamData.txt]]|
 +|:::​|//​Qinf//​|//​qinfjan,​ qinffeb, .., qinfdec//​|:::​|
 +|Outlet lake with two outlets| |//​ldtype//​=5 or 6|[[start:​hype_file_reference:​lakedata.txt|LakeData.txt]]|
 +|:::| |//w0ref, maxQprod, minflow, obsflow//​|:::​|
 +
  
 ==== Links to relevant modules in the code ==== ==== Links to relevant modules in the code ====
Line 440: Line 507:
 |::: |average_flow_rating_curve|ouflow with rating curve| |::: |average_flow_rating_curve|ouflow with rating curve|
 |::: |calculate_ilake_outflow|local lake| |::: |calculate_ilake_outflow|local lake|
-|::: |calculate_outflow_from_outlet_lake|simple outlet lake| 
-|::: |:::|outlet lake as a lakebasin| 
-|:::​|:::​|outlet lake with two outlets| 
 |:::​|set_general_rating_k|simple outlet lake| |:::​|set_general_rating_k|simple outlet lake|
-|:::|calculate_olake_waterstage|outlet lake as a lakebasin+|::: |calculate_outflow_from_outlet_lake calculate_branched_flow|simple ​outlet lake| 
-|:::|calculate_branched_flow|outlet lake with two outlets| +|:::|:::|outlet lake with two outlets| 
-|:::|calculate_branched_flow_new|:::|+|:::|calculate_lake_outlet_outflow|outlet lake with two outlets| 
 +|:::​|calculate_lakebasin_average_waterstage|outlet lake as multi-basin lake| 
 +|:::​|calculate_outflow_from_lakebasin_lake|:::​| 
 +|:::​|calculate_branched_flow|:::|
 |[[http://​hype.sourceforge.net/​doxy-html/​namespacemodelmodule.html|modelmodule (model_hype.f90)]] |initiate_model | local lake | |[[http://​hype.sourceforge.net/​doxy-html/​namespacemodelmodule.html|modelmodule (model_hype.f90)]] |initiate_model | local lake |
 +|::: |calculate_flow_from_undivided_lake|simple outlet lake|
 +|:::​|:::​|outlet lake with two outlets|
 +|::: |calculate_flow_for_lakebasin_lake|outlet lake as multi-basin lake|
  
 ==== References ==== ==== References ====
Line 457: Line 527:
  
 |{{:​start:​hype_model_description:​FloodScenarios.png?​400|}}| |{{:​start:​hype_model_description:​FloodScenarios.png?​400|}}|
-| Figure ​7: Five possible scenarios of flooding.|+| Figure ​4: Five possible scenarios of flooding.|
  
 ==== Common floodplain processes ==== ==== Common floodplain processes ====
Line 470: Line 540:
 <m> a_max = fpf * classarea ​ </m> <m> a_max = fpf * classarea ​ </m>
  
-|{{:​start:​hype_model_description:​FloodVarFlow.png?​400|}}| +| {{:​start:​hype_model_description:​FloodVarFlow.png?​400}} ​    ​
-| Figure ​8: Illustration of floodplain variables of a lake.|+| Figure ​5: Illustration of floodplain variables of a lake.  |
  
 The exchange of water between lake (or river) and floodplain is determined by the respective water levels (//​wl<​sub>​body</​sub>//​ and //​wl<​sub>​plain</​sub>//​),​ the equilibrium water level (//​wl<​sub>​equil</​sub>//​) and the thresholds between the water bodies (//​fl<​sub>​body</​sub>/​fl<​sub>​plain</​sub>//​). ​ The exchange of water between lake (or river) and floodplain is determined by the respective water levels (//​wl<​sub>​body</​sub>//​ and //​wl<​sub>​plain</​sub>//​),​ the equilibrium water level (//​wl<​sub>​equil</​sub>//​) and the thresholds between the water bodies (//​fl<​sub>​body</​sub>/​fl<​sub>​plain</​sub>//​). ​
Line 494: Line 564:
  
 |{{:​start:​hype_model_description:​FloodVar2.png?​400|}}| |{{:​start:​hype_model_description:​FloodVar2.png?​400|}}|
-| Figure ​9: Illustration of floodplain soil flows.|+| Figure ​6: Illustration of floodplain soil flows.|
  
 ==== Connected floodplains ==== ==== Connected floodplains ====
  
 It is possible for flooded floodplains to limit the water flow from upstream rivers and lakes. This is determined based on the water levels in the floodplains,​ a higher water level of a downstream floodplain compared to a upstream floodplain may reduced the flow from the upstream compartment (main river or outlet lake) to the downstream compartment (main river or outlet lake). The damming flow is calculated as the flow to reach equilibrium water level between the two floodplains. The relative level of the two floodplains location is determined based om the classes average elevation and thresholds or given as indata separately. The function of connecting floodplains works within a subbasin or between connected subbasins. This floodplain features may be used together with the **Floodplain model with soil routines**. It is possible for flooded floodplains to limit the water flow from upstream rivers and lakes. This is determined based on the water levels in the floodplains,​ a higher water level of a downstream floodplain compared to a upstream floodplain may reduced the flow from the upstream compartment (main river or outlet lake) to the downstream compartment (main river or outlet lake). The damming flow is calculated as the flow to reach equilibrium water level between the two floodplains. The relative level of the two floodplains location is determined based om the classes average elevation and thresholds or given as indata separately. The function of connecting floodplains works within a subbasin or between connected subbasins. This floodplain features may be used together with the **Floodplain model with soil routines**.
 +
 +
 +==== Links to file reference ====
 +
 +^Section ^Symbol ^Parameter/​Data ^File ^
 +| |//​fpf//​|//​fpfol,​ fpfmr//​|[[start:​hype_file_reference:​flooddata.txt|FloodData.txt]]|
 +|Common floodplain processes|//​classarea//​|//​slc_nn,​ area//​|[[start:​hype_file_reference:​geodata.txt|GeoData.txt]]|
 +|:::​|//​fym//​|//​fymol,​ fymmr//​|[[start:​hype_file_reference:​flooddata.txt|FloodData.txt]]|
 +|:::​|//​rc<​sub>​bodyToPlain</​sub>//​|//​rclfp,​ rcrfp//​|:::​|
 +|:::​|//​rc<​sub>​plainToBody</​sub>//​|//​rcfpl,​ rcfpr//​|:::​|
 +|:::​|//​fl<​sub>​body</​sub>//​|//​floll,​ flmrr//​|:::​|
 +|:::​|//​fl<​sub>​plain</​sub>//​|//​flolp,​ flmrp//​|:::​|
 +|Connected floodplains| |//hrefl, hrefr//​|:::​|
  
 ==== Links to relevant modules in the code ==== ==== Links to relevant modules in the code ====
Line 523: Line 606:
 ===== Bifurcations ===== ===== Bifurcations =====
  
-Outflow from a subbasin may flow in one or two directions. The main flow follows the main channel, which is the downstream subbasin ​described ​by the path given in [[start:​hype_file_reference:​geodata.txt|GeoData.txt]]. If there is a bifurcation,​ the branch flow goes to another downstream subbasin. Any of the flows may go outside the model set-ups area, they are then no longer a concern of the model. ​There are three ways to determine the flow in the different channels. 1) The division of the total outflow is determined in BranchData.txt. 2) The outflow is calculated for two outlets separately and then divided into the channels. For the second alternative see [[start:​hype_model_description:​hype_routing#​outlet_lake_with_two_outlets|Outlet lake with two outlets]] section above. 3. The demanded flow in the branch is prescibed. If the total flow is not enough to fulfil the need, less water goes into the branch. The main channel gets the rest of the total flow. For the first method the flow division into two channels by BranchData.txt is described by four parameters; //​mainpart//,​ //​maxQ<​sub>​main</​sub>//,​ //​minQ<​sub>​main</​sub>//​ and //​maxQ<​sub>​branch</​sub>//,​ which is set in [[start:​hype_file_reference:​branchdata.txt|BranchData.txt]]. Zero values of the parameters mean they are not used. The main flow (//​mainflow//​) is calculated from the totalflow (//q//) as: +Outflow from a subbasin may flow in one or two directions. The main flow follows the main channel, which is the downstream subbasin ​given by the path in [[start:​hype_file_reference:​geodata.txt|GeoData.txt]]. If there is a bifurcation,​ the branch flow goes to another downstream subbasin ​(with subid //​branchid//​). Any of the flows may go outside the model set-ups area, they are then no longer a concern of the model. ​
  
-<m> mainflow = delim{lbrace}{matrix{4}{2}{q {q<​=minQ_main} {mainpart×(q-minQ_main)+minQ_main} {minQ_main<​q<​=q_thresh} {maxQ_main} {q>​q_thresh \,\ q_thresh={{maxQ_main-minQ_main}/​{mainpart}}+minQ_main} ​ {q-maxQ_branch} ​ {q>​q_thresh\ ,\ q_thresh={{maxQ_branch}/​{1-mainpart}}+minQ_main}}}{} </m>+There are three ways to determine the flow in the different channels. 1) The division of the total outflow is determined in BranchData.txt. 2) The outflow is calculated for two outlets separately and then divided into the channels. For the second alternative see [[start:​hype_model_description:​hype_routing#​outlet_lake_with_two_outlets|Outlet lake with two outlets]] section above. 3) The demanded flow in the branch is prescribed (//​Qbranch//​). If the total flow is not enough to fulfil the need, less water goes into the branch. The main channel gets the rest of the total flow.  
 + 
 +For the first method the total outflow has been calculated the ordinary way. The flows division into the two channels is the determined by four parameters; //​mainpart//,​ //​maxQ<​sub>​main</​sub>//,​ //​minQ<​sub>​main</​sub>//​ and //​maxQ<​sub>​branch</​sub>//,​ which are set in [[start:​hype_file_reference:​branchdata.txt|BranchData.txt]]. Zero values of the input data mean they are not used. The main flow (//​mainflow//​) is calculated from the totalflow (//q//) as:  
 + 
 +<m> mainflow = delim{lbrace}{matrix{4}{2}{q {q<​=minQ_main} {mainpart*(q-minQ_main)+minQ_main} {minQ_main<​q<​=q_thresh} {maxQ_main} {q>​q_thresh \,\ q_thresh={{maxQ_main-minQ_main}/​{mainpart}}+minQ_main} ​ {q-maxQ_branch} ​ {q>​q_thresh\ ,\ q_thresh={{maxQ_branch}/​{1-mainpart}}+minQ_main}}}{} </m>
  
  
Line 538: Line 625:
  
 |{{:​start:​hype_model_description:​mainflow.png?​400|}}| |{{:​start:​hype_model_description:​mainflow.png?​400|}}|
-| Figure ​5: Main flow in relation to total flow for four different parameter combinations.|+| Figure ​7: Main flow in relation to total flow for four different parameter combinations.|
  
 |{{:​start:​hype_model_description:​branchflow.png?​400|}}| |{{:​start:​hype_model_description:​branchflow.png?​400|}}|
-| Figure ​6: Branch flow in relation to total flow for four different parameter combinations.|+| Figure ​8: Branch flow in relation to total flow for four different parameter combinations.| 
 + 
 + 
 + 
 +==== Links to file reference ====
  
 +^Symbol ^Parameter/​Data ^File ^
 +|//​branchid,​ Qbranch, mainpart//​|//​branchid,​ Qbranch, mainpart//​|[[start:​hype_file_reference:​branchdata.txt|BranchData.txt]]|
 +|//​maxQ<​sub>​main</​sub>,​ minQ<​sub>​main</​sub>,​ maxQ<​sub>​branch</​sub>//​|//​maxQmain,​ minQmain, maxQbranch//​|:::​|
  
 ==== Links to relevant modules in the code ==== ==== Links to relevant modules in the code ====
start/hype_model_description/hype_routing.txt · Last modified: 2024/01/25 11:37 (external edit)