macroutilsFocusGWConc | R Documentation |
INTERNAL & NON-OFFICIAL: Calculate the yearly and Xth percentile
groundwater concentration from a MACROInFOCUS output.
WARNING This function is not part
of the official MACROInFOCUS program. It is provided
for test-purpose, without any guarantee or support from
the authors, CKB, SLU or KEMI. You are strongly recommended to
benchmark the function against a range of (official)
MACROInFOCUS simulation results, before you use the
function. You are also strongly recommended to inspect
the code of these functions before you use them. To
inspect the content of these functions, simply type
body( macroutils2:::macroutilsFocusGWConc.data.frame )
after you have loaded the package macroutils2
.
macroutilsFocusGWConc(
x,
nbYrsWarmUp = 6L,
yearsAvg = NULL,
prob = 0.8,
method = c("focus", "R", "test")[1L],
negToZero = TRUE,
type = 7L,
quiet = FALSE,
massunits = 2L,
...
)
## S3 method for class 'character'
macroutilsFocusGWConc(
x,
nbYrsWarmUp = 6L,
yearsAvg = NULL,
prob = 0.8,
method = c("focus", "R", "test")[1L],
negToZero = TRUE,
type = 7L,
quiet = FALSE,
massunits = 2L,
...
)
## S3 method for class 'list'
macroutilsFocusGWConc(
x,
nbYrsWarmUp = 6L,
yearsAvg = NULL,
prob = 0.8,
method = c("focus", "R", "test")[1L],
negToZero = TRUE,
type = 7L,
quiet = FALSE,
massunits = 2L,
...
)
## S3 method for class 'data.frame'
macroutilsFocusGWConc(
x,
nbYrsWarmUp = 6L,
yearsAvg = NULL,
prob = 0.8,
method = c("focus", "R", "test")[1L],
negToZero = TRUE,
type = 7L,
quiet = FALSE,
massunits = 2L,
output_water = c(target_l = TRUE, lower_b = TRUE),
output_solute = c(target_l = TRUE, lower_b = FALSE),
...
)
x |
Either a vector of character strings, a
|
nbYrsWarmUp |
Single integer values: Number of warm-up years that should be removed from the beginning of the model output. A default of 6 years of warn-up are used in FOCUS. |
yearsAvg |
Single integer values: Number of simulation years to
"aggregate" when calculating yearly- or biennial- or
triennial- (etc.) average concentrations.
If |
prob |
Single numeric value, between 0 and 1. Probability
(percentile/100) of the worst case concentration
that shall be calculated. In FOCUS, the yearly results
are ordered by increasing yearly average concentrations
before the percentile is calculated, as the average
concentration of the two years closest to the Xth percentile
(X always being 80, in FOCUS). Here, in practice, the
index of the 1st and 2nd year used for calculating the
average are selected as follow:
|
method |
Single character string. If |
negToZero |
Single logical value. If |
type |
Single integer value. Only used when |
quiet |
Single logical value. Set to |
massunits |
Single integer value. Code for the mass unit of the simulation
result in |
... |
Additional parameters passed to
|
output_water |
Vector of two logical value, labelled |
output_solute |
Vector of two logical value, labelled |
Returns a list
with the following items:
"info_general"
A data.frame
with the following columns:
"conc_percentile"The percentile used to
calculate the Predicted Environmental Concentration
(columns ug_per_L
in items
conc_target_layer
and conc_perc
,
below), in [%].
"rank_period1"The rank of the first
simulation period used to calculate ug_per_L
,
when ordered by increasing average concentration.
"rank_period2"The rank of the second
simulation period used to calculate ug_per_L
,
when ordered by increasing average concentration.
"method"See argument method
above.
"nb_sim_yrs_used"Number of simulation years used for the calculation, after discarding the warm-up period.
"nb_yrs_per_period"Number of simulation years aggregated to calculate the average concentration of each "period". 1, 2 or 3 in cases of yearly, biennial or triennial pesticide application frequency.
"nb_yrs_warmup"Number of simulation years discarded as a warm-up period.
"neg_conc_set_to_0"See negToZero
above.
"info_period"
A data.frame
with the following columns:
"period_index"Index of the simulation
period when periods are sorted in chronological
order (i.e. 1
is the first or earliest
period).
"from_year"First year included in the period.
"to_year"Last year included in the period.
"water_target_layer_by_period"
A data.frame
with the following columns:
"period_index"See above.
"mm_mic"Accumulated amount of water passed through the micropores in target layer over the period, downward (positive) or upward (negative), in [mm] of water.
"mm_mac"Accumulated amount of water passed through the macropores in target layer over the period, downward (positive) or upward (negative), in [mm] of water.
"mm_tot"Accumulated amount of water passed through the target layer over the period, downward (positive) or upward (negative), in [mm] of water.
"solute_target_layer_by_period"
A data.frame
with the following columns:
"period_index"See above.
"mg_per_m2_mic"Accumulated mass of solute passed through the micropores, per square meter, in target layer, over the period, downward (positive) or upward (negative), in [mg/ m2].
"mg_per_m2_mac"Accumulated mass of solute passed through the macropores, per square meter, in target layer, over the period, downward (positive) or upward (negative), in [mg/ m2].
"mg_per_m2_tot"Accumulated mass of solute passed through the target layer, per square meter, over the period, downward (positive) or upward (negative), in [mg/ m2].
"ug_per_L"Water-flow-weighted average solute concentration over the period, in [micro-grams/L] or [mg/m3]. In practice equal to the accumulated solute mass divided by the accumulated water flow, with appropriate unit conversion.
"water_perc_by_period"
A data.frame
with the following columns:
"period_index"See above.
"mm"Accumulated amount of water passed through the bottom layer of the soil profile over the period, downward (positive) or upward (negative), in [mm] of water.
"solute_perc_by_period"
A data.frame
with the following columns:
"period_index"See above.
"mg_per_m2"Accumulated mass of solute passed through the bottom layer of the soil profile , per square meter, over the period, downward (positive) or upward (negative), in [mg/ m2].
"ug_per_L"Water-flow-weighted average solute concentration over the period, in [micro-grams/L] or [mg/m3]. In practice equal to the accumulated solute mass divided by the accumulated water flow, with appropriate unit conversion.
"conc_target_layer"
A data.frame
with the following columns:
"ug_per_L"Xth percentile of the period-
averaged solute concentrations in the target
layer, where X is equal to conc_percentile
(See above).
"ug_per_L_rnd"Same as above, except that the concentration is rounded to 2 digits after the decimal mark, in scientific mode, in an attempt to obtain the same value as MACRO In FOCUS graphical interface.
"index_period1"Index of the first simulation
period used to calculate the Xth percentile of
the period-averaged solute concentrations.
Corresponds to the column period_index
in
the tables above.
"index_period2"Index of the second simulation
period used to calculate the Xth percentile of
the period-averaged solute concentrations.
Corresponds to the column period_index
in
the tables above.
"f_solute_mac"Average fraction of solute
in the macropores corresponding to
ug_per_L
, 0 meaning 0% of the solute in
the macropres and 1 meaning 100% of the solute
in the macropores.
"f_solute_mic"Average fraction of solute
in the micropores corresponding to
ug_per_L
, 0 meaning 0% of the solute in
the micropres and 1 meaning 100% of the solute
in the micropores.
"conc_perc"
A data.frame
with the following columns:
"ug_per_L"Xth percentile of the period-
averaged solute concentrations percolated at the
bottom boundary of the soil profile, where X is
equal to conc_percentile
(See above).
"ug_per_L_rnd"Same as above, except that the concentration is rounded to 2 digits after the decimal mark, in scientific mode, in an attempt to obtain the same value as MACRO In FOCUS graphical interface.
"index_period1"Index of the first simulation
period used to calculate the Xth percentile of
the period-averaged solute concentrations.
Corresponds to the column period_index
in
the tables above.
"index_period2"Index of the second simulation
period used to calculate the Xth percentile of
the period-averaged solute concentrations.
Corresponds to the column period_index
in
the tables above.
Julien Moeys jules_m78-soiltexture@yahooDOTfr, contributions from Stefan Reichenberger SReichenberger@knoellDOTcom.
European Commission (2014) "Assessing Potential for Movement of Active Substances and their Metabolites to Ground Water in the EU Report of the FOCUS Ground Water Work Group, EC Document Reference Sanco/13144/2010 version 3, 613 pp. http://focus.jrc.ec.europa.eu/gw/docs/NewDocs/focusGWReportOct2014.pdf See in particular the last sentence page 475.
library( "macroutils2" )
# Path to the file to be read
( filenm <- system.file(
"bintest/chat_winCer_GW-D_1kgHa_d298_annual_output.bin",
package = "macroutils2", mustWork = TRUE ) )
res <- macroutilsFocusGWConc( x = filenm )
res
# Clean-up
rm( filenm, res )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.