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

Functions/Subroutines

subroutine, public initiate_soil_npc_state (initN, initP, initC, maxlayers, soilstate)
 
subroutine, public add_dry_deposition_to_landclass (i, j, iluse, veg, areaij, source, frozenstate, soilstate, model9)
 
subroutine, public atmdep_in_loss (iluse, flow, fastN, conc)
 
subroutine, public calculate_plant (i, j, temp, daylength, common_uptake, miscstate, model9)
 
subroutine crop_sources (i, j, calcN, calcP, calcC, ndays, ldays, areaij, thickness, soilstate, sources)
 
subroutine, public particle_processes_for_runoff (i, j, isoil, iluse, pdayno, calcPP, calcSS, prec, surfacerunoff, macroporflow, tilerunoff, totflow, csurface, cmacro, ctile, crunoff1, crunoff2, crunoff3, snow, frostdepth, soilstate)
 
subroutine calculate_mmf_erosion (i, j, pdayno, prec, surfacerunoff, cohesion, erodibility, snow, sreroexp, flow, erodedsed)
 
subroutine get_current_crop_and_ground_cover (i, j, total_cropcover, total_groundcover)
 
subroutine calculate_hbvsed_erosion (i, prec, lusepar, soilpar, slopepar, precexppar, eroindexpar, snow, frostdepth, erodedsed)
 
subroutine calculate_pp_of_erosion (flow, erodedsed, parmax, parstab, parflowstab, soilPartP, soilHumusP, thickness, fracminP, erodedP)
 
subroutine calculate_delay_pool_processes (i, j, calcSS, calcPP, flagSS, flagPP, erodedsed, erodedP, totflow, SSrelease, PPrelease, soilstate)
 
subroutine, public soil_substance_processes9 (i, j, iluse, isoil, config, area, wp, fc, pw, common_uptake, thickness, nitrification, denitrification, cropuptake, cropsources, soilstate, glaciersoil, soilmodel)
 
subroutine, public soil_substance_processes (i, j, iluse, isoil, config, area, wp, fc, pw, common_uptake, thickness, nitrification, denitrification, cropuptake, cropsources, soilstate, glaciersoil)
 
subroutine, public soil_substance_processes_of_third_soillayer9 (i, j, thickness, soilstate, model9)
 
subroutine soil_pool_transformations (i, j, calcN, calcP, wp, pw, thickness, source, pardisfN, pardisfP, pardishN, pardishP, minfNpar, minfPpar, degrhNpar, degrhPpar, soilstate)
 
subroutine plant_uptake (calcN, calcP, common_uptake, wp, thickness, soil, csoil, sink)
 
subroutine calculate_soil_profile_denitrification (calcN, i, j, iluse, porevolume, thickness, denpar_basic, soilstate, denitrification)
 
subroutine, public soil_denitrification (maxwc, denpar, halfsatIN, soil, stemp, csoil, sink)
 
subroutine balance_spsoil (i, j, thickness, kfr, nfr, kadsdes, soilstate)
 
subroutine, public croprotation_soilpoolaverage (i, ncrot, pool)
 
subroutine freundlich (PoolPP, SRP_Conc, Vol, LayerThick, Kfr, Nfr, Kadsdes)
 
subroutine, public find_lowest_soillayer (nl, layer, lowestlayer)
 
subroutine, public local_diffuse_source (i, j, pw, classarea, soilstate, ruralaload, upwardflow, ruralflow, lruralflow, alldissolved)
 
subroutine soil_carbon_pool_transformations (i, j, wp, fc, pw, thickness, klh, klo, kho, kof, koflim, minc, soimf, soimr, soilstate)
 
subroutine, public carbon_runoff_delay (i, j, calcOC, surfacerunoff, tilerunoff, runoff1, runoff2, runoff3, csurface, ctile, crunoff1, crunoff2, crunoff3, soilstate)
 
subroutine, public percolation_substance_reduction (n, subrproc, kpar, kparN, kparP, temp, soilm, wiltp, porew, thickness, conc)
 
subroutine weathering (calcSi, i, j, isoil, thickness, soilstate)
 
subroutine, public class_riparian_zone_processes (i, j, n, q, conc1, conc2, conc3, oldgrw, kpar, stemp, apar, spar, gwat, t10, t20, soilm, wiltp, porew, depthm)
 
subroutine riparian_moisturefactor (smfcn, sm, wp, pw, depthm, rising)
 

Detailed Description

Nitrogen, phosphorus and organic carbon processes in soil in HYPE.

Function/Subroutine Documentation

◆ add_dry_deposition_to_landclass()

subroutine, public npc_soil_processes::add_dry_deposition_to_landclass ( integer, intent(in)  i,
integer, intent(in)  j,
integer, intent(in)  iluse,
integer, intent(in)  veg,
real, intent(in)  areaij,
real, dimension(numsubstances), intent(inout)  source,
type(snowicestatetype), intent(inout)  frozenstate,
type(soilstatetype), intent(inout)  soilstate,
integer, dimension(0:numsubstances), intent(in), optional  model9 
)

Calculate dry atmospheric deposition of N and P and add it to snow or soil on land classes. Calculate the load for output.

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

