HYPE
All Classes Namespaces Files Functions Variables Pages
Functions/Subroutines
npc_surfacewater_processes Module Reference

Functions/Subroutines

subroutine, public initiate_river_substance_state (config, riverstate)
 
subroutine, public initiate_lake_substance_state (config, lakestate)
 
subroutine, public add_deposition_to_lake_as_load (i, iluse, pooltype, veg, areaij, sourcedry, lakestate)
 
subroutine, public add_deposition_to_river_as_load (i, iluse, pooltype, veg, areaij, sourcedry, riverstate)
 
subroutine, public substance_processes_in_river (i, itype, area, depth, transq, Qbank, maxSSconc, sedresSS, riverstate)
 
subroutine, public substance_processes_in_lake (i, itype, area, lakestate, resuspdown, pooladd_ts, pooladd_tn, pooladd_tp, pooladd_oc, pooladd_si, poolnet_ts)
 
subroutine denitrification_water (i, watertype, systemtype, area, denpar, halfsatINwater, riverstate, lakestate)
 
subroutine production_mineralisation (i, watertype, systemtype, area, prodNpar, prodPpar, prodSipar, tmpexpSipar, halfsatTPwater, limpppar, plimsipar, riverstate, lakestate, depth)
 
subroutine macrophyte_uptake (i, watertype, systemtype, area, muptNpar, muptPpar, halfsatTPwater, proddeppar, limpppar, lakestate, riverstate)
 
subroutine lake_sedimentation (i, substance, watertype, sedrate, limsedpar, lakestate, pooladd)
 
subroutine, public sediment_pool_density (watertype, res_mode, siltation_option, age, frac_clay, frac_silt, frac_sand, density)
 
subroutine lake_siltation_and_flushing (i, watertype, ss_frac, lakestate, resuspup, resuspdown, removedsed)
 
subroutine set_flushing_status (mode, frequency, start, sstop, depth, maxdepth, SSsedpool, AEsedpool, sedflush, sedage)
 
subroutine sediment_fraction (i, watertype, lakestate, ss_frac)
 
subroutine river_sedimentation_resuspension (i, watertype, area, sedexppar, riverq, qbank, depth, maxSSconc, sedresSS, riverstate)
 
subroutine calculate_lake_tpmean (i, watertype, lakestate)
 
subroutine calculate_river_tpmean (i, watertype, riverstate)
 
subroutine internal_lake_load (i, watertype, systemtype, area, lakestate)
 
subroutine oc_production_mineralisation (systemtype, area, prodpar, halfsatTPwater, limpppar, water, conc, watertemp, waterTPmean, temp10, temp20, depth)
 
subroutine, public add_diffuse_source_to_local_river (i, qin, cin, source, addedflow)
 
subroutine, public add_point_sources_to_main_river (isb, qin, cin, source, addedflow)
 
subroutine, public calculate_river_wetland (i, itype, n, temp5, temp30, qin, cin, cwetland)
 
subroutine calculate_riverwetland_np (n, qin, cin, area, vol, cvol, temp5, temp30)
 
subroutine, public wetland_substance_processes (n, area, vol, cvol, temp5, temp30, fastN, fastP, humusN, humusP, partP)
 

Detailed Description

Nitrogen, phosphorus and organic carbon processes in surface water in HYPE.

Function/Subroutine Documentation

◆ add_deposition_to_lake_as_load()

subroutine, public npc_surfacewater_processes::add_deposition_to_lake_as_load ( integer, intent(in)  i,
integer, intent(in)  iluse,
integer, intent(in)  pooltype,
integer, intent(in)  veg,
real, intent(in)  areaij,
real, dimension(numsubstances), intent(out)  sourcedry,
type(lakestatetype), intent(inout)  lakestate 
)

Calculate atmospheric deposition of N and P and add it to lakewater as load.

Reference ModelDescription Chapter Processes above ground (Atmospheric deposition of nitrogen and phosphorus)

Parameters
[in]iindex of subbasin
[in]iluseindex of land use
[in]pooltypelaketype: 1=ilake, 2=olake
[in]vegvegetation index
[in]areaijclassarea (km2)
[out]sourcedrydry deposition (kg/timestep)
[in,out]lakestateLake state
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add_deposition_to_river_as_load()

