From 03bda75d343402dad99df2aad55611e11279b833 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 30 Jan 2017 18:04:53 +0100 Subject: Correct psm file in the example with metabolites --- ChangeLog | 15 + R/PELMO_runs.R | 30 +- README.md | 2 + docs/index.html | 1 + docs/reference/PELMO_path.html | 2 +- docs/reference/PELMO_runs.html | 75 ++++- inst/testdata/Pesticide_D.psm | 68 +++++ .../Pesticide_D_1_May_every_other_year_mets.psm | 336 +++++++++++++++++++++ .../Pesticide_D_1_day_pre_em_every_third_year.psm | 64 ++++ man/PELMO_runs.Rd | 27 +- 10 files changed, 613 insertions(+), 7 deletions(-) create mode 100644 inst/testdata/Pesticide_D.psm create mode 100644 inst/testdata/Pesticide_D_1_May_every_other_year_mets.psm create mode 100644 inst/testdata/Pesticide_D_1_day_pre_em_every_third_year.psm diff --git a/ChangeLog b/ChangeLog index 6923efa..9cb0481 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +commit 39d202b0a0f833c756bc98fb4961483de1b15353 +Author: Johannes Ranke +Date: 2017-01-30 16:14:15 +0100 + + Ignore windows binary builds in git and in R package + +commit e6bb9654679f43af6958d6e28cb5206abb91d574 +Author: Johannes Ranke +Date: 2017-01-30 16:10:30 +0100 + + Test reproducing the FOCUS Summary information + + generated from the FOCUS PELMO GUI, as copied into the text files + in the testdata directory. + commit 80b451ddb4e749041c2b216603274a012dc83d59 Author: Johannes Ranke Date: 2017-01-30 14:28:23 +0100 diff --git a/R/PELMO_runs.R b/R/PELMO_runs.R index 3d4f03b..e5a78ff 100644 --- a/R/PELMO_runs.R +++ b/R/PELMO_runs.R @@ -12,7 +12,7 @@ #' run directory, holding the results for all FOCUS periods, equivalent to #' the period.plm file generated by the FOCUS PELMO GUI. #' -#' @return If evaluate is TRUE, a list of lists of data frames holding the +#' @return If evaluate is TRUE, a list of lists of matrices holding the #' PEC data. #' @param runs A list of lists. Each inner lists has an element named 'psm' #' that holds the psm string, and elements named using three letter crop acronyms, @@ -29,7 +29,31 @@ #' @references PELMO.installeR \url{https://jranke.github.io/PELMO.installeR} #' #' Wine \url{https://winehq.org} +#' +#' PELMO test results \url{http://esdac.jrc.ec.europa.eu/public_path/projects_data/focus/gw/models/pelmo/test-results/test_results_FOCUS_PELMO_5_5_3.doc} #' @export +#' @examples +#' # Reproduce the official test results for annual application of Pesticide D +#' # to winter cereals at the day before emergence +#' runs_1 <- list( +#' list(psm = 'Pesticide_D', +#' win = c("Cha", "Ham", "Jok", "Kre", "Oke", "Pia", "Por", "Sev", "Thi")), +#' list(psm = 'Pesticide_D_1_day_pre_em_every_third_year', +#' pot = c("Cha", "Ham", "Jok", "Kre", "Oke", "Pia", "Por", "Sev", "Thi"))) +#' time_1 <- system.time( +#' PECgw_1 <- PELMO_runs(runs_1, psm_dir = system.file("testdata", package = "pfm"), +#' cores = 6, overwrite = TRUE) +#' ) +#' print(PECgw_1) +#' # We get exactly the same PECgw values (on Linux, calling PELMO using Wine). +#' print(time_1) +#' +#' # Demonstrate some results with metabolites. +#' runs_2 <- list(list(psm = 'Pesticide_D_1_May_every_other_year_mets', +#' win = c("Cha", "Ham", "Kre"))) +#' PECgw_2 <- PELMO_runs(runs_2, psm_dir = system.file("testdata", package = "pfm"), +#' cores = 3, overwrite = TRUE) +#' print(PECgw_2) PELMO_runs <- function(runs, psm_dir = ".", version = "5.5.3", PELMO_base = "auto", execute = TRUE, cores = getOption("mc.cores", 2L), evaluate = TRUE, overwrite = FALSE) @@ -142,13 +166,11 @@ PELMO_runs <- function(runs, psm_dir = ".", version = "5.5.3", PELMO_base = "aut # the exe file from this directory file.copy(file.path(PELMO_base, "lf90.eer"), run_dir) } - run_list[[7]] - setup_run(run_list[[7]]) lapply(run_list, setup_run) if (execute) { - run_PELMO(runs, version = version, PELMO_base = PELMO_base) + run_PELMO(runs, version = version, PELMO_base = PELMO_base, cores = cores) } if (evaluate) { diff --git a/README.md b/README.md index 3e7c869..98529e6 100644 --- a/README.md +++ b/README.md @@ -41,3 +41,5 @@ One recent nice example of the usage of this package is the visualisation of a time weighted average for a sawtooth curve obtained from several overlays of mkinfit predictions as shown [here](http://jranke.github.io/pfm/reference/plot.one_box.html). +Another, even more recent example shows how FOCUS PELMO can be run in parallel under Linux +as shown [here](http://jranke.github.io/pfm/reference/PELMO_runs.html). diff --git a/docs/index.html b/docs/index.html index db22eb0..0c53fe9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -75,6 +75,7 @@ this program. If not, see <http://www.gnu.org/license

Examples

One recent nice example of the usage of this package is the visualisation of a time weighted average for a sawtooth curve obtained from several overlays of mkinfit predictions as shown here.

+

Another, even more recent example shows how FOCUS PELMO can be run in parallel under Linux as shown here.

diff --git a/docs/reference/PELMO_path.html b/docs/reference/PELMO_path.html index 79aa89d..ab24341 100644 --- a/docs/reference/PELMO_path.html +++ b/docs/reference/PELMO_path.html @@ -73,7 +73,7 @@

Create a path of run directories as the PELMO GUI does

-
PELMO_path(psm, crop, scenario)
+
PELMO_path(psm, crop, scenario = NA)

Arguments

diff --git a/docs/reference/PELMO_runs.html b/docs/reference/PELMO_runs.html index 03b7b7b..e299b7c 100644 --- a/docs/reference/PELMO_runs.html +++ b/docs/reference/PELMO_runs.html @@ -112,20 +112,93 @@ as used in FOCUS_GW_scenarios_2012<
Should an existing run directories be overwritten
+

Value

+ +

If evaluate is TRUE, a list of lists of matrices holding the + PEC data.

+ +

Details

+ +

As a side effect, an R data file (period_pfm.rda) is generated in each +run directory, holding the results for all FOCUS periods, equivalent to +the period.plm file generated by the FOCUS PELMO GUI.

+

References

PELMO.installeR https://jranke.github.io/PELMO.installeR

Wine https://winehq.org

+

PELMO test results http://esdac.jrc.ec.europa.eu/public_path/projects_data/focus/gw/models/pelmo/test-results/test_results_FOCUS_PELMO_5_5_3.doc

+

Examples

+
# Reproduce the official test results for annual application of Pesticide D +# to winter cereals at the day before emergence +runs_1 <- list( + list(psm = 'Pesticide_D', + win = c("Cha", "Ham", "Jok", "Kre", "Oke", "Pia", "Por", "Sev", "Thi")), + list(psm = 'Pesticide_D_1_day_pre_em_every_third_year', + pot = c("Cha", "Ham", "Jok", "Kre", "Oke", "Pia", "Por", "Sev", "Thi"))) +time_1 <- system.time( + PECgw_1 <- PELMO_runs(runs_1, psm_dir = system.file("testdata", package = "pfm"), + cores = 6, overwrite = TRUE) +) +print(PECgw_1)
#> $Pesticide_D +#> $Pesticide_D$win +#> FOCUS DUMMY D +#> Cha 0.025 +#> Ham 1.621 +#> Jok 0.388 +#> Kre 0.467 +#> Oke 1.608 +#> Pia 0.848 +#> Por 2.386 +#> Sev 0.009 +#> Thi 0.030 +#> +#> +#> $Pesticide_D_1_day_pre_em_every_third_year +#> $Pesticide_D_1_day_pre_em_every_third_year$pot +#> FOCUS DUMMY D +#> Cha 0.010 +#> Ham 0.014 +#> Jok 0.009 +#> Kre 0.027 +#> Oke 0.085 +#> Pia 0.051 +#> Por 0.021 +#> Sev 0.000 +#> Thi 0.001 +#> +#>
# We get exactly the same PECgw values (on Linux, calling PELMO using Wine). +print(time_1)
#> User System verstrichen +#> 231.892 0.496 57.056
+# Demonstrate some results with metabolites. +runs_2 <- list(list(psm = 'Pesticide_D_1_May_every_other_year_mets', + win = c("Cha", "Ham", "Kre"))) +PECgw_2 <- PELMO_runs(runs_2, psm_dir = system.file("testdata", package = "pfm"), + cores = 3, overwrite = TRUE) +print(PECgw_2)
#> $Pesticide_D_1_May_every_other_year_mets +#> $Pesticide_D_1_May_every_other_year_mets$win +#> FOCUS DUMMY D M1 M2 +#> Cha 0.001 126.195 0.000 +#> Ham 0.054 82.196 0.001 +#> Kre 0.103 75.494 0.001 +#> +#>
diff --git a/inst/testdata/Pesticide_D.psm b/inst/testdata/Pesticide_D.psm new file mode 100644 index 0000000..8204f3c --- /dev/null +++ b/inst/testdata/Pesticide_D.psm @@ -0,0 +1,68 @@ + +Pesticide D, 1 day before emergence + + + 0 + + + 1 0 9 +026 +-01 00 01 1 0 0 0 0 +-01 00 02 1 0 0 0 0 +-01 00 03 1 0 0 0 0 +-01 00 04 1 0 0 0 0 +-01 00 05 1 0 0 0 0 +-01 00 06 1 0 0 0 0 +-01 00 07 1 0 0 0 0 +-01 00 08 1 0 0 0 0 +-01 00 09 1 0 0 0 0 +-01 00 10 1 0 0 0 0 +-01 00 11 1 0 0 0 0 +-01 00 12 1 0 0 0 0 +-01 00 13 1 0 0 0 0 +-01 00 14 1 0 0 0 0 +-01 00 15 1 0 0 0 0 +-01 00 16 1 0 0 0 0 +-01 00 17 1 0 0 0 0 +-01 00 18 1 0 0 0 0 +-01 00 19 1 0 0 0 0 +-01 00 20 1 0 0 0 0 +-01 00 21 1 0 0 0 0 +-01 00 22 1 0 0 0 0 +-01 00 23 1 0 0 0 0 +-01 00 24 1 0 0 0 0 +-01 00 25 1 0 0 0 0 +-01 00 26 1 0 0 0 0 + 1 + + 1 1 + + + + 3.33E-04 90 300 1.00E-04 0.0498 0.1 98400 20 + 6.67E-10 180 300 4.00E-04 0.0498 0.1 98400 30 + + + 0.5 + + + 0.00E+00 20 2 19 0 0 0 + 0.00E+00 20 2 19 0 0 0 + 0.00E+00 20 2 19 0 0 0 + 0.0346570 20 2.2 0 100 0.7 0
+ 0 <0 = degradation according to degradation factors, 1 = constant with depth,2 individual,3 = degradation according to degradation factors, 4 = constant with depth,5 individual, >2 deg in liquid phase only) + + + 0 500 0 0 0 0 0 0 0 0 + + + <% change> KOC2 pH2 f_neq kdes> + 60 0.9 -99 20 0 0 0 1 -99 -99 0 0 + + + + + diff --git a/inst/testdata/Pesticide_D_1_May_every_other_year_mets.psm b/inst/testdata/Pesticide_D_1_May_every_other_year_mets.psm new file mode 100644 index 0000000..cf91533 --- /dev/null +++ b/inst/testdata/Pesticide_D_1_May_every_other_year_mets.psm @@ -0,0 +1,336 @@ + +Pesticide D, 1 May C H every other year + + + 0 + + + 10 0 0 +022 +01 01 01 0 0 0 0 0 +01 01 02 0 0 0 0 0 +01 01 03 0 0 0 0 0 +01 01 04 0 0 0 0 0 +01 01 05 0 0 0 0 0 +01 01 06 0 0 0 0 0 +01 01 07 0 0 0 0 0 +01 01 08 0 0 0 0 0 +01 01 09 0 0 0 0 0 +01 01 10 0 0 0 0 0 +01 01 11 0 0 0 0 0 +01 01 12 0 0 0 0 0 +01 01 13 0 0 0 0 0 +01 01 14 0 0 0 0 0 +01 01 15 0 0 0 0 0 +01 01 16 0 0 0 0 0 +01 01 17 0 0 0 0 0 +01 01 18 0 0 0 0 0 +01 01 19 0 0 0 0 0 +01 01 20 0 0 0 0 0 +01 01 21 0 0 0 0 0 +01 01 22 0 0 0 0 0 +023 C +01 05 01 1 0 0 0 0 +01 05 03 1 0 0 0 0 +01 05 05 1 0 0 0 0 +01 05 07 1 0 0 0 0 +01 05 09 1 0 0 0 0 +01 05 11 1 0 0 0 0 +01 05 13 1 0 0 0 0 +01 05 15 1 0 0 0 0 +01 05 17 1 0 0 0 0 +01 05 19 1 0 0 0 0 +01 05 21 1 0 0 0 0 +01 05 23 1 0 0 0 0 +01 05 25 1 0 0 0 0 +01 05 27 1 0 0 0 0 +01 05 29 1 0 0 0 0 +01 05 31 1 0 0 0 0 +01 05 33 1 0 0 0 0 +01 05 35 1 0 0 0 0 +01 05 37 1 0 0 0 0 +01 05 39 1 0 0 0 0 +01 05 41 1 0 0 0 0 +01 05 43 1 0 0 0 0 +01 05 45 1 0 0 0 0 +023 H +01 05 01 1 0 0 0 0 +01 05 03 1 0 0 0 0 +01 05 05 1 0 0 0 0 +01 05 07 1 0 0 0 0 +01 05 09 1 0 0 0 0 +01 05 11 1 0 0 0 0 +01 05 13 1 0 0 0 0 +01 05 15 1 0 0 0 0 +01 05 17 1 0 0 0 0 +01 05 19 1 0 0 0 0 +01 05 21 1 0 0 0 0 +01 05 23 1 0 0 0 0 +01 05 25 1 0 0 0 0 +01 05 27 1 0 0 0 0 +01 05 29 1 0 0 0 0 +01 05 31 1 0 0 0 0 +01 05 33 1 0 0 0 0 +01 05 35 1 0 0 0 0 +01 05 37 1 0 0 0 0 +01 05 39 1 0 0 0 0 +01 05 41 1 0 0 0 0 +01 05 43 1 0 0 0 0 +01 05 45 1 0 0 0 0 +023 J +01 05 01 1 0 0 0 0 +01 05 03 1 0 0 0 0 +01 05 05 1 0 0 0 0 +01 05 07 1 0 0 0 0 +01 05 09 1 0 0 0 0 +01 05 11 1 0 0 0 0 +01 05 13 1 0 0 0 0 +01 05 15 1 0 0 0 0 +01 05 17 1 0 0 0 0 +01 05 19 1 0 0 0 0 +01 05 21 1 0 0 0 0 +01 05 23 1 0 0 0 0 +01 05 25 1 0 0 0 0 +01 05 27 1 0 0 0 0 +01 05 29 1 0 0 0 0 +01 05 31 1 0 0 0 0 +01 05 33 1 0 0 0 0 +01 05 35 1 0 0 0 0 +01 05 37 1 0 0 0 0 +01 05 39 1 0 0 0 0 +01 05 41 1 0 0 0 0 +01 05 43 1 0 0 0 0 +01 05 45 1 0 0 0 0 +023 K +01 05 01 1 0 0 0 0 +01 05 03 1 0 0 0 0 +01 05 05 1 0 0 0 0 +01 05 07 1 0 0 0 0 +01 05 09 1 0 0 0 0 +01 05 11 1 0 0 0 0 +01 05 13 1 0 0 0 0 +01 05 15 1 0 0 0 0 +01 05 17 1 0 0 0 0 +01 05 19 1 0 0 0 0 +01 05 21 1 0 0 0 0 +01 05 23 1 0 0 0 0 +01 05 25 1 0 0 0 0 +01 05 27 1 0 0 0 0 +01 05 29 1 0 0 0 0 +01 05 31 1 0 0 0 0 +01 05 33 1 0 0 0 0 +01 05 35 1 0 0 0 0 +01 05 37 1 0 0 0 0 +01 05 39 1 0 0 0 0 +01 05 41 1 0 0 0 0 +01 05 43 1 0 0 0 0 +01 05 45 1 0 0 0 0 +023 N +01 05 01 1 0 0 0 0 +01 05 03 1 0 0 0 0 +01 05 05 1 0 0 0 0 +01 05 07 1 0 0 0 0 +01 05 09 1 0 0 0 0 +01 05 11 1 0 0 0 0 +01 05 13 1 0 0 0 0 +01 05 15 1 0 0 0 0 +01 05 17 1 0 0 0 0 +01 05 19 1 0 0 0 0 +01 05 21 1 0 0 0 0 +01 05 23 1 0 0 0 0 +01 05 25 1 0 0 0 0 +01 05 27 1 0 0 0 0 +01 05 29 1 0 0 0 0 +01 05 31 1 0 0 0 0 +01 05 33 1 0 0 0 0 +01 05 35 1 0 0 0 0 +01 05 37 1 0 0 0 0 +01 05 39 1 0 0 0 0 +01 05 41 1 0 0 0 0 +01 05 43 1 0 0 0 0 +01 05 45 1 0 0 0 0 +023 P +01 05 01 1 0 0 0 0 +01 05 03 1 0 0 0 0 +01 05 05 1 0 0 0 0 +01 05 07 1 0 0 0 0 +01 05 09 1 0 0 0 0 +01 05 11 1 0 0 0 0 +01 05 13 1 0 0 0 0 +01 05 15 1 0 0 0 0 +01 05 17 1 0 0 0 0 +01 05 19 1 0 0 0 0 +01 05 21 1 0 0 0 0 +01 05 23 1 0 0 0 0 +01 05 25 1 0 0 0 0 +01 05 27 1 0 0 0 0 +01 05 29 1 0 0 0 0 +01 05 31 1 0 0 0 0 +01 05 33 1 0 0 0 0 +01 05 35 1 0 0 0 0 +01 05 37 1 0 0 0 0 +01 05 39 1 0 0 0 0 +01 05 41 1 0 0 0 0 +01 05 43 1 0 0 0 0 +01 05 45 1 0 0 0 0 +023 O +01 05 01 1 0 0 0 0 +01 05 03 1 0 0 0 0 +01 05 05 1 0 0 0 0 +01 05 07 1 0 0 0 0 +01 05 09 1 0 0 0 0 +01 05 11 1 0 0 0 0 +01 05 13 1 0 0 0 0 +01 05 15 1 0 0 0 0 +01 05 17 1 0 0 0 0 +01 05 19 1 0 0 0 0 +01 05 21 1 0 0 0 0 +01 05 23 1 0 0 0 0 +01 05 25 1 0 0 0 0 +01 05 27 1 0 0 0 0 +01 05 29 1 0 0 0 0 +01 05 31 1 0 0 0 0 +01 05 33 1 0 0 0 0 +01 05 35 1 0 0 0 0 +01 05 37 1 0 0 0 0 +01 05 39 1 0 0 0 0 +01 05 41 1 0 0 0 0 +01 05 43 1 0 0 0 0 +01 05 45 1 0 0 0 0 +023 S +01 05 01 1 0 0 0 0 +01 05 03 1 0 0 0 0 +01 05 05 1 0 0 0 0 +01 05 07 1 0 0 0 0 +01 05 09 1 0 0 0 0 +01 05 11 1 0 0 0 0 +01 05 13 1 0 0 0 0 +01 05 15 1 0 0 0 0 +01 05 17 1 0 0 0 0 +01 05 19 1 0 0 0 0 +01 05 21 1 0 0 0 0 +01 05 23 1 0 0 0 0 +01 05 25 1 0 0 0 0 +01 05 27 1 0 0 0 0 +01 05 29 1 0 0 0 0 +01 05 31 1 0 0 0 0 +01 05 33 1 0 0 0 0 +01 05 35 1 0 0 0 0 +01 05 37 1 0 0 0 0 +01 05 39 1 0 0 0 0 +01 05 41 1 0 0 0 0 +01 05 43 1 0 0 0 0 +01 05 45 1 0 0 0 0 +023 T +01 05 01 1 0 0 0 0 +01 05 03 1 0 0 0 0 +01 05 05 1 0 0 0 0 +01 05 07 1 0 0 0 0 +01 05 09 1 0 0 0 0 +01 05 11 1 0 0 0 0 +01 05 13 1 0 0 0 0 +01 05 15 1 0 0 0 0 +01 05 17 1 0 0 0 0 +01 05 19 1 0 0 0 0 +01 05 21 1 0 0 0 0 +01 05 23 1 0 0 0 0 +01 05 25 1 0 0 0 0 +01 05 27 1 0 0 0 0 +01 05 29 1 0 0 0 0 +01 05 31 1 0 0 0 0 +01 05 33 1 0 0 0 0 +01 05 35 1 0 0 0 0 +01 05 37 1 0 0 0 0 +01 05 39 1 0 0 0 0 +01 05 41 1 0 0 0 0 +01 05 43 1 0 0 0 0 +01 05 45 1 0 0 0 0 + 1 + + 1 1 + + + + 3.33E-04 90 300 1.00E-04 0.0498 0.1 98400 20 + 6.67E-10 180 300 4.00E-04 0.0498 0.1 98400 30 + + + 0.5 + + + 0.0069310 20 2.2 0 100 0.7 0 + 0.00E+00 20 2 19 0 0 0 + 0.00E+00 20 2 19 0 0 0 + 0.00E+00 20 2.2 0 100 0.7 0
+ 0 <0 = degradation according to degradation factors, 1 = constant with depth,2 individual,3 = degradation according to degradation factors, 4 = constant with depth,5 individual, >2 deg in liquid phase only) + + + 0 500 0 0 0 0 0 0 0 0 + + + <% change> KOC2 pH2 f_neq kdes> + 60 0.9 -99 20 0 0 0 1 -99 -99 0 0 + + + + +############################################### + +METABOLITE A1 M1 + + + 1 + + + 200 + + + 0 + + + + 0.00E+00 20 2.58 0 100 0.7 0 + 0.00E+00 20 2.58 0 100 0.7 0 + 0.00E+00 20 2.58 0 100 0.7 0 + 0.0023100 20 2.2 0 100 0.7 0
+ 0 <0 = degradation according to degradation factors, 1 = constant with depth,2 individual,3 = degradation according to degradation factors, 4 = constant with depth,5 individual, >2 deg in liquid phase only) + + + <% change> KOC2 pH2 f_neq kdes> +10 0.9 -99 20 0.01 0 0 1 -99 -99 0 0 + + + + +############################################### + +METABOLITE B1 M2 + + + 1 + + + 200 + + + 0 + + + + 0.00E+00 20 2.58 0 100 0.7 0 + 0.00E+00 20 2.58 0 100 0.7 0 + 0.00E+00 20 2.58 0 100 0.7 0 + 0.0693150 20 2.2 0 100 0.7 0
+ 0 <0 = degradation according to degradation factors, 1 = constant with depth,2 individual,3 = degradation according to degradation factors, 4 = constant with depth,5 individual, >2 deg in liquid phase only) + + + <% change> KOC2 pH2 f_neq kdes> +1000 0.9 -99 20 0.01 0 0 1 -99 -99 0 0 + + + + + diff --git a/inst/testdata/Pesticide_D_1_day_pre_em_every_third_year.psm b/inst/testdata/Pesticide_D_1_day_pre_em_every_third_year.psm new file mode 100644 index 0000000..c6f5945 --- /dev/null +++ b/inst/testdata/Pesticide_D_1_day_pre_em_every_third_year.psm @@ -0,0 +1,64 @@ + +Pesticide D, 1 day before emergence + + + 0 + + + 1 0 9 +022 +-01 00 01 1 0 0 0 0 +-01 00 04 1 0 0 0 0 +-01 00 07 1 0 0 0 0 +-01 00 10 1 0 0 0 0 +-01 00 13 1 0 0 0 0 +-01 00 16 1 0 0 0 0 +-01 00 19 1 0 0 0 0 +-01 00 22 1 0 0 0 0 +-01 00 25 1 0 0 0 0 +-01 00 28 1 0 0 0 0 +-01 00 31 1 0 0 0 0 +-01 00 34 1 0 0 0 0 +-01 00 37 1 0 0 0 0 +-01 00 40 1 0 0 0 0 +-01 00 43 1 0 0 0 0 +-01 00 46 1 0 0 0 0 +-01 00 49 1 0 0 0 0 +-01 00 52 1 0 0 0 0 +-01 00 55 1 0 0 0 0 +-01 00 58 1 0 0 0 0 +-01 00 61 1 0 0 0 0 +-01 00 64 1 0 0 0 0 + 1 + + 1 1 + + + + 3.33E-04 90 300 1.00E-04 0.0498 0.1 98400 20 + 6.67E-10 180 300 4.00E-04 0.0498 0.1 98400 30 + + + 0.5 + + + 0.00E+00 20 2 19 0 0 0 + 0.00E+00 20 2 19 0 0 0 + 0.00E+00 20 2 19 0 0 0 + 0.0346570 20 2.2 0 100 0.7 0
+ 0 <0 = degradation according to degradation factors, 1 = constant with depth,2 individual,3 = degradation according to degradation factors, 4 = constant with depth,5 individual, >2 deg in liquid phase only) + + + 0 500 0 0 0 0 0 0 0 0 + + + <% change> KOC2 pH2 f_neq kdes> + 60 0.9 -99 20 0 0 0 1 -99 -99 0 0 + + + + + diff --git a/man/PELMO_runs.Rd b/man/PELMO_runs.Rd index 60519bd..ce5c7af 100644 --- a/man/PELMO_runs.Rd +++ b/man/PELMO_runs.Rd @@ -37,7 +37,7 @@ as used in \code{\link{FOCUS_GW_scenarios_2012}}.} \item{overwrite}{Should an existing run directories be overwritten} } \value{ -If evaluate is TRUE, a list of lists of data frames holding the +If evaluate is TRUE, a list of lists of matrices holding the PEC data. } \description{ @@ -54,8 +54,33 @@ As a side effect, an R data file (period_pfm.rda) is generated in each run directory, holding the results for all FOCUS periods, equivalent to the period.plm file generated by the FOCUS PELMO GUI. } +\examples{ +# Reproduce the official test results for annual application of Pesticide D +# to winter cereals at the day before emergence +runs_1 <- list( + list(psm = 'Pesticide_D', + win = c("Cha", "Ham", "Jok", "Kre", "Oke", "Pia", "Por", "Sev", "Thi")), + list(psm = 'Pesticide_D_1_day_pre_em_every_third_year', + pot = c("Cha", "Ham", "Jok", "Kre", "Oke", "Pia", "Por", "Sev", "Thi"))) +time_1 <- system.time( + PECgw_1 <- PELMO_runs(runs_1, psm_dir = system.file("testdata", package = "pfm"), + cores = 6, overwrite = TRUE) +) +print(PECgw_1) +# We get exactly the same PECgw values (on Linux, calling PELMO using Wine). +print(time_1) + +# Demonstrate some results with metabolites. +runs_2 <- list(list(psm = 'Pesticide_D_1_May_every_other_year_mets', + win = c("Cha", "Ham", "Kre"))) +PECgw_2 <- PELMO_runs(runs_2, psm_dir = system.file("testdata", package = "pfm"), + cores = 3, overwrite = TRUE) +print(PECgw_2) +} \references{ PELMO.installeR \url{https://jranke.github.io/PELMO.installeR} Wine \url{https://winehq.org} + +PELMO test results \url{http://esdac.jrc.ec.europa.eu/public_path/projects_data/focus/gw/models/pelmo/test-results/test_results_FOCUS_PELMO_5_5_3.doc} } -- cgit v1.2.1