Parameters
[in]icurrent subbasin
[in]jcurrent class
[in]iluseindex landuse
[in]vegvegetation type: 1=open,2=forest,3=water
[in]areaijclassarea (km2)
[in,out]sourcedry deposition (kg/timestep)
[in,out]frozenstateSnow and ice states
[in,out]soilstateSoil states
[in]model9flag for soilmodel0 (=1), not use=0
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ atmdep_in_loss()

subroutine, public npc_soil_processes::atmdep_in_loss ( integer, intent(in)  iluse,
real, intent(in)  flow,
real, dimension(maxsoillayers), intent(inout)  fastN,
real, intent(inout)  conc 
)

Transformation of inorganic N from atmospheric deposition (wet and dry through infiltration) to solid soil organic N.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Vegetation and soil surface processes - Transformation of nitrogen from atmospheric deposition)

Parameters
[in]iluseindex landuse
[in]flowinfiltration (mm/timestep)
[in,out]fastnpool fastN (kg/km2)
[in,out]concconcentration of IN in infiltration (mg/L)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ balance_spsoil()

subroutine npc_soil_processes::balance_spsoil ( integer, intent(in)  i,
integer, intent(in)  j,
real, dimension(maxsoillayers), intent(in)  thickness,
real, intent(in)  kfr,
real, intent(in)  nfr,
real, intent(in)  kadsdes,
type(soilstatetype), intent(inout)  soilstate 
)

Exchange of SRP in soil water with soil PartP pool, adsorption-desorption.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Soil processes - Balance SP-PartP)

Parameters
[in]icurrent subbasin index
[in]jcurrent soiltype-landuse class index
[in]thicknessthickness of soil layers
[in]kfrmodel parameter freundlich
[in]nfrmodel parameter freundlich
[in]kadsdesmodel parameter freundlich, adsorption or desportion rate (1/d)
[in,out]soilstateSoil states
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_delay_pool_processes()

subroutine npc_soil_processes::calculate_delay_pool_processes ( integer, intent(in)  i,
integer, intent(in)  j,
logical, intent(in)  calcSS,
logical, intent(in)  calcPP,
real, intent(in)  flagSS,
real, intent(in)  flagPP,
real, intent(in)  erodedsed,
real, intent(in)  erodedP,
real, intent(in)  totflow,
real, intent(out)  SSrelease,
real, intent(out)  PPrelease,
type(soilstatetype), intent(inout)  soilstate 
)

Calculate processes of soil erosion delay pool. Calculate suspended sediment and particulate phosphorus reaching the local stream.

Parameters
[in]iindex of current subbasin
[in]jindex of current class
[in]calcssflag for simulating SS with erosion
[in]calcppflag for simulating PP with erosion
[in]flagssflag for current erosion SS
[in]flagppflag for current erosion PP
[in]erodedsederoded sediment (SS) kg/km2
[in]erodedperoded phosphorus (PP) kg/km2
[in]totflowtotal runoff
[out]ssreleaseSS load released to runoff (kg/km2)
[out]ppreleasePP load released to runoff
[in,out]soilstateSoil states
+ Here is the caller graph for this function:

◆ calculate_hbvsed_erosion()

subroutine npc_soil_processes::calculate_hbvsed_erosion ( integer, intent(in)  i,
real, intent(in)  prec,
real, intent(in)  lusepar,
real, intent(in)  soilpar,
real, intent(in)  slopepar,
real, intent(in)  precexppar,
real, intent(in)  eroindexpar,
real, intent(in)  snow,
real, intent(in)  frostdepth,
real, intent(out)  erodedsed 
)

Calculate eroded particles from soil by HBV-sed based model.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Vegetation and soil surface processes - Erosion calculations)

Parameters
[in]iindex of current subbasin
[in]precprecipitation (rainfall only)
[in]luseparsoil erosion factor (land use dependence)
[in]soilparsoil erosion factor (soil dependence)
[in]slopeparslope erosion factor (exponent)
[in]precexpparerosion precipitation dependence factor (exponent)
[in]eroindexparmodel parameter for scaling of erosion index
[in]snowsnow water (mm)
[in]frostdepthfrost depth (cm)
[out]erodedsederoded (transported) sediment (kg/km2)

Algorithm Snow and soil frost turn off particle mobilization

Calculate mobilised sediments from erosion index, slope and rainfall

Eroded sediment calculated from mobilised sediment with a monthly factor

+ Here is the caller graph for this function:

◆ calculate_mmf_erosion()

subroutine npc_soil_processes::calculate_mmf_erosion ( integer, intent(in)  i,
integer, intent(in)  j,
integer, intent(in)  pdayno,
real, intent(in)  prec,
real, intent(in)  surfacerunoff,
real, intent(in)  cohesion,
real, intent(in)  erodibility,
real, intent(in)  snow,
real, intent(in)  sreroexp,
real, intent(in)  flow,
real, intent(out)  erodedsed 
)

Calculate eroded particles from soil with a method based on the Morgan-Morgan-Finney erosion model.

Reference: R. P. C. Morgan, D. D. V. Morgan, and H. J. Finney, 1984. A predictive model for the assessment of soil erosion risk, Journal of Agricultural Engineering Research, vol. 30, pp. 245�253

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Vegetation and soil surface processes - Erosion calculations, Crop cover and ground cover)

Parameters
[in]iindex of current subbasin
[in]jindex of current class
[in]pdaynocurrent pseudo day number of the year
[in]precprecipitation (rainfall only)
[in]surfacerunoffsaturated overland flow and excess infiltration (mm)
[in]cohesion(kPa)
[in]erodibility(g/J)
[in]snowsnow water (mm)
[in]sreroexpsurface runoff erosion exponent
[in]flowfast flow
[out]erodedsederoded (transported) sediment (kg/km2)

Algorithm

Calculate current cropcover and groundcover, will limit erosion

Calculate particles that is eroded by rain splash detachment and by overland flow (mobilised sediment)

Transport capacity of fast flowing water may limit transport of sediment

Eroded sediment calculated from mobilised sediment, possibly limited by the transport capacity

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

◆ calculate_plant()

subroutine, public npc_soil_processes::calculate_plant ( integer, intent(in)  i,
integer, intent(in)  j,
real, intent(in)  temp,
real, intent(in)  daylength,
real, dimension(2,2), intent(out)  common_uptake,
type(miscstatetype), intent(inout)  miscstate,
integer, dimension(0:numsubstances), intent(in), optional  model9 
)

Calculate things related to plants; determine growing season and the plant nutrient uptake. Nutrient uptake is calculate per crop and then the total for the class.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Vegetation and soil surface processes - Potential vegetation uptake of nitrogen)

Parameters
[in]iindex of subbasin
[in]jindex of class
[in]tempclass air temperature
[in]daylengthday length (hours) of subbasin
[out]common_uptakeplant uptake of nitrogen and phosphrous (kg/km2/timestep), (N:P,sl1:sl2)
[in,out]miscstateMiscstate states, including the start of the growing season
[in]model9Flag for not using soilmodel0 (0=do not use soilmodel0, 1=use soilmodel0)

Algorithm
Set default value

Update growth start dayno for alternative methods

Find the growing start dayno

Update number of consequtive days with temperature above threshold

Check if plant nutrient uptake to be calculated

Calculate nutrient uptake for each crop, and add together for the class:

  • Find the day number of the start of the growing season
  • Calculate nitrogen uptake if in growing season
  • Calculate nitrogen uptake for autumn sowed crop before winter set in
  • Calculate phosphorus uptake from nitrogen uptake, and sum uptake of crop to common uptake function for class
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculate_pp_of_erosion()

subroutine npc_soil_processes::calculate_pp_of_erosion ( real, intent(in)  flow,
real, intent(in)  erodedsed,
real, intent(in)  parmax,
real, intent(in)  parstab,
real, intent(in)  parflowstab,
real, intent(in)  soilPartP,
real, intent(in)  soilHumusP,
real, intent(in)  thickness,
real, intent(out)  fracminP,
real, intent(out)  erodedP 
)

Calculate how much particulate phosphorus is transported with eroded sediment.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Vegetation and soil surface processes - Erosion calculations)

Parameters
[in]flowfast flow (mm/timestep)
[in]erodedsedmobilised sediment (kg/km2)
[in]parmaxparameter for maximum enrichment (-)
[in]parstabparameter for minimum enrichment (stable level) (-)
[in]parflowstabparameter for flow when stable level is reached (mm/timestep)
[in]soilpartppartP upper soil layer (kg/m2)
[in]soilhumusphumusP upper soil layer (kg/m2)
[in]thicknessupper soillayer thickness (m)
[out]fracminpfraction of eroded P that is mineral
[out]erodedperoded PP (kg/m2)

Algorithm If no phosphorus in soil, return with no erosion

Calculate enrichment factor - finer soil particles are more likely to be eroded and contain more P per weight unit

Calculate erodedP as P in eroded sediments and effect of enrichment

Calculate mineral fraction of erodedP

+ Here is the caller graph for this function:

◆ calculate_soil_profile_denitrification()

subroutine npc_soil_processes::calculate_soil_profile_denitrification ( logical, intent(in)  calcN,
integer, intent(in)  i,
integer, intent(in)  j,
integer, intent(in)  iluse,
real, dimension(maxsoillayers), intent(in)  porevolume,
real, dimension(maxsoillayers), intent(in)  thickness,
real, intent(in)  denpar_basic,
type(soilstatetype), intent(inout)  soilstate,
real, dimension(maxsoillayers), intent(out)  denitrification 
)

Calculate retention in soil due to denitritfication.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Soil processes - Denitrification)

Parameters
[in]calcnStatus of nitrogen simulation
[in]iindex of subbasin
[in]jindex of class
[in]iluseindex of land use
[in]porevolumepore volume (mm)
[in]thicknessthickness of soil layers
[in]denpar_basicgenerally adjusted denitrification rate
[in,out]soilstateSoil states
[out]denitrificationdenitrification (kg/km2)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ carbon_runoff_delay()

subroutine, public npc_soil_processes::carbon_runoff_delay ( integer, intent(in)  i,
integer, intent(in)  j,
logical, intent(in)  calcOC,
real, intent(in)  surfacerunoff,
real, intent(in)  tilerunoff,
real, intent(in)  runoff1,
real, intent(in)  runoff2,
real, intent(in)  runoff3,
real, dimension(numsubstances), intent(inout)  csurface,
real, dimension(numsubstances), intent(inout)  ctile,
real, dimension(numsubstances), intent(inout)  crunoff1,
real, dimension(numsubstances), intent(inout)  crunoff2,
real, dimension(numsubstances), intent(inout)  crunoff3,
type(soilstatetype), intent(inout)  soilstate 
)

