From 06b528f0c19ca9f7a311612c0e9ae80c0d0c1d3f Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 27 Oct 2017 18:15:29 +0200 Subject: Exposit runoff calculations for surface water --- ChangeLog | 6 + DESCRIPTION | 2 +- NAMESPACE | 3 + R/PEC_sw_exposit_runoff.R | 119 ++++++++++++++ _pkgdown.yml | 1 + docs/reference/PEC_sw_exposit_runoff.html | 187 ++++++++++++++++++++++ docs/reference/PELMO_runs.html | 2 +- docs/reference/buffers.html | 137 ++++++++++++++++ docs/reference/index.html | 6 + docs/reference/perc_runoff_exposit.html | 138 ++++++++++++++++ docs/reference/perc_runoff_reduction_exposit.html | 137 ++++++++++++++++ docs/reference/pesticide.txt | 8 + man/PEC_sw_exposit_runoff.Rd | 47 ++++++ man/perc_runoff_exposit.Rd | 29 ++++ man/perc_runoff_reduction_exposit.Rd | 29 ++++ test.log | 1 + tests/testthat/test_exposit.R | 25 +++ 17 files changed, 875 insertions(+), 2 deletions(-) create mode 100644 R/PEC_sw_exposit_runoff.R create mode 100644 docs/reference/PEC_sw_exposit_runoff.html create mode 100644 docs/reference/buffers.html create mode 100644 docs/reference/perc_runoff_exposit.html create mode 100644 docs/reference/perc_runoff_reduction_exposit.html create mode 100644 man/PEC_sw_exposit_runoff.Rd create mode 100644 man/perc_runoff_exposit.Rd create mode 100644 man/perc_runoff_reduction_exposit.Rd create mode 100644 tests/testthat/test_exposit.R diff --git a/ChangeLog b/ChangeLog index b236efe..c9c1ce8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +commit 2cd464455a22791c0450ada45a0e0128c637fade +Author: Johannes Ranke +Date: 2017-10-23 15:19:03 +0200 + + Typos, rebuild static docs + commit 6f6575701d9b028af4b3b1b4b61c36d4989e2812 Author: Johannes Ranke Date: 2017-10-10 14:03:20 +0200 diff --git a/DESCRIPTION b/DESCRIPTION index 64e0499..a7becb0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: pfm Type: Package Title: Utilities for Pesticide Fate Modelling Version: 0.4-5 -Date: 2017-10-23 +Date: 2017-10-27 Authors@R: person("Johannes Ranke", email = "jranke@uni-bremen.de", role = c("aut", "cre", "cph"), comment = c(ORCID = "0000-0003-4371-6538")) diff --git a/NAMESPACE b/NAMESPACE index 7a5c668..141a68c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -16,9 +16,11 @@ export(FOCUS_PELMO_crop_sze_names) export(FOCUS_PELMO_crops) export(FOCUS_PELMO_location_codes) export(GUS) +export(Koc_breaks) export(PEC_soil) export(PEC_sw_drainage_UK) export(PEC_sw_drift) +export(PEC_sw_exposit_runoff) export(PEC_sw_focus) export(PEC_sw_sed) export(PELMO_path) @@ -26,6 +28,7 @@ export(PELMO_runs) export(SFO_actual_twa) export(SSLRC_mobility_classification) export(TOXSWA_cwa) +export(buffers) export(chent_focus_sw) export(endpoint) export(evaluate_PELMO) diff --git a/R/PEC_sw_exposit_runoff.R b/R/PEC_sw_exposit_runoff.R new file mode 100644 index 0000000..618b532 --- /dev/null +++ b/R/PEC_sw_exposit_runoff.R @@ -0,0 +1,119 @@ +#' Runoff loss percentages as used in Exposit 3 +#' +#' A table of the loss percentages used in Exposit 3 for the twelve different Koc classes +#' +#' @name perc_runoff_exposit +#' @format A data frame with percentage values for the dissolved fraction and the fraction +#' bound to eroding particles, with Koc classes used as row names +#' \describe{ +#' \item{dissolved}{The percentage of the applied substance transferred to an +#' adjacent water body in the dissolved phase} +#' \item{bound}{The percentage of the applied substance transferred to an +#' adjacent water body bound to eroding particles} +#' } +#' @source Excel 3.01 spreadsheet available from +#' \url{https://www.bvl.bund.de/DE/04_Pflanzenschutzmittel/03_Antragsteller/04_Zulassungsverfahren/07_Naturhaushalt/psm_naturhaush_node.html#doc1400590bodyText3} +#' @export +#' @examples +#' print(perc_runoff_exposit) +Koc_breaks <- c(0, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000, Inf) +tmp <- paste(Koc_breaks[1:11], Koc_breaks[2:12], sep = "-") +Koc_classes <- c(tmp[1], paste0(">", tmp[2:11]), ">50000") +perc_runoff_exposit <- data.frame( + Koc_lower_bound = Koc_breaks[1:12], + dissolved = c(0.11, 0.151, 0.197, 0.248, 0.224, 0.184, 0.133, 0.084, 0.037, 0.031, 0.014, 0.001), + bound = c(0, 0, 0, 0.001, 0.004, 0.020, 0.042, 0.091, 0.159, 0.192, 0.291, 0.451)) +rownames(perc_runoff_exposit) <- Koc_classes + +#' Runoff reduction percentages as used in Exposit +#' +#' A table of the runoff reduction percentages used in Exposit 3 for different vegetated buffer widths +#' +#' @name perc_runoff_reduction_exposit +#' @format A named list of data frames with reduction percentage values for the +#' dissolved fraction and the fraction bound to eroding particles, with +#' vegetated buffer widths as row names. The names of the list items are the Exposit versions +#' from which the values were taken. +#' \describe{ +#' \item{dissolved}{The reduction percentage for the dissolved phase} +#' \item{bound}{The reduction percentage for the particulate phase} +#' } +#' @source Excel 3.01 spreadsheet available from +#' \url{https://www.bvl.bund.de/DE/04_Pflanzenschutzmittel/03_Antragsteller/04_Zulassungsverfahren/07_Naturhaushalt/psm_naturhaush_node.html#doc1400590bodyText3} +#' @export +#' @examples +#' print(perc_runoff_reduction_exposit) +buffers <- c("No buffer", paste(c(5, 10, 20), "m")) +perc_runoff_reduction_exposit <- list( + "3.01" = data.frame( + dissolved = c(0, 40, 60, 80), + bound = c(0, 40, 85, 95), + row.names = buffers), + "2.0" = data.frame( + dissolved = c(0, 97.5), + bound = c(0, 97.5), + row.names = c("No buffer", "20 m")) +) + +#' Calculate PEC surface water due to runoff and erosion as in Exposit 3 +#' +#' This is a reimplementation of the calculation described in the Exposit 3.01 spreadsheet file, +#' in the worksheet "Konzept Runoff". Calculation of sediment PEC values is not implemented. +#' +#' @param rate The application rate in g/ha +#' @param Koc The sorption coefficient to soil organic carbon +#' @param DT50 The soil half-life in days +#' @param t_runoff The time between application and the runoff event, where degradation occurs, in days +#' @param exposit_reduction_version The version of the reduction factors to be used +#' @param V_ditch The volume of the ditch is assumed to be 1 m * 100 m * 30 cm = 30 m3 +#' @param V_event The unreduced runoff volume, equivalent to 10 mm precipitation on 1 ha +#' @return A list containing the following components +#' \describe{ +#' \item{Input}{A matrix containing dissolved and bound input for the different distances} +#' \item{PEC_sw_runoff}{A matrix containing PEC values for dissolved and bound substance +#' for the different distances. If the rate was given in g/ha, the PECsw are in microg/L.} +#' } +#' @export +#' @source Excel 3.01 spreadsheet available from +#' \url{https://www.bvl.bund.de/DE/04_Pflanzenschutzmittel/03_Antragsteller/04_Zulassungsverfahren/07_Naturhaushalt/psm_naturhaush_node.html#doc1400590bodyText3} +#' @seealso \code{\link{perc_runoff_exposit}} for runoff loss percentages and \code{\link{perc_runoff_reduction_exposit}} for runoff reduction percentages used +#' @examples +#' PEC_sw_exposit_runoff(500, 150) +PEC_sw_exposit_runoff <- function(rate, Koc, DT50 = Inf, t_runoff = 3, + exposit_reduction_version = c("3.01", "2.0"), + V_ditch = 30, V_event = 100) +{ + k_deg <- log(2)/DT50 + input <- rate * 1 * exp(-k_deg * t_runoff) # assumes 1 ha treated area + + if (length(Koc) > 1) stop("Only one compound at a time supported") + + exposit_reduction_version <- match.arg(exposit_reduction_version) + red_water <- perc_runoff_reduction_exposit[[exposit_reduction_version]]["dissolved"] / 100 + red_bound <- perc_runoff_reduction_exposit[[exposit_reduction_version]]["bound"] / 100 + reduction_runoff <- perc_runoff_reduction_exposit[[exposit_reduction_version]] / 100 + transfer_runoff <- 1 - reduction_runoff + + V_runoff <- V_event * (1 - reduction_runoff[["dissolved"]]) # m3 + V_ditch_runoff <- V_ditch + V_runoff + V_flowing_ditch_runoff <- 2 * V_ditch_runoff + f_runoff_exposit <- function(Koc) { + 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")] + return(unlist(perc_runoff) / 100) + } + f_runoff <- f_runoff_exposit(Koc) + runoff_dissolved <- input * f_runoff["dissolved"] * transfer_runoff["dissolved"] + runoff_bound <- input * f_runoff["bound"] * transfer_runoff["bound"] + runoff_input <- cbind(runoff_dissolved, runoff_bound) + runoff_input$total <- runoff_input$dissolved + runoff_input$bound + + PEC_sw_runoff <- 1000 * runoff_input / V_flowing_ditch_runoff + + result <- list(Rate = rate, + Koc = Koc, + Input = runoff_input, + PEC_sw_runoff = PEC_sw_runoff) + return(result) +} diff --git a/_pkgdown.yml b/_pkgdown.yml index 6c8f632..87afa93 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -26,6 +26,7 @@ reference: - drift_data_JKI - PEC_sw_drainage_UK - PEC_sw_focus + - PEC_sw_exposit_runoff - TOXSWA_cwa - read.TOXSWA_cwa - plot.TOXSWA_cwa diff --git a/docs/reference/PEC_sw_exposit_runoff.html b/docs/reference/PEC_sw_exposit_runoff.html new file mode 100644 index 0000000..378c4e2 --- /dev/null +++ b/docs/reference/PEC_sw_exposit_runoff.html @@ -0,0 +1,187 @@ + + + + + + + + +Calculate PEC surface water due to runoff and erosion as in Exposit 3 — PEC_sw_exposit_runoff • pfm + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