subroutine, public npc_surfacewater_processes::add_deposition_to_river_as_load ( integer, intent(in)  i,
integer, intent(in)  iluse,
integer, intent(in)  pooltype,
integer, intent(in)  veg,
real, intent(in)  areaij,
real, dimension(numsubstances), intent(out)  sourcedry,
type(riverstatetype), intent(inout)  riverstate 
)

Calculate atmospheric deposition of N and P and add it to river water components as load.

deposition of nitrogen and phosphorus)

Parameters
[in]iindex of subbasin
[in]iluseindex of land use
[in]pooltyperivertype: 1=lriver, 2=mriver
[in]vegvegetation index
[in]areaijclassarea (km2)
[out]sourcedrydry deposition (kg/timestep)
[in,out]riverstateRiver state

Algorithm

Prepare deposition

Calculate fractions to be added to river water compartments

Add deposition of Inorg-N and PartP/SoluteP to river watercourse compartments

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

◆ add_diffuse_source_to_local_river()

subroutine, public npc_surfacewater_processes::add_diffuse_source_to_local_river ( integer, intent(in)  i,
real, intent(inout)  qin,
real, dimension(numsubstances), intent(inout)  cin,
real, dimension(numsubstances), intent(out)  source,
real, intent(out)  addedflow 
)

Add load from local diffuse sources to local river inflow.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Nutrient sources - Rural household diffuse source)

Parameters
[in]iindex of subbasin
[in,out]qinflow in local river (m3/s)
[in,out]cinconcentration of flow into local river (mg/L)
[out]sourcelocal source added to local river (kg/timestep)
[out]addedflowadded flow (m3/timestep)

Algorithm

Find if rural load is added to local stream

Calculate diffuse source from rural households to local river

Add diffuse source to inflow to local river flow

+ Here is the caller graph for this function:

◆ add_point_sources_to_main_river()

subroutine, public npc_surfacewater_processes::add_point_sources_to_main_river ( integer, intent(in)  isb,
real, intent(inout)  qin,
real, dimension(numsubstances), intent(inout)  cin,
real, dimension(numsubstances,max_pstype), intent(out)  source,
real, intent(out)  addedflow 
)

Add load from point sources to main river inflow. For water temperature input value may be missing and in this case the temperature of the river is then kept.

Reference ModelDescription Chapter Water management (Point sources)

Parameters
[in]isbindex of subbasin
[in,out]qinflow into main river (m3/s)
[in,out]cinconcentration of flow into main river (mg/L)
[out]sourcepoint sources added to main river (kg/timestep)
[out]addedflowadded flow (m3/timestep)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_lake_tpmean()

subroutine npc_surfacewater_processes::calculate_lake_tpmean ( integer, intent(in)  i,
integer, intent(in)  watertype,
type(lakestatetype), intent(inout)  lakestate 
)

Calculates straight 365-day running average mean of TP concentration in lake.

Reference ModelDescription Chapter Nitrogen and phosphorus processes in rivers and lakes (Primary production and mineralization) and Organic carbon (River and Lakes - Primary production and mineralization)

Parameters
[in]iindex of current subbasin
[in]watertypeLake type (1=local, 2=outlet)
[in,out]lakestateLake state
+ Here is the caller graph for this function:

◆ calculate_river_tpmean()

subroutine npc_surfacewater_processes::calculate_river_tpmean ( integer, intent(in)  i,
integer, intent(in)  watertype,
type(riverstatetype), intent(inout)  riverstate 
)

Calculates straight 365-day running average mean of TP concentration in river.

Reference ModelDescription Chapter Nitrogen and phosphorus processes in rivers and lakes (Primary production and mineralization) and Organic carbon (River and Lakes - Primary production and mineralization)

Parameters
[in]iindex of current subbasin
[in]watertypeRiver type (1=local, 2=main)
[in,out]riverstateRiver states
+ Here is the caller graph for this function:

◆ calculate_river_wetland()

subroutine, public npc_surfacewater_processes::calculate_river_wetland ( integer, intent(in)  i,
integer, intent(in)  itype,
integer, intent(in)  n,
real, intent(in)  temp5,
real, intent(in)  temp30,
real, intent(in)  qin,
real, dimension(n), intent(inout)  cin,
real, dimension(n), intent(inout)  cwetland 
)

Calculate effect of river wetland constructed for nutrient removal.

