View source: R/solvedProbFunctions.R
powerLawPDF | R Documentation |
hydrogeom
can provide transient storage zone statistics based on
solutions to six integrations of a shape file. These functions are examples
of solutions for the powerLaw
and exponent
shape
functions.
powerLawPDF(tau, tau_0, tau_n, alpha) powerLawCCDF(tau, tau_0, tau_n, alpha) powerLawIntPDF(tau_a, tau_b, tau_0, tau_n, alpha) powerLawIntCCDF(tau_a, tau_b, tau_0, tau_n, alpha) powerLawIntTau.CCDF(tau_a, tau_b, tau_0, tau_n, alpha) powerLawIntTau.PDF(tau_a, tau_b, tau_0, tau_n, alpha) exponentPDF(tau, tau_0, tau_n, sigma) exponentCCDF(tau, tau_0, tau_n, sigma) exponentIntPDF(tau_a, tau_b, tau_0, tau_n, sigma) exponentIntCCDF(tau_a, tau_b, tau_0, tau_n, sigma) exponentIntTau.PDF(tau_a, tau_b, tau_0, tau_n, sigma) exponentIntTau.CCDF(tau_a, tau_b, tau_0, tau_n, sigma)
tau |
A residence time for which the PDF or CCDF value is desired. |
tau_0, tau_n |
The total range of |
alpha |
The exponent of the power law (this value is negated within the functions; entering 1.5 yields a power law with an exponent of -1.5). |
tau_a, tau_b |
The lower and upper range for the definite integral of the PDF or CCDF. |
sigma |
The exchange rate of groundwater with an exponential distribution. (This value is negated in the calculations to simulate the decay of water volume with residence time.) |
Calculation of transient storage zone (TSZ) statistics (see
TSZStats
) requires six functions:
1) the probability density function (PDF) of the curve shape (i.e., the
probability that a water molecule will exit the hyporheic zone with a
residence time of tau
)
2) the complementary cumulative distribution function (CCDF) (i.e., the
probablity that a water molecule will still be in the hyporheic zone at
residence time tau
)
3) the definite integral of the PDF.
4) the definite integral of the CCDF.
5) the definite integral of tau
*PDF.
6) the definite integral of tau
*CCDF.
These values can be derived with numeric integration of a shape function
(e.g., see powerLaw
), but numerical stablity can be an issue
(e.g., see checkShapeFunction
). Providing solutions for the
six integrations, above, may yield more reliable stability in the
calculations.
The solutions are published in Poole et al. (in Press) and their implementation in this package can be viewed by printing the source code for each of the following functions (e.g., type print(<functionName>) in the R console).
Solution functions for other shapes can be provided by the user. However, they must
follow the naming conventions of the concatination of the shape name and
the specific suffixes: "PDF", "CCDF", "IntPDF", "IntCCDF", "IntTau.PDF", and "IntTau.CCDF".
For instance, for a shape called "foo", the function names would be "fooPDF", "fooCCDF", "fooIntPDF", etc.
Also, the PDF and CDF solutions must have the signature function(tau, tau_0, tau_n, ...)
while the
remaining solutions must have the signature function(tau, tau_0, tau_n, ...)
where "..." are
additional parameters required by the shape function.
Returns a vector of numeric values.
PowerLawPDF and exponentPDF return the PDF value for tau
. This
provides the probability density that a water molecule entering the
hyporheic zone at time == tau_0
will return to the stream at time ==
tau
.
PowerLawCCDF and exponentCCDF return the CCDF value for tau
. This
provides the probablity that a water molecule entering the hyporehic zone
at time == tau_0
will still be in the hyporheic zone at time
tau
(e.g., will upwell after time == tau
)
PowerLawIntPDF and exponentIntPDF return the definite integral from tau_a
to
tau_b
of the PDF.
PowerLawIntCCDF and exponentIntCCDF return the difinite integral from tau_a
to
tau_b
of the CCDF.
PowerLawIntTau.PDF and exponentIntTau.PDF returns the definite integral from tau_a
to
tau_b
of tau
*PDF.
PowerLawIntTau.CCDF and exponentIntTau.CCDF return the difinite integral from tau_a
to
tau_b
of tau
*CCDF.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.