Delay of organic carbon from soil runoff in temporary storage. The OC released is transported by all runoff flows.

Reference ModelDescription Chapter Organic carbon (Riparian zone?)

Parameters
[in]iindex of current subbasin
[in]jindex of current class
[in]calcocflag for simulating OC with erosion
[in]surfacerunoffsurface runoff (mm/timestep)
[in]tilerunofftile drainage runoff (mm/timestep)
[in]runoff1soil layer runoff (mm/timestep)
[in]runoff2soil layer runoff (mm/timestep)
[in]runoff3soil layer runoff (mm/timestep)
[in,out]csurfaceconcentration surface runoff (mg/L)
[in,out]ctileconcentration tile drainage (mg/L)
[in,out]crunoff1concentration soil runoff layer 1 (mg/L)
[in,out]crunoff2concentration soil runoff layer 2 (mg/L)
[in,out]crunoff3concentration soil runoff layer 3 (mg/L)
[in,out]soilstateSoil states

Algorithm
No calculation if no OC simulated

Add OC of runoff to temporary OC pool

Calculate release from temporary OC pool

Calculate new OC concentrations of the runoffs

+ Here is the caller graph for this function:

◆ class_riparian_zone_processes()

subroutine, public npc_soil_processes::class_riparian_zone_processes ( integer, intent(in)  i,
integer, intent(in)  j,
integer, intent(in)  n,
real, intent(in)  q,
real, dimension(n), intent(inout)  conc1,
real, dimension(n), intent(inout)  conc2,
real, dimension(n), intent(inout)  conc3,
real, intent(inout)  oldgrw,
real, intent(in)  kpar,
real, dimension(maxsoillayers), intent(in)  stemp,
real, intent(in)  apar,
real, intent(in)  spar,
real, intent(in)  gwat,
real, intent(in)  t10,
real, intent(in)  t20,
real, intent(in)  soilm,
real, intent(in)  wiltp,
real, intent(in)  porew,
real, intent(in)  depthm 
)

Subroutine for dissolved organic carbon change in runoff from soil due to riparian zone processes.

Reference ModelDescription Chapter Organic carbon (Riparian zone)

Parameters
[in]icurrent subbasin
[in]jcurrent class
[in]nnumber of substances, array dimension
[in]qrunoff through riparian zone (mm)
[in,out]conc1concentration of runoff 1 (mg/l*mm)
[in,out]conc2concentration of runoff 2 (mg/l*mm)
[in,out]conc3concentration of runoff 3 (mg/l*mm)
[in,out]oldgrwground water table last time step (m)
[in]kparmodel parameter; amount of riparian zone influence
[in]stempsoil temperature of class (same all soil layers)
[in]aparmodel parameter
[in]sparmodel parameter
[in]gwatgroundwater level of class (m)
[in]t1010-day mean air temperature
[in]t2020-day mean air temperature
[in]soilmsoil moisture all soil layers (mm)
[in]wiltpwilting point of class (mm)
[in]porewpore wolume of class (all soil layers) (mm)
[in]depthmthickness of soil layer (all soillayers) (m)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ crop_sources()

subroutine npc_soil_processes::crop_sources ( integer, intent(in)  i,
integer, intent(in)  j,
logical, intent(in)  calcN,
logical, intent(in)  calcP,
logical, intent(in)  calcC,
real, intent(in)  ndays,
real, intent(in)  ldays,
real, intent(in)  areaij,
real, dimension(maxsoillayers), intent(in)  thickness,
type(soilstatetype), intent(inout)  soilstate,
real, dimension(numsubstances,2), intent(out)  sources 
)

Calculate and add the crops sources of nutrient to the soil.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Nutrient sources - Fertilizer, Plant residues)

Parameters
[in]isubbasin
[in]jclass
[in]calcnStatus of nitrogen simulation
[in]calcpStatus of phosphorus simulation
[in]calccStatus of organic carbon simulation
[in]ndaysnumber of days to spread fertilizer
[in]ldaysnumber of days to spread plant residuals
[in]areaijclass area (km2)
[in]thicknessthickness of soil layers (m)
[in,out]soilstateSoil states
[out]sourcesload from fertilizer and plant residues (kg/timestep)

Algorithm

For each crop on the class:

Calculate current anount of fertiliser and manure application

Calculate current residue application

Add fertiliser and manure to soil pools

Add residues to soil pools

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

◆ croprotation_soilpoolaverage()

subroutine, public npc_soil_processes::croprotation_soilpoolaverage ( integer, intent(in)  i,
integer, intent(in)  ncrot,
real, dimension(maxsoillayers,nclass,nsub), intent(inout)  pool 
)

Simulate crop rotation by averaging soil nutrient pools once a year.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Soil processes - Crop rotation effect on soil pools)

Parameters
[in]isubbasin index
[in]ncrotnumber of crop rotation sequences
[in,out]poolsoil solid nutrient pool
+ Here is the caller graph for this function:

◆ find_lowest_soillayer()

subroutine, public npc_soil_processes::find_lowest_soillayer ( integer, intent(in)  nl,
real, dimension(nl), intent(in)  layer,
integer, intent(out)  lowestlayer 
)

