Functions/Subroutines | |
subroutine, public | initiate_regional_groundwater_flow (n, ns, cb_ilake, cb_olake, cb_lriver, cb_mriver, cb_iwet, cb_owet) |
subroutine, public | initiate_aquifer_state (aquiferstate) |
subroutine, public | initiate_aquifer_model (n, ns, na) |
subroutine, public | calculate_regional_groundwater_flow (soilstate, outputflow) |
subroutine | calculate_soillayer_groundwaterflow_removal (i, j, subid, n, soil, csoil, rcgrwpar, plantwater, flow, cflow) |
subroutine, public | calculate_river_groundwaterflow_removal (i, j, subid, n, riverstate, flow, dampflow) |
subroutine, public | calculate_river_floodplain_groundwaterflow_removal (i, j, subid, n, miscstate, flow) |
subroutine | set_percolation_concentration (n, waterconc, percconc) |
subroutine | calculate_aquifer_percolation (perc, cperc) |
subroutine, public | calculate_aquifer (aquiferstate, aqoutflow, remflow2, aquiferirrloss) |
subroutine | calculate_percolation_delay (aquiferstate, na, ns, perc, cperc, recharge, crecharge) |
subroutine, public | calculate_delayed_water (aquiferstate, na, water) |
subroutine | calculate_aquifer_outflow (ia, aquiferstate, aqoutflow, caqoutflow) |
subroutine, public | calculate_current_flow_from_aquifer (na, ns, aquiferstate, outsideflow) |
subroutine, public | add_regional_groundwater_flow_to_soil (i, j, classarea, pw, soilstate, load, upwardflow, addedflow) |
subroutine, public | add_regional_groundwater_flow_to_olake (i, itype, numsubst, qfactor, lakev, lakec, qcinfl, grwload, addedwater) |
subroutine, public | add_aquifer_flow_to_river (i, numsubst, qin, cin, addedwater, addedload) |
real function, dimension(ns), public | calculate_aquifer_waterlevel (ns, na, aquiferstate) |
real function, dimension(ns), public | calculate_aquifer_conc (ns, na, subst, aquiferstate) |
Variables | |
character(len=49), dimension(5) | errstring |
real, dimension(:), allocatable | regrwarea |
real, dimension(:), allocatable | grwflow |
real, dimension(:,:), allocatable | cgrwflow |
real, dimension(:), allocatable | dcoeff |
real, dimension(:), allocatable | addflow |
real, dimension(:,:), allocatable | caddflow |
Regional groundwater calculations in HYPE.
Two options for regional groundwater: 1-instant transport to outlet of same subbasin or soil of subbasin 2-aquifer with delay of groundwater flow
Model 1: Regional groundwater flow can move water (and concentrations) from lowest soil layer to the outlet lake of the subbasin or to the lowest soil layer in another subbasin. It uses the surface water subbasin coupling if no separate coupling for regional groundwater flow is given.
Model 2: The aquifer modelled is a sub-surface, hydrologically connected, unconfined storage. It is treated as a single large store of water and a reactor for substances.
subroutine, public regional_groundwater_module::add_aquifer_flow_to_river | ( | integer, intent(in) | i, |
integer, intent(in) | numsubst, | ||
real, intent(inout) | qin, | ||
real, dimension(numsubst), intent(inout) | cin, | ||
real, intent(out) | addedwater, | ||
real, dimension(numsubst), intent(out) | addedload | ||
) |
Add aquifer outflow to main river.
Reference ModelDescription Chapter Deep processes (Aquifers)
[in] | i | index for subbasin |
[in] | numsubst | number of substances (numsubstances) |
[in,out] | qin | inflow to river (m3/s) |
[in,out] | cin | concentration of river inflow |
[out] | addedwater | water added (m3/timestep) |
[out] | addedload | load to river inflow |
Algorithm
Return if no outflow here
Add aquifer flow to river inflow
subroutine, public regional_groundwater_module::add_regional_groundwater_flow_to_olake | ( | integer, intent(in) | i, |
integer, intent(in) | itype, | ||
integer, intent(in) | numsubst, | ||
real, intent(in) | qfactor, | ||
real, intent(inout) | lakev, | ||
real, dimension(numsubst), intent(inout) | lakec, | ||
real, intent(inout) | qcinfl, | ||
real, dimension(numsubst), intent(out) | grwload, | ||
real, intent(out) | addedwater | ||
) |
Add regional groundwater flow to outlet lake of subbasin.
Reference ModelDescription Chapter Deep processes (Regional groundwater flow - Regional groundwater to outlet lake)
[in] | i | index for subbasin |
[in] | itype | lake type (ilake or olake) |
[in] | numsubst | number of substances (numsubstances) |
[in] | qfactor | flow unit transformation factor (m3/s->mm/timestep) |
[in,out] | lakev | lake volume (i.e. water stage) (mm) |
[in,out] | lakec | concentration of lake |
[in,out] | qcinfl | total inflow to olake (m3/s) (print out variable) |
[out] | grwload | load added (kg/timestep, U/timestep) |
[out] | addedwater | water added (m3/timestep) |
Algorithm
Return if not outlet lake
If regional groundwater flow to current lake:
Add regional groundwater flow to lake
Calculate (nutrient) load added to lake by regional groundwater flow
subroutine, public regional_groundwater_module::add_regional_groundwater_flow_to_soil | ( | integer, intent(in) | i, |
integer, intent(in) | j, | ||
real, intent(in) | classarea, | ||
real, dimension(maxsoillayers), intent(in) | pw, | ||
type(soilstatetype), intent(inout) | soilstate, | ||
real, dimension(numsubstances), intent(inout) | load, | ||
real, dimension(2), intent(out) | upwardflow, | ||
real, dimension(maxsoillayers,nsub), intent(inout) | addedflow | ||
) |
Add regional lateral groundwater flow from other subbasins to soil.
Reference ModelDescription Chapter Deep processes (Regional groundwater flow)
[in] | i | current subbasin index |
[in] | j | current class index |
[in] | classarea | class area (km2) |
[in] | pw | pore volume (mm) |
[in,out] | soilstate | Soil states |
[in,out] | load | load into soil (kg/timestep) |
[out] | upwardflow | upwelling due to overflowing lower soil layers (mm/timestep) |
[in,out] | addedflow | added regional groundwater flow (m3/timestep) |
Algorithm
For every subbasin that has regional flow to current subbasin:
subroutine, public regional_groundwater_module::calculate_aquifer | ( | type(aquiferstatetype), intent(inout) | aquiferstate, |
real, dimension(naquifers), intent(out) | aqoutflow, | ||
real, dimension(nsub), intent(out) | remflow2, | ||
real, dimension(naquifers), intent(in) | aquiferirrloss | ||
) |
Calculate aquifer flows.
Calculate aquifer flows, including removal of regional groundwater flow from all subbasins and classes (not lakes), delay of recharge, mixing of aquifer and outflow from aquifer.
Consequences Module variables grwflow and cgrwflow may change.
Reference ModelDescription Chapter Deep processes (Aquifers)
[in,out] | aquiferstate | Aquifer states |
[out] | aqoutflow | Outflow from aquifer (m3/timestep) |
[out] | remflow2 | Flow from soillayers toward aquifer (m3/timestep) |
[in] | aquiferirrloss | Flow from aquifer to irrigation (m3/timestep) |
Algorithm
Initiations for time step
Accumulate percolation from soil and river (all subbasins) to aquifer percolation
Add recharge to aquifer
Calculate aquifer outflow
Set output variables
real function, dimension(ns), public regional_groundwater_module::calculate_aquifer_conc | ( | integer, intent(in) | ns, |
integer, intent(in) | na, | ||
integer, intent(in) | subst, | ||
type(aquiferstatetype), intent(in) | aquiferstate | ||
) |
Get aquifer concentration below subbasin.
[in] | ns | Number of subbasins |
[in] | na | Number of aquifers |
[in] | subst | Substance |
[in] | aquiferstate | Aquifer state |
|
private |
Subroutine for calculation of outflow from aquifer.
Reference ModelDescription Chapter Deep processes (Aquifers)
[in] | ia | index of current aquifer |
[in,out] | aquiferstate | Aquifer state |
[out] | aqoutflow | aquifer outflow (m3/timestep) |
[out] | caqoutflow | Concentration of outflow from aquifer |
subroutine regional_groundwater_module::calculate_aquifer_percolation | ( | real, dimension(naquifers), intent(out) | perc, |
real, dimension(numsubstances,naquifers), intent(out) | cperc | ||
) |
Calculate percolation from soil layers and rivers that flows toward each aquifer.
Reference ModelDescription Chapter Deep processes (Aquifers - Deep percolation)
[out] | perc | water leaving soillayer (m3/timestep) |
[out] | cperc | concentration of water leaving soillayer |
Algorithm
Initiations
For every subbasin:
Calculate concentration of percolation
real function, dimension(ns), public regional_groundwater_module::calculate_aquifer_waterlevel | ( | integer, intent(in) | ns, |
integer, intent(in) | na, | ||
type(aquiferstatetype), intent(in) | aquiferstate | ||
) |
Calculate aquifer water level below ground.
[in] | ns | Number of subbasins |
[in] | na | Number of aquifers |
[in] | aquiferstate | Aquifer state |
subroutine, public regional_groundwater_module::calculate_current_flow_from_aquifer | ( | integer, intent(in) | na, |
integer, intent(in) | ns, | ||
type(aquiferstatetype), intent(inout) | aquiferstate, | ||
real, dimension(na), intent(out) | outsideflow | ||
) |
Subroutine for division of outflow from aquifer to main river.
Consequences Module variables addflow and caddflow will be set
Reference ModelDescription Chapter Deep processes (Aquifers)
[in] | na | number of aquifers |
[in] | ns | number of substances |
[in,out] | aquiferstate | Aquifer state |
[out] | outsideflow | Outflow from aquifer to outside model system (m3/timestep) |
subroutine, public regional_groundwater_module::calculate_delayed_water | ( | type(aquiferstatetype), intent(in) | aquiferstate, |
integer, intent(in) | na, | ||
real, dimension(na), intent(out) | water | ||
) |
Calculate the percolating water in delay of reaching aquifer.
Reference ModelDescription Chapter Deep processes (Aquifers - Deep percolation delay and aquifer recharge)
[in] | aquiferstate | Aquifer states |
[in] | na | Number of aquifers |
[out] | water | water in delay (m3/timestep) |
Algorithm
Calculate currently delayed water
subroutine regional_groundwater_module::calculate_percolation_delay | ( | type(aquiferstatetype), intent(inout) | aquiferstate, |
integer, intent(in) | na, | ||
integer, intent(in) | ns, | ||
real, dimension(na), intent(in) | perc, | ||
real, dimension(ns,na), intent(in) | cperc, | ||
real, dimension(na), intent(out) | recharge, | ||
real, dimension(ns,na), intent(out) | crecharge | ||
) |
Calculate deep percolation delay.
Reference ModelDescription Chapter Deep processes (Aquifers - Deep percolation delay and aquifer recharge)
[in,out] | aquiferstate | Aquifer states |
[in] | na | Number of aquifers |
[in] | ns | Number of substances |
[in] | perc | water leaving soillayer-model (m3/timestep) |
[in] | cperc | concentration of water -"- @param [out] recharge water entering aquifer (m3/timestep) @param [out] crecharge concentration of water -"- |
Algorithm
Calculate delay
subroutine, public regional_groundwater_module::calculate_regional_groundwater_flow | ( | type(soilstatetype), intent(inout) | soilstate, |
real, dimension(nsub,4), intent(out) | outputflow | ||
) |
Calculate regional groundwater flow from all subbasins and land.
Consequences Module variables grwflow and cgrwflow is set.
Reference ModelDescription Chapter Deep processes (Regional groundwater flow and Aquifers - Deep percolation)
[in,out] | soilstate | Soil states |
[out] | outputflow | Outflow from groundwater (m3/timestep) (1=all,2-4=per soillayer) |
Algorithm
Initiations
Return if no regional groundwater is simulated
For every subbasin and land class:
Calculate load removed from each subbasin
subroutine, public regional_groundwater_module::calculate_river_floodplain_groundwaterflow_removal | ( | integer, intent(in) | i, |
integer, intent(in) | j, | ||
integer, intent(in) | subid, | ||
integer, intent(in) | n, | ||
type(miscstatetype), intent(inout) | miscstate, | ||
real, intent(out) | flow | ||
) |
Calculate regional groundwater flow from main river flooded floodplain. Reduce OC-, ON-, and PP-concentration of flow and remove the water from the floodplain.
Reference ModelDescription Chapter Deep processes (Aquifers)
[in] | i | index for current subbasin |
[in] | j | index for class |
[in] | subid | subid for current subbasin |
[in] | n | array-dimension, number of substances |
[in,out] | miscstate | Misc states |
[out] | flow | calculated regional groundwater flow from river (m3/timestep) |
Algorithm
Calculate regional groundwater flow from river floodplain
Remove flow from river
subroutine, public regional_groundwater_module::calculate_river_groundwaterflow_removal | ( | integer, intent(in) | i, |
integer, intent(in) | j, | ||
integer, intent(in) | subid, | ||
integer, intent(in) | n, | ||
type(riverstatetype), intent(inout) | riverstate, | ||
real, intent(out) | flow, | ||
real, intent(out) | dampflow | ||
) |
Calculate regional groundwater flow from main river. Reduce OC-, ON-, and PP-concentration of flow and remove the water from the river.
Reference ModelDescription Chapter Deep processes (Aquifers)
[in] | i | index for current subbasin |
[in] | j | index for class |
[in] | subid | subid for current subbasin |
[in] | n | array-dimension, number of substances |
[in,out] | riverstate | River states |
[out] | flow | calculated regional groundwater flow from river (m3/timestep) |
[out] | dampflow | calculated regional groundwater flow from riverboxi (m3/timestep) |
Algorithm
Calculate regional groundwater flow from river
Remove flow from river damping box...
...and from the queue proportional to their volume.
Calculate concentration of flow
subroutine regional_groundwater_module::calculate_soillayer_groundwaterflow_removal | ( | integer, intent(in) | i, |
integer, intent(in) | j, | ||
integer, intent(in) | subid, | ||
integer, intent(in) | n, | ||
real, intent(inout) | soil, | ||
real, dimension(n), intent(inout) | csoil, | ||
real, intent(in) | rcgrwpar, | ||
real, intent(in) | plantwater, | ||
real, intent(inout) | flow, | ||
real, dimension(n), intent(inout) | cflow | ||
) |
Calculate regional groundwater flow from a soillayer Reduce OC-, ON-, and PP-concentration of flow and remove the water from the soil layer.
Reference ModelDescription Chapter Deep processes (Regional groundwater flow and Aquifers - Deep percolation)
[in] | i | index for current subbasin |
[in] | j | index for current class |
[in] | subid | subid for current subbasin |
[in] | n | array-dimension, number of substances |
[in,out] | soil | current soil water (mm) |
[in,out] | csoil | concentration of soil water |
[in] | rcgrwpar | parameter for regional groundwater removal |
[in] | plantwater | volume of field capacity (mm) |
[in,out] | flow | calculated regional groundwater flow contribution from this soillayer (mm/timestep) |
[in,out] | cflow | concentration of calculated regional groundwater flow |
Algorithm
If water above field capacity:
Calculate regional groundwater flow
Remove flow from soil
subroutine, public regional_groundwater_module::initiate_aquifer_model | ( | integer, intent(in) | n, |
integer, intent(in) | ns, | ||
integer, intent(in) | na | ||
) |
Initiate regional groundwater flow variables.
Consequences Module variables from regional_groundwater_module may be allocated
[in] | n | number of subbasin |
[in] | ns | number of substances |
[in] | na | number of aquifers |
Algorithm
Allocate aquifer flow variables
Calculate coefficient for deep percolation delay
subroutine, public regional_groundwater_module::initiate_aquifer_state | ( | type(aquiferstatetype), intent(inout) | aquiferstate | ) |
Initiate aquifer state variables.
[in,out] | aquiferstate | Aquifer states |
Algorithm
Calculate aquifer average volyme = initial volume
subroutine, public regional_groundwater_module::initiate_regional_groundwater_flow | ( | integer, intent(in) | n, |
integer, intent(in) | ns, | ||
integer, intent(in) | cb_ilake, | ||
integer, intent(in) | cb_olake, | ||
integer, intent(in) | cb_lriver, | ||
integer, intent(in) | cb_mriver, | ||
integer, intent(in) | cb_iwet, | ||
integer, intent(in) | cb_owet | ||
) |
Initiate regional groundwater flow variables.
Consequences Module variables from regional_groundwater_module may be allocated
[in] | n | number of subbasin |
[in] | ns | number of substances |
[in] | cb_ilake | slc-index for internal lake |
[in] | cb_olake | slc-index for outlet lake |
[in] | cb_lriver | slc-index for local stream |
[in] | cb_mriver | slc-index for main river |
[in] | cb_iwet | slc-index for internal wetland |
[in] | cb_owet | slc-index for outlet wetland |
Algorithm
Set receiving area of groundwater flow (land area for now)
Allocate groundwater flow variables
subroutine regional_groundwater_module::set_percolation_concentration | ( | integer, intent(in) | n, |
real, dimension(n), intent(in) | waterconc, | ||
real, dimension(n), intent(out) | percconc | ||
) |
During deep percolation ON, PP and OC are assumed to stay in the water source.
Reference ModelDescription Chapter Deep processes (Aquifers)
[in] | n | number of substances |
[in] | waterconc | concentration of water source |
[out] | percconc | concentration of outflowing water |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |