Extra Functions

pyfuse.Logistic(State, Statemax, Psmooth=0.01)[source]

Logistic function to smooth the threshold at the overflow of a bucket

Parameters:

State: float

Current state value

Statemax: float

Maximum allowed value of the state value

Psmooth: float

smoothing parameter to choose amount of smoothing default value 0.01

Returns:

logismooth: float

smoothing multiplier

References

[1] Clark, Martyn P., A. G. Slater, D. E. Rupp, R. A. Woods, Jasper A. Vrugt, H. V. Gupta, Thorsten Wagener, and L. E. Hay. Framework for Understanding Structural Errors (FUSE): A modular framework to diagnose differences between hydrological models. Water Resources Research 44 (2008): 14. Original code from Clark, Martyn P.

[2] Kavetski, Dmitri, and George Kuczera. “Model Smoothing Strategies to Remove Microscale Discontinuities and Spurious Secondary Optima in Objective Functions in Hydrological Calibration.” Water Resources Research 43, no. 3 (March 8, 2007): 1–9. http://www.agu.org/pubs/crossref/2007/2006WR005195.shtml.

pyfuse.calc_meantipow(set_par)[source]

Calculate mean of power transformed topographic index

Implementation here is the 3 parameter gamma distribution version following [1], with the values for chi, psi and loglambda. In the [2] version, the chi and psi are interchanged and the 1 parameter version is applied

more info: utilities -> gammadist

needs par-library as input!

References

[1] Sivapalan, M., K. Beven, and F Eric Wood. “On Hydrologic Similarity 2. A Scaled Model of Storm Runoff Production.” Water Resources Research 23, no. 12 (1987): 2266–2278.

[2] Clark, Martyn P., A. G. Slater, D. E. Rupp, R. A. Woods, Jasper A. Vrugt, H. V. Gupta, Thorsten Wagener, and L. E. Hay. Framework for Understanding Structural Errors (FUSE): A modular framework to diagnose differences between hydrological models. Water Resources Research 44 (2008): 14. Original code from Clark, Martyn P.

The topographic index distribution is defined by:

\[f(\zeta) = \frac{1}{\chi \Gamma(\phi)} \left( \frac{\zeta-\mu}{\chi}\right) e^{\left( -\frac{\zeta-\mu}{\chi}\right)}\]
pyfuse.qtimedelay(set_par, deltim=1.0)[source]

Gamma-function based weight function to control the runoff delay, this function calculates the fractions to derive the fluxes, defined by the frac_future parameter

Parameters:

set_par: dict

The dictionary with the model parameters

Returns:

set_par: dict

updated dictionary with the frac_future parameter added

pyfuse.linres(n_res, q_init, co, k)[source]

Recursive calculation of a cascade of linear reservoirs, with fluxes defined in mm

Parameters:

n_res: int

number of reservoirs in the cascade

q_init: narray

initial fluxes of the different reservoirs in array

co: float

incoming flow

k: float

residence time constant for the reservoir

Returns:

q_init: narray

narray with the new fluxes ofr each reservoir

TODO: improve by incorporating previous timestep incoming flow

pyfuse.linresv(n_res, q_init, co, v, k)[source]

Recursive calculation of a cascade of linear reservoirs, with incoming fluxes defined in mm and outgoing flow in m3/s

See also

pyFUSE.linres