View source: R/customProbFunctions.R
powerLaw | R Documentation |
Transient storage zone statistics are calucated based on an assumed shape of
the hydrologic residence time distribution (RTD) of the hyporheic zone, which
is the probablity density function (PDF) that a water molecule will exit the
hyporheic zone at time tau
. powerLaw
and exponent
are
examples of functions that describe a basic shape for the RTD.
powerLaw(tau, tau_n, alpha) exponent(tau, tau_n, sigma)
tau |
A numeric vector of residence times. |
tau_n |
A numeric vector (usually but not necessarily lenth == 1)
representing the maximum |
alpha |
The exponent of the power law; this value is negated within the
|
sigma |
The hydrologic exchange rate for the |
Given an appropriate "shape function," HydroGeom
can calculate
transient storage zone statistics for any assumed shape of the RTD. Shape
functions must have the signature function(tau, tau_n, ...)
and
typically return zero when tau == tau_n.
You can generate hyporheic TSZ statistics based on a RTD with a shape
corresponding to a custom function that you provide. If you write a shape
function like foo = function(tau, tau_n, chi, omega)
, where chi
and omega
are parameters that influence the shape of the curve
described by your function (e.g., analagous to the way alpha
serves as
an exponent that controls the specific shape of a power law curve in the
powerLaw
function), you can then use TSZStats
with
shape = "foo"
to generate TSZ statistics using a custom shape for the
RTD of the hyporheic zone. Implemented this way, results of TSZStats
are derived using numerical integration (see numericalSolution
).
Solutions for integration of a custom function can also be provide (see fullSolution
and
powerLawPDF
).
Technically speaking, tau_n
serves as the upper limit of tau
used to calculate the normalizing constant of the PDF, which is defined as
the inverse of the definite integral of the shape function from some lower
limit (tau_0
) to tau_n. Pragmatically, tau_n
represents the
maximum residence time of interest, which should approximate the maximum
subsurface residence time of hyporheic water. Water that stays in the
subsurface longer than tau_n
is assumed to enter the true groundwater
system.
All paramerters for these fuctions correspond to the defintions found in Poole et al. (In Press) "The Hydrolgic Geometry of Hyporheic Zones in Expansive Coarse-Grained Alluvial Aquifers."
Shape functions (including custom shape functions you write) must
recycle values of tau
and tau_n
. Effectively, since the
tau_n
is typically length == 1, shape functions usually return a
vector of numeric values equal in length to the tau
vector passed to
the function. Both powerLaw
and exponent
conform to these
requirements. The powerLaw
function returns tau^(-alpha) -
tau_n^(-alpha)
. The exponent
function returns
exp(-sigma*tau) - exp(-sigma * tau_n)
. Implementation of these
functions can be viewed by typing print(powerLaw)
or
print(exponent)
into the console.
checkShapeFunction
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.