This is a reimplementation of the calculation described in the Exposit 3.01 spreadsheet file, +in the worksheet "Konzept Runoff". Calculation of sediment PEC values is not implemented.

+ + +
PEC_sw_exposit_runoff(rate, Koc, DT50 = Inf, t_runoff = 3,
+  exposit_reduction_version = c("3.01", "2.0"), V_ditch = 30,
+  V_event = 100)
+ +

Arguments

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
rate

The application rate in g/ha

Koc

The sorption coefficient to soil organic carbon

DT50

The soil half-life in days

t_runoff

The time between application and the runoff event, where degradation occurs, in days

exposit_reduction_version

The version of the reduction factors to be used

V_ditch

The volume of the ditch is assumed to be 1 m * 100 m * 30 cm = 30 m3

V_event

The unreduced runoff volume, equivalent to 10 mm precipitation on 1 ha

+ +

Source

+ +

Excel 3.01 spreadsheet available from + https://www.bvl.bund.de/DE/04_Pflanzenschutzmittel/03_Antragsteller/04_Zulassungsverfahren/07_Naturhaushalt/psm_naturhaush_node.html#doc1400590bodyText3

+ +

Value

+ +

A list containing the following components

+
Input

A matrix containing dissolved and bound input for the different distances

+
PEC_sw_runoo

A matrix containing PEC values for dissolved and bound substance + for the different distances. If the rate was given in g/ha, the PECsw are in /L.

+
+ + +

See also

+ +

perc_runoff_exposit for runoff loss percentages and perc_runoff_reduction_exposit for runoff reduction percentages used

+ + +

Examples

+
PEC_sw_exposit_runoff(500, 150)
#> $Rate +#> [1] 500 +#> +#> $Koc +#> [1] 150 +#> +#> $Input +#> dissolved bound total +#> No buffer 1.240 0.00500 1.24500 +#> 5 m 0.744 0.00300 0.74700 +#> 10 m 0.496 0.00075 0.49675 +#> 20 m 0.248 0.00025 0.24825 +#> +#> $PEC_sw_runoff +#> dissolved bound total +#> No buffer 4.769231 0.019230769 4.788462 +#> 5 m 4.133333 0.016666667 4.150000 +#> 10 m 3.542857 0.005357143 3.548214 +#> 20 m 2.480000 0.002500000 2.482500 +#>
+
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/PELMO_runs.html b/docs/reference/PELMO_runs.html index b7dc4e6..9f6b7e8 100644 --- a/docs/reference/PELMO_runs.html +++ b/docs/reference/PELMO_runs.html @@ -190,7 +190,7 @@ the period.plm file generated by the FOCUS PELMO GUI.

#> #>
# We get exactly the same PECgw values (on Linux, calling PELMO using Wine). print(time_1)
#> User System verstrichen -#> 218.820 0.896 56.243
+#> 218.896 1.000 55.247
# Demonstrate some results with metabolites. runs_2 <- list(list(psm = 'Pesticide_D_1_May_every_other_year_mets', win = c("Cha", "Ham", "Kre"))) diff --git a/docs/reference/buffers.html b/docs/reference/buffers.html new file mode 100644 index 0000000..f04c3d0 --- /dev/null +++ b/docs/reference/buffers.html @@ -0,0 +1,137 @@ + + + + + + + + +Runoff reduction percentages as used in Exposit — buffers • pfm + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

A table of the runoff reduction percentages used in Exposit 3 for different vegetated buffer widths

+ + +
buffers
+ +

Format

+ +

A named list of data frames with reduction percentage values for the +dissolved fraction and the fraction bound to eroding particles, with +vegetated buffer widths as row names. The names of the list items are the Exposit versions +from which the values were taken.

+
dissolved

The reduction percentage for the dissolved phase

+
bound

The reduction percentage for the particulate phase

+
+ +

Source

+ +

Excel 3.01 spreadsheet available from + https://www.bvl.bund.de/DE/04_Pflanzenschutzmittel/03_Antragsteller/04_Zulassungsverfahren/07_Naturhaushalt/psm_naturhaush_node.html#doc1400590bodyText3

+ + +

Examples

+
print(perc_runoff_reduction_exposit)
#> $`3.01` +#> dissolved bound +#> No buffer 0 0 +#> 5 m 40 40 +#> 10 m 60 85 +#> 20 m 80 95 +#> +#> $`2.0` +#> dissolved bound +#> 1 0.0 0.0 +#> 2 97.5 97.5 +#>
+
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/index.html b/docs/reference/index.html index 0fbae40..47f495a 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -192,6 +192,12 @@ published by the JKI

PEC_sw_focus

Calculate PEC surface water at FOCUS Step 1

+ + + +

PEC_sw_exposit_runoff

+ +

Calculate PEC surface water due to runoff and erosion as in Exposit 3

