Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
~ ~ ~ PURPOSE ~ ~ ~
this subroutine computes the daily stream pesticide balance
(soluble and sorbed)
initialize depth of water for pesticide calculations
volume of water entering reach and stored in reach
use channel water temperature (inflow + storage weighted) for aquatic/benthic decay
pesticide transported into reach during day
calculate mass of pesticide in reach
calculate mass of pesticide in bed sediment
BUG FIX
zero outflow/accumulators so values from a previous channel
are not forwarded downstream or into basin totals
in-stream processes
calculate sediment concentration
set kd
calculate fraction of soluble and sorbed pesticide
BUG FIX
kd is in mL/g (=L/kg), sedcon in mg/L (=g/m3)
Product kdsedcon has units (L/kg)(mg/L) = mg/kg, NOT dimensionless.
Need 1.e-6 to convert to (m3/g)*(g/m3) = dimensionless.
CORRECTED
Benthic partition: fd2 = pore water fraction in benthic sediment
per unit bulk volume: dissolved = porcw; sorbed = ch_bdkdcw
fd2 = por / (por + kdch_bd); kd [cm3/g] * ch_bd [g/cm3] = dimensionless
CORRECTED
calculate flow duration
calculate amount of pesticide that undergoes chemical or biological degradation on day in reach
add decay to daughter pesticides
BUG FIX: local variable avoids double-counting with multiple parents
calculate amount of pesticide that volatilizes from reach
calculate amount of pesticide removed from reach by settling
calculate resuspension of pesticide in reach
calculate diffusion of pesticide between reach and sediment
calculate removal of pesticide from active sediment layer by burial
verify that water concentration is at or below solubility
insignificant flow
benthic processes
calculate loss of pesticide from bed sediments by reaction
add decay to daughter pesticides
BUG FIX: local variable avoids double-counting with multiple parents
set new pesticide mass of (in + store) after processes
calculate outflow and storage in water column
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.