HYPE
Functions/Subroutines | Variables
regional_groundwater_module Module Reference

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
 

Detailed Description

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.

Function/Subroutine Documentation

◆ add_aquifer_flow_to_river()

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)

Parameters
[in]iindex for subbasin
[in]numsubstnumber of substances (numsubstances)
[in,out]qininflow to river (m3/s)
[in,out]cinconcentration of river inflow
[out]addedwaterwater added (m3/timestep)
[out]addedloadload to river inflow

Algorithm

Return if no outflow here

Add aquifer flow to river inflow

+ Here is the caller graph for this function:

◆ add_regional_groundwater_flow_to_olake()

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)

Parameters
[in]iindex for subbasin
[in]itypelake type (ilake or olake)
[in]numsubstnumber of substances (numsubstances)
[in]qfactorflow unit transformation factor (m3/s->mm/timestep)
[in,out]lakevlake volume (i.e. water stage) (mm)
[in,out]lakecconcentration of lake
[in,out]qcinfltotal inflow to olake (m3/s) (print out variable)
[out]grwloadload added (kg/timestep, U/timestep)
[out]addedwaterwater added (m3/timestep)

Algorithm
Return if not outlet lake

If regional groundwater flow to current lake:

  • Calculate regional groundwater flow to lake and add to variable for inflow to lake

Add regional groundwater flow to lake

Calculate (nutrient) load added to lake by regional groundwater flow

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add_regional_groundwater_flow_to_soil()

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)

Parameters
[in]icurrent subbasin index
[in]jcurrent class index
[in]classareaclass area (km2)
[in]pwpore volume (mm)
[in,out]soilstateSoil states
[in,out]loadload into soil (kg/timestep)
[out]upwardflowupwelling due to overflowing lower soil layers (mm/timestep)
[in,out]addedflowadded regional groundwater flow (m3/timestep)

Algorithm

For every subbasin that has regional flow to current subbasin:

  • Add regional groundwater flow to soil
  • Accumulate load of regional groundwater flow into soil (kg/timestep)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_aquifer()

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)

Parameters
[in,out]aquiferstateAquifer states
[out]aqoutflowOutflow from aquifer (m3/timestep)
[out]remflow2Flow from soillayers toward aquifer (m3/timestep)
[in]aquiferirrlossFlow 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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_aquifer_conc()

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.

Parameters
[in]nsNumber of subbasins
[in]naNumber of aquifers
[in]substSubstance
[in]aquiferstateAquifer state
Returns
Aquifer concentration (mg/L or other)
+ Here is the caller graph for this function:

◆ calculate_aquifer_outflow()

subroutine regional_groundwater_module::calculate_aquifer_outflow ( integer, intent(in)  ia,
type(aquiferstatetype), intent(inout)  aquiferstate,
real, intent(out)  aqoutflow,
real, dimension(numsubstances), intent(out)  caqoutflow 
)
private

Subroutine for calculation of outflow from aquifer.

Reference ModelDescription Chapter Deep processes (Aquifers)

Parameters
[in]iaindex of current aquifer
[in,out]aquiferstateAquifer state
[out]aqoutflowaquifer outflow (m3/timestep)
[out]caqoutflowConcentration of outflow from aquifer
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_aquifer_percolation()

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)

Parameters
[out]percwater leaving soillayer (m3/timestep)
[out]cpercconcentration of water leaving soillayer

Algorithm
Initiations

For every subbasin:

  • Add subbasin groundwater seepage to aquifer percolation

Calculate concentration of percolation

+ Here is the caller graph for this function:

◆ calculate_aquifer_waterlevel()

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.

Parameters
[in]nsNumber of subbasins
[in]naNumber of aquifers
[in]aquiferstateAquifer state
Returns
Aquifer water depth (m)
+ Here is the caller graph for this function:

◆ calculate_current_flow_from_aquifer()

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)

Parameters
[in]nanumber of aquifers
[in]nsnumber of substances
[in,out]aquiferstateAquifer state
[out]outsideflowOutflow from aquifer to outside model system (m3/timestep)
+ Here is the caller graph for this function:

◆ calculate_delayed_water()

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)

Parameters
[in]aquiferstateAquifer states
[in]naNumber of aquifers
[out]waterwater in delay (m3/timestep)

