API Reference
Transfer functions
Dispersion transfer function
- transep.transep.dispersion_function(tau, p_d=0.1, mtt=40)[source]
Dispersive transfer function for dispersion model
\[g(\tau) = \frac{1}{\tau \sqrt{4 \pi\left(P_{D}\right)^{*} \cdot \frac{\tau}{T_{m}}}} \exp \left[-\frac{\left(1-\frac{\tau}{T_{m}}\right)^{2}}{4\left(P_{D}\right)^{*} \frac{\tau}{T_{m}}}\right]\]Stumpp, C., Stichler, W., and Maloszewski, P.: Application of the environmental isotope δ18O to study water flow in unsaturated soils planted with different crops: Case study of a weighable lysimeter from the research field in Neuherberg, Germany, Journal of Hydrology, 368, 68-78, https://doi.org/10.1016/j.jhydrol.2009.01.027, 2009.
- Parameters:
tau (float, np.array) – time step increment
p_d (float) – dispersion parameter
mtt (float) – mean travel time
- Returns:
gout – travel time distribution
- Return type:
float, np.array
Exponential-piston transfer function
- transep.transep.exponential_piston_function(tau, mtt=40, eta=1)[source]
Exponential-piston function for exponential-piston model
\[\begin{split}\begin{eqnarray} g(\tau) & = & \frac{\eta}{\tau_{m}} \exp \left(\frac{-\eta \tau}{\tau_{m}}+\eta-1\right) \quad \text { for } \quad \tau \geq \tau_{m}\left(1-\eta^{-1}\right) \\ g(\tau) & = & 0 \quad \text { for } \quad \tau<\tau_{m}\left(1-\eta^{-1}\right) \end{eqnarray}\end{split}\]Weiler, M., McGlynn, B. L., McGuire, K. J., and McDonnell, J. J.: How does rainfall become runoff? A combined tracer and runoff transfer function approach, Water Resources Research, 39, https://doi.org/10.1029/2003wr002331, 2003.
- Parameters:
tau (float, np.array) – time step increment
mtt (float) – mean travel time
eta (float) – parameter which equals the total volume of water divided by the exponential flow volume
- Returns:
gout – travel time distribution
- Return type:
float, np.array
Gamma transfer function
- transep.transep.gamma_function(tau, alpha=1, beta=1)[source]
Gamma transfer function for gamma model
\[g(\tau) = \frac{\tau^{\alpha-1}}{\beta^{\alpha} \Gamma(\alpha)} \exp (-\tau / \beta)\]Seeger, S., and Weiler, M.: Reevaluation of transit time distributions, mean transit times and their relation to catchment topography, Hydrol. Earth Syst. Sci., 18, 4751-4771, https://doi.org/10.5194/hess-18-4751-2014, 2014.
- Parameters:
tau (float, np.array) – time step
alpha (float) – scale parameter
beta (float) – shape parameter
- Returns:
gout – travel time distribution
- Return type:
float, np.array
Linear transfer function
- transep.transep.linear_reservoir_function(tau, mtt=40)[source]
Linear reservoir transfer function for linear reservoir model
\[g(\tau) = \frac{1}{\tau_{\mathrm{m}}} \exp \left(\frac{-\tau}{\tau_{\mathrm{m}}}\right)\]Seeger, S., and Weiler, M.: Reevaluation of transit time distributions, mean transit times and their relation to catchment topography, Hydrol. Earth Syst. Sci., 18, 4751-4771, https://doi.org/10.5194/hess-18-4751-2014, 2014.
- Parameters:
tau (float, np.array) – time step increment
mtt (float) – mean travel time
- Returns:
gout – travel time distribution
- Return type:
float, np.array
Parallel transfer function
- transep.transep.parallel_linear_reservoir_function(tau, mtt_slow=40, mtt_fast=10, frac_fast=0.1)[source]
Parallel linear reservoir transfer function for paralle linear reservoir model
\[g(\tau) = \frac{\phi}{\tau_{\mathrm{f}}} \exp \left(-\frac{\tau}{\tau_{\mathrm{f}}}\right)+\frac{1-\phi}{\tau_{\mathrm{s}}} \exp \left(-\frac{\tau}{\tau_{\mathrm{s}}}\right)\]Seeger, S., and Weiler, M.: Reevaluation of transit time distributions, mean transit times and their relation to catchment topography, Hydrol. Earth Syst. Sci., 18, 4751-4771, https://doi.org/10.5194/hess-18-4751-2014, 2014.
- Parameters:
tau (float, np.array) – time step increment
mtt_slow (float) – mean travel time of slow reservoir
mtt_fast (float) – mean travel time of fast reservoir
frac_fast (float) – fraction of fast reservoir (value range is between 0 and 1)
- Returns:
gout – travel time distribution
- Return type:
float, np.array
Effective precipitation
Loss function
- transep.transep.loss_function(prec, b1, b2, b3)[source]
Loss function to generate effective precipitation
\[\begin{split}\begin{eqnarray} s(t )& = & b_{1} p(t)+\left(1-b_{2}^{-1}\right) s(t-\Delta t) \\ s(t=0) & = & b_{3} \\ p_{eff}(t) & = & p(t) s(t) \end{eqnarray}\end{split}\]Weiler, M., McGlynn, B. L., McGuire, K. J., and McDonnell, J. J.: How does rainfall become runoff? A combined tracer and runoff transfer function approach, Water Resources Research, 39, https://doi.org/10.1029/2003wr002331, 2003.
- Parameters:
prec (np.array) – precipitation
b1 (float) – parameter
b2 (float) – parameter to exponentially weigh the precipitation backward in time
b3 (float) – initial antecedent precipitation index
- Returns:
prec_eff – effective precipitation
- Return type:
float, np.array