The R package pfm provides some utilities for fate modelling, including dealing with FOCUS pesticide fate modelling tools, (currently only TOXSWA cwa and out files), made available under the GNU public license. This means:
-
This program is free software:you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation, either version 3 of the License, or (at your option) any later
-version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
-details.
-
-You should have received a copy of the GNU General Public License along with
-this program. If not, see <http://www.gnu.org/licenses/>
Alternatively you can install the package using the devtools package. Using quick = TRUE skips docs, multiple-architecture builds, demos, and vignettes.
@@ -153,8 +153,9 @@ and in the EFSA guidance on PEC soil calculations (EFSA, 2015, 2017).
interval
-
Period of the deeper mixing, defaults to 365, which is a year if
-degradation rate units are in days
+
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
@@ -168,7 +169,7 @@ degradation rate units are in days
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
+takes place. By default, losses from the layer down to the tillage
depth are taken into account in this implementation.
@@ -193,6 +194,13 @@ also be a name for the substance as a character string
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
@@ -255,7 +263,7 @@ from 2017 (p. 92).
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
+ (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
diff --git a/docs/reference/PEC_sw_drainage_UK.html b/docs/reference/PEC_sw_drainage_UK.html
index e183ae2..80dd7fa 100644
--- a/docs/reference/PEC_sw_drainage_UK.html
+++ b/docs/reference/PEC_sw_drainage_UK.html
@@ -62,7 +62,7 @@ published on the CRC website" />
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/PEC_sw_drift.html b/docs/reference/PEC_sw_drift.html
index b5608db..f537d5d 100644
--- a/docs/reference/PEC_sw_drift.html
+++ b/docs/reference/PEC_sw_drift.html
@@ -63,7 +63,7 @@ with input via spray drift." />
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/PEC_sw_exposit_runoff.html b/docs/reference/PEC_sw_exposit_runoff.html
index 9fab616..b57c2f9 100644
--- a/docs/reference/PEC_sw_exposit_runoff.html
+++ b/docs/reference/PEC_sw_exposit_runoff.html
@@ -62,7 +62,7 @@ in the worksheet "Konzept Runoff". Calculation of sediment PEC values
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/PEC_sw_focus.html b/docs/reference/PEC_sw_focus.html
index 88f5b43..93d5d44 100644
--- a/docs/reference/PEC_sw_focus.html
+++ b/docs/reference/PEC_sw_focus.html
@@ -67,7 +67,7 @@ to be used with the FOCUS calculator." />
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/PEC_sw_sed.html b/docs/reference/PEC_sw_sed.html
index 01ccf29..28dae7c 100644
--- a/docs/reference/PEC_sw_sed.html
+++ b/docs/reference/PEC_sw_sed.html
@@ -64,7 +64,7 @@ PEC calculator" />
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/PELMO_path.html b/docs/reference/PELMO_path.html
index b390917..a67084c 100644
--- a/docs/reference/PELMO_path.html
+++ b/docs/reference/PELMO_path.html
@@ -61,7 +61,7 @@
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/PELMO_runs.html b/docs/reference/PELMO_runs.html
index 12a4244..2a75191 100644
--- a/docs/reference/PELMO_runs.html
+++ b/docs/reference/PELMO_runs.html
@@ -67,7 +67,7 @@ and run using wine." />
pfm
- 0.5.1
+ 0.5.2
@@ -229,7 +229,7 @@ the period.plm file generated by the FOCUS PELMO GUI.
#>
#>
# We get exactly the same PECgw values (on Linux, calling PELMO using Wine).print(time_1)
This was inspired by an answer on stackoverflow
+https://stackoverflow.com/a/717791
+
+
+
+
get_vertex(x, y)
+
+
+
+
+
Contents
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/reference/index.html b/docs/reference/index.html
index 12abbd4..d57bc84 100644
--- a/docs/reference/index.html
+++ b/docs/reference/index.html
@@ -58,7 +58,7 @@
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/max_twa.html b/docs/reference/max_twa.html
index c603fb4..838b00f 100644
--- a/docs/reference/max_twa.html
+++ b/docs/reference/max_twa.html
@@ -65,7 +65,7 @@ max_twa." />
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/one_box.html b/docs/reference/one_box.html
index f3a6324..78daced 100644
--- a/docs/reference/one_box.html
+++ b/docs/reference/one_box.html
@@ -61,7 +61,7 @@
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/perc_runoff_exposit.html b/docs/reference/perc_runoff_exposit.html
index 2c7dd2a..2899a26 100644
--- a/docs/reference/perc_runoff_exposit.html
+++ b/docs/reference/perc_runoff_exposit.html
@@ -61,7 +61,7 @@
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/perc_runoff_reduction_exposit.html b/docs/reference/perc_runoff_reduction_exposit.html
index 9a8f10a..865f1cf 100644
--- a/docs/reference/perc_runoff_reduction_exposit.html
+++ b/docs/reference/perc_runoff_reduction_exposit.html
@@ -61,7 +61,7 @@
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/pesticide.txt b/docs/reference/pesticide.txt
index 1f9181a..e524f3c 100644
--- a/docs/reference/pesticide.txt
+++ b/docs/reference/pesticide.txt
@@ -41,3 +41,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 16df913..e09eff8 100644
--- a/docs/reference/pfm_degradation.html
+++ b/docs/reference/pfm_degradation.html
@@ -61,7 +61,7 @@
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/plot.TOXSWA_cwa.html b/docs/reference/plot.TOXSWA_cwa.html
index 65703e8..6a98359 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." />
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/plot.one_box.html b/docs/reference/plot.one_box.html
index 473243a..6081c71 100644
--- a/docs/reference/plot.one_box.html
+++ b/docs/reference/plot.one_box.html
@@ -61,7 +61,7 @@
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/read.TOXSWA_cwa.html b/docs/reference/read.TOXSWA_cwa.html
index 5f6aba2..2f036de 100644
--- a/docs/reference/read.TOXSWA_cwa.html
+++ b/docs/reference/read.TOXSWA_cwa.html
@@ -66,7 +66,7 @@ renamed to ConLiqWatLay in the out file." />
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/sawtooth.html b/docs/reference/sawtooth.html
index 87dcab2..128d1f9 100644
--- a/docs/reference/sawtooth.html
+++ b/docs/reference/sawtooth.html
@@ -63,7 +63,7 @@ times, with an interval i." />
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/soil_scenario_data_EFSA_2015.html b/docs/reference/soil_scenario_data_EFSA_2015.html
index 23fe106..7565ef7 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." />
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/soil_scenario_data_EFSA_2017.html b/docs/reference/soil_scenario_data_EFSA_2017.html
index be49263..21bf797 100644
--- a/docs/reference/soil_scenario_data_EFSA_2017.html
+++ b/docs/reference/soil_scenario_data_EFSA_2017.html
@@ -63,7 +63,7 @@ scenario and model adjustment factors from p. 16 and p. 18 are included." />
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/sum_periods.html b/docs/reference/sum_periods.html
index 109d9e7..45d35c4 100644
--- a/docs/reference/sum_periods.html
+++ b/docs/reference/sum_periods.html
@@ -61,7 +61,7 @@
pfm
- 0.5.1
+ 0.5.2
diff --git a/docs/reference/twa.html b/docs/reference/twa.html
index f74399c..f493a29 100644
--- a/docs/reference/twa.html
+++ b/docs/reference/twa.html
@@ -63,7 +63,7 @@ is after one window has passed." />
pfm
- 0.5.1
+ 0.5.2
diff --git a/man/PEC_FOMC_accu_rel.Rd b/man/PEC_FOMC_accu_rel.Rd
new file mode 100644
index 0000000..ab0ddd9
--- /dev/null
+++ b/man/PEC_FOMC_accu_rel.Rd
@@ -0,0 +1,21 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/PEC_soil.R
+\name{PEC_FOMC_accu_rel}
+\alias{PEC_FOMC_accu_rel}
+\title{Get the relative accumulation of an FOMC model over multiples of an interval}
+\usage{
+PEC_FOMC_accu_rel(n, interval, FOMC)
+}
+\arguments{
+\item{n}{number of applications}
+
+\item{interval}{Time between applications}
+
+\item{FOMC}{Named numeric vector containing the FOMC parameters alpha and beta}
+}
+\value{
+A numeric vector containing all n accumulation factors for the n applications
+}
+\description{
+Get the relative accumulation of an FOMC model over multiples of an interval
+}
diff --git a/man/PEC_soil.Rd b/man/PEC_soil.Rd
index c8c93ac..e85f33c 100644
--- a/man/PEC_soil.Rd
+++ b/man/PEC_soil.Rd
@@ -35,7 +35,7 @@ units are in days}
\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
+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
@@ -53,7 +53,7 @@ also be a name for the substance as a character string}
If DT50 is not specified here and not available from the chent object, zero
degradation is assumed}
-\item{FOMC}{If specified, it should be a named numeric vector containing
+\item{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}
@@ -111,7 +111,7 @@ 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
+ (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
diff --git a/man/get_vertex.Rd b/man/get_vertex.Rd
new file mode 100644
index 0000000..fe2f5c0
--- /dev/null
+++ b/man/get_vertex.Rd
@@ -0,0 +1,12 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/PEC_soil.R
+\name{get_vertex}
+\alias{get_vertex}
+\title{Fit a parabola through three points}
+\usage{
+get_vertex(x, y)
+}
+\description{
+This was inspired by an answer on stackoverflow
+https://stackoverflow.com/a/717791
+}
diff --git a/tests/testthat/test_PEC_soil.R b/tests/testthat/test_PEC_soil.R
index 34b4749..6e4e30b 100644
--- a/tests/testthat/test_PEC_soil.R
+++ b/tests/testthat/test_PEC_soil.R
@@ -127,3 +127,23 @@ test_that("Tier 1 PEC soil example for Pesticide F in EFSA guidance from 2015 ca
expect_equivalent(round(results_pfm, 2), results_guidance)
expect_equivalent(round(results_pfm_pw, 2), results_guidance_pw)
})
+
+test_that("Long term FOMC PEC soil from ESCAPE can be reproduced", {
+ # Application of 100 g/ha with 25% interception and FOMC degradation type a
+ fomc_50_a <- PEC_soil(100, interception = 0.25, FOMC = c(alpha = 1, beta = 10),
+ interval = 365, tillage_depth = 20, n_periods = 50)
+ fomc_long_a <- PEC_soil(100, interception = 0.25, FOMC = c(alpha = 1, beta = 10),
+ interval = 365, tillage_depth = 20)
+
+ # Application of 100 g/ha with 25% interception and FOMC degradation type b
+ # The long term PEC is much lower than when adding FOMC curves for 50 years
+ fomc_50_b <- PEC_soil(100, interception = 0.25, FOMC = c(alpha = 0.5, beta = 20),
+ interval = 365, tillage_depth = 20, n_periods = 50)
+ fomc_long_b <- PEC_soil(100, interception = 0.25, FOMC = c(alpha = 0.5, beta = 20),
+ interval = 365, tillage_depth = 20)
+
+ expect_true(fomc_50_b > fomc_long_b)
+
+ # The benchmark results were obtained with ESCAPE
+ expect_equivalent(round(fomc_long_b, 4), 0.1424)
+})
--
cgit v1.2.1