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) |
Nitrogen, phosphorus and organic carbon processes in soil in HYPE.
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)
[in] | i | current subbasin |
[in] | j | current class |
[in] | iluse | index landuse |
[in] | veg | vegetation type: 1=open,2=forest,3=water |
[in] | areaij | classarea (km2) |
[in,out] | source | dry deposition (kg/timestep) |
[in,out] | frozenstate | Snow and ice states |
[in,out] | soilstate | Soil states |
[in] | model9 | flag for soilmodel0 (=1), not use=0 |
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)
[in] | iluse | index landuse |
[in] | flow | infiltration (mm/timestep) |
[in,out] | fastn | pool fastN (kg/km2) |
[in,out] | conc | concentration of IN in infiltration (mg/L) |
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)
[in] | i | current subbasin index |
[in] | j | current soiltype-landuse class index |
[in] | thickness | thickness of soil layers |
[in] | kfr | model parameter freundlich |
[in] | nfr | model parameter freundlich |
[in] | kadsdes | model parameter freundlich, adsorption or desportion rate (1/d) |
[in,out] | soilstate | Soil states |
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.
[in] | i | index of current subbasin |
[in] | j | index of current class |
[in] | calcss | flag for simulating SS with erosion |
[in] | calcpp | flag for simulating PP with erosion |
[in] | flagss | flag for current erosion SS |
[in] | flagpp | flag for current erosion PP |
[in] | erodedsed | eroded sediment (SS) kg/km2 |
[in] | erodedp | eroded phosphorus (PP) kg/km2 |
[in] | totflow | total runoff |
[out] | ssrelease | SS load released to runoff (kg/km2) |
[out] | pprelease | PP load released to runoff |
[in,out] | soilstate | Soil states |
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)
[in] | i | index of current subbasin |
[in] | prec | precipitation (rainfall only) |
[in] | lusepar | soil erosion factor (land use dependence) |
[in] | soilpar | soil erosion factor (soil dependence) |
[in] | slopepar | slope erosion factor (exponent) |
[in] | precexppar | erosion precipitation dependence factor (exponent) |
[in] | eroindexpar | model parameter for scaling of erosion index |
[in] | snow | snow water (mm) |
[in] | frostdepth | frost depth (cm) |
[out] | erodedsed | eroded (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
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)
[in] | i | index of current subbasin |
[in] | j | index of current class |
[in] | pdayno | current pseudo day number of the year |
[in] | prec | precipitation (rainfall only) |
[in] | surfacerunoff | saturated overland flow and excess infiltration (mm) |
[in] | cohesion | (kPa) |
[in] | erodibility | (g/J) |
[in] | snow | snow water (mm) |
[in] | sreroexp | surface runoff erosion exponent |
[in] | flow | fast flow |
[out] | erodedsed | eroded (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
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)
[in] | i | index of subbasin |
[in] | j | index of class |
[in] | temp | class air temperature |
[in] | daylength | day length (hours) of subbasin |
[out] | common_uptake | plant uptake of nitrogen and phosphrous (kg/km2/timestep), (N:P,sl1:sl2) |
[in,out] | miscstate | Miscstate states, including the start of the growing season |
[in] | model9 | Flag 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:
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)
[in] | flow | fast flow (mm/timestep) |
[in] | erodedsed | mobilised sediment (kg/km2) |
[in] | parmax | parameter for maximum enrichment (-) |
[in] | parstab | parameter for minimum enrichment (stable level) (-) |
[in] | parflowstab | parameter for flow when stable level is reached (mm/timestep) |
[in] | soilpartp | partP upper soil layer (kg/m2) |
[in] | soilhumusp | humusP upper soil layer (kg/m2) |
[in] | thickness | upper soillayer thickness (m) |
[out] | fracminp | fraction of eroded P that is mineral |
[out] | erodedp | eroded 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
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)
[in] | calcn | Status of nitrogen simulation |
[in] | i | index of subbasin |
[in] | j | index of class |
[in] | iluse | index of land use |
[in] | porevolume | pore volume (mm) |
[in] | thickness | thickness of soil layers |
[in] | denpar_basic | generally adjusted denitrification rate |
[in,out] | soilstate | Soil states |
[out] | denitrification | denitrification (kg/km2) |
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?)
[in] | i | index of current subbasin |
[in] | j | index of current class |
[in] | calcoc | flag for simulating OC with erosion |
[in] | surfacerunoff | surface runoff (mm/timestep) |
[in] | tilerunoff | tile drainage runoff (mm/timestep) |
[in] | runoff1 | soil layer runoff (mm/timestep) |
[in] | runoff2 | soil layer runoff (mm/timestep) |
[in] | runoff3 | soil layer runoff (mm/timestep) |
[in,out] | csurface | concentration surface runoff (mg/L) |
[in,out] | ctile | concentration tile drainage (mg/L) |
[in,out] | crunoff1 | concentration soil runoff layer 1 (mg/L) |
[in,out] | crunoff2 | concentration soil runoff layer 2 (mg/L) |
[in,out] | crunoff3 | concentration soil runoff layer 3 (mg/L) |
[in,out] | soilstate | Soil 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
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)
[in] | i | current subbasin |
[in] | j | current class |
[in] | n | number of substances, array dimension |
[in] | q | runoff through riparian zone (mm) |
[in,out] | conc1 | concentration of runoff 1 (mg/l*mm) |
[in,out] | conc2 | concentration of runoff 2 (mg/l*mm) |
[in,out] | conc3 | concentration of runoff 3 (mg/l*mm) |
[in,out] | oldgrw | ground water table last time step (m) |
[in] | kpar | model parameter; amount of riparian zone influence |
[in] | stemp | soil temperature of class (same all soil layers) |
[in] | apar | model parameter |
[in] | spar | model parameter |
[in] | gwat | groundwater level of class (m) |
[in] | t10 | 10-day mean air temperature |
[in] | t20 | 20-day mean air temperature |
[in] | soilm | soil moisture all soil layers (mm) |
[in] | wiltp | wilting point of class (mm) |
[in] | porew | pore wolume of class (all soil layers) (mm) |
[in] | depthm | thickness of soil layer (all soillayers) (m) |
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)
[in] | i | subbasin |
[in] | j | class |
[in] | calcn | Status of nitrogen simulation |
[in] | calcp | Status of phosphorus simulation |
[in] | calcc | Status of organic carbon simulation |
[in] | ndays | number of days to spread fertilizer |
[in] | ldays | number of days to spread plant residuals |
[in] | areaij | class area (km2) |
[in] | thickness | thickness of soil layers (m) |
[in,out] | soilstate | Soil states |
[out] | sources | load 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
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)
[in] | i | subbasin index |
[in] | ncrot | number of crop rotation sequences |
[in,out] | pool | soil solid nutrient pool |
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.
[in] | nl | maximum number of soil layers |
[in] | layer | thickness of soillayers (m) |
[out] | lowestlayer | Soil layer flow was added |
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)
[in,out] | poolpp | Pool PP (kg/km2) |
[in,out] | srp_conc | SRP conc of soil water (mg/l) |
[in] | vol | Soil water content in layer (mm) |
[in] | layerthick | soil layer thickness (m) |
[in] | kfr | freundlich adsorption isoterm (l/kg) |
[in] | nfr | freundlich exponential coefficient |
[in] | kadsdes | adsorption/desorption coefficient (1/d) |
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)
[in] | i | index of current subbasin |
[in] | j | index of current class |
[out] | total_cropcover | total crop cover of class (-) |
[out] | total_groundcover | total ground cover of class (-) |
Algorithm
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.
[in] | initn | flag for initiation of nitrogen model |
[in] | initp | flag for initiation of phosphorus model |
[in] | initc | flag for initiation of organic carbon model |
[in] | maxlayers | maximum number of soil layers in the model set-up |
[in,out] | soilstate | Soil 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)
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)
[in] | i | current subbasin index |
[in] | j | current slc-class index |
[in] | pw | pore volume of soil (mm) |
[in] | classarea | area of class (km2) |
[in,out] | soilstate | Soil states |
[out] | ruralaload | Load from rural households (kg/timestep) |
[out] | upwardflow | upwelling due to overflowing lower soil layers (mm/timestep) |
[out] | ruralflow | added flow from rural (mm/timestep) |
[out] | lruralflow | load from rural households (kg/km2) |
[in] | alldissolved | flag 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
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)
[in] | i | index of current subbasin |
[in] | j | index of current class |
[in] | isoil | index of soil type |
[in] | iluse | index of landuse |
[in] | pdayno | pseudo day number of the year |
[in] | calcpp | flag for simulating PP with erosion (use below instead of simulate) |
[in] | calcss | flag for simulating SS with erosion |
[in] | prec | precipitation (rainfall only) |
[in] | surfacerunoff | surface runoff (mm/timestep) |
[in] | macroporflow | macropore flow (mm/timestep) |
[in] | tilerunoff | tile drainage runoff (mm/timestep) |
[in] | totflow | total runoff (surfacerunoff, tilerunoff, soilrunoff layer 1-3) |
[in,out] | csurface | PP concentration surface runoff (mg/L) |
[in,out] | cmacro | PP concentration macropores (mg/L) |
[in,out] | ctile | PP concentration tile drainage (mg/L) |
[in,out] | crunoff1 | PP concentration soil runoff layer 1 (mg/L) |
[in,out] | crunoff2 | PP concentration soil runoff layer 2 (mg/L) |
[in,out] | crunoff3 | PP concentration soil runoff layer 3 (mg/L) |
[in] | snow | snow water (mm) |
[in] | frostdepth | frost depth (cm) |
[in,out] | soilstate | Soil 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
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)
[in] | n | number of substances, array dimension |
[in] | subrproc | flag for substance reduction during percolation |
[in] | kpar | reduction parameter doc |
[in] | kparn | reduction parameter on |
[in] | kparp | reduction parameter pp |
[in] | temp | soil layer temperature (degree Celcius) |
[in] | soilm | soil water in soillayer (mm) |
[in] | wiltp | wilting point of soillayer (mm) |
[in] | porew | pore wolume of soillayer (mm) |
[in] | thickness | thickness of soillayer (m) |
[in,out] | conc | concentration of flow (mg/l) |
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)
[in] | calcn | flag for nitrogen simulation |
[in] | calcp | flag for phosphorus simulation |
[in] | common_uptake | plant uptake (kg/km2/d), (N:P,sl1:sl2) |
[in] | wp | water content at wilting point (mm) |
[in] | thickness | thickness of soil layers |
[in] | soil | soil moisture (mm) |
[in,out] | csoil | concentration in soil moisture (mg/L etc) |
[out] | sink | sink 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
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)
[out] | smfcn | soil moisture dependence factor |
[in] | sm | soil moisture |
[in] | wp | wilting point pore wolume |
[in] | pw | total pore wolume |
[in] | depthm | thickness of soil layers (m) |
[in] | rising | ground water table is rising? |
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)
[in] | i | current subbasin index |
[in] | j | current class index |
[in] | wp | water content at wilting point (mm) |
[in] | fc | water content at field capacity (mm) |
[in] | pw | water content: total porosity (mm) |
[in] | thickness | thickness of soil layers |
[in] | klh | transformation rate of fastC to humusC (d-1) |
[in] | klo | degradation fastC (d-1) |
[in] | kho | degradation humusC (d-1) |
[in] | kof | transformation to fastC (d-1) |
[in] | koflim | threshold for transformation to fastC (-) |
[in] | minc | fraction mineralisation to DIC (-) |
[in] | soimf | satuaration soilmoisture factor (-) |
[in] | soimr | rate soilmoisture factor (-) |
[in,out] | soilstate | Soil states |
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)
[in] | maxwc | Maximum water content of soil (mm) |
[in] | denpar | model parameter denitrification in soil |
[in] | halfsatin | model parameter half saturation IN of soil (mg/L) |
[in] | soil | soil water (mm) |
[in] | stemp | soil temperature (degree Celcius) |
[in,out] | csoil | concentration of soil water |
[out] | sink | sink of nutrient in this subroutine (kg/km2) |
Dependence factors of denitrification
Denitrification
Set the sink (kg/km2)
Calculate the new soil concentrations
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)
[in] | i | current subbasin |
[in] | j | current slc-class |
[in] | calcn | flag for nitrogen simulation |
[in] | calcp | flag for phosphorus simulation |
[in] | wp | water content at wilting point (mm) |
[in] | pw | pore volumeater (mm) |
[in] | thickness | thickness of soil layers |
[out] | source | source of soil water nutrients through mineralization |
[in] | pardisfn | model parameter mineralisation fastN to dissolved ON |
[in] | pardisfp | model parameter mineralisation fastP to dissolved OP |
[in] | pardishn | model parameter mineralisation humusN to dissolved ON |
[in] | pardishp | model parameter mineralisation humusP to dissolved OP |
[in] | minfnpar | model parameter mineralisation fastN |
[in] | minfppar | model parameter mineralisation fastP |
[in] | degrhnpar | model parameter degradation humusN |
[in] | degrhppar | model parameter degradation humusP |
[in,out] | soilstate | Soil states |
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)
[in] | i | index of subbasin |
[in] | j | index of class |
[in] | iluse | index of land use |
[in] | isoil | index of soil type |
[in] | config | state file configuration |
[in] | area | class area (km2) |
[in] | wp | water content at wilting point (mm) |
[in] | fc | water content at field capacity (mm) |
[in] | pw | pore wolume (mm) |
[in] | common_uptake | uptake by plants (kg NP/km2/timestep) |
[in] | thickness | thickness of soil layers |
[out] | denitrification | denitrification (kg/km2) |
[out] | cropuptake | crop uptake of IN |
[out] | cropsources | loads of fertilizer and residuals (kg/timestep) |
[in,out] | soilstate | Soil states |
[in] | glaciersoil | flag for glacier soil model |
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)
[in] | i | index of subbasin |
[in] | j | index of class |
[in] | iluse | index of land use |
[in] | isoil | index of soil type |
[in] | config | state file configuration |
[in] | area | class area (km2) |
[in] | wp | water content at wilting point (mm) |
[in] | fc | water content at field capacity (mm) |
[in] | pw | pore wolume (mm) |
[in] | common_uptake | uptake by plants (kg NP/km2/timestep) |
[in] | thickness | thickness of soil layers |
[out] | denitrification | denitrification (kg/km2) |
[out] | cropuptake | crop uptake of IN |
[out] | cropsources | loads of fertilizer and residuals (kg/timestep) |
[in,out] | soilstate | Soil states |
[in] | glaciersoil | flag for glacier soil model |
[in] | soilmodel | flag for soil models using these processes (=1, otherwise 0) |
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)
[in] | i | index of subbasin |
[in] | j | index of class |
[in] | thickness | thickness of soil layers |
[in,out] | soilstate | Soil states |
[in] | model9 | flag of substance (0 for apply exponential decay) |
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
[in] | calcsi | Status of silica simulation |
[in] | i | index of subbasin |
[in] | j | index of class |
[in] | isoil | index of soil type |
[in] | thickness | thickness of soil layers (m) |
[in,out] | soilstate | Soil states |