Subroutine for finding the lowest soillayer.

Parameters
[in]nlmaximum number of soil layers
[in]layerthickness of soillayers (m)
[out]lowestlayerSoil layer flow was added
+ Here is the caller graph for this function:

◆ freundlich()

subroutine npc_soil_processes::freundlich ( real, intent(inout)  PoolPP,
real, intent(inout)  SRP_Conc,
real, intent(in)  Vol,
real, intent(in)  LayerThick,
real, intent(in)  Kfr,
real, intent(in)  Nfr,
real, intent(in)  Kadsdes 
)

Calculate the balance between P in solution and mineral P.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Soil processes - Balance SP-PartP)

Parameters
[in,out]poolppPool PP (kg/km2)
[in,out]srp_concSRP conc of soil water (mg/l)
[in]volSoil water content in layer (mm)
[in]layerthicksoil layer thickness (m)
[in]kfrfreundlich adsorption isoterm (l/kg)
[in]nfrfreundlich exponential coefficient
[in]kadsdesadsorption/desorption coefficient (1/d)
+ Here is the caller graph for this function:

◆ get_current_crop_and_ground_cover()

subroutine npc_soil_processes::get_current_crop_and_ground_cover ( integer, intent(in)  i,
integer, intent(in)  j,
real, intent(out)  total_cropcover,
real, intent(out)  total_groundcover 
)

Calculate the plant cover of a class that will limit erosion of the soil. Crop cover shelter from rain and ground cover from surface runoff.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Vegetation and soil surface processes - Erosion calculations, Crop cover and ground cover)

Parameters
[in]iindex of current subbasin
[in]jindex of current class
[out]total_cropcovertotal crop cover of class (-)
[out]total_groundcovertotal ground cover of class (-)

Algorithm

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

◆ initiate_soil_npc_state()

subroutine, public npc_soil_processes::initiate_soil_npc_state ( logical, intent(in)  initN,
logical, intent(in)  initP,
logical, intent(in)  initC,
integer, intent(in)  maxlayers,
type(soilstatetype), intent(inout)  soilstate 
)

Initiation of soil for nutrient concentrations and soil pools. Nutrient pools in kg/km2.

Parameters
[in]initnflag for initiation of nitrogen model
[in]initpflag for initiation of phosphorus model
[in]initcflag for initiation of organic carbon model
[in]maxlayersmaximum number of soil layers in the model set-up
[in,out]soilstateSoil states

Algorithm
Initialize soil nitrogen pools (kg/km2)

Initialize soil phosphorus pools (kg/km2)

Initialize soil organic carbon pools (kg/km2)

Initialize soil organic carbon soil water concentration (mg/L)

Initilize nutrient concentration of soil (mg/L)

+ Here is the caller graph for this function:

◆ local_diffuse_source()

subroutine, public npc_soil_processes::local_diffuse_source ( integer, intent(in)  i,
integer, intent(in)  j,
real, dimension(maxsoillayers), intent(in)  pw,
real, intent(in)  classarea,
type(soilstatetype), intent(inout)  soilstate,
real, dimension(numsubstances), intent(out)  ruralaload,
real, dimension(maxsoillayers-1), intent(out)  upwardflow,
real, dimension(maxsoillayers), intent(out)  ruralflow,
real, dimension(numsubstances,maxsoillayers), intent(out)  lruralflow,
logical, intent(in), optional  alldissolved 
)

Add load from local diffuse sources to the lowest soil layer.

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

Parameters
[in]icurrent subbasin index
[in]jcurrent slc-class index
[in]pwpore volume of soil (mm)
[in]classareaarea of class (km2)
[in,out]soilstateSoil states
[out]ruralaloadLoad from rural households (kg/timestep)
[out]upwardflowupwelling due to overflowing lower soil layers (mm/timestep)
[out]ruralflowadded flow from rural (mm/timestep)
[out]lruralflowload from rural households (kg/km2)
[in]alldissolvedflag for all dissolved load

Algorithm
Set default output values, and initialise internal variables

Diffuse source added to soil and/or stream as volume and concentration

If local diffuse source to soil...

Set concentration of rural inflow to soil (IN,ON,SP,.. but maybe not PP)

Add rural inflow to lowest soillayer

If not all nutrients are dissolved...

Add rural inflow of PP to fastP-pool of lowest soillayer

Local diffuse source added as load to soil and vol/conc to stream...

Add local diffuse load to third soillayer

Calculate output loads

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

◆ particle_processes_for_runoff()

subroutine, public npc_soil_processes::particle_processes_for_runoff ( integer, intent(in)  i,
integer, intent(in)  j,
integer, intent(in)  isoil,
integer, intent(in)  iluse,
integer, intent(in)  pdayno,
logical, intent(in)  calcPP,
logical, intent(in)  calcSS,
real, intent(in)  prec,
real, intent(in)  surfacerunoff,
real, intent(in)  macroporflow,
real, intent(in)  tilerunoff,
real, intent(in)  totflow,
real, dimension(numsubstances), intent(inout)  csurface,
real, dimension(numsubstances), intent(inout)  cmacro,
real, dimension(numsubstances), intent(inout)  ctile,
real, dimension(numsubstances), intent(inout)  crunoff1,
real, dimension(numsubstances), intent(inout)  crunoff2,
real, dimension(numsubstances), intent(inout)  crunoff3,
real, intent(in)  snow,
real, intent(in)  frostdepth,
type(soilstatetype), intent(inout)  soilstate 
)