Reference ModelDescription Chapter Water management (Constructed wetlands)

Parameters
[in]iindex of subbasin
[in]itypeindex of river type (local or main)
[in]nnumber of substances
[in]temp5temperature (5-day-mean) (degree Celsius)
[in]temp30temperature (30-day-mean) (degree Celsius)
[in]qinflow into/out of river wetland (m3/s)
[in,out]cinconcentration of flow into/out of river wetland (mg/L)
[in,out]cwetlandconcentration of river wetland (mg/L)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_riverwetland_np()

subroutine npc_surfacewater_processes::calculate_riverwetland_np ( integer, intent(in)  n,
real, intent(in)  qin,
real, dimension(n), intent(in)  cin,
real, intent(in)  area,
real, intent(in)  vol,
real, dimension(n), intent(inout)  cvol,
real, intent(in)  temp5,
real, intent(in)  temp30 
)

Calculate nutrient processes in river wetland. Retention is limited to 99.9% of the pool.

Reference ModelDescription Chapter Water management (Constructed wetlands)

Parameters
[in]nnumber of substances
[in]qinflow into wetland (m3/d)
[in]cinconcentration of river flow (mg/l) (before and after wetland processes
[in]areaarea of wetland (m2)
[in]volvolume of wetland (m3)
[in,out]cvolconcentration of wetland volume (mg/l) (before and after wetland processes
[in]temp5temperature (5-day-mean) (degree Celsius)
[in]temp30temperature (30-day-mean) (degree Celsius)
+ Here is the caller graph for this function:

◆ denitrification_water()

subroutine npc_surfacewater_processes::denitrification_water ( integer, intent(in)  i,
integer, intent(in)  watertype,
integer, intent(in)  systemtype,
real, intent(in)  area,
real, intent(in)  denpar,
real, intent(in)  halfsatINwater,
type(riverstatetype), intent(inout), optional  riverstate,
type(lakestatetype), intent(inout), optional  lakestate 
)

Calculates the denitrification in river and lakes Lake processes take place in whole lake volume.

Reference ModelDescription Chapter Nitrogen and phosphorus processes in rivers and lakes (Denitrification)

Parameters
[in]iindex of current subbasin
[in]watertypeLake or river type (1=local, 2=main/outlet)
[in]systemtypeaquatic system type (1=lake, 2=river)
[in]arealake surface area/river bottom area (m2)
[in]denparmodel parameter denitrification rate (kg/m2/day)
[in]halfsatinwatermodel parameter half saturation IN (mg/L)
[in,out]riverstateRiver states
[in,out]lakestateLake states
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initiate_lake_substance_state()

subroutine, public npc_surfacewater_processes::initiate_lake_substance_state ( type(stateconfigurationtype), intent(in)  config,
type(lakestatetype), intent(inout)  lakestate 
)

Initiation lake for nutrients and organic carbon. Concentration in.

Consequences Module hypevariables variable slowlakeini may be allocated and set.

Parameters
[in]configstate file configuration
[in,out]lakestateLake states
+ Here is the caller graph for this function:

◆ initiate_river_substance_state()

subroutine, public npc_surfacewater_processes::initiate_river_substance_state ( type(stateconfigurationtype), intent(in)  config,
type(riverstatetype), intent(inout)  riverstate 
)

Initiation river variables for nutrients and organic carbon simulations. Concentration (mg/L)

Consequences Module hypevariables variable Qmax, Q2max, iQmax, iQ2max may be allocated and set.

Parameters
[in]configstate file configuration
[in,out]riverstateRiver states

Algorithm
Allocate and initialize river sediment variables

Set TPmean-variable if phosphorus is not calculated by HYPE

+ Here is the caller graph for this function:

◆ internal_lake_load()

subroutine npc_surfacewater_processes::internal_lake_load ( integer, intent(in)  i,
integer, intent(in)  watertype,
integer, intent(in)  systemtype,
real, intent(in)  area,
type(lakestatetype), intent(inout)  lakestate 
)

Calculates and add internal load of phosphorus for lakes.

Reference ModelDescription Chapter Nitrogen and phosphorus processes in rivers and lakes (Internal load)

Parameters
[in]iindex of current subbasin
[in]watertypeLake or river type (1=local, 2=main/outlet)
[in]systemtypeaquatic system type (1=lake, 2=river)
[in]arealake surface area/ river bottom area (m2)
[in,out]lakestateLake state

Algorithm
Check if internal phosphorus load is to be calculated

Calculate pool of P, and concentration and temperature dependent factors

Calculate internal load of phosphorus

Add internal load of phosphorus to lake water

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

◆ lake_sedimentation()

subroutine npc_surfacewater_processes::lake_sedimentation ( integer, intent(in)  i,
integer, intent(in)  substance,
integer, intent(in)  watertype,
real, intent(in)  sedrate,
real, intent(in)  limsedpar,
type(lakestatetype), intent(inout)  lakestate,
real, intent(out)  pooladd 
)

Calculate sedimentation of substance in lake.

Reference ModelDescription Chapter Nitrogen and phosphorus processes in rivers and lakes (Sedimentation/Resuspension) and Organic carbon (River and lakes - Sedimentation)

Parameters
[in]icurrent index of subbasin
[in]substancecurrent index of substance (PP,ON,SS,AE)
[in]watertypeLake type (1=local, 2=outlet)
[in]sedratesedimentation rate (lakes) (m/ts)
[in]limsedparconcentration limit for sedimentation (mg/L)
[in,out]lakestateLake state

Algoritm Calculate water volume, amount of substance in water (pool) and the sedimentation

Remove sedimentation from the water pool

Amount of substance added to sediment pool

Add sedimentation to the sediment pool

Calculate the new concentration in the water due to the change in the water pool

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

◆ lake_siltation_and_flushing()

subroutine npc_surfacewater_processes::lake_siltation_and_flushing ( integer, intent(in)  i,
integer, intent(in)  watertype,
real, intent(in)  ss_frac,
type(lakestatetype), intent(inout)  lakestate,
real, dimension(numsubstances), intent(out)  resuspup,
real, dimension(numsubstances), intent(out)  resuspdown,
real, dimension(numsubstances), intent(out)  removedsed 
)

Calculate siltation of lake with sespended sediments (and algae) and flushing.

Reference ModelDescription Chapter Sediment

Parameters
[in]icurrent index of subbasin
[in]watertypeLake type (1=local, 2=outlet)
[in]ss_fracss fraction of sediment pool depth
[in,out]lakestateLake state
[out]resuspupresuspended substance to suspension in lake water (kg/m2/ts)
[out]resuspdownflushed substance to be transported downstream (kg/m2/ts)
[out]removedsedamount of sediment removed from lake sediment pool by flushing (kg/m2/ts)

Algoritm Initiate resuspension and sediment flush rates to 0 - set to 0 for non-sediment substances

Check if lake information is available and if flushing is possible for this lake/reservoir (set help variables)

  • Bottom sediment is accumulating Calculate the density of substance (SS or AE) and update lake depth
  • Bottom sediment is flushing this time step Calculate the flushing of substance (SS or AE) and update lake depth

Determine whether or not to flush bottom sediments next timestep and then reset bottom sediment age

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

◆ macrophyte_uptake()

subroutine npc_surfacewater_processes::macrophyte_uptake ( integer, intent(in)  i,
integer, intent(in)  watertype,
integer, intent(in)  systemtype,
real, intent(in)  area,
real, intent(in)  muptNpar,
real, intent(in)  muptPpar,
real, intent(in)  halfsatTPwater,
real, intent(in)  proddeppar,
real, intent(in)  limpppar,
type(lakestatetype), intent(inout), optional  lakestate,
type(riverstatetype), intent(inout), optional  riverstate 
)

Calculates macrophyte uptake of IN/SP in surface water.

Reference ModelDescription Chapter Nitrogen and phosphorus processes in rivers and lakes (Macrophyte uptake)

Parameters
[in]iindex of current subbasin
[in]watertypeLake or river type (1=local, 2=main/outlet)
[in]systemtypeaquatic system type (1=lake, 2=river)
[in]arealake surface area/ river bottom area (m2)
[in]muptnparmodel parameter production rate ON in water
[in]muptpparmodel parameter production rate PP in water
[in]halfsattpwatermodel parameter half saturation TP (mg/L)
[in]proddeppardepth above which macrophyte grows (m)
[in]limpppar(mg/L)
[in,out]lakestateLake states
[in,out]riverstateRiver states
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oc_production_mineralisation()

subroutine npc_surfacewater_processes::oc_production_mineralisation ( integer, intent(in)  systemtype,
real, intent(in)  area,
real, intent(in)  prodpar,
real, intent(in)  halfsatTPwater,
real, intent(in)  limpppar,
real, intent(in)  water,
real, intent(inout)  conc,
real, intent(in)  watertemp,
real, intent(in)  waterTPmean,
real, intent(in)  temp10,
real, intent(in)  temp20,
real, intent(in), optional  depth 
)

Calculates transformation between OC/DIC in water Simulating the combined processes of primary production and mineralisation.

Reference ModelDescription Organic carbon (River and lakes - Primary production and mineralization)

Parameters
[in]systemtypeaquatic system type (1=lake, 2=river)
[in]arealake surface area/ river bottom area (m2)
[in]prodparmodel parameter production rate OC in water
[in]halfsattpwatermodel parameter half saturation TP (mg/L)
[in]limppparlimitation of sedimentation parameter (mg/L)
[in]waterriver or lake water (mm or m3)
[in,out]concOC concentration of river or lake
[in]watertempwater temperature
[in]watertpmeanwater TP mean
[in]temp1010-day water temperature
[in]temp2020-day water temperature
[in]depthriver depth (m)

Algorithm
Calculate pools of organic carbon in the water, water temperature and fraction of depth of water volume that is active

Calculate dependency factors (Tot-P and temperature)

Calculate production/mineralisation of organic carbon

Set new concentration due to changes in pools

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

◆ production_mineralisation()

subroutine npc_surfacewater_processes::production_mineralisation ( integer, intent(in)  i,
integer, intent(in)  watertype,
integer, intent(in)  systemtype,
real, intent(in)  area,
real, intent(in)  prodNpar,
real, intent(in)  prodPpar,
real, intent(in)  prodSipar,
real, intent(in)  tmpexpSipar,
real, intent(in)  halfsatTPwater,
real, intent(in)  limpppar,
real, intent(in)  plimsipar,
type(riverstatetype), intent(inout), optional  riverstate,
type(lakestatetype), intent(inout), optional  lakestate,
real, intent(in), optional  depth 
)

Calculates transformation between IN/ON and SRP/PP in water. Also simulated algae production (=ON-production) for sediment simulation. Simulating the combined processes of primary production and mineralisation. Lake process in whole lake volume.

Reference ModelDescription Chapter Nitrogen and phosphorus processes in rivers and lakes (Primary production and mineralization)

Parameters
[in]iindex of current subbasin
[in]watertypeLake or river type (1=local, 2=main/outlet)
[in]systemtypeaquatic system type (1=lake, 2=river)
[in]arealake surface area/ river bottom area (m2)
[in]prodnparmodel parameter production rate ON in water
[in]prodpparmodel parameter production rate PP in water
[in]prodsiparmodel parameter production Algal Si
[in]tmpexpsiparmodel parameter temperature dependence production Algal Si
[in]halfsattpwatermodel parameter half saturation TP (mg/L)
[in]limppparlimitation of sedimentation parameter (mg/L)
[in]plimsiparP limitation of Si production parameter (mg/L)
[in,out]riverstateRiver states
[in,out]lakestateLake states
[in]depthriver depth (m)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ river_sedimentation_resuspension()

subroutine npc_surfacewater_processes::river_sedimentation_resuspension ( integer, intent(in)  i,
integer, intent(in)  watertype,
real, intent(in)  area,
real, intent(in)  sedexppar,
real, intent(in)  riverq,
real, intent(in)  qbank,
real, intent(in)  depth,
real, intent(out)  maxSSconc,
real, intent(out)  sedresSS,
type(riverstatetype), intent(inout)  riverstate 
)

Calculate sedimentation and resuspension of PP and SS in rivers.

Reference ModelDescription Chapter Nitrogen and phosphorus processes in rivers and lakes (Sedimentation/Resuspension)

Parameters
[in]iindex of current subbasin
[in]watertyperiver type (1=local, 2=main)
[in]areariver surface area (m2)
[in]sedexpparsedimentation/resuspension parameter
[in]riverqriver discharge (m3/s)
[in]qbankbank full flow (m3/s)
[in]depthriver depth (m)
[out]maxssconcriver SS maximum transport concentration (mg/L)
[out]sedresssriver sedimentation/resuspension of SS (kg/timestep)
[in,out]riverstateRiver states

Algorithm

Initial check if calculation is to be made

Assess pool of PP and SS in water and sediment

Select current model for river resuspension/sedimentation

For model 0:

Calculate sedimentation and resuspension factor (per day)

Transfer PP and SS between sediment and water pools

For model 2: Simplified Bagnold Equation

Calculate river peak velocity across channel

Calculate amount of sediment (kg) to transfer, and/or amount of PP

Transfer SS between sediment and water pools

Transfer PP between sediment and water pools

Update state variables

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

◆ sediment_fraction()

subroutine npc_surfacewater_processes::sediment_fraction ( integer, intent(in)  i,
integer, intent(in)  watertype,
type(lakestatetype), intent(in)  lakestate,
real, intent(out)  ss_frac 
)

Calculate fraction of siltation depth that is due to SS.

Reference ModelDescription Chapter Sediment

Parameters
[in]icurrent index of subbasin
[in]watertypeLake type (1=local, 2=outlet)
[in]lakestateLake state
[out]ss_fracfraction of resuspended substance that is SS (-)

Algoritm

+ Here is the caller graph for this function:

◆ sediment_pool_density()

subroutine, public npc_surfacewater_processes::sediment_pool_density ( integer, intent(in)  watertype,
integer, intent(in)  res_mode,
integer, intent(in)  siltation_option,
real, intent(in)  age,
real, intent(in)  frac_clay,
real, intent(in)  frac_silt,
real, intent(in)  frac_sand,
real, intent(out)  density 
)

Calculate density of sediment in reservoir sediment pool.

Calculate the density of substance in sediment (SS and AE) with different options: Siltation Option 1: No Compaction + General Density - Use density (kg/m3) of substance (SS or AE) from general parameter in par.txt Siltation Option 2: No Compaction + Density from Soil Fraction & Reservoir Operation - Calculate the density (kg/m3) of substance (SS or AE) from GeoData.txt soil fractions and reservoir operation mode Siltation Option 3: Compaction + Density from Soil Fraction & Reservoir Operation - Calculate the compacted density (kg/m3) of substance (SS or AE) from GeoData.txt soil fractions and reservoir operation mode

Reference ModelDescription Chapter Sediment

Parameters
[in]watertypeLake type (1=local, 2=outlet)
[in]res_modereservoir operation mode (1=sediment always submerged or nearly submerged, 2=normally moderate to considerable reservoir drawdown, 3=reservoir normally empty, 4=riverbed sediments)
[in]siltation_optionsiltation density option (1=constant, 2=depentent on soil, 3=compactation depending on soil and age
[in]agenumber of timesteps sediment has been compacting
[in]frac_clayfraction of clay in incoming sediment
[in]frac_siltfraction of silt in incoming sediment
[in]frac_sandfraction of sand in incoming sediment
[out]densitynew sediment production pool density (kg/m3)
+ Here is the caller graph for this function:

◆ set_flushing_status()

subroutine npc_surfacewater_processes::set_flushing_status ( integer, intent(in)  mode,
integer, intent(in)  frequency,
real, intent(in)  start,
real, intent(in)  sstop,
real, intent(in)  depth,
real, intent(in)  maxdepth,
real, intent(in)  SSsedpool,
real, intent(in)  AEsedpool,
integer, intent(inout)  sedflush,
real, intent(inout)  sedage 
)

Determine whether or not to flush sediments next timestep and reset sediment age.

Parameters
[in]modesediment management mode
[in]frequencysediment flush frequency
[in]startsediment flush start
[in]sstopsediment flush end
[in]depthcurrent lake depth from threshold
[in]maxdepthmaximum depth from threshold (lake_depth)
[in]sssedpoolSS in sediment
[in]aesedpoolAE in sediment
[in,out]sedflushlake sediment flush on/off
[in,out]sedageage of sediment in lake since flushing
+ Here is the caller graph for this function:

◆ substance_processes_in_lake()

subroutine, public npc_surfacewater_processes::substance_processes_in_lake ( integer, intent(in)  i,
integer, intent(in)  itype,
real, intent(in)  area,
type(lakestatetype), intent(inout)  lakestate,
real, dimension(numsubstances), intent(out)  resuspdown,
real, intent(out)  pooladd_ts,
real, intent(out)  pooladd_tn,
real, intent(out)  pooladd_tp,
real, intent(out)  pooladd_oc,
real, intent(out)  pooladd_si,
real, intent(out)  poolnet_ts 
)

Calculate nutrient, organic carbon, silica and sediment processes in lake: denitrification, mineralisation, primary production, macrophyte uptake, sedimentation, internal load.

Reference ModelDescription Chapter Nitrogen and phosphorus processes in rivers and lakes (Common things in lakes and river, Denitrification, Primary production and mineralization, Sedimentation/Resuspension and Internal load) and Chapter Organic carbon (River and Lakes)

Parameters
[in]iindex of subbasin
[in]itypelake type (ilake or olake)
[in]arealake area (m2)
[in,out]lakestateLake state
[out]resuspdownresuspended substance to be transported downstream (kg?/ts)
[out]pooladd_tssediment added to lake bottom sediment pool (SS+AE) (kg)
[out]pooladd_tnnitrogen added to lake sediment (ON) (kg)
[out]pooladd_tpphosphorus added to lake sediment (PP) (kg)
[out]pooladd_ocorg. carbon added to lake sediment (OC) (kg)
[out]pooladd_sisilica added to lake sediment (ASi) (kg)
[out]poolnet_tsnet change in bottom sediment in lake (SS+AE) (kg)

Algorithm

Short notation for parameters dependent on regional corrections, and some more

Calculate the nutrient degradation and uptake processes

Calculate the sedimentation and resuspension processes

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

◆ substance_processes_in_river()

subroutine, public npc_surfacewater_processes::substance_processes_in_river ( integer, intent(in)  i,
integer, intent(in)  itype,
real, intent(in)  area,
real, intent(in)  depth,
real, intent(in)  transq,
real, intent(in)  Qbank,
real, intent(out)  maxSSconc,
real, intent(out)  sedresSS,
type(riverstatetype), intent(inout)  riverstate 
)

Calculate nutrient, organic carbon, silica and sediment processes in river This include denitrification, mineralisation, primary production, sedimentation, resuspension, exchange with sediment.

Reference ModelDescription Chapter Nitrogen and phosphorus processes in rivers and lakes (Common things in lakes and river, Denitrification, Primary production and mineralization, and Sedimentation/Resuspension) and Chapter Organic carbon (River and Lakes - Primary production and mineralization)

Parameters
[in]iindex of current subbasin
[in]ityperiver type (local or main)
[in]areariver area (m2)
[in]depthriver depth (m)
[in]transqflow out of translation box chain (m3/s)
[in]qbankbank full river flow
[out]maxssconcriver SS maximum transport concentration (mg/L)
[out]sedresssriver sedimentation/resuspension of SS (kg/timestep)
[in,out]riverstateRiver states
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wetland_substance_processes()

subroutine, public npc_surfacewater_processes::wetland_substance_processes ( integer, intent(in)  n,
real, intent(in)  area,
real, intent(in)  vol,
real, dimension(n), intent(inout)  cvol,
real, intent(in)  temp5,
real, intent(in)  temp30,
real, intent(inout)  fastN,
real, intent(inout)  fastP,
real, intent(inout)  humusN,
real, intent(inout)  humusP,
real, intent(inout)  partP 
)

Calculate processes for substances in wetland. Retention is limited to 99.9% (sed) or 50% (uptake) of the pool.

Reference ModelDescription Chapter Water management (Constructed wetlands)

Parameters
[in]nnumber of substances
[in]areaarea of wetland (m2)
[in]volvolume of wetland (m3)
[in,out]cvolconcentration of wetland volume (mg/l) (before and after wetland processes)
[in]temp5temperature (5-day-mean) (degree Celsius)
[in]temp30temperature (30-day-mean) (degree Celsius)
[in,out]fastnimmobile fast turnover nitrogen in upper soil layer(kg/km2)
[in,out]fastpimmobile fast turnover phosphorus in upper soil layer (kg/km2)
[in,out]humusnimmobile slow turnover nitrogen in upper soil layer(kg/km2)
[in,out]humuspimmobile slow turnover phosphorus in upper soil layer (kg/km2)
[in,out]partpimmobile particulate phosphorus in upper soil layer (kg/km2)
+ Here is the call graph for this function:
+ Here is the caller graph for this function: