aboutsummaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorRanke Johannes <johannes.ranke@agroscope.admin.ch>2024-08-13 10:58:16 +0200
committerRanke Johannes <johannes.ranke@agroscope.admin.ch>2024-08-13 11:00:17 +0200
commit396ba6c42252426a132be56b9f417786a1f276e3 (patch)
treedacbad92ab168e0dfc1b70c6f8c7a3af29243d96 /man
parent870c7f6315e2656fceea28449bdeb5b2a57adf10 (diff)
Support units in drift, runoff und sediment PECs
Diffstat (limited to 'man')
-rw-r--r--man/PEC_sw_drift.Rd14
-rw-r--r--man/PEC_sw_exposit_drainage.Rd2
-rw-r--r--man/PEC_sw_exposit_runoff.Rd14
-rw-r--r--man/PEC_sw_sed.Rd10
-rw-r--r--man/perc_runoff_exposit.Rd2
-rw-r--r--man/perc_runoff_reduction_exposit.Rd2
6 files changed, 28 insertions, 16 deletions
diff --git a/man/PEC_sw_drift.Rd b/man/PEC_sw_drift.Rd
index c576753..3db80d7 100644
--- a/man/PEC_sw_drift.Rd
+++ b/man/PEC_sw_drift.Rd
@@ -7,7 +7,7 @@
PEC_sw_drift(
rate,
applications = 1,
- water_depth = 30,
+ water_depth = as_units("30 cm"),
drift_percentages = NULL,
drift_data = c("JKI", "RF"),
crop_group_JKI = c("Ackerbau", "Obstbau frueh", "Obstbau spaet", "Weinbau frueh",
@@ -16,14 +16,15 @@ PEC_sw_drift(
"fruit, early", "aerial"),
distances = c(1, 5, 10, 20),
formula = c("Rautmann", "FOCUS"),
- water_width = 100,
+ water_width = as_units("100 cm"),
side_angle = 90,
rate_units = "g/ha",
PEC_units = "µg/L"
)
}
\arguments{
-\item{rate}{Application rate in units specified below}
+\item{rate}{Application rate in units specified below, or with units defined via the
+\code{units} package.}
\item{applications}{Number of applications for selection of drift percentile}
@@ -53,7 +54,8 @@ calculated as described in Chapter 5.4.5 of the FOCUS surface water guidance}
\item{side_angle}{The angle of the side of the water relative to the bottom which
is assumed to be horizontal, in degrees. The SYNOPS model assumes 45 degrees here.}
-\item{rate_units}{Defaults to g/ha}
+\item{rate_units}{Defaults to g/ha. For backwards compatibility, only used
+if the specified rate does not have \link[units:units]{units::units}].}
\item{PEC_units}{Requested units for the calculated PEC. Only µg/L currently supported}
}
@@ -65,6 +67,10 @@ This is a basic, vectorised form of a simple calculation of a contaminant
concentration in surface water based on complete, instantaneous mixing
with input via spray drift.
}
+\details{
+It is recommened to specify the arguments \code{rate}, \code{water_depth} and
+\code{water_width} using \link[units:units]{units::units} from the \code{units} package.
+}
\examples{
PEC_sw_drift(100)
# Alternatively, we can use the formula for a single application to
diff --git a/man/PEC_sw_exposit_drainage.Rd b/man/PEC_sw_exposit_drainage.Rd
index c809e08..a516e23 100644
--- a/man/PEC_sw_exposit_drainage.Rd
+++ b/man/PEC_sw_exposit_drainage.Rd
@@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/PEC_sw_exposit_runoff.R
+% Please edit documentation in R/PEC_sw_exposit.R
\name{PEC_sw_exposit_drainage}
\alias{PEC_sw_exposit_drainage}
\title{Calculate PEC surface water due to drainage as in Exposit 3}
diff --git a/man/PEC_sw_exposit_runoff.Rd b/man/PEC_sw_exposit_runoff.Rd
index fca5553..393ed29 100644
--- a/man/PEC_sw_exposit_runoff.Rd
+++ b/man/PEC_sw_exposit_runoff.Rd
@@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/PEC_sw_exposit_runoff.R
+% Please edit documentation in R/PEC_sw_exposit.R
\name{PEC_sw_exposit_runoff}
\alias{PEC_sw_exposit_runoff}
\title{Calculate PEC surface water due to runoff and erosion as in Exposit 3}
@@ -12,11 +12,11 @@ PEC_sw_exposit_runoff(
rate,
interception = 0,
Koc,
- DT50 = Inf,
- t_runoff = 3,
+ DT50 = set_units(Inf, "d"),
+ t_runoff = set_units(3, "days"),
exposit_reduction_version = c("3.02", "3.01a", "3.01a2", "2.0"),
- V_ditch = 30,
- V_event = 100,
+ V_ditch = set_units(30, "m3"),
+ V_event = set_units(100, "m3"),
dilution = 2
)
}
@@ -56,6 +56,10 @@ for the different distances. If the rate was given in g/ha, the PECsw are in mic
This is a reimplementation of the calculation described in the Exposit 3.02 spreadsheet file,
in the worksheet "Konzept Runoff".
}
+\details{
+It is recommened to specify the arguments \code{rate}, \code{Koc}, \code{DT50}, \code{t_runoff}, \code{V_ditch} and \code{V_event}
+using \link[units:units]{units::units} from the \code{units} package.
+}
\examples{
PEC_sw_exposit_runoff(500, Koc = 150)
PEC_sw_exposit_runoff(600, Koc = 10000, DT50 = 195, exposit = "3.01a")
diff --git a/man/PEC_sw_sed.Rd b/man/PEC_sw_sed.Rd
index bc82ee3..0ebfd28 100644
--- a/man/PEC_sw_sed.Rd
+++ b/man/PEC_sw_sed.Rd
@@ -9,9 +9,9 @@ PEC_sw_sed(
PEC_sw,
percentage = 100,
method = "percentage",
- sediment_depth = 5,
- water_depth = 30,
- sediment_density = 1.3,
+ sediment_depth = set_units(5, "cm"),
+ water_depth = set_units(30, "cm"),
+ sediment_density = set_units(1.3, "kg/L"),
PEC_sed_units = c("µg/kg", "mg/kg")
)
}
@@ -27,7 +27,7 @@ which the corresponding sediment concentration is to be estimated}
\item{water_depth}{Depth of the water body in cm}
-\item{sediment_density}{The density of the sediment in L/kg (equivalent to
+\item{sediment_density}{The density of the sediment in kg/L (equivalent to
g/cm3)}
\item{PEC_sed_units}{The units of the estimated sediment PEC value}
@@ -40,6 +40,8 @@ The method 'percentage' is equivalent to what is used in the CRD spreadsheet
PEC calculator
}
\examples{
+library(pfm)
+library(units)
PEC_sw_sed(PEC_sw_drift(100, distances = 1), percentage = 50)
}
\author{
diff --git a/man/perc_runoff_exposit.Rd b/man/perc_runoff_exposit.Rd
index 47ea586..e30ab73 100644
--- a/man/perc_runoff_exposit.Rd
+++ b/man/perc_runoff_exposit.Rd
@@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/PEC_sw_exposit_runoff.R
+% Please edit documentation in R/PEC_sw_exposit.R
\docType{data}
\name{perc_runoff_exposit}
\alias{perc_runoff_exposit}
diff --git a/man/perc_runoff_reduction_exposit.Rd b/man/perc_runoff_reduction_exposit.Rd
index 2fc32a6..4514a58 100644
--- a/man/perc_runoff_reduction_exposit.Rd
+++ b/man/perc_runoff_reduction_exposit.Rd
@@ -1,5 +1,5 @@
% Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/PEC_sw_exposit_runoff.R
+% Please edit documentation in R/PEC_sw_exposit.R
\docType{data}
\name{perc_runoff_reduction_exposit}
\alias{perc_runoff_reduction_exposit}

Contact - Imprint