Erosion of soil particles and phosphorus with fast flow, surface flow and macropore flow. Delay of particles in temporary storage. The released P is transported as PP by all runoff flows. Both partP and humusP of the soil contribute to eroded P.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Vegetation and soil surface processes - Erosion calculations)

Parameters
[in]iindex of current subbasin
[in]jindex of current class
[in]isoilindex of soil type
[in]iluseindex of landuse
[in]pdaynopseudo day number of the year
[in]calcppflag for simulating PP with erosion (use below instead of simulate)
[in]calcssflag for simulating SS with erosion
[in]precprecipitation (rainfall only)
[in]surfacerunoffsurface runoff (mm/timestep)
[in]macroporflowmacropore flow (mm/timestep)
[in]tilerunofftile drainage runoff (mm/timestep)
[in]totflowtotal runoff (surfacerunoff, tilerunoff, soilrunoff layer 1-3)
[in,out]csurfacePP concentration surface runoff (mg/L)
[in,out]cmacroPP concentration macropores (mg/L)
[in,out]ctilePP concentration tile drainage (mg/L)
[in,out]crunoff1PP concentration soil runoff layer 1 (mg/L)
[in,out]crunoff2PP concentration soil runoff layer 2 (mg/L)
[in,out]crunoff3PP concentration soil runoff layer 3 (mg/L)
[in]snowsnow water (mm)
[in]frostdepthfrost depth (cm)
[in,out]soilstateSoil states

Algorithm
No erosion calculation if neither of NPC is simulated

MMF model Step 1 Mobilization of particles from soil

Calculate particulate phosphorus of eroded sediment

Step 2 Transport the eroded sediment of the field (filtering/deposition) The eroded sediment is divided between surface runoff and macropore flow (if positive flows)

The final amount eroded P is removed from soil pools

Step 3 Suspended sediment and particulate phosphorus reaching the local stream Sediment and PP of macropore flow is all added to the temporary delay pools

Add delayed erosion to concentration of runoff

Calculate erosion of soil and transport of sediment by runoff

Step 1 Mobilization of particles from soil

Calculate particulate phosphorus of eroded sediment

Step 2 Transport the eroded sediment of the field The eroded sediment is divided between surface runoff and macropore flow (if positive flows) and reduced by filtering/deposition on the way to the stream

The final amount eroded P is removed from soil pools

Step 3 Suspended sediment and particulate phosphorus reaching the local stream Sediment and PP of macropore flow is 100% filtered and all added to the temporary pools

Add PP of tile drainage and surface flow to temporary PP pool

Remove/decay phosphorus from temporary pool if no erosion occurred so that it doesn't remain detached forever

Calculate release from temporary PP pool and new concentrations of the flows

Add SS of tile drainage and surface flow to temporary pool

Remove/decay sediment from temporary pool if no erosion occurred so that sediment doesn't remain detached forever

Calculate release from temporary pool and new concentrations of the flows

Remove/decay sediment from temporary pool if no erosion occurred so that sediment doesn't remain detached forever

Step 1 Sediment delivery

Step 2 Mitigation measusers

Step 3 Suspended sediment and particulate phosphorus reaching the local stream, processes of the delay pool

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

◆ percolation_substance_reduction()

subroutine, public npc_soil_processes::percolation_substance_reduction ( integer, intent(in)  n,
logical, dimension(n), intent(in)  subrproc,
real, intent(in)  kpar,
real, intent(in)  kparN,
real, intent(in)  kparP,
real, intent(in)  temp,
real, intent(in)  soilm,
real, intent(in)  wiltp,
real, intent(in)  porew,
real, intent(in)  thickness,
real, dimension(n), intent(inout)  conc 
)

Subroutine for reducing concentration of percolating water down in.

Reference ModelDescription Chapter Organic carbon (Soil processes - Percolation)

Parameters
[in]nnumber of substances, array dimension
[in]subrprocflag for substance reduction during percolation
[in]kparreduction parameter doc
[in]kparnreduction parameter on
[in]kparpreduction parameter pp
[in]tempsoil layer temperature (degree Celcius)
[in]soilmsoil water in soillayer (mm)
[in]wiltpwilting point of soillayer (mm)
[in]porewpore wolume of soillayer (mm)
[in]thicknessthickness of soillayer (m)
[in,out]concconcentration of flow (mg/l)

◆ plant_uptake()

subroutine npc_soil_processes::plant_uptake ( logical, intent(in)  calcN,
logical, intent(in)  calcP,
real, dimension(2,2), intent(in)  common_uptake,
real, dimension(maxsoillayers), intent(in)  wp,
real, dimension(maxsoillayers), intent(in)  thickness,
real, dimension(maxsoillayers), intent(in)  soil,
real, dimension(numsubstances,maxsoillayers), intent(inout)  csoil,
real, dimension(numsubstances), intent(out)  sink 
)

Calculate retention in soil due to plant uptake Inorganic nitrogen and phosphorus is removed.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Soil processes - Vegetation nutrient uptake)