Algorithm
Calculate currently delayed water

+ Here is the caller graph for this function:

◆ calculate_percolation_delay()

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)

Parameters
[in,out]aquiferstateAquifer states
[in]naNumber of aquifers
[in]nsNumber of substances
[in]percwater leaving soillayer-model (m3/timestep)
[in]cpercconcentration of water -"- @param [out] recharge water entering aquifer (m3/timestep) @param [out] crecharge concentration of water -"-

Algorithm

Calculate delay

+ Here is the caller graph for this function:

◆ calculate_regional_groundwater_flow()

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)

Parameters
[in,out]soilstateSoil states
[out]outputflowOutflow 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 soil groundwater removal from the lowest soil layer
  • Accumulate to subbasin regional groundwater flow

Calculate load removed from each subbasin

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_river_floodplain_groundwaterflow_removal()

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)

Parameters
[in]iindex for current subbasin
[in]jindex for class
[in]subidsubid for current subbasin
[in]narray-dimension, number of substances
[in,out]miscstateMisc states
[out]flowcalculated regional groundwater flow from river (m3/timestep)

Algorithm

Calculate regional groundwater flow from river floodplain

Remove flow from river

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_river_groundwaterflow_removal()

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)

Parameters
[in]iindex for current subbasin
[in]jindex for class
[in]subidsubid for current subbasin
[in]narray-dimension, number of substances
[in,out]riverstateRiver states
[out]flowcalculated regional groundwater flow from river (m3/timestep)
[out]dampflowcalculated 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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_soillayer_groundwaterflow_removal()

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)

Parameters
[in]iindex for current subbasin
[in]jindex for current class
[in]subidsubid for current subbasin
[in]narray-dimension, number of substances
[in,out]soilcurrent soil water (mm)
[in,out]csoilconcentration of soil water
[in]rcgrwparparameter for regional groundwater removal
[in]plantwatervolume of field capacity (mm)
[in,out]flowcalculated regional groundwater flow contribution from this soillayer (mm/timestep)
[in,out]cflowconcentration of calculated regional groundwater flow

Algorithm

If water above field capacity:

Calculate regional groundwater flow

Remove flow from soil

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initiate_aquifer_model()

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

Parameters
[in]nnumber of subbasin
[in]nsnumber of substances
[in]nanumber of aquifers

Algorithm
Allocate aquifer flow variables

Calculate coefficient for deep percolation delay

+ Here is the caller graph for this function:

◆ initiate_aquifer_state()

subroutine, public regional_groundwater_module::initiate_aquifer_state ( type(aquiferstatetype), intent(inout)  aquiferstate)

Initiate aquifer state variables.

Parameters
[in,out]aquiferstateAquifer states

Algorithm
Calculate aquifer average volyme = initial volume

+ Here is the caller graph for this function:

◆ initiate_regional_groundwater_flow()

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

Parameters
[in]nnumber of subbasin
[in]nsnumber of substances
[in]cb_ilakeslc-index for internal lake
[in]cb_olakeslc-index for outlet lake
[in]cb_lriverslc-index for local stream
[in]cb_mriverslc-index for main river
[in]cb_iwetslc-index for internal wetland
[in]cb_owetslc-index for outlet wetland

Algorithm
Set receiving area of groundwater flow (land area for now)

Allocate groundwater flow variables

+ Here is the caller graph for this function:

◆ set_percolation_concentration()

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)

Parameters
[in]nnumber of substances
[in]waterconcconcentration of water source
[out]percconcconcentration of outflowing water
+ Here is the caller graph for this function:

Variable Documentation

◆ addflow

real, dimension(:), allocatable regional_groundwater_module::addflow
private

◆ caddflow

real, dimension(:,:), allocatable regional_groundwater_module::caddflow
private

◆ cgrwflow

real, dimension(:,:), allocatable regional_groundwater_module::cgrwflow
private

◆ dcoeff

real, dimension(:), allocatable regional_groundwater_module::dcoeff
private

◆ errstring

character(len=49), dimension(5) regional_groundwater_module::errstring
private

◆ grwflow

real, dimension(:), allocatable regional_groundwater_module::grwflow
private

◆ regrwarea

real, dimension(:), allocatable regional_groundwater_module::regrwarea
private