Calculates TMDL

1 2 |

`data` |
Typically result of |

`names` |
List that can specify custom column names in
data frame |

`mult` |
Multiplier to convert flow rate times pollutant
concentration to resulting load units.
If flow rate is given in |

`WQS` |
Water quality standard |

`target` |
Same as |

`WLA` |
Wate Load Allocation |

`MOS` |
Margin Of Safety. FALSE for implicit, 0-1 to use % of Load Capacity, or TRUE to calculate MOS for flow interval as a difference between LC for median and low flows for a given flow interval |

`intervals` |
Currently broken |

`interp` |
How to interpolate WLA for different exceedance level. Used in plotting. |

`WLA` can be one of the following

numeric length of 1 or 5

matrix of data.frame with 5 columns

list of functions

Object of class "tmdl", essentially a list with the following components...

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
data(flow)
data(pol)
flow.ranked <- rankflow(flow,pol,names=list(date="Date",Q="cfs"))
fd.fig <- fdplot(flow.ranked,names=list(Q="cfs"),values=TRUE)
WQS <- 5 # mg/L => 10 NTU
WLA.construction = function(exc,LC,MOS,LC.fun,MOS.fun) {
LA = ifelse(exc>75, LC.fun(75)-MOS.fun(75), LC - MOS)
.01 * LA
}
MS4.Duluth = function(exc,LC,MOS,LC.fun,MOS.fun) {
.16 * (LC-MOS-WLA.construction(exc,LC,MOS,LC.fun,MOS.fun))
}
WLA=list(WLA=WLA.construction, MS4=MS4.Duluth)
kr.tmdl <- tmdl(flow.ranked,names=list(Q="cfs",pol="TSS"),WQS=WQS, WLA=WLA)
summary(kr.tmdl)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.