Parameters
[in]calcnflag for nitrogen simulation
[in]calcpflag for phosphorus simulation
[in]common_uptakeplant uptake (kg/km2/d), (N:P,sl1:sl2)
[in]wpwater content at wilting point (mm)
[in]thicknessthickness of soil layers
[in]soilsoil moisture (mm)
[in,out]csoilconcentration in soil moisture (mg/L etc)
[out]sinksink of nutrients in this subroutine (kg/km2)

Algorithm
Initial calculations; IN and SRP pools, maximum uptake

Calculate plant nutrient uptake

Sum up the sinks (kg/km2)

Calculate the new soil concentrations

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

◆ riparian_moisturefactor()

subroutine npc_soil_processes::riparian_moisturefactor ( real, intent(out)  smfcn,
real, intent(in)  sm,
real, intent(in)  wp,
real, intent(in)  pw,
real, intent(in)  depthm,
logical, intent(in)  rising 
)

Calculates the soil moisture dependence factor, different for rising and sinking ground water level.

Reference ModelDescription Chapter Organic carbon (Riparian zone)

Parameters
[out]smfcnsoil moisture dependence factor
[in]smsoil moisture
[in]wpwilting point pore wolume
[in]pwtotal pore wolume
[in]depthmthickness of soil layers (m)
[in]risingground water table is rising?
+ Here is the caller graph for this function:

◆ soil_carbon_pool_transformations()

subroutine npc_soil_processes::soil_carbon_pool_transformations ( integer, intent(in)  i,
integer, intent(in)  j,
real, dimension(maxsoillayers), intent(in)  wp,
real, dimension(maxsoillayers), intent(in)  fc,
real, dimension(maxsoillayers), intent(in)  pw,
real, dimension(maxsoillayers), intent(in)  thickness,
real, intent(in)  klh,
real, intent(in)  klo,
real, intent(in)  kho,
real, intent(in)  kof,
real, intent(in)  koflim,
real, intent(in)  minc,
real, intent(in)  soimf,
real, intent(in)  soimr,
type(soilstatetype), intent(inout)  soilstate 
)

Subroutine for organic carbon transformation between pools in the soil.

Reference ModelDescription Chapter Organic carbon (Soil processes)

Parameters
[in]icurrent subbasin index
[in]jcurrent class index
[in]wpwater content at wilting point (mm)
[in]fcwater content at field capacity (mm)
[in]pwwater content: total porosity (mm)
[in]thicknessthickness of soil layers
[in]klhtransformation rate of fastC to humusC (d-1)
[in]klodegradation fastC (d-1)
[in]khodegradation humusC (d-1)
[in]koftransformation to fastC (d-1)
[in]koflimthreshold for transformation to fastC (-)
[in]mincfraction mineralisation to DIC (-)
[in]soimfsatuaration soilmoisture factor (-)
[in]soimrrate soilmoisture factor (-)
[in,out]soilstateSoil states
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ soil_denitrification()

subroutine, public npc_soil_processes::soil_denitrification ( real, intent(in)  maxwc,
real, intent(in)  denpar,
real, intent(in)  halfsatIN,
real, intent(in)  soil,
real, intent(in)  stemp,
real, dimension(numsubstances), intent(inout)  csoil,
real, dimension(numsubstances), intent(out)  sink 
)

Calculate retention in soil due to denitritfication.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Soil processes - Denitrification)

Parameters
[in]maxwcMaximum water content of soil (mm)
[in]denparmodel parameter denitrification in soil
[in]halfsatinmodel parameter half saturation IN of soil (mg/L)
[in]soilsoil water (mm)
[in]stempsoil temperature (degree Celcius)
[in,out]csoilconcentration of soil water
[out]sinksink of nutrient in this subroutine (kg/km2)

Dependence factors of denitrification

Denitrification

Set the sink (kg/km2)

Calculate the new soil concentrations

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

◆ soil_pool_transformations()

subroutine npc_soil_processes::soil_pool_transformations ( integer, intent(in)  i,
integer, intent(in)  j,
logical, intent(in)  calcN,
logical, intent(in)  calcP,
real, dimension(maxsoillayers), intent(in)  wp,
real, dimension(maxsoillayers), intent(in)  pw,
real, dimension(maxsoillayers), intent(in)  thickness,
real, dimension(numsubstances), intent(out)  source,
real, intent(in)  pardisfN,
real, intent(in)  pardisfP,
real, intent(in)  pardishN,
real, intent(in)  pardishP,
real, intent(in)  minfNpar,
real, intent(in)  minfPpar,
real, intent(in)  degrhNpar,
real, intent(in)  degrhPpar,
type(soilstatetype), intent(inout)  soilstate 
)

Transformation between NP-pools in soil. Degradation/delay.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Soil processes)

Parameters
[in]icurrent subbasin
[in]jcurrent slc-class
[in]calcnflag for nitrogen simulation
[in]calcpflag for phosphorus simulation
[in]wpwater content at wilting point (mm)
[in]pwpore volumeater (mm)
[in]thicknessthickness of soil layers
[out]sourcesource of soil water nutrients through mineralization
[in]pardisfnmodel parameter mineralisation fastN to dissolved ON
[in]pardisfpmodel parameter mineralisation fastP to dissolved OP
[in]pardishnmodel parameter mineralisation humusN to dissolved ON
[in]pardishpmodel parameter mineralisation humusP to dissolved OP
[in]minfnparmodel parameter mineralisation fastN
[in]minfpparmodel parameter mineralisation fastP
[in]degrhnparmodel parameter degradation humusN
[in]degrhpparmodel parameter degradation humusP
[in,out]soilstateSoil states
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ soil_substance_processes()