diff --git a/docs/reference/perc_runoff_exposit.html b/docs/reference/perc_runoff_exposit.html new file mode 100644 index 0000000..1f570ce --- /dev/null +++ b/docs/reference/perc_runoff_exposit.html @@ -0,0 +1,138 @@ + + + + + + + + +Runoff loss percentages as used in Exposit 3 — perc_runoff_exposit • pfm + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

A table of the loss percentages used in Exposit 3 for the twelve different Koc classes

+ + +
Koc_breaks
+ +

Format

+ +

A data frame with percentage values for the dissolved fraction and the fraction + bound to eroding particles, with Koc classes used as row names

+
dissolved

The percentage of the applied substance transferred to an + adjacent water body in the dissolved phase

+
bound

The percentage of the applied substance transferred to an + adjacent water body bound to eroding particles

+
+ +

Source

+ +

Excel 3.01 spreadsheet available from + https://www.bvl.bund.de/DE/04_Pflanzenschutzmittel/03_Antragsteller/04_Zulassungsverfahren/07_Naturhaushalt/psm_naturhaush_node.html#doc1400590bodyText3

+ + +

Examples

+
print(perc_runoff_exposit)
#> Koc_lower_bound dissolved bound +#> 0-20 0 0.110 0.000 +#> >20-50 20 0.151 0.000 +#> >50-100 50 0.197 0.000 +#> >100-200 100 0.248 0.001 +#> >200-500 200 0.224 0.004 +#> >500-1000 500 0.184 0.020 +#> >1000-2000 1000 0.133 0.042 +#> >2000-5000 2000 0.084 0.091 +#> >5000-10000 5000 0.037 0.159 +#> >10000-20000 10000 0.031 0.192 +#> >20000-50000 20000 0.014 0.291 +#> >50000 50000 0.001 0.451
+
+ +
+ +
+ + +
+

Site built with pkgdown.

+
+ +
+
+ + + diff --git a/docs/reference/perc_runoff_reduction_exposit.html b/docs/reference/perc_runoff_reduction_exposit.html new file mode 100644 index 0000000..d951a9e --- /dev/null +++ b/docs/reference/perc_runoff_reduction_exposit.html @@ -0,0 +1,137 @@ + + + + + + + + +Runoff reduction percentages as used in Exposit — perc_runoff_reduction_exposit • pfm + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+ +
+
+ + + +

A table of the runoff reduction percentages used in Exposit 3 for different vegetated buffer widths

+ + +
buffers
+ +

Format

+ +

A named list of data frames with reduction percentage values for the +dissolved fraction and the fraction bound to eroding particles, with +vegetated buffer widths as row names. The names of the list items are the Exposit versions +from which the values were taken.

+
dissolved

The reduction percentage for the dissolved phase

+
bound

The reduction percentage for the particulate phase

+
+ +

Source

+ +

Excel 3.01 spreadsheet available from + https://www.bvl.bund.de/DE/04_Pflanzenschutzmittel/03_Antragsteller/04_Zulassungsverfahren/07_Naturhaushalt/psm_naturhaush_node.html#doc1400590bodyText3

+ + +

Examples

+
print(perc_runoff_reduction_exposit)
#> $`3.01` +#> dissolved bound +#> No buffer 0 0 +#> 5 m 40 40 +#> 10 m 60 85 +#> 20 m 80 95 +#> +#> $`2.0` +#> dissolved bound +#> 1 0.0 0.0 +#> 2 97.5 97.5 +#>
+
+ +
+ + +
+ + + diff --git a/docs/reference/pesticide.txt b/docs/reference/pesticide.txt index e0dddbf..62a2df9 100644 --- a/docs/reference/pesticide.txt +++ b/docs/reference/pesticide.txt @@ -3,3 +3,11 @@ Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Du M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js 250.00 100.00 100.00 50.00 100.00 100.00 0.00E+00 50.00 1000.00 1.00 0.00E+00 1.00 -99.00 -99.00 -99.00 -99.00 0.00E+00 1.00 Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA -99.00 -99.00 6000.00 344.80 0.00E+00 6.00 0.00E+00 0.00E+00 3000.00 1.00 0.00E+00 0.00E+00 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 15.00 16.00 17.00 18.00 19.00 20.00 21.00 22.00 23.00 24.00 25.00 26.00 27.00 28.00 0.00E+00 -99.00 -99.00 -99.00 0.00E+00 1.00 M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js 250.00 100.00 100.00 50.00 100.00 100.00 0.00E+00 50.00 1000.00 1.00 0.00E+00 1.00 -99.00 -99.00 -99.00 -99.00 0.00E+00 1.00 +Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA -99.00 -99.00 6000.00 344.80 0.00E+00 6.00 0.00E+00 0.00E+00 3000.00 1.00 0.00E+00 0.00E+00 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 15.00 16.00 17.00 18.00 19.00 20.00 21.00 22.00 23.00 24.00 25.00 26.00 27.00 28.00 0.00E+00 -99.00 -99.00 -99.00 0.00E+00 1.00 +M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js 250.00 100.00 100.00 50.00 100.00 100.00 0.00E+00 50.00 1000.00 1.00 0.00E+00 1.00 -99.00 -99.00 -99.00 -99.00 0.00E+00 1.00 +Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA -99.00 -99.00 6000.00 344.80 0.00E+00 6.00 0.00E+00 0.00E+00 3000.00 1.00 0.00E+00 0.00E+00 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 15.00 16.00 17.00 18.00 19.00 20.00 21.00 22.00 23.00 24.00 25.00 26.00 27.00 28.00 0.00E+00 -99.00 -99.00 -99.00 0.00E+00 1.00 +M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js 250.00 100.00 100.00 50.00 100.00 100.00 0.00E+00 50.00 1000.00 1.00 0.00E+00 1.00 -99.00 -99.00 -99.00 -99.00 0.00E+00 1.00 +Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA -99.00 -99.00 6000.00 344.80 0.00E+00 6.00 0.00E+00 0.00E+00 3000.00 1.00 0.00E+00 0.00E+00 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 15.00 16.00 17.00 18.00 19.00 20.00 21.00 22.00 23.00 24.00 25.00 26.00 27.00 28.00 0.00E+00 -99.00 -99.00 -99.00 0.00E+00 1.00 +M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js 250.00 100.00 100.00 50.00 100.00 100.00 0.00E+00 50.00 1000.00 1.00 0.00E+00 1.00 -99.00 -99.00 -99.00 -99.00 0.00E+00 1.00 +Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA Dummy 1 cereals, spring n NA Dummy 1 cereals, winter s of Dummy 1 citrus n mm Dummy 1 cotton s js Dummy 1 field beans n NA Dummy 1 grass / alfalfa s of Dummy 1 hops n mm Dummy 1 legumes s js Dummy 1 maize n NA Dummy 1 oil seed rape, spring s of Dummy 1 oil seed rape, winter n mm Dummy 1 olives s js Dummy 1 pome / stone fruit, early applns n NA Dummy 1 pome / stone fruit, late applns s of Dummy 1 potatoes n mm Dummy 1 soybeans s js Dummy 1 sugar beets n NA Dummy 1 sunflowers s of Dummy 1 tobacco n mm Dummy 1 vegetables, bulb s js Dummy 1 vegetables, fruiting n NA Dummy 1 vegetables, leafy s of Dummy 1 vegetables, root n mm Dummy 1 vines, early applns s js Dummy 1 vines, late applns n NA Dummy 1 appln, aerial s of Dummy 1 appln, hand (crop < 50 cm) n mm Dummy 1 appln, hand (crop > 50 cm) s js Dummy 1 no drift (incorp or seed trtmt) n NA -99.00 -99.00 6000.00 344.80 0.00E+00 6.00 0.00E+00 0.00E+00 3000.00 1.00 0.00E+00 0.00E+00 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 15.00 16.00 17.00 18.00 19.00 20.00 21.00 22.00 23.00 24.00 25.00 26.00 27.00 28.00 0.00E+00 -99.00 -99.00 -99.00 0.00E+00 1.00 +M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js M1 cereals, winter n NA M1 cereals, winter s of M1 cereals, winter n mm M1 cereals, winter s js 250.00 100.00 100.00 50.00 100.00 100.00 0.00E+00 50.00 1000.00 1.00 0.00E+00 1.00 -99.00 -99.00 -99.00 -99.00 0.00E+00 1.00 diff --git a/man/PEC_sw_exposit_runoff.Rd b/man/PEC_sw_exposit_runoff.Rd new file mode 100644 index 0000000..7ed18b6 --- /dev/null +++ b/man/PEC_sw_exposit_runoff.Rd @@ -0,0 +1,47 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/PEC_sw_exposit_runoff.R +\name{PEC_sw_exposit_runoff} +\alias{PEC_sw_exposit_runoff} +\title{Calculate PEC surface water due to runoff and erosion as in Exposit 3} +\source{ +Excel 3.01 spreadsheet available from + \url{https://www.bvl.bund.de/DE/04_Pflanzenschutzmittel/03_Antragsteller/04_Zulassungsverfahren/07_Naturhaushalt/psm_naturhaush_node.html#doc1400590bodyText3} +} +\usage{ +PEC_sw_exposit_runoff(rate, Koc, DT50 = Inf, t_runoff = 3, + exposit_reduction_version = c("3.01", "2.0"), V_ditch = 30, + V_event = 100) +} +\arguments{ +\item{rate}{The application rate in g/ha} + +\item{Koc}{The sorption coefficient to soil organic carbon} + +\item{DT50}{The soil half-life in days} + +\item{t_runoff}{The time between application and the runoff event, where degradation occurs, in days} + +\item{exposit_reduction_version}{The version of the reduction factors to be used} + +\item{V_ditch}{The volume of the ditch is assumed to be 1 m * 100 m * 30 cm = 30 m3} + +\item{V_event}{The unreduced runoff volume, equivalent to 10 mm precipitation on 1 ha} +} +\value{ +A list containing the following components + \describe{ + \item{Input}{A matrix containing dissolved and bound input for the different distances} + \item{PEC_sw_runoff}{A matrix containing PEC values for dissolved and bound substance + for the different distances. If the rate was given in g/ha, the PECsw are in microg/L.} + } +} +\description{ +This is a reimplementation of the calculation described in the Exposit 3.01 spreadsheet file, +in the worksheet "Konzept Runoff". Calculation of sediment PEC values is not implemented. +} +\examples{ + PEC_sw_exposit_runoff(500, 150) +} +\seealso{ +\code{\link{perc_runoff_exposit}} for runoff loss percentages and \code{\link{perc_runoff_reduction_exposit}} for runoff reduction percentages used +} diff --git a/man/perc_runoff_exposit.Rd b/man/perc_runoff_exposit.Rd new file mode 100644 index 0000000..70f80c5 --- /dev/null +++ b/man/perc_runoff_exposit.Rd @@ -0,0 +1,29 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/PEC_sw_exposit_runoff.R +\docType{data} +\name{perc_runoff_exposit} +\alias{perc_runoff_exposit} +\alias{Koc_breaks} +\title{Runoff loss percentages as used in Exposit 3} +\format{A data frame with percentage values for the dissolved fraction and the fraction + bound to eroding particles, with Koc classes used as row names + \describe{ + \item{dissolved}{The percentage of the applied substance transferred to an + adjacent water body in the dissolved phase} + \item{bound}{The percentage of the applied substance transferred to an + adjacent water body bound to eroding particles} + }} +\source{ +Excel 3.01 spreadsheet available from + \url{https://www.bvl.bund.de/DE/04_Pflanzenschutzmittel/03_Antragsteller/04_Zulassungsverfahren/07_Naturhaushalt/psm_naturhaush_node.html#doc1400590bodyText3} +} +\usage{ +Koc_breaks +} +\description{ +A table of the loss percentages used in Exposit 3 for the twelve different Koc classes +} +\examples{ +print(perc_runoff_exposit) +} +\keyword{datasets} diff --git a/man/perc_runoff_reduction_exposit.Rd b/man/perc_runoff_reduction_exposit.Rd new file mode 100644 index 0000000..51b067d --- /dev/null +++ b/man/perc_runoff_reduction_exposit.Rd @@ -0,0 +1,29 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/PEC_sw_exposit_runoff.R +\docType{data} +\name{perc_runoff_reduction_exposit} +\alias{perc_runoff_reduction_exposit} +\alias{buffers} +\title{Runoff reduction percentages as used in Exposit} +\format{A named list of data frames with reduction percentage values for the +dissolved fraction and the fraction bound to eroding particles, with +vegetated buffer widths as row names. The names of the list items are the Exposit versions +from which the values were taken. + \describe{ + \item{dissolved}{The reduction percentage for the dissolved phase} + \item{bound}{The reduction percentage for the particulate phase} + }} +\source{ +Excel 3.01 spreadsheet available from + \url{https://www.bvl.bund.de/DE/04_Pflanzenschutzmittel/03_Antragsteller/04_Zulassungsverfahren/07_Naturhaushalt/psm_naturhaush_node.html#doc1400590bodyText3} +} +\usage{ +buffers +} +\description{ +A table of the runoff reduction percentages used in Exposit 3 for different vegetated buffer widths +} +\examples{ +print(perc_runoff_reduction_exposit) +} +\keyword{datasets} diff --git a/test.log b/test.log index 86aeebe..2692d54 100644 --- a/test.log +++ b/test.log @@ -8,6 +8,7 @@ Loading required package: inline Loading required package: methods Loading required package: parallel Testing pfm +Exposit runoff calculations: ... Geometric mean calculation: ...... Check max_twa for parent mkinfit models against analytical solutions: . Simple PEC sediment calculations: . diff --git a/tests/testthat/test_exposit.R b/tests/testthat/test_exposit.R new file mode 100644 index 0000000..667b4ee --- /dev/null +++ b/tests/testthat/test_exposit.R @@ -0,0 +1,25 @@ +library(pfm) +context("Exposit runoff calculations") + +test_that("Runoff PECsw are as in Exposit 3.01", { + # Expected results are from the Exposit 3.01, downloaded 2017-10-27 + + # 100 g/ha, Koc = 1000 L/kg, DT50 = 1000 days + PEC_spreadsheet_1 <- data.frame(dissolved = c(0.706, 0.612, 0.525, 0.367), + total = c(0.783, 0.679, 0.546, 0.377)) + + PEC_pfm_1 <- round(PEC_sw_exposit_runoff(100, Koc = 1000, DT50 = 1000)$PEC_sw_runoff, 3)[c("dissolved", "total")] + expect_equivalent(PEC_spreadsheet_1, PEC_pfm_1) + + # 10 g/ha, Koc = 300000 L/kg, DT50 = 10 days + PEC_spreadsheet_2 <- data.frame(dissolved = c(0, 0, 0, 0), + total = c(0.141, 0.122, 0.039, 0.018)) + PEC_pfm_2 <- round(PEC_sw_exposit_runoff(10, Koc = 300000, DT50 = 10)$PEC_sw_runoff, 3)[c("dissolved", "total")] + expect_equivalent(PEC_spreadsheet_2, PEC_pfm_2) + + # 200 g/ha, Koc = 30 L/kg, DT50 = 100 days + PEC_spreadsheet_3 <- data.frame(dissolved = c(1.138, 0.986, 0.845, 0.592), + total = c(1.138, 0.986, 0.845, 0.592)) + PEC_pfm_3 <- round(PEC_sw_exposit_runoff(200, Koc = 30, DT50 = 100)$PEC_sw_runoff, 3)[c("dissolved", "total")] + expect_equivalent(PEC_spreadsheet_3, PEC_pfm_3) +}) -- cgit v1.2.1