From e0029129aec8b92d58aea8552006002c5fe409f5 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 10 Feb 2021 09:29:33 +0100 Subject: Treat Kfoc = 0 like Exposit in runoff calcs --- R/PEC_sw_exposit_runoff.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.1