subroutine, public npc_soil_processes::soil_substance_processes ( integer, intent(in)  i,
integer, intent(in)  j,
integer, intent(in)  iluse,
integer, intent(in)  isoil,
type(stateconfigurationtype), intent(in)  config,
real, intent(in)  area,
real, dimension(maxsoillayers), intent(in)  wp,
real, dimension(maxsoillayers), intent(in)  fc,
real, dimension(maxsoillayers), intent(in)  pw,
real, dimension(2,2), intent(in)  common_uptake,
real, dimension(maxsoillayers), intent(in)  thickness,
real, intent(out)  nitrification,
real, dimension(maxsoillayers), intent(out)  denitrification,
real, intent(out)  cropuptake,
real, dimension(numsubstances,2), intent(out)  cropsources,
type(soilstatetype), intent(inout)  soilstate,
logical, intent(in), optional  glaciersoil 
)

Calculate nutrient processes in soil; sources, transformations,.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Soil processes)

Parameters
[in]iindex of subbasin
[in]jindex of class
[in]iluseindex of land use
[in]isoilindex of soil type
[in]configstate file configuration
[in]areaclass area (km2)
[in]wpwater content at wilting point (mm)
[in]fcwater content at field capacity (mm)
[in]pwpore wolume (mm)
[in]common_uptakeuptake by plants (kg NP/km2/timestep)
[in]thicknessthickness of soil layers
[out]denitrificationdenitrification (kg/km2)
[out]cropuptakecrop uptake of IN
[out]cropsourcesloads of fertilizer and residuals (kg/timestep)
[in,out]soilstateSoil states
[in]glaciersoilflag for glacier soil model
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ soil_substance_processes9()

subroutine, public npc_soil_processes::soil_substance_processes9 ( integer, intent(in)  i,
integer, intent(in)  j,
integer, intent(in)  iluse,
integer, intent(in)  isoil,
type(stateconfigurationtype), intent(in)  config,
real, intent(in)  area,
real, dimension(maxsoillayers), intent(in)  wp,
real, dimension(maxsoillayers), intent(in)  fc,
real, dimension(maxsoillayers), intent(in)  pw,
real, dimension(2,2), intent(in)  common_uptake,
real, dimension(maxsoillayers), intent(in)  thickness,
real, intent(out)  nitrification,
real, dimension(maxsoillayers), intent(out)  denitrification,
real, intent(out)  cropuptake,
real, dimension(numsubstances,2), intent(out)  cropsources,
type(soilstatetype), intent(inout)  soilstate,
logical, intent(in), optional  glaciersoil,
integer, dimension(0:numsubstances), intent(in), optional  soilmodel 
)

Calculate nutrient processes in soil; sources, transformations,.

Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Soil processes)

Parameters
[in]iindex of subbasin
[in]jindex of class
[in]iluseindex of land use
[in]isoilindex of soil type
[in]configstate file configuration
[in]areaclass area (km2)
[in]wpwater content at wilting point (mm)
[in]fcwater content at field capacity (mm)
[in]pwpore wolume (mm)
[in]common_uptakeuptake by plants (kg NP/km2/timestep)
[in]thicknessthickness of soil layers
[out]denitrificationdenitrification (kg/km2)
[out]cropuptakecrop uptake of IN
[out]cropsourcesloads of fertilizer and residuals (kg/timestep)
[in,out]soilstateSoil states
[in]glaciersoilflag for glacier soil model
[in]soilmodelflag for soil models using these processes (=1, otherwise 0)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ soil_substance_processes_of_third_soillayer9()

subroutine, public npc_soil_processes::soil_substance_processes_of_third_soillayer9 ( integer, intent(in)  i,
integer, intent(in)  j,
real, dimension(maxsoillayers), intent(in)  thickness,
type(soilstatetype), intent(inout)  soilstate,
integer, dimension(0:numsubstances), intent(in), optional  model9 
)

Calculate nutrient (and other substances) processes in third soil layer for the root zone leakage soil model (classmodel 6); exponential decay. For selected substances. Reference ModelDescription Chapter Nitrogen and phosphorus in land routines (Soil processesXX)

Parameters
[in]iindex of subbasin
[in]jindex of class
[in]thicknessthickness of soil layers
[in,out]soilstateSoil states
[in]model9flag of substance (0 for apply exponential decay)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ weathering()

subroutine npc_soil_processes::weathering ( logical, intent(in)  calcSi,
integer, intent(in)  i,
integer, intent(in)  j,
integer, intent(in)  isoil,
real, dimension(maxsoillayers), intent(in)  thickness,
type(soilstatetype), intent(inout)  soilstate 
)

Soil weathering of silica to be dissolved in soil water.

Reference ModelDescription Chapter Silica

Parameters
[in]calcsiStatus of silica simulation
[in]iindex of subbasin
[in]jindex of class
[in]isoilindex of soil type
[in]thicknessthickness of soil layers (m)
[in,out]soilstateSoil states
+ Here is the caller graph for this function: