Title: | Utilities for Pesticide Fate Modelling |
---|---|
Description: | Utilities for simple calculations of predicted environmental concentrations ('PEC' values) and for dealing with data from some FOCUS pesticide fate modelling software packages. |
Authors: | Johannes Ranke [aut, cre] |
Maintainer: | Johannes Ranke <[email protected]> |
License: | GPL |
Version: | 0.6.3 |
Built: | 2024-11-14 08:00:44 UTC |
Source: | https://github.com/jranke/pfm |
Create a chemical compound object for FOCUS Step 1 calculations
chent_focus_sw( name, Koc, DT50_ws = NA, DT50_soil = NA, DT50_water = NA, DT50_sediment = NA, cwsat = 1000, mw = NA, max_soil = 1, max_ws = 1 )
chent_focus_sw( name, Koc, DT50_ws = NA, DT50_soil = NA, DT50_water = NA, DT50_sediment = NA, cwsat = 1000, mw = NA, max_soil = 1, max_ws = 1 )
name |
Length one character vector containing the name |
Koc |
Partition coefficient between organic carbon and water in L/kg. |
DT50_ws |
Half-life in water/sediment systems in days |
DT50_soil |
Half-life in soil in days |
DT50_water |
Half-life in water in days (Step 2) |
DT50_sediment |
Half-life in sediment in days (Step 2) |
cwsat |
Water solubility in mg/L |
mw |
Molar weight in g/mol. |
max_soil |
Maximum observed fraction (dimensionless) in soil |
max_ws |
Maximum observed fraction (dimensionless) in water/sediment systems |
A list with the substance specific properties
Deposition from spray drift expressed as percent of the applied dose as published by the German Julius-Kühn Institute (JKI).
drift_data_JKI
drift_data_JKI
A list currently containing matrices with spray drift percentage data for field crops (Ackerbau), and Pome/stone fruit, early and late (Obstbau frueh, spaet).
The data were extracted from the spreadsheet cited below using the R code
given in the file data_generation/drift_data_JKI.R
installed with this
package. The file itself is not included in the package, as its licence is
not clear.
Additional spray drift values were taken from the publication by Rautmann et al. (2001). Specifically, these are the values for early vines, and the values for a 3 m buffer which are incomplete in the spreadsheet.
Note that for vegetables, ornamentals and small fruit, the values for field crops are used for crops < 50 cm, and the vales for late vines are used for crops > 50 cm. In the JKI spreadsheet, it is indicated that these values are used for spray applications with handheld/knapsack equipment (tragbare Spritz- und Sprühgerate).
Values for non-professional use listed in the JKI spreadsheet were not included.
JKI (2010) Spreadsheet 'Tabelle der Abdrifteckwerte.xls', retrieved from http://www.jki.bund.de/no_cache/de/startseite/institute/anwendungstechnik/abdrift-eckwerte.html on 2015-06-11, not present any more 2024-01-31
Rautmann, D., Streloke, M and Winkler, R (2001) New basic drift values in the authorization procedure for plant protection products Mitt. Biol. Bundesanst. Land- Forstwirtsch. 383, 133-141
drift_data_JKI
drift_data_JKI
The parameters were extracted from Appendix B to the FOCUS surface water guidance
using the R code given in the file data_generation/drift_parameters_focus.R
installed with this package. The appendix itself is not included in the package,
as its licence is not clear.
drift_parameters_focus
drift_parameters_focus
For the hinge distance, Inf
was substituted for the cases where no hinge
distance is given in the data, in this way parameters C and D are never
used for any distance if A and B are used for the case that the distance
is smaller than the hinge distance.
FOCUS (2014) Generic guidance for Surface Water Scenarios (version 1.4). FOrum for the Co-ordination of pesticde fate models and their USe. http://esdac.jrc.ec.europa.eu/public_path/projects_data/focus/sw/docs/Generic%20FOCUS_SWS_vc1.4.pdf
FOCUS (2001) FOCUS Surface Water Scenarios in the EU Evaluation Process under 91/414/EEC. Report of the FOCUS Working Group on Surface Water Scenarios, EC Document Reference SANCO/4802/2001-rev.2. 245, Appendix B. https://esdac.jrc.ec.europa.eu/public_path/projects_data/focus/sw/docs/FOCUS_SWS_APPENDIX_B.doc
Rautmann, D., Streloke, M and Winkler, R (2001) New basic drift values in the authorization procedure for plant protection products Mitt. Biol. Bundesanst. Land- Forstwirtsch. 383, 133-141
drift_percentages_rautmann, PEC_sw_drift
drift_parameters_focus unique(drift_parameters_focus$crop_group)
drift_parameters_focus unique(drift_parameters_focus$crop_group)
Calculate drift percentages based on Rautmann data
drift_percentages_rautmann( distances, applications = 1, crop_group_RF = c("arable", "hops", "vines, late", "vines, early", "fruit, late", "fruit, early", "aerial"), formula = c("Rautmann", "FOCUS"), widths = 1 )
drift_percentages_rautmann( distances, applications = 1, crop_group_RF = c("arable", "hops", "vines, late", "vines, early", "fruit, late", "fruit, early", "aerial"), formula = c("Rautmann", "FOCUS"), widths = 1 )
distances |
The distances in m for which to get PEC values |
applications |
Number of applications for selection of drift percentile |
crop_group_RF |
One of the crop groups as used in drift_parameters_focus |
formula |
By default, the original Rautmann formula is used. If you specify "FOCUS", mean drift input over the width of the water body is calculated as described in Chapter 5.4.5 of the FOCUS surface water guidance |
widths |
The widths of the water bodies (only used in the FOCUS formula) |
FOCUS (2014) Generic guidance for Surface Water Scenarios (version 1.4). FOrum for the Co-ordination of pesticde fate models and their USe. http://esdac.jrc.ec.europa.eu/public_path/projects_data/focus/sw/docs/Generic%20FOCUS_SWS_vc1.4.pdf
drift_parameters_focus, PEC_sw_drift
# Compare JKI data with Rautmann and FOCUS formulas for arable crops (default) # One application on field crops, for 1 m, 3 m and 5 m distance drift_data_JKI[[1]][as.character(c(1, 3, 5)), "Ackerbau"] drift_percentages_rautmann(c(1, 3, 5)) drift_percentages_rautmann(c(1, 3, 5), formula = "FOCUS") # One application to early or late fruit crops drift_data_JKI[[1]][as.character(c(3, 5, 20, 50)), "Obstbau frueh"] drift_percentages_rautmann(c(3, 5, 20, 50), crop_group_RF = "fruit, early") drift_percentages_rautmann(c(3, 5, 20, 50), crop_group_RF = "fruit, early", formula = "FOCUS") drift_data_JKI[[1]][as.character(c(3, 5, 20, 50)), "Obstbau spaet"] drift_percentages_rautmann(c(3, 5, 20, 50), crop_group_RF = "fruit, late") drift_percentages_rautmann(c(3, 5, 20, 50), crop_group_RF = "fruit, late", formula = "FOCUS") # We get a continuum if the waterbody covers the hinge distance # (11.4 m for 1 early app to fruit) x <- seq(3, 30, by = 0.1) d <- drift_percentages_rautmann(x, crop_group_RF = "fruit, early", formula = "FOCUS") plot(x, d, type = "l", xlab = "Distance of near edge [m]", ylab = "Mean drift percentage over waterbody width", main = "One application to fruit, early") abline(v = 11.4, lty = 2)
# Compare JKI data with Rautmann and FOCUS formulas for arable crops (default) # One application on field crops, for 1 m, 3 m and 5 m distance drift_data_JKI[[1]][as.character(c(1, 3, 5)), "Ackerbau"] drift_percentages_rautmann(c(1, 3, 5)) drift_percentages_rautmann(c(1, 3, 5), formula = "FOCUS") # One application to early or late fruit crops drift_data_JKI[[1]][as.character(c(3, 5, 20, 50)), "Obstbau frueh"] drift_percentages_rautmann(c(3, 5, 20, 50), crop_group_RF = "fruit, early") drift_percentages_rautmann(c(3, 5, 20, 50), crop_group_RF = "fruit, early", formula = "FOCUS") drift_data_JKI[[1]][as.character(c(3, 5, 20, 50)), "Obstbau spaet"] drift_percentages_rautmann(c(3, 5, 20, 50), crop_group_RF = "fruit, late") drift_percentages_rautmann(c(3, 5, 20, 50), crop_group_RF = "fruit, late", formula = "FOCUS") # We get a continuum if the waterbody covers the hinge distance # (11.4 m for 1 early app to fruit) x <- seq(3, 30, by = 0.1) d <- drift_percentages_rautmann(x, crop_group_RF = "fruit, early", formula = "FOCUS") plot(x, d, type = "l", xlab = "Distance of near edge [m]", ylab = "Mean drift percentage over waterbody width", main = "One application to fruit, early") abline(v = 11.4, lty = 2)
Subset of EFSA crop interception default values for groundwater modelling
EFSA_GW_interception_2014
EFSA_GW_interception_2014
A matrix containing interception values, currently only for some selected crops
European Food Safety Authority (2014) EFSA Guidance Document for evaluating laboratory and field dissipation studies to obtain DegT50 values of active substances of plant protection products and transformation products of these active substances in soil. EFSA Journal 12(5):3662, 37 pp., doi:10.2903/j.efsa.2014.3662
EFSA_GW_interception_2014
EFSA_GW_interception_2014
Subset of EFSA crop washoff default values
EFSA_washoff_2017
EFSA_washoff_2017
A matrix containing wash-off factors, currently only for some selected crops
European Food Safety Authority (2017) EFSA guidance document for predicting environmental concentrations of active substances of plant protection products and transformation products of these active substances in soil. EFSA Journal 15(10) 4982 doi:10.2903/j.efsa.2017.4982
EFSA_washoff_2017
EFSA_washoff_2017
R6 class objects of class chent represent chemical entities and can hold a list of information loaded from a chemical yaml file in their chyaml field. Such information is extracted and optionally aggregated by this function.
endpoint( chent, medium = "soil", type = c("degradation", "sorption"), lab_field = c(NA, "laboratory", "field"), redox = c(NA, "aerobic", "anaerobic"), value = c("DT50ref", "Kfoc", "N"), aggregator = geomean, raw = FALSE, signif = 3 ) soil_DT50( chent, aggregator = geomean, signif = 3, lab_field = "laboratory", value = "DT50ref", redox = "aerobic", raw = FALSE ) soil_Kfoc(chent, aggregator = geomean, signif = 3, value = "Kfoc", raw = FALSE) soil_N(chent, aggregator = mean, signif = 3, raw = FALSE) soil_sorption( chent, values = c("Kfoc", "N"), aggregators = c(Kfoc = geomean, Koc = geomean, N = mean), signif = c(Kfoc = 3, N = 3), raw = FALSE )
endpoint( chent, medium = "soil", type = c("degradation", "sorption"), lab_field = c(NA, "laboratory", "field"), redox = c(NA, "aerobic", "anaerobic"), value = c("DT50ref", "Kfoc", "N"), aggregator = geomean, raw = FALSE, signif = 3 ) soil_DT50( chent, aggregator = geomean, signif = 3, lab_field = "laboratory", value = "DT50ref", redox = "aerobic", raw = FALSE ) soil_Kfoc(chent, aggregator = geomean, signif = 3, value = "Kfoc", raw = FALSE) soil_N(chent, aggregator = mean, signif = 3, raw = FALSE) soil_sorption( chent, values = c("Kfoc", "N"), aggregators = c(Kfoc = geomean, Koc = geomean, N = mean), signif = c(Kfoc = 3, N = 3), raw = FALSE )
chent |
The chent object to get the information from |
medium |
The medium for which information is sought |
type |
The information type |
lab_field |
If not NA, do we want laboratory or field endpoints |
redox |
If not NA, are we looking for aerobic or anaerobic data |
value |
The name of the value we want. The list given in the usage section is not exclusive |
aggregator |
The aggregator function. Can be mean,
|
raw |
Should the number(s) be returned as stored in the chent object (could be a character value) to retain original information about precision? |
signif |
How many significant digits do we want |
values |
The values to be returned |
aggregators |
A named vector of aggregator functions to be used |
The functions soil_*
are functions to extract soil specific endpoints.
For the Freundlich exponent, the capital letter N
is used in order to
facilitate dealing with such data in R. In pesticide fate modelling, this
exponent is often called 1/n.
The result from applying the aggregator function to the values converted to a numeric vector, rounded to the given number of significant digits, or, if raw = TRUE, the values as a character value, retaining any implicit information on precision that may be present.
Currently, only scenario names with acronyms and a small subset of the soil definitions are provided. The soil definitions are from page 46ff. from FOCUS (2012).
FOCUS_GW_scenarios_2012
FOCUS_GW_scenarios_2012
An object of class list
of length 2.
FOCUS (2012) Generic guidance for Tier 1 FOCUS ground water assessments. Version 2.1. FOrum for the Co-ordination of pesticde fate models and their USe. http://focus.jrc.ec.europa.eu/gw/docs/Generic_guidance_FOCV2_1.pdf
FOCUS_GW_scenarios_2012
FOCUS_GW_scenarios_2012
The data were extracted from the scenario.txt file using the R code shown below. The text file is not included in the package as its licence is not clear.
A list containing the scenario names in a character vector called 'names', the drift percentiles in a matrix called 'drift', interception percentages in a matrix called 'interception' and the runoff/drainage percentages for Step 2 calculations in a matrix called 'rd'.
## Not run: # This is the code that was used to extract the data scenario_path <- "inst/extdata/FOCUS_Step_12_scenarios.txt" scenarios <- readLines(scenario_path)[9:38] FOCUS_Step_12_scenarios <- list() sce <- read.table(text = scenarios, sep = "\t", header = TRUE, check.names = FALSE, stringsAsFactors = FALSE) FOCUS_Step_12_scenarios$names = sce$Crop rownames(sce) <- sce$Crop FOCUS_Step_12_scenarios$drift = sce[, 3:11] FOCUS_Step_12_scenarios$interception = sce[, 12:15] sce_2 <- readLines(scenario_path)[41:46] rd <- read.table(text = sce_2, sep = "\t")[1:2] rd_mat <- matrix(rd$V2, nrow = 3, byrow = FALSE) dimnames(rd_mat) = list(Time = c("Oct-Feb", "Mar-May", "Jun-Sep"), Region = c("North", "South")) FOCUS_Step_12_scenarios$rd = rd_mat save(FOCUS_Step_12_scenarios, file = "data/FOCUS_Step_12_scenarios.RData") ## End(Not run) # And this is the resulting data FOCUS_Step_12_scenarios
## Not run: # This is the code that was used to extract the data scenario_path <- "inst/extdata/FOCUS_Step_12_scenarios.txt" scenarios <- readLines(scenario_path)[9:38] FOCUS_Step_12_scenarios <- list() sce <- read.table(text = scenarios, sep = "\t", header = TRUE, check.names = FALSE, stringsAsFactors = FALSE) FOCUS_Step_12_scenarios$names = sce$Crop rownames(sce) <- sce$Crop FOCUS_Step_12_scenarios$drift = sce[, 3:11] FOCUS_Step_12_scenarios$interception = sce[, 12:15] sce_2 <- readLines(scenario_path)[41:46] rd <- read.table(text = sce_2, sep = "\t")[1:2] rd_mat <- matrix(rd$V2, nrow = 3, byrow = FALSE) dimnames(rd_mat) = list(Time = c("Oct-Feb", "Mar-May", "Jun-Sep"), Region = c("North", "South")) FOCUS_Step_12_scenarios$rd = rd_mat save(FOCUS_Step_12_scenarios, file = "data/FOCUS_Step_12_scenarios.RData") ## End(Not run) # And this is the resulting data FOCUS_Step_12_scenarios
Actual and maximum moving window time average concentrations for FOMC kinetics
FOMC_actual_twa( alpha = 1.0001, beta = 10, times = c(0, 1, 2, 4, 7, 14, 21, 28, 42, 50, 100) )
FOMC_actual_twa( alpha = 1.0001, beta = 10, times = c(0, 1, 2, 4, 7, 14, 21, 28, 42, 50, 100) )
alpha |
Parameter of the FOMC model |
beta |
Parameter of the FOMC model |
times |
The output times, and window sizes for time weighted average concentrations |
Johannes Ranke
FOCUS (2014) Generic Guidance for Estimating Persistence and Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration, Version 1.1, 18 December 2014, p. 251
FOMC_actual_twa(alpha = 1.0001, beta = 10)
FOMC_actual_twa(alpha = 1.0001, beta = 10)
Based on some posts in a thread on Stackoverflow http://stackoverflow.com/questions/2602583/geometric-mean-is-there-a-built-in This function returns NA if NA values are present and na.rm = FALSE (default). If negative values are present, it gives an error message. If at least one element of the vector is 0, it returns 0.
geomean(x, na.rm = FALSE)
geomean(x, na.rm = FALSE)
x |
Vector of numbers |
na.rm |
Should NA values be omitted? |
The geometric mean
Johannes Ranke
geomean(c(1, 3, 9)) geomean(c(1, 3, NA, 9)) ## Not run: geomean(c(1, -3, 9)) # returns an error
geomean(c(1, 3, 9)) geomean(c(1, 3, NA, 9)) ## Not run: geomean(c(1, -3, 9)) # returns an error
This was inspired by an answer on stackoverflow https://stackoverflow.com/a/717791
get_vertex(x, y)
get_vertex(x, y)
x |
Three x coordinates |
y |
Three y coordinates |
The groundwater ubiquity score GUS is calculated according to the following equation
GUS(...) ## S3 method for class 'numeric' GUS(DT50, Koc, ...) ## S3 method for class 'chent' GUS( chent, degradation_value = "DT50ref", lab_field = "laboratory", redox = "aerobic", sorption_value = "Kfoc", degradation_aggregator = geomean, sorption_aggregator = geomean, ... ) ## S3 method for class 'GUS_result' print(x, ..., digits = 1)
GUS(...) ## S3 method for class 'numeric' GUS(DT50, Koc, ...) ## S3 method for class 'chent' GUS( chent, degradation_value = "DT50ref", lab_field = "laboratory", redox = "aerobic", sorption_value = "Kfoc", degradation_aggregator = geomean, sorption_aggregator = geomean, ... ) ## S3 method for class 'GUS_result' print(x, ..., digits = 1)
... |
Included in the generic to allow for further arguments later. Therefore this also had to be added to the specific methods. |
DT50 |
Half-life of the chemical in soil. Should be a field half-life according to Gustafson (1989). However, leaching to the sub-soil can not completely be excluded in field dissipation experiments and Gustafson did not refer to any normalisation procedure, but says the field study should be conducted under use conditions. |
Koc |
The sorption constant normalised to organic carbon. Gustafson does not mention the nonlinearity of the sorption constant commonly found and usually described by Freundlich sorption, therefore it is unclear at which reference concentration the Koc should be observed (and if the reference concentration would be in soil or in porewater). |
chent |
If a chent is given with appropriate information present in its chyaml field, this information is used, with defaults specified below. |
degradation_value |
Which of the available degradation values should be used? |
lab_field |
Should laboratory or field half-lives be used? This defaults to lab in this implementation, in order to avoid double-accounting for mobility. If comparability with the original GUS values given by Gustafson (1989) is desired, non-normalised first-order field half-lives obtained under actual use conditions should be used. |
redox |
Aerobic or anaerobic degradation data |
sorption_value |
Which of the available sorption values should be used? Defaults to Kfoc as this is what is generally available from the European pesticide peer review process. These values generally use a reference concentration of 1 mg/L in porewater, that means they would be expected to be Koc values at a concentration of 1 mg/L in the water phase. |
degradation_aggregator |
Function for aggregating half-lives |
sorption_aggregator |
Function for aggregation Koc values |
x |
An object of class GUS_result to be printed |
digits |
The number of digits used in the print method |
A list with the DT50 and Koc used as well as the resulting score of class GUS_result
Johannes Ranke
Gustafson, David I. (1989) Groundwater ubiquity score: a simple method for assessing pesticide leachability. Environmental toxicology and chemistry 8(4) 339–57.
If you generate your time series using sawtooth
,
you need to make sure that the length of the time series allows
for finding the maximum. It is therefore recommended to check this using
plot.one_box
using the window size for the argument
max_twa
.
max_twa(x, window = 21)
max_twa(x, window = 21)
x |
An object of type |
window |
The size of the moving window |
The method working directly on fitted mkinfit
objects uses the
equations given in the PEC soil section of the FOCUS guidance and is restricted
SFO, FOMC and DFOP models and to the parent compound
FOCUS (2006) “Guidance Document on Estimating Persistence and Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration” Report of the FOCUS Work Group on Degradation Kinetics, EC Document Reference Sanco/10058/2005 version 2.0, 434 pp, http://esdac.jrc.ec.europa.eu/projects/degradation-kinetics
pred <- sawtooth(one_box(10), applications = data.frame(time = c(0, 7), amount = c(1, 1))) max_twa(pred) pred_FOMC <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) max_twa(pred_FOMC)
pred <- sawtooth(one_box(10), applications = data.frame(time = c(0, 7), amount = c(1, 1))) max_twa(pred) pred_FOMC <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) max_twa(pred_FOMC)
Create a time series of decline data
one_box(x, ini, ..., t_end = 100, res = 0.01) ## S3 method for class 'numeric' one_box(x, ini = 1, ..., t_end = 100, res = 0.01) ## S3 method for class 'character' one_box(x, ini = 1, parms, ..., t_end = 100, res = 0.01) ## S3 method for class 'mkinfit' one_box(x, ini = "model", ..., t_end = 100, res = 0.01)
one_box(x, ini, ..., t_end = 100, res = 0.01) ## S3 method for class 'numeric' one_box(x, ini = 1, ..., t_end = 100, res = 0.01) ## S3 method for class 'character' one_box(x, ini = 1, parms, ..., t_end = 100, res = 0.01) ## S3 method for class 'mkinfit' one_box(x, ini = "model", ..., t_end = 100, res = 0.01)
x |
When numeric, this is the half-life to be used for an exponential
decline. When a character string specifying a parent decline model is given
e.g. |
ini |
The initial amount. If x is an |
... |
Further arguments passed to methods |
t_end |
End of the time series |
res |
Resolution of the time series |
parms |
A named numeric vector containing the model parameters |
An object of class one_box
, inheriting from ts
.
# Only use a half-life pred_0 <- one_box(10) plot(pred_0) # Use a fitted mkinfit model require(mkin) fit <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) pred_1 <- one_box(fit) plot(pred_1) # Use a model with more than one observed variable m_2 <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO")) fit_2 <- mkinfit(m_2, FOCUS_2006_D, quiet = TRUE) pred_2 <- one_box(fit_2, ini = "model") plot(pred_2)
# Only use a half-life pred_0 <- one_box(10) plot(pred_0) # Use a fitted mkinfit model require(mkin) fit <- mkinfit("FOMC", FOCUS_2006_C, quiet = TRUE) pred_1 <- one_box(fit) plot(pred_1) # Use a model with more than one observed variable m_2 <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO")) fit_2 <- mkinfit(m_2, FOCUS_2006_D, quiet = TRUE) pred_2 <- one_box(fit_2, ini = "model") plot(pred_2)
Get the relative accumulation of an FOMC model over multiples of an interval
PEC_FOMC_accu_rel(n, interval, FOMC)
PEC_FOMC_accu_rel(n, interval, FOMC)
n |
number of applications |
interval |
Time between applications |
FOMC |
Named numeric vector containing the FOMC parameters alpha and beta |
A numeric vector containing all n accumulation factors for the n applications
This is a basic calculation of a contaminant concentration in bulk soil based on complete, instantaneous mixing. If an interval is given, an attempt is made at calculating a long term maximum concentration using the concepts layed out in the PPR panel opinion (EFSA PPR panel 2012 and in the EFSA guidance on PEC soil calculations (EFSA, 2015, 2017).
PEC_soil( rate, rate_units = "g/ha", interception = 0, mixing_depth = 5, PEC_units = "mg/kg", PEC_pw_units = "mg/L", interval = NA, n_periods = Inf, tillage_depth = 20, leaching_depth = tillage_depth, crop = "annual", cultivation = FALSE, chent = NA, DT50 = NA, FOMC = NA, Koc = NA, Kom = Koc/1.724, t_avg = 0, t_act = NULL, scenarios = c("default", "EFSA_2017", "EFSA_2015"), leaching = scenarios == "EFSA_2017", porewater = FALSE )
PEC_soil( rate, rate_units = "g/ha", interception = 0, mixing_depth = 5, PEC_units = "mg/kg", PEC_pw_units = "mg/L", interval = NA, n_periods = Inf, tillage_depth = 20, leaching_depth = tillage_depth, crop = "annual", cultivation = FALSE, chent = NA, DT50 = NA, FOMC = NA, Koc = NA, Kom = Koc/1.724, t_avg = 0, t_act = NULL, scenarios = c("default", "EFSA_2017", "EFSA_2015"), leaching = scenarios == "EFSA_2017", porewater = FALSE )
rate |
Application rate in units specified below |
rate_units |
Defaults to g/ha |
interception |
The fraction of the application rate that does not reach the soil |
mixing_depth |
Mixing depth in cm |
PEC_units |
Requested units for the calculated PEC. Only mg/kg currently supported |
PEC_pw_units |
Only mg/L currently supported |
interval |
Period of the deeper mixing. The default is NA, i.e. no deeper mixing. For annual deeper mixing, set this to 365 when degradation units are in days |
n_periods |
Number of periods to be considered for long term PEC calculations |
tillage_depth |
Periodic (see interval) deeper mixing in cm |
leaching_depth |
EFSA (2017) uses the mixing depth (ecotoxicological evaluation depth) to calculate leaching for annual crops where tillage takes place. By default, losses from the layer down to the tillage depth are taken into account in this implementation. |
crop |
Ignored for scenarios other than EFSA_2017. Only annual crops are supported when these scenarios are used. Only crops with a single cropping cycle per year are currently supported. |
cultivation |
Does mechanical cultivation in the sense of EFSA (2017) take place, i.e. twice a year to a depth of 5 cm? Ignored for scenarios other than EFSA_2017 |
chent |
An optional chent object holding substance specific information. Can also be a name for the substance as a character string |
DT50 |
If specified, overrides soil DT50 endpoints from a chent object If DT50 is not specified here and not available from the chent object, zero degradation is assumed |
FOMC |
If specified, it should be a named numeric vector containing the FOMC parameters alpha and beta. This overrides any other degradation endpoints, and the degradation during the interval and after the maximum PEC is calculated using these parameters without temperature correction |
Koc |
If specified, overrides Koc endpoints from a chent object |
Kom |
Calculated from Koc by default, but can explicitly be specified as Kom here |
t_avg |
Averaging times for time weighted average concentrations |
t_act |
Time series for actual concentrations |
scenarios |
If this is 'default', the DT50 will be used without correction and soil properties as specified in the REACH guidance (R.16, Table R.16-9) are used for porewater PEC calculations. If this is "EFSA_2015", the DT50 is taken to be a modelling half-life at 20°C and pF2 (for when 'chent' is specified, the DegT50 with destination 'PECgw' will be used), and corrected using an Arrhenius activation energy of 65.4 kJ/mol. Also model and scenario adjustment factors from the EFSA guidance are used. |
leaching |
Should leaching be taken into account? The default is FALSE, except when the EFSA_2017 scenarios are used. |
porewater |
Should equilibrium porewater concentrations be estimated based on Kom and the organic carbon fraction of the soil instead of total soil concentrations? Based on equation (7) given in the PPR panel opinion (EFSA 2012, p. 24) and the scenarios specified in the EFSA guidance (2015, p. 13). |
This assumes that the complete load to soil during the time specified by 'interval' (typically 365 days) is dosed at once. As in the PPR panel opinion cited below (EFSA PPR panel 2012), only temperature correction using the Arrhenius equation is performed.
Total soil and porewater PEC values for the scenarios as defined in the EFSA guidance (2017, p. 14/15) can easily be calculated.
The predicted concentration in soil
While time weighted average (TWA) concentrations given in the examples from the EFSA guidance from 2015 (p. 80) are be reproduced, this is not true for the TWA concentrations given for the same example in the EFSA guidance from 2017 (p. 92).
According to the EFSA guidance (EFSA, 2017, p. 43), leaching should be taken into account for the EFSA 2017 scenarios, using the evaluation depth (here mixing depth) as the depth of the layer from which leaching takes place. However, as the amount leaching below the evaluation depth (often 5 cm) will partly be mixed back during tillage, the default in this function is to use the tillage depth for the calculation of the leaching rate.
If temperature information is available in the selected scenarios, as e.g. in the EFSA scenarios, the DT50 for groundwater modelling (destination 'PECgw') is taken from the chent object, otherwise the DT50 with destination 'PECsoil'.
Johannes Ranke
EFSA Panel on Plant Protection Products and their Residues (2012) Scientific Opinion on the science behind the guidance for scenario selection and scenario parameterisation for predicting environmental concentrations of plant protection products in soil. EFSA Journal 10(2) 2562, doi:10.2903/j.efsa.2012.2562
EFSA (European Food Safety Authority) 2017) EFSA guidance document for predicting environmental concentrations of active substances of plant protection products and transformation products of these active substances in soil. EFSA Journal 15(10) 4982 doi:10.2903/j.efsa.2017.4982
EFSA (European Food Safety Authority) (2015) EFSA guidance document for predicting environmental concentrations of active substances of plant protection products and transformation products of these active substances in soil. EFSA Journal 13(4) 4093 doi:10.2903/j.efsa.2015.4093
PEC_soil(100, interception = 0.25) # This is example 1 starting at p. 92 of the EFSA guidance (2017) # Note that TWA concentrations differ from the ones given in the guidance # for an unknown reason (the values from EFSA (2015) can be reproduced). PEC_soil(1000, interval = 365, DT50 = 250, t_avg = c(0, 21), Kom = 1000, scenarios = "EFSA_2017") PEC_soil(1000, interval = 365, DT50 = 250, t_av = c(0, 21), Kom = 1000, scenarios = "EFSA_2017", porewater = TRUE) # This is example 1 starting at p. 79 of the EFSA guidance (2015) PEC_soil(1000, interval = 365, DT50 = 250, t_avg = c(0, 21), scenarios = "EFSA_2015") PEC_soil(1000, interval = 365, DT50 = 250, t_av = c(0, 21), Kom = 1000, scenarios = "EFSA_2015", porewater = TRUE) # The following is from example 4 starting at p. 85 of the EFSA guidance (2015) # Metabolite M2 # Calculate total and porewater soil concentrations for tier 1 scenarios # Relative molar mass is 100/300, formation fraction is 0.7 * 1 results_pfm <- PEC_soil(100/300 * 0.7 * 1 * 1000, interval = 365, DT50 = 250, t_avg = c(0, 21), scenarios = "EFSA_2015") results_pfm_pw <- PEC_soil(100/300 * 0.7 * 1000, interval = 365, DT50 = 250, t_av = c(0, 21), Kom = 100, scenarios = "EFSA_2015", porewater = TRUE)
PEC_soil(100, interception = 0.25) # This is example 1 starting at p. 92 of the EFSA guidance (2017) # Note that TWA concentrations differ from the ones given in the guidance # for an unknown reason (the values from EFSA (2015) can be reproduced). PEC_soil(1000, interval = 365, DT50 = 250, t_avg = c(0, 21), Kom = 1000, scenarios = "EFSA_2017") PEC_soil(1000, interval = 365, DT50 = 250, t_av = c(0, 21), Kom = 1000, scenarios = "EFSA_2017", porewater = TRUE) # This is example 1 starting at p. 79 of the EFSA guidance (2015) PEC_soil(1000, interval = 365, DT50 = 250, t_avg = c(0, 21), scenarios = "EFSA_2015") PEC_soil(1000, interval = 365, DT50 = 250, t_av = c(0, 21), Kom = 1000, scenarios = "EFSA_2015", porewater = TRUE) # The following is from example 4 starting at p. 85 of the EFSA guidance (2015) # Metabolite M2 # Calculate total and porewater soil concentrations for tier 1 scenarios # Relative molar mass is 100/300, formation fraction is 0.7 * 1 results_pfm <- PEC_soil(100/300 * 0.7 * 1 * 1000, interval = 365, DT50 = 250, t_avg = c(0, 21), scenarios = "EFSA_2015") results_pfm_pw <- PEC_soil(100/300 * 0.7 * 1000, interval = 365, DT50 = 250, t_av = c(0, 21), Kom = 100, scenarios = "EFSA_2015", porewater = TRUE)
Calculate initial and accumulation PEC soil for a set of metabolites
PEC_soil_mets(rate, mw_parent, mets, interval = 365, ...)
PEC_soil_mets(rate, mw_parent, mets, interval = 365, ...)
rate |
Application rate in units specified below |
mw_parent |
The molecular weight of the parent compound |
mets |
A dataframe with metabolite identifiers as rownames and columns "mw", "occ" and "DT50" holding their molecular weight, maximum occurrence in soil and their soil DT50 |
interval |
The interval for accumulation calculations |
... |
Further arguments are passed to PEC_soil |
This implements the method specified in the UK data requirements handbook and was checked against the spreadsheet published on the CRC website
PEC_sw_drainage_UK( rate, interception = 0, Koc, latest_application = NULL, soil_DT50 = NULL, model = NULL, model_parms = NULL )
PEC_sw_drainage_UK( rate, interception = 0, Koc, latest_application = NULL, soil_DT50 = NULL, model = NULL, model_parms = NULL )
rate |
Application rate in g/ha |
interception |
The fraction of the application rate that does not reach the soil |
Koc |
The sorption coefficient normalised to organic carbon in L/kg |
latest_application |
Latest application date, formatted as e.g. "01 July" |
soil_DT50 |
Soil degradation half-life, if SFO kinetics are to be used |
model |
The soil degradation model to be used. Either one of "FOMC", "DFOP", "HS", or "IORE", or an mkinmod object |
model_parms |
A named numeric vector containing the model parameters |
The predicted concentration in surface water in µg/L
Johannes Ranke
HSE's Chemicals Regulation Division (CRD) Active substance PECsw calculations (for UK specific authorisation requests) https://www.hse.gov.uk/pesticides/topics/pesticide-approvals/pesticides-registration/data-requirements-handbook/fate/active-substance-uk.htm accessed 2019-09-27
Drainage PECs Version 1.0 (2015) Spreadsheet published at https://www.hse.gov.uk/pesticides/topics/pesticide-approvals/pesticides-registration/data-requirements-handbook/fate/pec-tools-2015/PEC%20sw-sed%20(drainage).xlsx accessed 2019-09-27
PEC_sw_drainage_UK(150, Koc = 100)
PEC_sw_drainage_UK(150, Koc = 100)
This is a basic, vectorised form of a simple calculation of a contaminant concentration in surface water based on complete, instantaneous mixing with input via spray drift.
PEC_sw_drift( rate, applications = 1, water_depth = as_units("30 cm"), drift_percentages = NULL, drift_data = c("JKI", "RF"), crop_group_JKI = c("Ackerbau", "Obstbau frueh", "Obstbau spaet", "Weinbau frueh", "Weinbau spaet", "Hopfenbau", "Flaechenkulturen > 900 l/ha", "Gleisanlagen"), crop_group_RF = c("arable", "hops", "vines, late", "vines, early", "fruit, late", "fruit, early", "aerial"), distances = c(1, 5, 10, 20), formula = c("Rautmann", "FOCUS"), water_width = as_units("100 cm"), side_angle = 90, rate_units = "g/ha", PEC_units = "µg/L" )
PEC_sw_drift( rate, applications = 1, water_depth = as_units("30 cm"), drift_percentages = NULL, drift_data = c("JKI", "RF"), crop_group_JKI = c("Ackerbau", "Obstbau frueh", "Obstbau spaet", "Weinbau frueh", "Weinbau spaet", "Hopfenbau", "Flaechenkulturen > 900 l/ha", "Gleisanlagen"), crop_group_RF = c("arable", "hops", "vines, late", "vines, early", "fruit, late", "fruit, early", "aerial"), distances = c(1, 5, 10, 20), formula = c("Rautmann", "FOCUS"), water_width = as_units("100 cm"), side_angle = 90, rate_units = "g/ha", PEC_units = "µg/L" )
rate |
Application rate in units specified below, or with units defined via the
|
applications |
Number of applications for selection of drift percentile |
water_depth |
Depth of the water body in cm |
drift_percentages |
Percentage drift values for which to calculate PECsw. Overrides 'drift_data' and 'distances' if not NULL. |
drift_data |
Source of drift percentage data. If 'JKI', the drift_data_JKI included in the package is used. If 'RF', the Rautmann drift data are calculated either in the original form or integrated over the width of the water body, depending on the 'formula' argument. |
crop_group_JKI |
When using the 'JKI' drift data, one of the German names as used in drift_parameters_focus. Will only be used if drift_data is 'JKI'. |
crop_group_RF |
One of the crop groups as used in drift_parameters_focus |
distances |
The distances in m for which to get PEC values |
formula |
By default, the original Rautmann formula is used. If you specify "FOCUS", mean drift input over the width of the water body is calculated as described in Chapter 5.4.5 of the FOCUS surface water guidance |
water_width |
Width of the water body in cm |
side_angle |
The angle of the side of the water relative to the bottom which is assumed to be horizontal, in degrees. The SYNOPS model assumes 45 degrees here. |
rate_units |
Defaults to g/ha. For backwards compatibility, only used if the specified rate does not have units::units]. |
PEC_units |
Requested units for the calculated PEC. Only µg/L currently supported |
It is recommened to specify the arguments rate
, water_depth
and
water_width
using units::units from the units
package.
The predicted concentration in surface water
Johannes Ranke
drift_parameters_focus, drift_percentages_rautmann
PEC_sw_drift(100) # Alternatively, we can use the formula for a single application to # "Ackerbau" from the paper PEC_sw_drift(100, drift_data = "RF") # This makes it possible to also use different distances PEC_sw_drift(100, distances = c(1, 3, 5, 6, 10, 20, 50, 100), drift_data = "RF") # or consider aerial application PEC_sw_drift(100, distances = c(1, 3, 5, 6, 10, 20, 50, 100), drift_data = "RF", crop_group_RF = "aerial") # Using custom drift percentages is also supported PEC_sw_drift(100, drift_percentages = c(2.77, 0.95, 0.57, 0.48, 0.29, 0.15, 0.06, 0.03)) # The influence of assuming a 45° angle of the sides of the waterbody and the width of the # waterbody can be illustrated PEC_sw_drift(100) PEC_sw_drift(100, drift_data = "RF") PEC_sw_drift(100, drift_data = "RF", formula = "FOCUS") PEC_sw_drift(100, drift_data = "RF", formula = "FOCUS", side_angle = 45) PEC_sw_drift(100, drift_data = "RF", formula = "FOCUS", side_angle = 45, water_width = 200)
PEC_sw_drift(100) # Alternatively, we can use the formula for a single application to # "Ackerbau" from the paper PEC_sw_drift(100, drift_data = "RF") # This makes it possible to also use different distances PEC_sw_drift(100, distances = c(1, 3, 5, 6, 10, 20, 50, 100), drift_data = "RF") # or consider aerial application PEC_sw_drift(100, distances = c(1, 3, 5, 6, 10, 20, 50, 100), drift_data = "RF", crop_group_RF = "aerial") # Using custom drift percentages is also supported PEC_sw_drift(100, drift_percentages = c(2.77, 0.95, 0.57, 0.48, 0.29, 0.15, 0.06, 0.03)) # The influence of assuming a 45° angle of the sides of the waterbody and the width of the # waterbody can be illustrated PEC_sw_drift(100) PEC_sw_drift(100, drift_data = "RF") PEC_sw_drift(100, drift_data = "RF", formula = "FOCUS") PEC_sw_drift(100, drift_data = "RF", formula = "FOCUS", side_angle = 45) PEC_sw_drift(100, drift_data = "RF", formula = "FOCUS", side_angle = 45, water_width = 200)
This is a reimplementation of the calculation described in the Exposit 3.02 spreadsheet file,
in the worksheet "Konzept Drainage". Although there are four groups of
compounds ("Gefährdungsgruppen"), only one distinction is made in the
calculations, between compounds with low mobility (group 1) and compounds
with modest to high mobility (groups 2, 3 and 4). In this implementation,
the group is derived only from the Koc, if not given explicitly. For
details, see the discussion of the function arguments below.
It is recommened to specify the arguments rate
, Koc
, DT50
, t_drainage
,
V_ditch
and V_drainage
using units::units from the units
package.
PEC_sw_exposit_drainage( rate, interception = 0, Koc = NA, mobility = c(NA, "low", "high"), DT50 = set_units(Inf, "d"), t_drainage = set_units(3, "days"), V_ditch = set_units(30, "m3"), V_drainage = set_units(c(spring = 10, autumn = 100), "m3"), dilution = 2 )
PEC_sw_exposit_drainage( rate, interception = 0, Koc = NA, mobility = c(NA, "low", "high"), DT50 = set_units(Inf, "d"), t_drainage = set_units(3, "days"), V_ditch = set_units(30, "m3"), V_drainage = set_units(c(spring = 10, autumn = 100), "m3"), dilution = 2 )
rate |
The application rate in g/ha |
interception |
The fraction intercepted by the crop |
Koc |
The sorption coefficient to soil organic carbon used to determine the mobility. A trigger value of 550 L/kg is used in order to decide if Koc >> 500. |
mobility |
Overrides what is determined from the Koc. |
DT50 |
The soil half-life in days |
t_drainage |
The time between application and the drainage event, where degradation occurs, in days |
V_ditch |
The volume of the ditch is assumed to be 1 m * 100 m * 30 cm = 30 m3 |
V_drainage |
The drainage volume, equivalent to 1 mm precipitation on 1 ha for spring/summer or 10 mm for autumn/winter/early spring. |
dilution |
The dilution factor |
A list containing the following components
Gesamtaustrag (total fraction of the residue drained)
Stoßbelastung (fraction drained at event)
A matrix containing PEC values for the spring and autumn scenarios. If the rate was given in g/ha, the PECsw are in microg/L.
Excel 3.02 spreadsheet available from https://www.bvl.bund.de/SharedDocs/Downloads/04_Pflanzenschutzmittel/zul_umwelt_exposit.html
perc_runoff_exposit
for runoff loss percentages and perc_runoff_reduction_exposit
for runoff reduction percentages used
PEC_sw_exposit_drainage(500, Koc = 150)
PEC_sw_exposit_drainage(500, Koc = 150)
This is a reimplementation of the calculation described in the Exposit 3.02 spreadsheet file, in the worksheet "Konzept Runoff".
PEC_sw_exposit_runoff( rate, interception = 0, Koc, DT50 = set_units(Inf, "d"), t_runoff = set_units(3, "days"), exposit_reduction_version = c("3.02", "3.01a", "3.01a2", "2.0"), V_ditch = set_units(30, "m3"), V_event = set_units(100, "m3"), dilution = 2 )
PEC_sw_exposit_runoff( rate, interception = 0, Koc, DT50 = set_units(Inf, "d"), t_runoff = set_units(3, "days"), exposit_reduction_version = c("3.02", "3.01a", "3.01a2", "2.0"), V_ditch = set_units(30, "m3"), V_event = set_units(100, "m3"), dilution = 2 )
rate |
The application rate in g/ha |
interception |
The fraction intercepted by the crop |
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. "3.02" is the current version used in Germany, "3.01a" is the version with additional percentages for 3 m and 6 m buffer zones used in Switzerland. "3.01a2" is a version introduced for consistency with previous calculations performed for a 3 m buffer zone in Switzerland, with the same reduction being applied to the dissolved and the bound fraction. |
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 |
dilution |
The dilution factor |
It is recommened to specify the arguments rate
, Koc
, DT50
, t_runoff
, V_ditch
and V_event
using units::units from the units
package.
A list containing the following components
The runoff percentages for dissolved and bound substance
A matrix containing dissolved and bound input for the different distances
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.
Excel 3.02 spreadsheet available from https://www.bvl.bund.de/SharedDocs/Downloads/04_Pflanzenschutzmittel/zul_umwelt_exposit.html
perc_runoff_exposit
for runoff loss percentages and perc_runoff_reduction_exposit
for runoff reduction percentages used
PEC_sw_exposit_runoff(500, Koc = 150) PEC_sw_exposit_runoff(600, Koc = 10000, DT50 = 195, exposit = "3.01a")
PEC_sw_exposit_runoff(500, Koc = 150) PEC_sw_exposit_runoff(600, Koc = 10000, DT50 = 195, exposit = "3.01a")
This is a reimplementation of the FOCUS Step 1 and 2 calculator version 3.2, authored by Michael Klein, in R. Note that results for multiple applications should be compared to the corresponding results for a single application. At current, this is not done automatically in this implementation. Only Step 1 PECs are calculated. However, input files can be generated that are suitable as input for the FOCUS calculator.
PEC_sw_focus( parent, rate, n = 1, i = NA, comment = "", met = NULL, f_drift = NA, f_rd = 0.1, scenario = FOCUS_Step_12_scenarios$names, region = c("n", "s"), season = c(NA, "of", "mm", "js"), interception = c("no interception", "minimal crop cover", "average crop cover", "full canopy"), met_form_water = TRUE, txt_file = "pesticide.txt", overwrite = FALSE, append = FALSE )
PEC_sw_focus( parent, rate, n = 1, i = NA, comment = "", met = NULL, f_drift = NA, f_rd = 0.1, scenario = FOCUS_Step_12_scenarios$names, region = c("n", "s"), season = c(NA, "of", "mm", "js"), interception = c("no interception", "minimal crop cover", "average crop cover", "full canopy"), met_form_water = TRUE, txt_file = "pesticide.txt", overwrite = FALSE, append = FALSE )
parent |
A list containing substance specific parameters, e.g. conveniently generated by chent_focus_sw. |
rate |
The application rate in g/ha. Overriden when applications are given explicitly |
n |
The number of applications |
i |
The application interval |
comment |
A comment for the input file |
met |
A list containing metabolite specific parameters. e.g. conveniently generated by chent_focus_sw. If not NULL, the PEC is calculated for this compound, not the parent. |
f_drift |
The fraction of the application rate reaching the waterbody via drift. If NA, this is derived from the scenario name and the number of applications via the drift data defined by the FOCUS_Step_12_scenarios |
f_rd |
The fraction of the amount applied reaching the waterbody via runoff/drainage. At Step 1, it is assumed to be 10%, be it the parent or a metabolite |
scenario |
The name of the scenario. Must be one of the scenario names given in FOCUS_Step_12_scenarios |
region |
'n' for Northern Europe or 's' for Southern Europe. If NA, only Step 1 PECsw are calculated |
season |
'of' for October to February, 'mm' for March to May, and 'js' for June to September. If NA, only step 1 PECsw are calculated |
interception |
One of 'no interception' (default), 'minimal crop cover', 'average crop cover' or 'full canopy' |
met_form_water |
Should the metabolite formation in water be taken into account? This can be switched off to check the influence and to compare with previous versions of the Steps 12 calculator |
txt_file |
the name, and potentially the full path to the Steps.12 input text file to which the specification of the run(s) should be written |
overwrite |
Should an existing file a the location specified in
|
append |
Should the input text file be appended, if it exists? |
The formulas for input to the waterbody via runoff/drainage of the parent and subsequent formation of the metabolite in water is not documented in the model description coming with the calculator. As one would expect, this appears to be (as we get the same results) calculated by multiplying the application rate with the molar weight correction and the formation fraction in water/sediment systems.
Step 2 is not implemented.
FOCUS (2014) Generic guidance for Surface Water Scenarios (version 1.4). FOrum for the Co-ordination of pesticde fate models and their USe. http://esdac.jrc.ec.europa.eu/public_path/projects_data/focus/sw/docs/Generic%20FOCUS_SWS_vc1.4.pdf
Website of the Steps 1 and 2 calculator at the Joint Research Center of the European Union: http://esdac.jrc.ec.europa.eu/projects/stepsonetwo
# Parent only dummy_1 <- chent_focus_sw("Dummy 1", cwsat = 6000, DT50_ws = 6, Koc = 344.8) PEC_sw_focus(dummy_1, 3000, f_drift = 0) # Metabolite new_dummy <- chent_focus_sw("New Dummy", mw = 250, Koc = 100) M1 <- chent_focus_sw("M1", mw = 100, cwsat = 100, DT50_ws = 100, Koc = 50, max_ws = 0, max_soil = 0.5) PEC_sw_focus(new_dummy, 1000, scenario = "cereals, winter", met = M1)
# Parent only dummy_1 <- chent_focus_sw("Dummy 1", cwsat = 6000, DT50_ws = 6, Koc = 344.8) PEC_sw_focus(dummy_1, 3000, f_drift = 0) # Metabolite new_dummy <- chent_focus_sw("New Dummy", mw = 250, Koc = 100) M1 <- chent_focus_sw("M1", mw = 100, cwsat = 100, DT50_ws = 100, Koc = 50, max_ws = 0, max_soil = 0.5) PEC_sw_focus(new_dummy, 1000, scenario = "cereals, winter", met = M1)
The method 'percentage' is equivalent to what is used in the CRD spreadsheet PEC calculator
PEC_sw_sed( PEC_sw, percentage = 100, method = "percentage", sediment_depth = set_units(5, "cm"), water_depth = set_units(30, "cm"), sediment_density = set_units(1.3, "kg/L"), PEC_sed_units = c("µg/kg", "mg/kg") )
PEC_sw_sed( PEC_sw, percentage = 100, method = "percentage", sediment_depth = set_units(5, "cm"), water_depth = set_units(30, "cm"), sediment_density = set_units(1.3, "kg/L"), PEC_sed_units = c("µg/kg", "mg/kg") )
PEC_sw |
Numeric vector or matrix of surface water concentrations in µg/L for which the corresponding sediment concentration is to be estimated |
percentage |
The percentage in sediment, used for the percentage method |
method |
The method used for the calculation |
sediment_depth |
Depth of the sediment layer |
water_depth |
Depth of the water body in cm |
sediment_density |
The density of the sediment in kg/L (equivalent to g/cm3) |
PEC_sed_units |
The units of the estimated sediment PEC value |
The predicted concentration in sediment
Johannes Ranke
library(pfm) library(units) PEC_sw_sed(PEC_sw_drift(100, distances = 1), percentage = 50)
library(pfm) library(units) PEC_sw_sed(PEC_sw_drift(100, distances = 1), percentage = 50)
A table of the loss percentages used in Exposit 3 for the twelve different Koc classes
perc_runoff_exposit
perc_runoff_exposit
A data frame with percentage values for the dissolved fraction and the fraction bound to eroding particles, with Koc classes used as row names
The lower bound of the Koc class
The percentage of the applied substance transferred to an adjacent water body in the dissolved phase
The percentage of the applied substance transferred to an adjacent water body bound to eroding particles
Excel 3.02 spreadsheet available from https://www.bvl.bund.de/SharedDocs/Downloads/04_Pflanzenschutzmittel/zul_umwelt_exposit.html
print(perc_runoff_exposit)
print(perc_runoff_exposit)
A table of the runoff reduction percentages used in Exposit 3 for different vegetated buffer widths
perc_runoff_reduction_exposit
perc_runoff_reduction_exposit
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.
The reduction percentage for the dissolved phase
The reduction percentage for the particulate phase
Excel 3.02 spreadsheet available from https://www.bvl.bund.de/SharedDocs/Downloads/04_Pflanzenschutzmittel/zul_umwelt_exposit.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.
print(perc_runoff_reduction_exposit)
print(perc_runoff_reduction_exposit)
Calculate a time course of relative concentrations based on an mkinmod model
pfm_degradation( model = "SFO", DT50 = 1000, parms = c(k_parent = log(2)/DT50), years = 1, step_days = 1, times = seq(0, years * 365, by = step_days) )
pfm_degradation( model = "SFO", DT50 = 1000, parms = c(k_parent = log(2)/DT50), years = 1, step_days = 1, times = seq(0, years * 365, by = step_days) )
model |
The degradation model to be used. Either a parent only model like 'SFO' or 'FOMC', or an mkinmod object |
DT50 |
The half-life. This is only used when simple exponential decline is calculated (SFO model). |
parms |
The parameters used for the degradation model |
years |
For how many years should the degradation be predicted? |
step_days |
What step size in days should the output have? |
times |
The output times |
Johannes Ranke
head(pfm_degradation("SFO", DT50 = 10))
head(pfm_degradation("SFO", DT50 = 10))
Plot time series of decline data
## S3 method for class 'one_box' plot( x, xlim = range(time(x)), ylim = c(0, max(x)), xlab = "Time", ylab = "Residue", max_twa = NULL, max_twa_var = dimnames(x)[[2]][1], ... )
## S3 method for class 'one_box' plot( x, xlim = range(time(x)), ylim = c(0, max(x)), xlab = "Time", ylab = "Residue", max_twa = NULL, max_twa_var = dimnames(x)[[2]][1], ... )
x |
The object of type |
xlim |
Limits for the x axis |
ylim |
Limits for the y axis |
xlab |
Label for the x axis |
ylab |
Label for the y axis |
max_twa |
If a numeric value is given, the maximum time weighted average concentration(s) is/are shown in the graph. |
max_twa_var |
Variable for which the maximum time weighted average should be shown if max_twa is not NULL. |
... |
Further arguments passed to methods |
dfop_pred <- one_box("DFOP", parms = c(k1 = 0.2, k2 = 0.02, g = 0.7)) plot(dfop_pred) plot(sawtooth(dfop_pred, 3, 7), max_twa = 21) # Use a fitted mkinfit model m_2 <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO")) fit_2 <- mkinfit(m_2, FOCUS_2006_D, quiet = TRUE) pred_2 <- one_box(fit_2, ini = 1) pred_2_saw <- sawtooth(pred_2, 2, 7) plot(pred_2_saw, max_twa = 21, max_twa_var = "m1")
dfop_pred <- one_box("DFOP", parms = c(k1 = 0.2, k2 = 0.02, g = 0.7)) plot(dfop_pred) plot(sawtooth(dfop_pred, 3, 7), max_twa = 21) # Use a fitted mkinfit model m_2 <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO")) fit_2 <- mkinfit(m_2, FOCUS_2006_D, quiet = TRUE) pred_2 <- one_box(fit_2, ini = 1) pred_2_saw <- sawtooth(pred_2, 2, 7) plot(pred_2_saw, max_twa = 21, max_twa_var = "m1")
Plot TOXSWA hourly concentrations of a chemical substance in a specific segment of a TOXSWA surface water body.
## S3 method for class 'TOXSWA_cwa' plot( x, time_column = c("datetime", "t", "t_firstjan", "t_rel_to_max"), xlab = "default", ylab = "default", add = FALSE, threshold_factor = 1000, thin_low = 1, total = FALSE, LC_TIME = "C", ... )
## S3 method for class 'TOXSWA_cwa' plot( x, time_column = c("datetime", "t", "t_firstjan", "t_rel_to_max"), xlab = "default", ylab = "default", add = FALSE, threshold_factor = 1000, thin_low = 1, total = FALSE, LC_TIME = "C", ... )
x |
The TOXSWA_cwa object to be plotted. |
time_column |
What should be used for the time axis. If "t_firstjan" is chosen, the time is given in days relative to the first of January in the first year. |
xlab , ylab
|
Labels for x and y axis. |
add |
Should we add to an existing plot? |
threshold_factor |
The factor by which the data have to be lower than the maximum in order to get thinned for plotting (see next argument). |
thin_low |
If an integer greater than 1, the data close to zero (smaller than 1/threshold_factor of the maximum) in the series will be thinned by this factor in order to decrease the amount of data that is included in the plots |
total |
Should the total concentration in water be plotted, including substance sorbed to suspended matter? |
LC_TIME |
Specification of the locale used to format dates |
... |
Further arguments passed to |
Johannes Ranke
H_sw_D4_pond <- read.TOXSWA_cwa("00001p_pa.cwa", basedir = "SwashProjects/project_H_sw/TOXSWA", zipfile = system.file("testdata/SwashProjects.zip", package = "pfm")) plot(H_sw_D4_pond) plot(H_sw_D4_pond, time_column = "t") plot(H_sw_D4_pond, time_column = "t_firstjan") plot(H_sw_D4_pond, time_column = "t_rel_to_max") H_sw_R1_stream <- read.TOXSWA_cwa("00003s_pa.cwa", basedir = "SwashProjects/project_H_sw/TOXSWA", zipfile = system.file("testdata/SwashProjects.zip", package = "pfm")) plot(H_sw_R1_stream, time_column = "t_rel_to_max")
H_sw_D4_pond <- read.TOXSWA_cwa("00001p_pa.cwa", basedir = "SwashProjects/project_H_sw/TOXSWA", zipfile = system.file("testdata/SwashProjects.zip", package = "pfm")) plot(H_sw_D4_pond) plot(H_sw_D4_pond, time_column = "t") plot(H_sw_D4_pond, time_column = "t_firstjan") plot(H_sw_D4_pond, time_column = "t_rel_to_max") H_sw_R1_stream <- read.TOXSWA_cwa("00003s_pa.cwa", basedir = "SwashProjects/project_H_sw/TOXSWA", zipfile = system.file("testdata/SwashProjects.zip", package = "pfm")) plot(H_sw_R1_stream, time_column = "t_rel_to_max")
Read TOXSWA hourly concentrations of a chemical substance in a specific segment of a TOXSWA surface water body. Per default, the data for the last segment are imported. As TOXSWA 4 reports the values at the end of the hour (ConLiqWatLayCur) in its summary file, we use this value as well instead of the hourly averages (ConLiqWatLay). In TOXSWA 5.5.3 this variable was renamed to ConLiqWatLay in the out file.
read.TOXSWA_cwa( filename, basedir = ".", zipfile = NULL, segment = "last", substance = "parent", total = FALSE, windows = NULL, thresholds = NULL )
read.TOXSWA_cwa( filename, basedir = ".", zipfile = NULL, segment = "last", substance = "parent", total = FALSE, windows = NULL, thresholds = NULL )
filename |
The filename of the cwa file (TOXSWA 2.x.y or similar) or the out file when using FOCUS TOXSWA 4 (i.e. TOXSWA 4.4.2) or higher. |
basedir |
The path to the directory where the cwa file resides. |
zipfile |
Optional path to a zip file containing the cwa file. |
segment |
The segment for which the data should be read. Either "last", or the segment number. |
substance |
For .out files, the default value "parent" leads to reading concentrations of the parent compound. Alternatively, the substance of interested can be selected by its code name. |
total |
Set this to TRUE in order to read total concentrations as well. This is only necessary for .out files as generated by TOXSWA 4.4.2 or similar, not for .cwa files. For .cwa files, the total concentration is always read as well. |
windows |
Numeric vector of width of moving windows in days, for calculating maximum time weighted average concentrations and areas under the curve. |
thresholds |
Numeric vector of threshold concentrations in µg/L for generating event statistics. |
An instance of an R6 object of class
TOXSWA_cwa
.
Johannes Ranke
H_sw_D4_pond <- read.TOXSWA_cwa("00001p_pa.cwa", basedir = "SwashProjects/project_H_sw/TOXSWA", zipfile = system.file("testdata/SwashProjects.zip", package = "pfm"))
H_sw_D4_pond <- read.TOXSWA_cwa("00001p_pa.cwa", basedir = "SwashProjects/project_H_sw/TOXSWA", zipfile = system.file("testdata/SwashProjects.zip", package = "pfm"))
If the application pattern is specified in applications
,
n
and i
are disregarded.
sawtooth( x, n = 1, i = 365, applications = data.frame(time = seq(0, (n - 1) * i, length.out = n), amount = 1) )
sawtooth( x, n = 1, i = 365, applications = data.frame(time = seq(0, (n - 1) * i, length.out = n), amount = 1) )
x |
A |
n |
The number of applications. If |
i |
The interval between applications. If |
applications |
A data frame holding the application times in the first column and the corresponding amounts applied in the second column. |
applications = data.frame(time = seq(0, 14, by = 7), amount = c(1, 2, 3)) pred <- one_box(10) plot(sawtooth(pred, applications = applications)) m_2 <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO")) fit_2 <- mkinfit(m_2, FOCUS_2006_D, quiet = TRUE) pred_2 <- one_box(fit_2, ini = 1) pred_2_saw <- sawtooth(pred_2, 2, 7) plot(pred_2_saw, max_twa = 21, max_twa_var = "m1") max_twa(pred_2_saw)
applications = data.frame(time = seq(0, 14, by = 7), amount = c(1, 2, 3)) pred <- one_box(10) plot(sawtooth(pred, applications = applications)) m_2 <- mkinmod(parent = mkinsub("SFO", "m1"), m1 = mkinsub("SFO")) fit_2 <- mkinfit(m_2, FOCUS_2006_D, quiet = TRUE) pred_2 <- one_box(fit_2, ini = 1) pred_2_saw <- sawtooth(pred_2, 2, 7) plot(pred_2_saw, max_twa = 21, max_twa_var = "m1") max_twa(pred_2_saw)
Actual and maximum moving window time average concentrations for SFO kinetics
SFO_actual_twa(DT50 = 1000, times = c(0, 1, 2, 4, 7, 14, 21, 28, 42, 50, 100))
SFO_actual_twa(DT50 = 1000, times = c(0, 1, 2, 4, 7, 14, 21, 28, 42, 50, 100))
DT50 |
The half-life. |
times |
The output times, and window sizes for time weighted average concentrations |
Johannes Ranke
FOCUS (2014) Generic Guidance for Estimating Persistence and Degradation Kinetics from Environmental Fate Studies on Pesticides in EU Registration, Version 1.1, 18 December 2014, p. 251
SFO_actual_twa(10)
SFO_actual_twa(10)
Properties of the predefined scenarios used at Tier 1, Tier 2A and Tier 3A for the concentration in soil as given in the EFSA guidance (2015, p. 13/14). Also, the scenario and model adjustment factors from p. 15 and p. 17 are included.
soil_scenario_data_EFSA_2015
soil_scenario_data_EFSA_2015
A data frame with one row for each scenario. Row names are the scenario codes,
e.g. CTN for the Northern scenario for the total concentration in soil. Columns are
mostly self-explanatory. rho
is the dry bulk density of the top soil.
EFSA (European Food Safety Authority) (2015) EFSA guidance document for predicting environmental concentrations of active substances of plant protection products and transformation products of these active substances in soil. EFSA Journal 13(4) 4093 doi:10.2903/j.efsa.2015.4093
soil_scenario_data_EFSA_2015
soil_scenario_data_EFSA_2015
Properties of the predefined scenarios used at Tier 1, Tier 2A and Tier 3A for the concentration in soil as given in the EFSA guidance (2017, p. 14/15). Also, the scenario and model adjustment factors from p. 16 and p. 18 are included.
soil_scenario_data_EFSA_2017
soil_scenario_data_EFSA_2017
A data frame with one row for each scenario. Row names are the scenario codes,
e.g. CTN for the Northern scenario for the total concentration in soil. Columns are
mostly self-explanatory. rho
is the dry bulk density of the top soil.
EFSA (European Food Safety Authority) (2017) EFSA guidance document for predicting environmental concentrations of active substances of plant protection products and transformation products of these active substances in soil. EFSA Journal 15(10) 4982 doi:10.2903/j.efsa.2017.4982
soil_scenario_data_EFSA_2017 waldo::compare(soil_scenario_data_EFSA_2017, soil_scenario_data_EFSA_2015)
soil_scenario_data_EFSA_2017 waldo::compare(soil_scenario_data_EFSA_2017, soil_scenario_data_EFSA_2015)
This implements the method specified in the UK data requirements handbook and was checked against the spreadsheet published on the CRD website
SSLRC_mobility_classification(Koc)
SSLRC_mobility_classification(Koc)
Koc |
The sorption coefficient normalised to organic carbon in L/kg |
A list containing the classification and the percentage of the compound transported per 10 mm drain water
Johannes Ranke
HSE's Chemicals Regulation Division (CRD) Active substance PECsw calculations (for UK specific authorisation requests) https://www.hse.gov.uk/pesticides/topics/pesticide-approvals/pesticides-registration/data-requirements-handbook/fate/active-substance-uk.htm accessed 2019-09-27
Drainage PECs Version 1.0 (2015) Spreadsheet published at https://www.hse.gov.uk/pesticides/topics/pesticide-approvals/pesticides-registration/data-requirements-handbook/fate/pec-tools-2015/PEC%20sw-sed%20(drainage).xlsx accessed 2019-09-27
SSLRC_mobility_classification(100) SSLRC_mobility_classification(10000)
SSLRC_mobility_classification(100) SSLRC_mobility_classification(10000)
An R6 class for holding TOXSWA water concentration (cwa) data
and some associated statistics. like maximum moving window average
concentrations, and dataframes holding the events exceeding specified
thresholds. Usually, an instance of this class will be generated
by read.TOXSWA_cwa
.
An R6Class
generator object.
filename
Length one character vector holding the filename.
basedir
Length one character vector holding the directory where the file came from.
zipfile
If not null, giving the path to the zip file from which the file was read.
segment
Length one integer, specifying for which segment the cwa data were read.
substance
The TOXSWA name of the substance.
cwas
Dataframe holding the concentrations.
events
List of dataframes holding the event statistics for each threshold.
windows
Matrix of maximum time weighted average concentrations (TWAC_max) and areas under the curve in µg/day * h (AUC_max_h) or µg/day * d (AUC_max_d) for the requested moving window sizes in days.
new()
Create a TOXSWA_cwa object from a file
TOXSWA_cwa$new( filename, basedir, zipfile = NULL, segment = "last", substance = "parent", total = FALSE )
filename
The filename
basedir
The directory to look in
zipfile
Optional path to a zipfile holding the file
segment
Either "last" or the number of the segment for which to read the data
substance
The TOXSWA substance name (for TOXSWA 4 or higher)
total
Should total concentrations be read in? If FALSE, free concentrations are read
moving_windows()
Add to the windows
field described above.
TOXSWA_cwa$moving_windows(windows, total = FALSE)
windows
Window sizes in days
total
If TRUE, the total concentration including the amount adsorbed to suspended matter will be used.
get_events()
Populate a datataframe with event information for the specified
threshold value. The resulting dataframe is stored in the events
field of the object.
TOXSWA_cwa$get_events(thresholds, total = FALSE)
thresholds
Threshold values in µg/L.
total
If TRUE, the total concentration including the amount adsorbed to suspended matter will be used.
print()
Print a TOXSWA_cwa
object
TOXSWA_cwa$print()
clone()
The objects of this class are cloneable with this method.
TOXSWA_cwa$clone(deep = FALSE)
deep
Whether to make a deep clone.
H_sw_R1_stream <- read.TOXSWA_cwa("00003s_pa.cwa", basedir = "SwashProjects/project_H_sw/TOXSWA", zipfile = system.file("testdata/SwashProjects.zip", package = "pfm")) H_sw_R1_stream$get_events(c(2, 10)) H_sw_R1_stream$moving_windows(c(7, 21)) print(H_sw_R1_stream)
H_sw_R1_stream <- read.TOXSWA_cwa("00003s_pa.cwa", basedir = "SwashProjects/project_H_sw/TOXSWA", zipfile = system.file("testdata/SwashProjects.zip", package = "pfm")) H_sw_R1_stream$get_events(c(2, 10)) H_sw_R1_stream$moving_windows(c(7, 21)) print(H_sw_R1_stream)
The FOCUS groundwater guidance (FOCUS 2014, p. 41) states that a reliable measured log Kow for neutral pH must be available in order to apply the Briggs equation. It is not clarified when it can be regarded reliable, but the equation is stated to be produced for non-ionic compounds, suggesting that the compound should not be ionogenic (weak acid/base) or ionic.
TSCF(log_Kow, method = c("briggs82", "dettenmaier09"))
TSCF(log_Kow, method = c("briggs82", "dettenmaier09"))
log_Kow |
The decadic logarithm of the octanol-water partition constant |
method |
Short name of the estimation method. |
The Dettenmaier equation is given to show that other views on the subject exist.
FOCUS (2014) Generic Guidance for Tier 1 FOCUS Ground Water Assessments. Version 2.2, May 2014 Dettenmaier EM, Doucette WJ and Bugbee B (2009) Chemical hydrophobicity and uptake by plant roots. Environ. Sci. Technol 43, 324 - 329
plot(TSCF, -1, 5, xlab = "log Kow", ylab = "TSCF", ylim = c(0, 1.1)) TSCF_2 <- function(x) TSCF(x, method = "dettenmaier09") curve(TSCF_2, -1, 5, add = TRUE, lty = 2) legend("topright", lty = 1:2, bty = "n", legend = c("Briggs et al. (1982)", "Dettenmaier et al. (2009)"))
plot(TSCF, -1, 5, xlab = "log Kow", ylab = "TSCF", ylim = c(0, 1.1)) TSCF_2 <- function(x) TSCF(x, method = "dettenmaier09") curve(TSCF_2, -1, 5, add = TRUE, lty = 2) legend("topright", lty = 1:2, bty = "n", legend = c("Briggs et al. (1982)", "Dettenmaier et al. (2009)"))
The moving average is built only using the values in the past, so the earliest possible time for the maximum in the time series returned is after one window has passed.
twa(x, window = 21) ## S3 method for class 'one_box' twa(x, window = 21)
twa(x, window = 21) ## S3 method for class 'one_box' twa(x, window = 21)
x |
An object of type |
window |
The size of the moving window |
pred <- sawtooth(one_box(10), applications = data.frame(time = c(0, 7), amount = c(1, 1))) max_twa(pred)
pred <- sawtooth(one_box(10), applications = data.frame(time = c(0, 7), amount = c(1, 1))) max_twa(pred)