aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2021-02-10 09:29:33 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2021-02-10 09:29:33 +0100
commite0029129aec8b92d58aea8552006002c5fe409f5 (patch)
tree318324c4f30a0852c6de729a0437c1a0cdf6ab09
parentc97a4f5a9fe30ffc3321681a97eea167cfc427b5 (diff)
Treat Kfoc = 0 like Exposit in runoff calcs
-rw-r--r--R/PEC_sw_exposit_runoff.R3
1 files changed, 2 insertions, 1 deletions
diff --git a/R/PEC_sw_exposit_runoff.R b/R/PEC_sw_exposit_runoff.R
index d4b2c90..d68a521 100644
--- a/R/PEC_sw_exposit_runoff.R
+++ b/R/PEC_sw_exposit_runoff.R
@@ -41,7 +41,7 @@ rownames(perc_runoff_exposit) <- Koc_classes
#' }
#' @source Excel 3.02 spreadsheet available from
#' \url{https://www.bvl.bund.de/EN/04_PlantProtectionProducts/03_Applicants/04_AuthorisationProcedure/08_Environment/ppp_environment_node.html}
-#'
+#'
#' Agroscope version 3.01a with additional runoff factors for 3 m and 6 m buffer zones received from Muris Korkaric (not published).
#' The variant 3.01a2 was introduced for consistency with previous calculations performed by Agroscope for a 3 m buffer zone.
#' @export
@@ -120,6 +120,7 @@ PEC_sw_exposit_runoff <- function(rate, interception = 0, Koc, DT50 = Inf, t_run
Koc_breaks <- c(perc_runoff_exposit$Koc_lower_bound, Inf)
Koc_classes <- as.character(cut(Koc, Koc_breaks, labels = rownames(perc_runoff_exposit)))
perc_runoff <- perc_runoff_exposit[Koc_classes, c("dissolved", "bound")]
+ if (identical(Koc, 0)) perc_runoff <- c(dissolved = 0, bound = 0)
return(unlist(perc_runoff) / 100)
}
f_runoff <- f_runoff_exposit(Koc)

Contact - Imprint