From 6acfd0dfb2670e3eeab6144c90586f28105583a8 Mon Sep 17 00:00:00 2001
From: Johannes Ranke Actual and maximum moving window time average concentrations for FOMC kinetics Parameter of the FOMC model Parameter of the FOMC model The output times, and window sizes for time weighted average concentrations 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. 251Actual and maximum moving window time average concentrations for FOMC kinetics
+ Source: R/FOMC_actual_twa.R
+ FOMC_actual_twa.Rd
FOMC_actual_twa(alpha = 1.0001, beta = 10, times = c(0, 1, 2, 4, 7, 14,
+ 21, 28, 42, 50, 100))
+
+ Arguments
+
+
+
+
+
+ alpha
+
+
+
+ beta
+
+
+
+ times
+
+ Source
+
+ Examples
+
+
FOCUS (2014) Generic Guidance for Estimating Persistence and Degradation - Kinetics from Environmental Fate Studies on Pesticides in EU Registratin, Version 1.1, + Kinetics from Environmental Fate Studies on Pesticides in EU Registration, Version 1.1, 18 December 2014, p. 251
diff --git a/docs/reference/SSLRC_mobility_classification.html b/docs/reference/SSLRC_mobility_classification.html index 4e673bf..49b80e7 100644 --- a/docs/reference/SSLRC_mobility_classification.html +++ b/docs/reference/SSLRC_mobility_classification.html @@ -62,7 +62,7 @@ checked against the spreadsheet published on the CRC website" /> diff --git a/docs/reference/TOXSWA_cwa.html b/docs/reference/TOXSWA_cwa.html index a078e31..3b11804 100644 --- a/docs/reference/TOXSWA_cwa.html +++ b/docs/reference/TOXSWA_cwa.html @@ -62,7 +62,7 @@ Usually, an instance of this class will be generated by read.TOXSWA_cwa." /> diff --git a/docs/reference/chent_focus_sw.html b/docs/reference/chent_focus_sw.html index 501f002..1683067 100644 --- a/docs/reference/chent_focus_sw.html +++ b/docs/reference/chent_focus_sw.html @@ -61,7 +61,7 @@ diff --git a/docs/reference/create_run_list.html b/docs/reference/create_run_list.html index 02d2d0c..255aa1d 100644 --- a/docs/reference/create_run_list.html +++ b/docs/reference/create_run_list.html @@ -61,7 +61,7 @@ diff --git a/docs/reference/drift_data_JKI.html b/docs/reference/drift_data_JKI.html index 9cee8fe..ada93e7 100644 --- a/docs/reference/drift_data_JKI.html +++ b/docs/reference/drift_data_JKI.html @@ -64,7 +64,7 @@ published by the German Julius-Kühn Institute (JKI)." /> diff --git a/docs/reference/endpoint.html b/docs/reference/endpoint.html index 2a36788..a078bd8 100644 --- a/docs/reference/endpoint.html +++ b/docs/reference/endpoint.html @@ -64,7 +64,7 @@ this function." /> diff --git a/docs/reference/focus_80th.html b/docs/reference/focus_80th.html index c15c73a..375e15a 100644 --- a/docs/reference/focus_80th.html +++ b/docs/reference/focus_80th.html @@ -64,7 +64,7 @@ values obtained by PELMO." /> diff --git a/docs/reference/geomean.html b/docs/reference/geomean.html index b8c2415..5673322 100644 --- a/docs/reference/geomean.html +++ b/docs/reference/geomean.html @@ -64,7 +64,7 @@ returns 0 if at least one element of the vector is 0." /> diff --git a/docs/reference/get_flux.html b/docs/reference/get_flux.html index 7e331ec..025b4ad 100644 --- a/docs/reference/get_flux.html +++ b/docs/reference/get_flux.html @@ -61,7 +61,7 @@ diff --git a/docs/reference/get_interval.html b/docs/reference/get_interval.html index 2d1dc02..0cd69f3 100644 --- a/docs/reference/get_interval.html +++ b/docs/reference/get_interval.html @@ -61,7 +61,7 @@ diff --git a/docs/reference/index.html b/docs/reference/index.html index 395b446..c153b50 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -58,7 +58,7 @@ diff --git a/docs/reference/max_twa.html b/docs/reference/max_twa.html index 0875c46..6e5ee67 100644 --- a/docs/reference/max_twa.html +++ b/docs/reference/max_twa.html @@ -65,7 +65,7 @@ max_twa." /> diff --git a/docs/reference/one_box.html b/docs/reference/one_box.html index 1e793d0..9cd4d61 100644 --- a/docs/reference/one_box.html +++ b/docs/reference/one_box.html @@ -61,7 +61,7 @@ diff --git a/docs/reference/perc_runoff_exposit.html b/docs/reference/perc_runoff_exposit.html index e24e0ad..e243efb 100644 --- a/docs/reference/perc_runoff_exposit.html +++ b/docs/reference/perc_runoff_exposit.html @@ -61,7 +61,7 @@ diff --git a/docs/reference/perc_runoff_reduction_exposit.html b/docs/reference/perc_runoff_reduction_exposit.html index 69acbac..4e10a64 100644 --- a/docs/reference/perc_runoff_reduction_exposit.html +++ b/docs/reference/perc_runoff_reduction_exposit.html @@ -61,7 +61,7 @@ diff --git a/docs/reference/pesticide.txt b/docs/reference/pesticide.txt index 42be741..0f03e9a 100644 --- a/docs/reference/pesticide.txt +++ b/docs/reference/pesticide.txt @@ -31,3 +31,5 @@ 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 diff --git a/docs/reference/pfm_degradation.html b/docs/reference/pfm_degradation.html index 899a0a4..e547ed1 100644 --- a/docs/reference/pfm_degradation.html +++ b/docs/reference/pfm_degradation.html @@ -61,7 +61,7 @@ diff --git a/docs/reference/plot.TOXSWA_cwa.html b/docs/reference/plot.TOXSWA_cwa.html index cf5bdf9..8612bac 100644 --- a/docs/reference/plot.TOXSWA_cwa.html +++ b/docs/reference/plot.TOXSWA_cwa.html @@ -62,7 +62,7 @@ segment of a TOXSWA surface water body." /> diff --git a/docs/reference/plot.one_box.html b/docs/reference/plot.one_box.html index e4ffef4..a8f62d4 100644 --- a/docs/reference/plot.one_box.html +++ b/docs/reference/plot.one_box.html @@ -61,7 +61,7 @@ diff --git a/docs/reference/read.TOXSWA_cwa.html b/docs/reference/read.TOXSWA_cwa.html index d838794..60e236a 100644 --- a/docs/reference/read.TOXSWA_cwa.html +++ b/docs/reference/read.TOXSWA_cwa.html @@ -65,7 +65,7 @@ of the hourly averages (ConLiqWatLay)." /> diff --git a/docs/reference/sawtooth.html b/docs/reference/sawtooth.html index 6b2ce13..175e045 100644 --- a/docs/reference/sawtooth.html +++ b/docs/reference/sawtooth.html @@ -63,7 +63,7 @@ times, with an interval i." /> diff --git a/docs/reference/soil_scenario_data_EFSA_2015.html b/docs/reference/soil_scenario_data_EFSA_2015.html index 77759b5..64c9c28 100644 --- a/docs/reference/soil_scenario_data_EFSA_2015.html +++ b/docs/reference/soil_scenario_data_EFSA_2015.html @@ -63,7 +63,7 @@ scenario and model adjustment factors from p. 15 and p. 17 are included." /> diff --git a/docs/reference/sum_periods.html b/docs/reference/sum_periods.html index 96cbaf2..ec0c34b 100644 --- a/docs/reference/sum_periods.html +++ b/docs/reference/sum_periods.html @@ -61,7 +61,7 @@ diff --git a/docs/reference/twa.html b/docs/reference/twa.html index 8f8e98f..da44f92 100644 --- a/docs/reference/twa.html +++ b/docs/reference/twa.html @@ -63,7 +63,7 @@ is after one window has passed." /> -- cgit v1.2.1 From 6ca8bdb8636141fac592688a6794ae092f0bc85a Mon Sep 17 00:00:00 2001 From: Johannes RankeYou can install the package from github, e.g. using the devtools
package. Using quick = TRUE
skips docs, multiple-architecture builds, demos, and vignettes, to make installation as fast and painless as possible.
The easiest way to install the package is probably to use drat:
+install.packages("drat")
+drat::addRepo("jranke")
+install.packages("pfm")
Alternatively you can install the package using the devtools
package. Using quick = TRUE
skips docs, multiple-architecture builds, demos, and vignettes.
library(devtools)
install_github("jranke/pfm", quick = TRUE)
You can install the package from github, e.g. using the devtools
package. Using quick = TRUE
skips docs, multiple-architecture builds, demos, and vignettes, to make installation as fast and painless as possible.
The easiest way to install the package is probably to use drat:
+install.packages("drat")
+drat::addRepo("jranke")
+install.packages("pfm")
+Alternatively you can install the package using the devtools
package. Using quick = TRUE
skips docs, multiple-architecture builds, demos, and vignettes.
library(devtools)
install_github("jranke/pfm", quick = TRUE)
Period of the deeper mixing, defaults to 365, which is a year if -rate units are in days
R/TOXSWA_cwa.R
TOXSWA_cwa.Rd
An R6 class for holding TOXSWA cwa concentration data and some associated statistics. +
An R6 class for holding TOXSWA water concentration (cwa) data and some associated statistics.
Usually, an instance of this class will be generated by read.TOXSWA_cwa
.
R6 class for holding TOXSWA cwa concentration data and associated statistics
R6 class for holding TOXSWA water concentration data and associated statistics
The filename of the cwa file (TOXSWA 2.x.y or similar) or the -out file (FOCUS TOXSWA 4, i.e. TOXSWA 4.4.2 or similar).
For TOXSWA 4 .out files, the default value "parent" leads +
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.
The easiest way to install the package is probably to use drat:
+The easiest way to install the package is probably to use drat:
install.packages("drat")
drat::addRepo("jranke")
install.packages("pfm")
diff --git a/README.md b/README.md
index 68874f2..ab34018 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ This means:
## Installation
The easiest way to install the package is probably to use
-[drat](http://cran.r-project.org/package=drat):
+[drat](https://cran.r-project.org/package=drat):
```r
install.packages("drat")
diff --git a/build.log b/build.log
index ea12067..e77bb21 100644
--- a/build.log
+++ b/build.log
@@ -3,6 +3,7 @@
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
+Removed empty directory ‘pfm/inst/testdata/SwashProjects/Project_1/MACRO’
* looking to see if a ‘data/datalist’ file should be added
-* building ‘pfm_0.4-6.tar.gz’
+* building ‘pfm_0.5.1.tar.gz’
diff --git a/data/soil_scenario_data_EFSA_2017.RData b/data/soil_scenario_data_EFSA_2017.RData
new file mode 100644
index 0000000..ff8f045
Binary files /dev/null and b/data/soil_scenario_data_EFSA_2017.RData differ
diff --git a/man/PEC_soil.Rd b/man/PEC_soil.Rd
index 1491790..f9e82e8 100644
--- a/man/PEC_soil.Rd
+++ b/man/PEC_soil.Rd
@@ -6,9 +6,11 @@
\usage{
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, chent = NA, DT50 = NA,
+ n_periods = Inf, tillage_depth = 20, leaching_depth = tillage_depth,
+ crop = "annual", cultivation = FALSE, chent = NA, DT50 = NA,
Koc = NA, Kom = Koc/1.724, t_avg = 0, scenarios = c("default",
- "EFSA_2015"), porewater = FALSE)
+ "EFSA_2017", "EFSA_2015"), leaching = scenarios == "EFSA_2017",
+ porewater = FALSE)
}
\arguments{
\item{rate}{Application rate in units specified below}
@@ -30,7 +32,20 @@ degradation rate units are in days}
\item{tillage_depth}{Periodic (see interval) deeper mixing in cm}
-\item{chent}{An optional chent object holding substance specific information. Can
+\item{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.}
+
+\item{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.}
+
+\item{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}
+
+\item{chent}{An optional chent object holding substance specific information. Can
also be a name for the substance as a character string}
\item{DT50}{If specified, overrides soil DT50 endpoints from a chent object
@@ -52,6 +67,9 @@ the DT50 is taken to be a modelling half-life at 20°C and pF2 (for when
and corrected using an Arrhenius activation energy of 65.4 kJ/mol. Also
model and scenario adjustment factors from the EFSA guidance are used.}
+\item{leaching}{Should leaching be taken into account? The default is FALSE,
+except when the EFSA_2017 scenarios are used.}
+
\item{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
@@ -63,20 +81,33 @@ The predicted concentration in soil
}
\description{
This is a basic calculation of a contaminant concentration in bulk soil
-based on complete, instantaneous mixing. If an interval is given, an
+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 for example in the PPR panel opinion (EFSA 2012).
+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).
}
\details{
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 (PPR panel 2012), only temperature correction using the
+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 (2015, p. 13) can easily be calculated.
+guidance (2017, p. 14/15) can easily be calculated.
}
\note{
+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
@@ -85,6 +116,14 @@ If temperature information is available in the selected scenarios, as
\examples{
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")
@@ -107,6 +146,12 @@ EFSA Panel on Plant Protection Products and their Residues (2012)
concentrations of plant protection products in soil. \emph{EFSA Journal}
\bold{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. \emph{EFSA Journal} \bold{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
diff --git a/man/perc_runoff_exposit.Rd b/man/perc_runoff_exposit.Rd
index 4f460e4..bdc36e8 100644
--- a/man/perc_runoff_exposit.Rd
+++ b/man/perc_runoff_exposit.Rd
@@ -6,6 +6,7 @@
\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{Koc_lower_bound}{The lower bound of the Koc class}
\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
diff --git a/man/soil_scenario_data_EFSA_2015.Rd b/man/soil_scenario_data_EFSA_2015.Rd
index 02c16dc..64c00a8 100644
--- a/man/soil_scenario_data_EFSA_2015.Rd
+++ b/man/soil_scenario_data_EFSA_2015.Rd
@@ -9,10 +9,10 @@
mostly self-explanatory. \code{rho} is the dry bulk density of the top soil.}
\source{
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. \emph{EFSA Journal} \bold{13}(4) 4093
-doi:10.2903/j.efsa.2015.4093
+ EFSA guidance document for predicting environmental concentrations
+ of active substances of plant protection products and transformation products of these
+ active substances in soil. \emph{EFSA Journal} \bold{13}(4) 4093
+ doi:10.2903/j.efsa.2015.4093
}
\description{
Properties of the predefined scenarios used at Tier 1, Tier 2A and Tier 3A for the
diff --git a/man/soil_scenario_data_EFSA_2017.Rd b/man/soil_scenario_data_EFSA_2017.Rd
new file mode 100644
index 0000000..aeaacac
--- /dev/null
+++ b/man/soil_scenario_data_EFSA_2017.Rd
@@ -0,0 +1,25 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/soil_scenario_data_EFSA_2017.R
+\docType{data}
+\name{soil_scenario_data_EFSA_2017}
+\alias{soil_scenario_data_EFSA_2017}
+\title{Properties of the predefined scenarios from the EFSA guidance from 2017}
+\format{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. \code{rho} is the dry bulk density of the top soil.}
+\source{
+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. \emph{EFSA Journal} \bold{15}(10) 4982
+ doi:10.2903/j.efsa.2017.4982
+}
+\description{
+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.
+}
+\examples{
+soil_scenario_data_EFSA_2017
+}
+\keyword{datasets}
diff --git a/test.log b/test.log
index 2692d54..f16336b 100644
--- a/test.log
+++ b/test.log
@@ -2,23 +2,25 @@ Loading pfm
Loading required package: testthat
Loading required package: R6
Loading required package: mkin
-Loading required package: minpack.lm
-Loading required package: rootSolve
-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: .
-Simple PEC soil calculations: ...........
-Simple PEC surface water calculations with drift entry: ..
-Create PELMO runs from psm files and execute them: ...........................................................................................................................................................................................................................
-Actual and time weighted average concentrations for SFO kinetics: .
-FOCUS Step 1 calculations: .........
-FOCUS Steps 12 input files: ........
-Read and analyse TOXSWA cwa files: .......
-UK drainage PEC calculations: ............
+✔ | OK F W S | Context
+
⠏ | 0 | Exposit runoff calculations
⠋ | 1 | Exposit runoff calculations
⠙ | 2 | Exposit runoff calculations
⠹ | 3 | Exposit runoff calculations
✔ | 3 | Exposit runoff calculations
+
⠏ | 0 | Geometric mean calculation
⠋ | 1 | Geometric mean calculation
⠙ | 2 | Geometric mean calculation
⠹ | 3 | Geometric mean calculation
⠸ | 4 | Geometric mean calculation
⠼ | 5 | Geometric mean calculation
⠴ | 6 | Geometric mean calculation
✔ | 6 | Geometric mean calculation
+
⠏ | 0 | Check max_twa for parent mkinfit models against analytical solutions
⠋ | 1 | Check max_twa for parent mkinfit models against analytical solutions
✔ | 1 | Check max_twa for parent mkinfit models against analytical solutions [1.0 s]
+
⠏ | 0 | Simple PEC sediment calculations
⠋ | 1 | Simple PEC sediment calculations
✔ | 1 | Simple PEC sediment calculations
+
⠏ | 0 | Simple PEC soil calculations
⠋ | 1 | Simple PEC soil calculations
⠙ | 2 | Simple PEC soil calculations
⠹ | 3 | Simple PEC soil calculations
⠸ | 4 | Simple PEC soil calculations
⠼ | 5 | Simple PEC soil calculations
⠴ | 6 | Simple PEC soil calculations
⠦ | 7 | Simple PEC soil calculations
⠧ | 8 | Simple PEC soil calculations
⠇ | 9 | Simple PEC soil calculations
⠏ | 10 | Simple PEC soil calculations
⠋ | 11 | Simple PEC soil calculations
⠙ | 12 | Simple PEC soil calculations
⠹ | 13 | Simple PEC soil calculations
✔ | 13 | Simple PEC soil calculations
+
⠏ | 0 | Simple PEC surface water calculations with drift entry
⠋ | 1 | Simple PEC surface water calculations with drift entry
⠙ | 2 | Simple PEC surface water calculations with drift entry
✔ | 2 | Simple PEC surface water calculations with drift entry
+
⠏ | 0 | Create PELMO runs from psm files and execute them
⠋ | 1 | Create PELMO runs from psm files and execute them
⠙ | 2 | Create PELMO runs from psm files and execute them
⠹ | 3 | Create PELMO runs from psm files and execute them
⠸ | 4 | Create PELMO runs from psm files and execute them
⠼ | 5 | Create PELMO runs from psm files and execute them
⠴ | 6 | Create PELMO runs from psm files and execute them
⠦ | 7 | Create PELMO runs from psm files and execute them
⠧ | 8 | Create PELMO runs from psm files and execute them
⠇ | 9 | Create PELMO runs from psm files and execute them
⠏ | 10 | Create PELMO runs from psm files and execute them
⠋ | 11 | Create PELMO runs from psm files and execute them
⠙ | 12 | Create PELMO runs from psm files and execute them
⠹ | 13 | Create PELMO runs from psm files and execute them
⠸ | 14 | Create PELMO runs from psm files and execute them
⠼ | 15 | Create PELMO runs from psm files and execute them
⠴ | 16 | Create PELMO runs from psm files and execute them
⠦ | 17 | Create PELMO runs from psm files and execute them
⠧ | 18 | Create PELMO runs from psm files and execute them
⠇ | 19 | Create PELMO runs from psm files and execute them
⠏ | 20 | Create PELMO runs from psm files and execute them
⠋ | 21 | Create PELMO runs from psm files and execute them
⠙ | 22 | Create PELMO runs from psm files and execute them
⠹ | 23 | Create PELMO runs from psm files and execute them
⠸ | 24 | Create PELMO runs from psm files and execute them
⠼ | 25 | Create PELMO runs from psm files and execute them
⠴ | 26 | Create PELMO runs from psm files and execute them
⠦ | 27 | Create PELMO runs from psm files and execute them
⠧ | 28 | Create PELMO runs from psm files and execute them
⠇ | 29 | Create PELMO runs from psm files and execute them
⠏ | 30 | Create PELMO runs from psm files and execute them
⠋ | 31 | Create PELMO runs from psm files and execute them
⠙ | 32 | Create PELMO runs from psm files and execute them
⠹ | 33 | Create PELMO runs from psm files and execute them
⠸ | 34 | Create PELMO runs from psm files and execute them
⠼ | 35 | Create PELMO runs from psm files and execute them
⠴ | 36 | Create PELMO runs from psm files and execute them
⠦ | 37 | Create PELMO runs from psm files and execute them
⠧ | 38 | Create PELMO runs from psm files and execute them
⠇ | 39 | Create PELMO runs from psm files and execute them
⠏ | 40 | Create PELMO runs from psm files and execute them
⠋ | 41 | Create PELMO runs from psm files and execute them
⠙ | 42 | Create PELMO runs from psm files and execute them
⠹ | 43 | Create PELMO runs from psm files and execute them
⠸ | 44 | Create PELMO runs from psm files and execute them
⠼ | 45 | Create PELMO runs from psm files and execute them
⠴ | 46 | Create PELMO runs from psm files and execute them
⠦ | 47 | Create PELMO runs from psm files and execute them
⠧ | 48 | Create PELMO runs from psm files and execute them
⠇ | 49 | Create PELMO runs from psm files and execute them
⠏ | 50 | Create PELMO runs from psm files and execute them
⠋ | 51 | Create PELMO runs from psm files and execute them
⠙ | 52 | Create PELMO runs from psm files and execute them
⠹ | 53 | Create PELMO runs from psm files and execute them
⠸ | 54 | Create PELMO runs from psm files and execute them
⠼ | 55 | Create PELMO runs from psm files and execute them
⠴ | 56 | Create PELMO runs from psm files and execute them
⠦ | 57 | Create PELMO runs from psm files and execute them
⠧ | 58 | Create PELMO runs from psm files and execute them
⠇ | 59 | Create PELMO runs from psm files and execute them
⠏ | 60 | Create PELMO runs from psm files and execute them
⠋ | 61 | Create PELMO runs from psm files and execute them
⠙ | 62 | Create PELMO runs from psm files and execute them
⠹ | 63 | Create PELMO runs from psm files and execute them
⠸ | 64 | Create PELMO runs from psm files and execute them
⠼ | 65 | Create PELMO runs from psm files and execute them
⠴ | 66 | Create PELMO runs from psm files and execute them
⠦ | 67 | Create PELMO runs from psm files and execute them
⠧ | 68 | Create PELMO runs from psm files and execute them
⠇ | 69 | Create PELMO runs from psm files and execute them
⠏ | 70 | Create PELMO runs from psm files and execute them
⠋ | 71 | Create PELMO runs from psm files and execute them
⠙ | 72 | Create PELMO runs from psm files and execute them
⠹ | 73 | Create PELMO runs from psm files and execute them
⠸ | 74 | Create PELMO runs from psm files and execute them
⠼ | 75 | Create PELMO runs from psm files and execute them
⠴ | 76 | Create PELMO runs from psm files and execute them
⠦ | 77 | Create PELMO runs from psm files and execute them
⠧ | 78 | Create PELMO runs from psm files and execute them
⠇ | 79 | Create PELMO runs from psm files and execute them
⠏ | 80 | Create PELMO runs from psm files and execute them
⠋ | 81 | Create PELMO runs from psm files and execute them
⠙ | 82 | Create PELMO runs from psm files and execute them
⠹ | 83 | Create PELMO runs from psm files and execute them
⠸ | 84 | Create PELMO runs from psm files and execute them
⠼ | 85 | Create PELMO runs from psm files and execute them
⠴ | 86 | Create PELMO runs from psm files and execute them
⠦ | 87 | Create PELMO runs from psm files and execute them
⠧ | 88 | Create PELMO runs from psm files and execute them
⠇ | 89 | Create PELMO runs from psm files and execute them
⠏ | 90 | Create PELMO runs from psm files and execute them
⠋ | 91 | Create PELMO runs from psm files and execute them
⠙ | 92 | Create PELMO runs from psm files and execute them
⠹ | 93 | Create PELMO runs from psm files and execute them
⠸ | 94 | Create PELMO runs from psm files and execute them
⠼ | 95 | Create PELMO runs from psm files and execute them
⠴ | 96 | Create PELMO runs from psm files and execute them
⠦ | 97 | Create PELMO runs from psm files and execute them
⠧ | 98 | Create PELMO runs from psm files and execute them
⠇ | 99 | Create PELMO runs from psm files and execute them
⠏ | 100 | Create PELMO runs from psm files and execute them
⠋ | 101 | Create PELMO runs from psm files and execute them
⠙ | 102 | Create PELMO runs from psm files and execute them
⠹ | 103 | Create PELMO runs from psm files and execute them
⠸ | 104 | Create PELMO runs from psm files and execute them
⠼ | 105 | Create PELMO runs from psm files and execute them
⠴ | 106 | Create PELMO runs from psm files and execute them
⠦ | 107 | Create PELMO runs from psm files and execute them
⠧ | 108 | Create PELMO runs from psm files and execute them
⠇ | 109 | Create PELMO runs from psm files and execute them
⠏ | 110 | Create PELMO runs from psm files and execute them
⠋ | 111 | Create PELMO runs from psm files and execute them
⠙ | 112 | Create PELMO runs from psm files and execute them
⠹ | 113 | Create PELMO runs from psm files and execute them
⠸ | 114 | Create PELMO runs from psm files and execute them
⠼ | 115 | Create PELMO runs from psm files and execute them
⠴ | 116 | Create PELMO runs from psm files and execute them
⠦ | 117 | Create PELMO runs from psm files and execute them
⠧ | 118 | Create PELMO runs from psm files and execute them
⠇ | 119 | Create PELMO runs from psm files and execute them
⠏ | 120 | Create PELMO runs from psm files and execute them
⠋ | 121 | Create PELMO runs from psm files and execute them
⠙ | 122 | Create PELMO runs from psm files and execute them
⠹ | 123 | Create PELMO runs from psm files and execute them
⠸ | 124 | Create PELMO runs from psm files and execute them
⠼ | 125 | Create PELMO runs from psm files and execute them
⠴ | 126 | Create PELMO runs from psm files and execute them
⠦ | 127 | Create PELMO runs from psm files and execute them
⠧ | 128 | Create PELMO runs from psm files and execute them
⠇ | 129 | Create PELMO runs from psm files and execute them
⠏ | 130 | Create PELMO runs from psm files and execute them
⠋ | 131 | Create PELMO runs from psm files and execute them
⠙ | 132 | Create PELMO runs from psm files and execute them
⠹ | 133 | Create PELMO runs from psm files and execute them
⠸ | 134 | Create PELMO runs from psm files and execute them
⠼ | 135 | Create PELMO runs from psm files and execute them
⠴ | 136 | Create PELMO runs from psm files and execute them
⠦ | 137 | Create PELMO runs from psm files and execute them
⠧ | 138 | Create PELMO runs from psm files and execute them
⠇ | 139 | Create PELMO runs from psm files and execute them
⠏ | 140 | Create PELMO runs from psm files and execute them
⠋ | 141 | Create PELMO runs from psm files and execute them
⠙ | 142 | Create PELMO runs from psm files and execute them
⠹ | 143 | Create PELMO runs from psm files and execute them
⠸ | 144 | Create PELMO runs from psm files and execute them
⠼ | 145 | Create PELMO runs from psm files and execute them
⠴ | 146 | Create PELMO runs from psm files and execute them
⠦ | 147 | Create PELMO runs from psm files and execute them
⠧ | 148 | Create PELMO runs from psm files and execute them
⠇ | 149 | Create PELMO runs from psm files and execute them
⠏ | 150 | Create PELMO runs from psm files and execute them
⠋ | 151 | Create PELMO runs from psm files and execute them
⠙ | 152 | Create PELMO runs from psm files and execute them
⠹ | 153 | Create PELMO runs from psm files and execute them
⠸ | 154 | Create PELMO runs from psm files and execute them
⠼ | 155 | Create PELMO runs from psm files and execute them
⠴ | 156 | Create PELMO runs from psm files and execute them
⠦ | 157 | Create PELMO runs from psm files and execute them
⠧ | 158 | Create PELMO runs from psm files and execute them
⠇ | 159 | Create PELMO runs from psm files and execute them
⠏ | 160 | Create PELMO runs from psm files and execute them
⠋ | 161 | Create PELMO runs from psm files and execute them
⠙ | 162 | Create PELMO runs from psm files and execute them
⠹ | 163 | Create PELMO runs from psm files and execute them
⠸ | 164 | Create PELMO runs from psm files and execute them
⠼ | 165 | Create PELMO runs from psm files and execute them
⠴ | 166 | Create PELMO runs from psm files and execute them
⠦ | 167 | Create PELMO runs from psm files and execute them
⠧ | 168 | Create PELMO runs from psm files and execute them
⠇ | 169 | Create PELMO runs from psm files and execute them
⠏ | 170 | Create PELMO runs from psm files and execute them
⠋ | 171 | Create PELMO runs from psm files and execute them
⠙ | 172 | Create PELMO runs from psm files and execute them
⠹ | 173 | Create PELMO runs from psm files and execute them
⠸ | 174 | Create PELMO runs from psm files and execute them
⠼ | 175 | Create PELMO runs from psm files and execute them
⠴ | 176 | Create PELMO runs from psm files and execute them
⠦ | 177 | Create PELMO runs from psm files and execute them
⠧ | 178 | Create PELMO runs from psm files and execute them
⠇ | 179 | Create PELMO runs from psm files and execute them
⠏ | 180 | Create PELMO runs from psm files and execute them
⠋ | 181 | Create PELMO runs from psm files and execute them
⠙ | 182 | Create PELMO runs from psm files and execute them
⠹ | 183 | Create PELMO runs from psm files and execute them
⠸ | 184 | Create PELMO runs from psm files and execute them
⠼ | 185 | Create PELMO runs from psm files and execute them
⠴ | 186 | Create PELMO runs from psm files and execute them
⠦ | 187 | Create PELMO runs from psm files and execute them
⠧ | 188 | Create PELMO runs from psm files and execute them
⠇ | 189 | Create PELMO runs from psm files and execute them
⠏ | 190 | Create PELMO runs from psm files and execute them
⠋ | 191 | Create PELMO runs from psm files and execute them
⠙ | 192 | Create PELMO runs from psm files and execute them
⠹ | 193 | Create PELMO runs from psm files and execute them
⠸ | 194 | Create PELMO runs from psm files and execute them
⠼ | 195 | Create PELMO runs from psm files and execute them
⠴ | 196 | Create PELMO runs from psm files and execute them
⠦ | 197 | Create PELMO runs from psm files and execute them
⠧ | 198 | Create PELMO runs from psm files and execute them
⠇ | 199 | Create PELMO runs from psm files and execute them
⠏ | 200 | Create PELMO runs from psm files and execute them
⠋ | 201 | Create PELMO runs from psm files and execute them
⠙ | 202 | Create PELMO runs from psm files and execute them
⠹ | 203 | Create PELMO runs from psm files and execute them
⠸ | 204 | Create PELMO runs from psm files and execute them
⠼ | 205 | Create PELMO runs from psm files and execute them
⠴ | 206 | Create PELMO runs from psm files and execute them
⠦ | 207 | Create PELMO runs from psm files and execute them
⠧ | 208 | Create PELMO runs from psm files and execute them
⠇ | 209 | Create PELMO runs from psm files and execute them
⠏ | 210 | Create PELMO runs from psm files and execute them
⠋ | 211 | Create PELMO runs from psm files and execute them
⠙ | 212 | Create PELMO runs from psm files and execute them
⠹ | 213 | Create PELMO runs from psm files and execute them
⠸ | 214 | Create PELMO runs from psm files and execute them
⠼ | 215 | Create PELMO runs from psm files and execute them
⠴ | 216 | Create PELMO runs from psm files and execute them
⠦ | 217 | Create PELMO runs from psm files and execute them
⠧ | 218 | Create PELMO runs from psm files and execute them
⠇ | 219 | Create PELMO runs from psm files and execute them
✔ | 219 | Create PELMO runs from psm files and execute them [73.9 s]
+
⠏ | 0 | Actual and time weighted average concentrations for SFO kinetics
⠋ | 1 | Actual and time weighted average concentrations for SFO kinetics
✔ | 1 | Actual and time weighted average concentrations for SFO kinetics
+
⠏ | 0 | FOCUS Step 1 calculations
⠋ | 1 | FOCUS Step 1 calculations
⠙ | 2 | FOCUS Step 1 calculations
⠹ | 3 | FOCUS Step 1 calculations
⠸ | 4 | FOCUS Step 1 calculations
⠼ | 5 | FOCUS Step 1 calculations
⠴ | 6 | FOCUS Step 1 calculations
⠦ | 7 | FOCUS Step 1 calculations
⠧ | 8 | FOCUS Step 1 calculations
⠇ | 9 | FOCUS Step 1 calculations
✔ | 9 | FOCUS Step 1 calculations [0.1 s]
+
⠏ | 0 | FOCUS Steps 12 input files
⠋ | 1 | FOCUS Steps 12 input files
⠙ | 2 | FOCUS Steps 12 input files
⠹ | 3 | FOCUS Steps 12 input files
⠸ | 4 | FOCUS Steps 12 input files
⠼ | 5 | FOCUS Steps 12 input files
⠴ | 6 | FOCUS Steps 12 input files
⠦ | 7 | FOCUS Steps 12 input files
⠧ | 8 | FOCUS Steps 12 input files
✔ | 8 | FOCUS Steps 12 input files
+
⠏ | 0 | Read and analyse TOXSWA cwa files
⠋ | 1 | Read and analyse TOXSWA cwa files
⠙ | 2 | Read and analyse TOXSWA cwa files
⠹ | 3 | Read and analyse TOXSWA cwa files
⠸ | 4 | Read and analyse TOXSWA cwa files
⠼ | 5 | Read and analyse TOXSWA cwa files
⠴ | 6 | Read and analyse TOXSWA cwa files
⠦ | 7 | Read and analyse TOXSWA cwa files
✔ | 7 | Read and analyse TOXSWA cwa files [3.6 s]
+
⠏ | 0 | UK drainage PEC calculations
⠋ | 1 | UK drainage PEC calculations
⠙ | 2 | UK drainage PEC calculations
⠹ | 3 | UK drainage PEC calculations
⠸ | 4 | UK drainage PEC calculations
⠼ | 5 | UK drainage PEC calculations
⠴ | 6 | UK drainage PEC calculations
⠦ | 7 | UK drainage PEC calculations
⠧ | 8 | UK drainage PEC calculations
⠇ | 9 | UK drainage PEC calculations
⠏ | 10 | UK drainage PEC calculations
⠋ | 11 | UK drainage PEC calculations
⠙ | 12 | UK drainage PEC calculations
✔ | 12 | UK drainage PEC calculations
-DONE ===============================================================================================
+══ Results ═════════════════════════════════════════════════════════════════════════════════════════
+Duration: 78.9 s
+
+OK: 282
+Failed: 0
+Warnings: 0
+Skipped: 0
diff --git a/tests/testthat/test_PEC_soil.R b/tests/testthat/test_PEC_soil.R
index 0661a52..34b4749 100644
--- a/tests/testthat/test_PEC_soil.R
+++ b/tests/testthat/test_PEC_soil.R
@@ -1,4 +1,5 @@
library(pfm)
+library(testthat)
context("Simple PEC soil calculations")
test_that("PEC_soil calculates correctly", {
@@ -6,40 +7,73 @@ test_that("PEC_soil calculates correctly", {
expect_equal(as.numeric(PEC_soil(100)), 0.1 * 4/3)
# or 0.1 mg/kg assuming 25% interception
- expect_equal(as.numeric(PEC_soil(100, interception = 0.25)), 0.1)
+ expect_equal(as.numeric(PEC_soil(100, interception = 0.25)), 0.1)
# Mixing depth of 1 cm gives five-fold PEC
expect_equal(as.numeric(PEC_soil(100, interception = 0.25, mixing_depth = 1)), 0.5)
})
-test_that("Tier 1 PEC soil example for Pesticide A in EFSA guidance can be reproduced", {
+test_that("Tier 1 PEC soil example for Pesticide A in EFSA guidance from 2017 can be reproduced", {
# Calculate total soil concentrations for tier 1 scenarios
- results_pfm <- PEC_soil(1000, interval = 365, DT50 = 250, t_avg = c(0, 21),
- scenarios = "EFSA_2015")
+ # Leaching is calculated from the 5 cm layer to be able to reproduce the
+ # results from the guidance
+ results_pfm_2017 <- PEC_soil(1000, interval = 365, DT50 = 250, t_avg = c(0, 21),
+ scenarios = "EFSA_2017", Kom = 1000,
+ leaching_depth = 5)
+
+ # From Table G.2, p. 92
+ results_guidance_2017 <- matrix(c(18.6, 13.0, 9.9, 18.2, 12.7, 9.6),
+ ncol = 3, byrow = TRUE)
+ dimnames(results_guidance_2017) <- list(t_avg = c(0, 21),
+ scenario = c("CTN", "CTC", "CTS"))
+
+
+ expect_equal(round(results_pfm_2017, 1)[1, ], results_guidance_2017[1, ])
+ # I do not get the same TWA concentrations as in the 2017 guidance on p. 92
+
+ # Calculate porewater soil concentrations for tier 1 scenarios
+ results_pfm_pw_2017 <- PEC_soil(1000, interval = 365, DT50 = 250, t_av = c(0, 21),
+ Kom = 1000, scenarios = "EFSA_2017", porewater = TRUE,
+ leaching_depth = 5)
# From Table I.5, p. 80
- results_guidance <- matrix(c(22.0, 11.5, 9.1, 21.8, 11.4, 9.0),
- ncol = 3, byrow = TRUE)
- dimnames(results_guidance) <- list(t_avg = c(0, 21),
- scenario = c("CTN", "CTC", "CTS"))
+ results_guidance_pw_2017 <- matrix(c(0.48, 0.60, 0.91, 0.47, 0.58, 0.86),
+ ncol = 3, byrow = TRUE)
+ dimnames(results_guidance_pw_2017) <- list(t_avg = c(0, 21),
+ scenario = c("CLN", "CLC", "CLS"))
+ expect_equal(round(results_pfm_pw_2017, 2)[1, ], results_guidance_pw_2017[1, ])
+ # Here I also do not get the same TWA concentrations as in the guidance p. 92
+})
+
+test_that("Tier 1 PEC soil example for Pesticide A in EFSA guidance from 2015 can be reproduced", {
+ # Calculate total soil concentrations for tier 1 scenarios
+ results_pfm_2015 <- PEC_soil(1000, interval = 365, DT50 = 250, t_avg = c(0, 21),
+ scenarios = "EFSA_2015")
+
+ # From Table I.5, p. 80
+ results_guidance_2015 <- matrix(c(22.0, 11.5, 9.1, 21.8, 11.4, 9.0),
+ ncol = 3, byrow = TRUE)
+ dimnames(results_guidance_2015) <- list(t_avg = c(0, 21),
+ scenario = c("CTN", "CTC", "CTS"))
- expect_equal(round(results_pfm, 1), results_guidance)
+
+ expect_equal(round(results_pfm_2015, 1), results_guidance_2015)
# Calculate porewater soil concentrations for tier 1 scenarios
- results_pfm_pw <- PEC_soil(1000, interval = 365, DT50 = 250, t_av = c(0, 21),
- Kom = 1000, scenarios = "EFSA_2015", porewater = TRUE)
+ results_pfm_pw_2015 <- PEC_soil(1000, interval = 365, DT50 = 250, t_av = c(0, 21),
+ Kom = 1000, scenarios = "EFSA_2015", porewater = TRUE)
# From Table I.5, p. 80
- results_guidance_pw <- matrix(c(0.76, 0.67, 0.91, 0.75, 0.66, 0.90),
- ncol = 3, byrow = TRUE)
- dimnames(results_guidance_pw) <- list(t_avg = c(0, 21),
- scenario = c("CLN", "CLC", "CLS"))
+ results_guidance_pw_2015 <- matrix(c(0.76, 0.67, 0.91, 0.75, 0.66, 0.90),
+ ncol = 3, byrow = TRUE)
+ dimnames(results_guidance_pw_2015) <- list(t_avg = c(0, 21),
+ scenario = c("CLN", "CLC", "CLS"))
- expect_equal(round(results_pfm_pw, 2), results_guidance_pw)
+ expect_equal(round(results_pfm_pw_2015, 2), results_guidance_pw_2015)
})
-test_that("Tier 1 PEC soil example for Pesticide F in EFSA guidance can be reproduced", {
+test_that("Tier 1 PEC soil example for Pesticide F in EFSA guidance from 2015 can be reproduced", {
# Parent F
# Calculate total and porewater soil concentrations for tier 1 scenarios
results_pfm <- PEC_soil(1000, interval = 365, DT50 = 25, t_avg = c(0, 21),
diff --git a/tests/testthat/test_PELMO.R b/tests/testthat/test_PELMO.R
index be0b410..49c03d3 100644
--- a/tests/testthat/test_PELMO.R
+++ b/tests/testthat/test_PELMO.R
@@ -45,6 +45,7 @@ test_that("PELMO runs are correctly set up", {
}
# Prepare runs in analogy to the test archive
+ skip_on_cran()
PELMO_runs(runs, psm_dir = PELMO_base, execute = FALSE, evaluate = FALSE, overwrite = TRUE)
# Check that input files are correctly generated in the right location
@@ -70,6 +71,7 @@ test_that("PELMO runs can be run and give the expected result files", {
skip("A wine installation is needed for this test")
}
+ skip_on_cran()
run_PELMO(runs, cores = 7)
plm_files <- c("CHEM.PLM", "ECHO.PLM",
@@ -89,8 +91,12 @@ test_that("PELMO runs can be run and give the expected result files", {
new <- readLines(file.path(PELMO_base, "FOCUS", pp, plm))
test <- readLines(file.path(test_dir, pp, plm))
+ # Don't check for differences in the PESTICIDE BALANCE ERROR
+ pest_balance_error <- suppressWarnings(grep("PESTICIDE BALANCE ERROR", new))
+ # Suppress warnings about invalid strings in this locale caused by the files
+
# Check if the ouput files are correctly reproduced
- expect_identical(new, test)
+ expect_identical(new[!pest_balance_error], test[!pest_balance_error])
}
}
}
@@ -105,6 +111,7 @@ test_that("PELMO runs are correctly evaluated", {
skip("A wine installation is needed for this test")
}
+ skip_on_cran()
# Check that if output is the same as in the test archive
for (run in runs) {
psm <- run$psm
@@ -164,6 +171,7 @@ test_that("PECgw from FOCUS summary files can be reproduced", {
if (!wine_installed) {
skip("A wine installation is needed for this test")
}
+ skip_on_cran()
focus_summary <- list()
for (run in runs) {
diff --git a/tests/testthat/test_TOXSWA.R b/tests/testthat/test_TOXSWA.R
index 7c9a73c..de60d48 100644
--- a/tests/testthat/test_TOXSWA.R
+++ b/tests/testthat/test_TOXSWA.R
@@ -1,26 +1,23 @@
library(pfm)
context("Read and analyse TOXSWA cwa files")
-zipfile_test = system.file("testdata/SwashProjects.zip", package = "pfm")
-basedir_test = "SwashProjects/project_H_sw/TOXSWA"
-
-H_sw_D4_pond <- read.TOXSWA_cwa("00001p_pa.cwa",
- basedir = basedir_test,
- zipfile = zipfile_test)
-
-H_sw_R1_stream <- read.TOXSWA_cwa("00003s_pa.cwa",
- basedir = basedir_test,
- zipfile = zipfile_test)
+# zipfile_test = tempfile()
+# download.file("https://cgit.jrwb.de/pfm/plain/inst/testdata/SwashProjects.zip", zipfile_test)
+zipfile_test <- system.file("testdata/SwashProjects.zip", package = "pfm")
+basedir_test = "SwashProjects/project_H_sw/TOXSWA" # cwa files from TOXSWA 3.x
+# .out file produced with TOXSWA 4.4.2
basedir_test_2 = "SwashProjects/Project_1/TOXSWA"
-EXSW2_R1_stream <- read.TOXSWA_cwa("3.out",
- basedir = basedir_test_2,
- zipfile = zipfile_test)
-
+H_sw_D4_pond <- read.TOXSWA_cwa("00001p_pa.cwa",
+ basedir = basedir_test,
+ zipfile = zipfile_test)
+H_sw_R1_stream <- read.TOXSWA_cwa("00003s_pa.cwa",
+ basedir = basedir_test,
+ zipfile = zipfile_test)
-test_that("TOXSWA cwa file is correctly read and printed", {
+test_that("Old TOXSWA cwa and out files are correctly read and printed", {
# This was the setting when printing the output into text files
options(width = 100)
@@ -37,15 +34,31 @@ test_that("TOXSWA cwa file is correctly read and printed", {
# The basedir is not printed, therefore tested separately
expect_equal(H_sw_D4_pond$basedir, basedir_test)
+
+ EXSW2_R1_stream <- read.TOXSWA_cwa("3.out",
+ basedir = basedir_test_2,
+ zipfile = zipfile_test)
EXSW2_R1_stream_printed <- capture.output(print(EXSW2_R1_stream))
expect_equal(EXSW2_R1_stream_printed, readLines("EXSW2_R1_stream_printed.txt"))
+})
- # The basedir is not printed, therefore tested separately
- expect_equal(H_sw_D4_pond$basedir, basedir_test)
+test_that("A TOXSWA 5.5.3 out file is correctly read and printed", {
+ # zipfile_test_3 = tempfile()
+ # download.file("https://cgit.jrwb.de/pfm/plain/inst/testdata/SwashProjects_TOXSWA_553.zip",
+ # zipfile_test_3)
+ zipfile_test_3 <- system.file("testdata/SwashProjects_TOXSWA_553.zip", package = "pfm")
+ basedir_test_3 = "SwashProjects/Project_1/TOXSWA"
+
+ EXSW2_R1_stream_TOXSWA_553 <- read.TOXSWA_cwa("3.out",
+ basedir = basedir_test_3,
+ zipfile = zipfile_test_3)
+ EXSW2_R1_stream_printed_TOXSWA_553 <- capture.output(print(EXSW2_R1_stream_TOXSWA_553))
+
+ # We actually get the same results, at least judged by the printed object
+ expect_equal(EXSW2_R1_stream_printed_TOXSWA_553, readLines("EXSW2_R1_stream_printed.txt"))
})
test_that("Getting events and moving window analysis works", {
-
# Event analysis with two different thresholds
H_sw_R1_stream$get_events(c(2, 10))
expect_equal_to_reference(H_sw_R1_stream$events, file = "H_sw_R1_stream_events.rds")
--
cgit v1.2.1
From 22b36c824fe5e1561868a649216fe079c6fbfb85 Mon Sep 17 00:00:00 2001
From: Johannes Ranke The easiest way to install the package is probably to use drat:
+The easiest way to install the package is probably to use drat:
install.packages("drat")
drat::addRepo("jranke")
install.packages("pfm")
This is a basic calculation of a contaminant concentration in bulk soil -based on complete, instantaneous mixing. If an interval is given, an +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 for example in the PPR panel opinion (EFSA 2012).
+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, chent = NA, DT50 = NA, + n_periods = Inf, tillage_depth = 20, leaching_depth = tillage_depth, + crop = "annual", cultivation = FALSE, chent = NA, DT50 = NA, Koc = NA, Kom = Koc/1.724, t_avg = 0, scenarios = c("default", - "EFSA_2015"), porewater = FALSE)+ "EFSA_2017", "EFSA_2015"), leaching = scenarios == "EFSA_2017", + porewater = FALSE)
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 + | An optional chent object holding substance specific information. Can also be a name for the substance as a character string |
leaching | +Should leaching be taken into account? The default is FALSE, +except when the EFSA_2017 scenarios are used. |
|
porewater | @@ -212,14 +240,24 @@ p. 13).Actual and maximum moving window time average concentrations for SFO kinetics |
+ |
+ + | +Actual and maximum moving window time average concentrations for FOMC kinetics |
|
Properties of the predefined scenarios from the EFSA guidance from 2015 |
+ ||
+ + | +Properties of the predefined scenarios from the EFSA guidance from 2017 |
|