lstream¶
The L-Stream model provides features for implementing storage based routing methods similar to those implemented by the water balance model LARSIM.
Conceptionally, application models derived from HydPy-L-Stream can be very similar to those of LARSIM. However, while LARSIM uses approximate “ad hoc” solutions of the underlying ordinary differential equations, L-Stream defines the differential equations in their original form and leaves their solution to numerical integration algorithms. On the upside, this allows for more flexibility (regarding the coupling and extension of methodologies), accuracy (the user can define the aimed accuracy), and correctness (one can easily avoid problems resulting from approximate solutions like the water balance errors of the Williams implementation of LARSIM). On the downside, numerical convergence might require (sometimes much) more time.
To partly solve the computation time issue, we implement all differential equations in
a “smooth” form. By applying the regularisation functions supplied by module
smoothtools, we remove all discontinuities from the original formulations, which
speeds up numerical convergence. However, it is up to the user to define a reasonable
degree of “smoothness”. Please read the related documentation of module smoothtools
and module modeltools for further information.
Method Features¶
- class hydpy.models.lstream.lstream_model.Model[source]¶
Bases:
ELSModelThe HydPy-L-Stream model.
- The following “inlet update methods” are called in the given sequence at the beginning of each simulation step:
Pick_Q_V1Query the current inflow from all inlet nodes.
- The following methods define the relevant components of a system of ODE equations (e.g. direct runoff):
Calc_RHM_V1Regularise the stage with respect to the channel bottom.Calc_RHMDH_V1Calculate the derivative of the stage regularised with respect to the channel bottom.Calc_RHV_V1Regularise the stage with respect to the transition from the main channel to both forelands.Calc_RHVDH_V1Calculate the derivative of the stage regularised with respect to the transition from the main channel to both forelands.Calc_RHLVR_RHRVR_V1Regularise the stage with respect to the transitions from the forelands to the outer embankments.Calc_RHLVRDH_RHRVRDH_V1Calculate the derivative of the stage regularised with respect to the transition from the forelands to the outer embankments.Calc_AM_UM_V1Calculate the wetted area and the wetted perimeter of the main channel.Calc_AMDH_UMDH_V1Calculate the derivatives of the wetted area and perimeter of the main channel.Calc_ALV_ARV_ULV_URV_V1Calculate the wetted area and wetted perimeter of both forelands.Calc_ALVDH_ARVDH_ULVDH_URVDH_V1Calculate the derivatives of the wetted area and perimeter of both forelands.Calc_ALVR_ARVR_ULVR_URVR_V1Calculate the wetted area and perimeter of both outer embankments.Calc_ALVRDH_ARVRDH_ULVRDH_URVRDH_V1Calculate the derivatives of the wetted area and perimeter of both outer embankments.Calc_QM_V1Calculate the discharge of the main channel after Manning-Strickler.Calc_QMDH_V1Calculate the derivative of the discharge of the main channel following methodCalc_QM_V1.Calc_QM_V2Calculate the discharge of the main channel following the kinematic wave approach.Calc_QLV_QRV_V1Calculate the discharge of both forelands after Manning-Strickler.Calc_QLVDH_QRVDH_V1Calculate the derivative of both forelands’ discharge with respect to the stage following methodCalc_QLV_QRV_V1.Calc_QLV_QRV_V2Calculate the discharge of both forelands following the kinematic wave approach.Calc_QLVR_QRVR_V1Calculate the discharge of both outer embankments after Manning-Strickler.Calc_QLVRDH_QRVRDH_V1Calculate the derivative of the discharge over the outer embankments with respect to the stage following methodCalc_QLVR_QRVR_V1.Calc_QLVR_QRVR_V2Calculate the discharge of both outer embankments following the kinematic wave approach.Calc_AG_V1Calculate the through wetted of the total cross-sections.Calc_QG_V1Calculate the discharge of the total cross-section.Calc_QG_V2Calculate the discharge of the total cross-section based on an interpolated flow velocity.Calc_QA_V1Query the actual outflow.Calc_WBM_V1Calculate the water table width above the main channel.Calc_WBLV_WBRV_V1Calculate the water table width above both forelands.Calc_WBLVR_WBRVR_V1Calculate the water table width above both outer embankments.Calc_WBG_V1Calculate the water level width of the total cross-section.Calc_DH_V1Determine the change in the stage.
- The following methods define the complete equations of an ODE system (e.g. change in storage of fast water due to effective precipitation and direct runoff):
Update_H_V1Update the stage.Update_VG_V1Update the water volume.
- The following “outlet update methods” are called in the given sequence at the end of each simulation step:
Pass_Q_V1Pass the outflow to the outlet node.
- The following “additional methods” might be called by one or more of the other methods or are meant to be directly called by the user:
Return_QF_V1Calculate and return the “error” between the actual discharge and the discharge corresponding to the given water stage.Return_H_V1Calculate and return the water stage corresponding to the current discharge value.
- The following “submodels” might be called by one or more of the implemented methods or are meant to be directly called by the user:
PegasusHPegasus iterator for finding the correct water stage.
- class hydpy.models.lstream.lstream_model.Pick_Q_V1[source]¶
Bases:
MethodQuery the current inflow from all inlet nodes.
- class hydpy.models.lstream.lstream_model.Calc_QZA_V1[source]¶
Bases:
MethodCalculate the current inflow into the channel.
- Basic equation:
\(QZA = QZ\)
- class hydpy.models.lstream.lstream_model.Calc_RHM_V1[source]¶
Bases:
MethodRegularise the stage with respect to the channel bottom.
- Required by the method:
- Requires the control parameter:
- Requires the derived parameter:
- Requires the state sequence:
- Calculates the aide sequence:
- Used auxiliary method:
smooth_logistic2()- Basic equation:
\(RHM = smooth_{logistic2}(H, HRP)\)
Examples:
>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(5) >>> states.h = -1.0, -0.1, 0.0, 0.1, 1.0
>>> hr(0.0) >>> derived.hrp.update() >>> model.calc_rhm_v1() >>> aides.rhm rhm(0.0, 0.0, 0.0, 0.1, 1.0)
>>> hr(0.1) >>> derived.hrp.update() >>> model.calc_rhm_v1() >>> aides.rhm rhm(0.0, 0.01, 0.040983, 0.11, 1.0)
- class hydpy.models.lstream.lstream_model.Calc_RHMDH_V1[source]¶
Bases:
MethodCalculate the derivative of the stage regularised with respect to the channel bottom.
- Required by the method:
- Requires the control parameter:
- Requires the derived parameter:
- Requires the state sequence:
- Calculates the aide sequence:
- Used auxiliary method:
smooth_logistic2_derivative2()- Basic equation:
\(RHMDH = smooth_{logistic2'}(H, HRP)\)
Examples:
We apply the class
NumericalDifferentiatorto validate the calculated derivatives:>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(5) >>> states.h = -1.0, -0.1, 0.0, 0.1, 1.0
>>> hr(0.0) >>> derived.hrp.update() >>> model.calc_rhmdh_v1() >>> aides.rhmdh rhmdh(0.0, 0.0, 1.0, 1.0, 1.0)
>>> from hydpy import NumericalDifferentiator >>> numdiff = NumericalDifferentiator( ... xsequence=states.h, ... ysequences=[aides.rhm], ... methods=[model.calc_rhm_v1]) >>> numdiff() d_rhm/d_h: 0.0, 0.0, 1.0, 1.0, 1.0
>>> hr(0.1) >>> derived.hrp.update() >>> model.calc_rhmdh_v1() >>> aides.rhmdh rhmdh(0.0, 0.155602, 0.5, 0.844398, 1.0)
>>> numdiff() d_rhm/d_h: 0.0, 0.155602, 0.5, 0.844398, 1.0
- class hydpy.models.lstream.lstream_model.Calc_RHV_V1[source]¶
Bases:
MethodRegularise the stage with respect to the transition from the main channel to both forelands.
- Required by the method:
- Requires the control parameters:
- Requires the derived parameter:
- Requires the state sequence:
- Calculates the aide sequence:
- Used auxiliary method:
smooth_logistic2()- Basic equation:
\(RHV = smooth_{logistic2}(H-HM, HRP)\)
Examples:
>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(5) >>> hm(1.0) >>> hr(0.1) >>> derived.hrp.update() >>> states.h = 0.0, 0.9, 1.0, 1.1, 2.0 >>> model.calc_rhv_v1() >>> aides.rhv rhv(0.0, 0.01, 0.040983, 0.11, 1.0)
- class hydpy.models.lstream.lstream_model.Calc_RHVDH_V1[source]¶
Bases:
MethodCalculate the derivative of the stage regularised with respect to the transition from the main channel to both forelands.
- Required by the method:
- Requires the control parameters:
- Requires the derived parameter:
- Requires the state sequence:
- Calculates the aide sequence:
- Used auxiliary method:
smooth_logistic2_derivative2()- Basic equation:
\(RHVDH = smooth_{logistic2'}(H-HM, HRP)\)
Examples:
We apply the class
NumericalDifferentiatorto validate the calculated derivatives:>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(5) >>> hm(1.0) >>> states.h = 0.0, 0.9, 1.0, 1.1, 2.0
>>> hr(0.0) >>> derived.hrp.update() >>> model.calc_rhvdh_v1() >>> aides.rhvdh rhvdh(0.0, 0.0, 1.0, 1.0, 1.0)
>>> from hydpy import NumericalDifferentiator >>> numdiff = NumericalDifferentiator( ... xsequence=states.h, ... ysequences=[aides.rhv], ... methods=[model.calc_rhv_v1]) >>> numdiff() d_rhv/d_h: 0.0, 0.0, 1.0, 1.0, 1.0
>>> hr(0.1) >>> derived.hrp.update() >>> model.calc_rhvdh_v1() >>> aides.rhvdh rhvdh(0.0, 0.155602, 0.5, 0.844398, 1.0)
>>> numdiff() d_rhv/d_h: 0.0, 0.155602, 0.5, 0.844398, 1.0
- class hydpy.models.lstream.lstream_model.Calc_RHLVR_RHRVR_V1[source]¶
Bases:
MethodRegularise the stage with respect to the transitions from the forelands to the outer embankments.
- Required by the method:
- Requires the control parameters:
- Requires the derived parameters:
- Requires the state sequence:
- Calculates the aide sequences:
- Used auxiliary method:
smooth_logistic2()- Basic equation:
\(RHVR = smooth_{logistic2}(H-HM-HV, HRP)\)
Examples:
>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(6) >>> hm(1.0) >>> hr(0.1) >>> derived.hv(left=1.0, right=1.1) >>> derived.hrp.update() >>> states.h = 1.0, 1.9, 2.0, 2.1, 2.2, 3.0 >>> model.calc_rhlvr_rhrvr_v1() >>> aides.rhlvr rhlvr(0.0, 0.01, 0.040983, 0.11, 0.201974, 1.0) >>> aides.rhrvr rhrvr(0.0, 0.001974, 0.01, 0.040983, 0.11, 0.9)
- class hydpy.models.lstream.lstream_model.Calc_RHLVRDH_RHRVRDH_V1[source]¶
Bases:
MethodCalculate the derivative of the stage regularised with respect to the transition from the forelands to the outer embankments.
- Required by the method:
- Requires the control parameters:
- Requires the derived parameters:
- Requires the state sequence:
- Calculates the aide sequences:
- Used auxiliary method:
smooth_logistic2_derivative2()- Basic equation:
\(RHVDH = smooth_{logistic2'}(H-HM-HV, HRP)\)
Examples:
We apply the class
NumericalDifferentiatorto validate the calculated derivatives:>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(8) >>> hm(1.0) >>> derived.hv(left=1.0, right=2.0) >>> states.h = 1.0, 1.9, 2.0, 2.1, 2.9, 3.0, 3.1, 4.0
>>> hr(0.0) >>> derived.hrp.update() >>> model.calc_rhlvrdh_rhrvrdh_v1() >>> aides.rhlvrdh rhlvrdh(0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0) >>> aides.rhrvrdh rhrvrdh(0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0)
>>> from hydpy import NumericalDifferentiator >>> numdiff = NumericalDifferentiator( ... xsequence=states.h, ... ysequences=[aides.rhlvr, aides.rhrvr], ... methods=[model.calc_rhlvr_rhrvr_v1]) >>> numdiff() d_rhlvr/d_h: 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 d_rhrvr/d_h: 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0
>>> hr(0.1) >>> derived.hrp.update() >>> model.calc_rhlvrdh_rhrvrdh_v1() >>> aides.rhlvrdh rhlvrdh(0.0, 0.155602, 0.5, 0.844398, 1.0, 1.0, 1.0, 1.0) >>> aides.rhrvrdh rhrvrdh(0.0, 0.0, 0.0, 0.0, 0.155602, 0.5, 0.844398, 1.0)
>>> numdiff() d_rhlvr/d_h: 0.0, 0.155602, 0.5, 0.844398, 1.0, 1.0, 1.0, 1.0 d_rhrvr/d_h: 0.0, 0.0, 0.0, 0.0, 0.155602, 0.5, 0.844398, 1.0
- class hydpy.models.lstream.lstream_model.Calc_AM_UM_V1[source]¶
Bases:
MethodCalculate the wetted area and the wetted perimeter of the main channel.
- Required by the method:
- Requires the control parameters:
- Requires the derived parameter:
- Requires the aide sequences:
- Calculates the aide sequences:
The main channel is assumed to have identical slopes on both sides. Water flowing exactly above the main channel contributes to
AM. Both theoretical surfaces separating the water above the main channel from the water above the forelands contribute toUM.Examples:
Generally, a trapezoid with reflection symmetry is assumed. Here, we set its smaller base (bottom) to a length of 2 meters, its legs to an inclination of 1 meter per 4 meters, and its height (depths) to 1 meter:
>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(8) >>> bm(2.0) >>> bnm(4.0) >>> derived.bnmf.update()
First, we show that all calculations agree with the unmodified triple trapezoid profile results when setting the smoothing parameter
HRPto zero:>>> derived.hrp(0)
This example deals with normal flow conditions, where water flows within the main channel completely (
H<HM, the first five channel sections), and with high flow conditions, where water flows over the foreland also (H>HM, the three last channel sections):>>> hm(1.0) >>> states.h = 0.0, 0.1, 0.5, 0.9, 1.0, 1.1, 1.5, 2.0 >>> model.calc_rhm_v1() >>> model.calc_rhv_v1() >>> model.calc_am_um_v1() >>> aides.am am(0.0, 0.24, 2.0, 5.04, 6.0, 7.0, 11.0, 16.0) >>> aides.um um(2.0, 2.824621, 6.123106, 9.42159, 10.246211, 10.446211, 11.246211, 12.246211)
The next example checks the special case of a channel with zero height:
>>> hm(0.0) >>> model.calc_rhm_v1() >>> model.calc_rhv_v1() >>> model.calc_am_um_v1() >>> aides.am am(0.0, 0.2, 1.0, 1.8, 2.0, 2.2, 3.0, 4.0) >>> aides.um um(2.0, 2.2, 3.0, 3.8, 4.0, 4.2, 5.0, 6.0)
Second, we repeat both examples with a reasonable smoothing parameterisation. The primary deviations occur around the original discontinuities related to the channel bottom and the main channel’s transition to both forelands:
>>> hr(0.1) >>> derived.hrp.update()
>>> hm(1.0) >>> states.h = 0.0, 0.1, 0.5, 0.9, 1.0, 1.1, 1.5, 2.0 >>> model.calc_rhm_v1() >>> model.calc_rhv_v1() >>> model.calc_am_um_v1() >>> aides.am am(0.088684, 0.2684, 2.000075, 5.0396, 5.993282, 6.9916, 10.99995, 16.0) >>> aides.um um(2.337952, 2.907083, 6.123131, 9.359128, 9.990225, 10.383749, 11.246133, 12.246211)
>>> hm(0.0) >>> model.calc_rhm_v1() >>> model.calc_rhv_v1() >>> model.calc_am_um_v1() >>> aides.am am(0.081965, 0.22, 1.000025, 1.8, 2.0, 2.2, 3.0, 4.0) >>> aides.um um(2.081965, 2.22, 3.000025, 3.8, 4.0, 4.2, 5.0, 6.0)
- class hydpy.models.lstream.lstream_model.Calc_AMDH_UMDH_V1[source]¶
Bases:
MethodCalculate the derivatives of the wetted area and perimeter of the main channel.
- Requires the control parameters:
- Requires the derived parameter:
- Requires the aide sequences:
- Calculates the aide sequences:
Examples:
In the following, we repeat the examples of the documentation on method
Calc_AM_UM_V1and check the derivatives’ correctness by comparing the results of classNumericalDifferentiator:>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(8) >>> bm(2.0) >>> bnm(4.0)
>>> derived.bnmf.update() >>> derived.hrp(0)
>>> hm(1.0) >>> states.h = 0.0, 0.1, 0.5, 0.9, 1.0, 1.1, 1.5, 2.0 >>> model.calc_rhm_v1() >>> model.calc_rhmdh_v1() >>> model.calc_rhv_v1() >>> model.calc_rhvdh_v1() >>> model.calc_amdh_umdh_v1() >>> aides.amdh amdh(2.0, 2.8, 6.0, 9.2, 10.0, 10.0, 10.0, 10.0) >>> aides.umdh umdh(8.246211, 8.246211, 8.246211, 8.246211, 2.0, 2.0, 2.0, 2.0)
>>> from hydpy import NumericalDifferentiator >>> numdiff = NumericalDifferentiator( ... xsequence=states.h, ... ysequences=[aides.am, aides.um], ... methods=[model.calc_rhm_v1, ... model.calc_rhv_v1, ... model.calc_am_um_v1]) >>> numdiff() d_am/d_h: 2.0, 2.8, 6.0, 9.2, 10.0, 10.0, 10.0, 10.0 d_um/d_h: 8.246211, 8.246211, 8.246211, 8.246211, 2.0, 2.0, 2.0, 2.0
>>> hm(0.0) >>> model.calc_rhm_v1() >>> model.calc_rhmdh_v1() >>> model.calc_rhv_v1() >>> model.calc_rhvdh_v1() >>> model.calc_amdh_umdh_v1() >>> aides.amdh amdh(2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0) >>> aides.umdh umdh(2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0) >>> numdiff() d_am/d_h: 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0 d_um/d_h: 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0
>>> hr(0.1) >>> derived.hrp.update()
>>> hm(1.0) >>> model.calc_rhm_v1() >>> model.calc_rhmdh_v1() >>> model.calc_rhv_v1() >>> model.calc_rhvdh_v1() >>> model.calc_amdh_umdh_v1() >>> aides.amdh amdh(1.163931, 2.431865, 5.998826, 9.18755, 9.836069, 10.05693, 10.000749, 10.0) >>> aides.umdh umdh(4.123105, 6.963079, 8.243132, 7.274283, 5.123105, 2.971926, 2.001327, 2.0)
>>> numdiff() d_am/d_h: 1.163931, 2.431865, 5.998826, 9.18755, 9.836069, 10.05693, 10.000749, 10.0 d_um/d_h: 4.123105, 6.963079, 8.243132, 7.274283, 5.123105, 2.971926, 2.001327, 2.0
- class hydpy.models.lstream.lstream_model.Calc_ALV_ARV_ULV_URV_V1[source]¶
Bases:
MethodCalculate the wetted area and wetted perimeter of both forelands.
- Required by the method:
- Requires the control parameters:
- Requires the derived parameter:
- Requires the aide sequences:
- Calculates the aide sequences:
Each foreland lies between the main channel and one outer embankment. The water flowing exactly above a foreland is contributing to
ALVorARV. The theoretical surface separating the water above the main channel from the water above the foreland is not contributing toULVorURV. On the other hand, the surface separating the water above the foreland from the water above its outer embankment is contributing toULVandURV.Examples:
>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(14) >>> hm(1.0)
First, we show that all calculations agree with the unmodified triple trapezoid profile results when setting the smoothing parameter
HRPto zero:>>> derived.hrp(0)
This example deals with normal flow conditions, where water flows within the main channel completely (
H<HM, the first four channel sections); with moderate high flow conditions, where water flows over both forelands, but not over their embankments (HM<H< (HM+HV), channel sections six to eight or twelve for the left and the right foreland, respectively), and with extreme high flow conditions, where water flows over both forelands and their outer embankments ((HM+HV) <H, the last six or two channel sections for the left and the right foreland, respectively):>>> bv(left=2.0, right=3.0) >>> bnv(left=4.0, right=5.0) >>> derived.bnvf.update() >>> derived.hv(left=1.0, right=2.0)
>>> states.h = (0.0, 0.5, 0.9, 1.0, 1.1, 1.5, 1.9, ... 2.0, 2.1, 2.5, 2.9, 3.0, 3.1, 4.0) >>> model.calc_rhm_v1() >>> model.calc_rhv_v1() >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_alv_arv_ulv_urv_v1() >>> aides.alv alv(0.0, 0.0, 0.0, 0.0, 0.22, 1.5, 3.42, 4.0, 4.6, 7.0, 9.4, 10.0, 10.6, 16.0) >>> aides.arv arv(0.0, 0.0, 0.0, 0.0, 0.325, 2.125, 4.725, 5.5, 6.325, 10.125, 14.725, 16.0, 17.3, 29.0) >>> aides.ulv ulv(2.0, 2.0, 2.0, 2.0, 2.412311, 4.061553, 5.710795, 6.123106, 6.223106, 6.623106, 7.023106, 7.123106, 7.223106, 8.123106) >>> aides.urv urv(3.0, 3.0, 3.0, 3.0, 3.509902, 5.54951, 7.589118, 8.09902, 8.608921, 10.648529, 12.688137, 13.198039, 13.298039, 14.198039)
The next example proves the correct handling of forelands with zero widths and heights:
>>> bv(left=0.0, right=2.0) >>> bnv(4.0) >>> derived.hv(left=1.0, right=0.0) >>> model.calc_rhv_v1() >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_alv_arv_ulv_urv_v1() >>> aides.alv alv(0.0, 0.0, 0.0, 0.0, 0.02, 0.5, 1.62, 2.0, 2.4, 4.0, 5.6, 6.0, 6.4, 10.0) >>> aides.arv arv(0.0, 0.0, 0.0, 0.0, 0.2, 1.0, 1.8, 2.0, 2.2, 3.0, 3.8, 4.0, 4.2, 6.0) >>> aides.ulv ulv(0.0, 0.0, 0.0, 0.0, 0.412311, 2.061553, 3.710795, 4.123106, 4.223106, 4.623106, 5.023106, 5.123106, 5.223106, 6.123106) >>> aides.urv urv(2.0, 2.0, 2.0, 2.0, 2.1, 2.5, 2.9, 3.0, 3.1, 3.5, 3.9, 4.0, 4.1, 5.0)
Second, we repeat both examples with a reasonable smoothing parameterisation. The primary deviations occur around the original discontinuities related to the channel bottom and the main channel’s transition to both forelands:
>>> hr(0.1) >>> derived.hrp.update()
>>> bv(left=2.0, right=3.0) >>> bnv(left=4.0, right=5.0) >>> derived.hv(left=1.0, right=2.0) >>> model.calc_rhv_v1() >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_alv_arv_ulv_urv_v1() >>> aides.alv alv(0.0, 0.000025, 0.0202, 0.085324, 0.2442, 1.50005, 3.4198, 3.996641, 4.5958, 6.999975, 9.4, 10.0, 10.6, 16.0) >>> aides.arv arv(0.0, 0.000038, 0.03025, 0.127147, 0.36025, 2.125069, 4.725, 5.5, 6.325, 10.125, 14.72475, 15.995801, 17.29475, 29.0) >>> aides.ulv ulv(2.0, 2.000052, 2.041231, 2.168976, 2.453542, 4.061565, 5.679564, 5.995113, 6.191875, 6.623066, 7.023106, 7.123106, 7.223106, 8.123106) >>> aides.urv urv(3.0, 3.000064, 3.05099, 3.208971, 3.560892, 5.549574, 7.589118, 8.09902, 8.608921, 10.648478, 12.647147, 13.03005, 13.257049, 14.198039)
>>> bv(left=0.0, right=2.0) >>> bnv(4.0) >>> derived.hv(left=1.0, right=0.0) >>> model.calc_rhm_v1() >>> model.calc_rhv_v1() >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_alv_arv_ulv_urv_v1() >>> aides.alv alv(0.0, 0.0, 0.0002, 0.003359, 0.0242, 0.500025, 1.6198, 1.996641, 2.3958, 3.999975, 5.6, 6.0, 6.4, 10.0) >>> aides.arv arv(0.0, 0.000025, 0.02, 0.081965, 0.22, 1.000025, 1.8, 2.0, 2.2, 3.0, 3.8, 4.0, 4.2, 6.0) >>> aides.ulv ulv(0.0, 0.000052, 0.041231, 0.168976, 0.453542, 2.061565, 3.679564, 3.995113, 4.191875, 4.623066, 5.023106, 5.123106, 5.223106, 6.123106) >>> aides.urv urv(2.0, 2.000013, 2.01, 2.040983, 2.11, 2.500013, 2.9, 3.0, 3.1, 3.5, 3.9, 4.0, 4.1, 5.0)
- class hydpy.models.lstream.lstream_model.Calc_ALVDH_ARVDH_ULVDH_URVDH_V1[source]¶
Bases:
MethodCalculate the derivatives of the wetted area and perimeter of both forelands.
- Requires the control parameters:
- Requires the derived parameter:
- Requires the aide sequences:
- Calculates the aide sequences:
Examples:
In the following, we repeat the examples of the documentation on method
Calc_ALV_ARV_ULV_URV_V1and check the derivatives’ correctness by comparing the results of classNumericalDifferentiator:>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(13) >>> hm(1.0) >>> bv(left=2.0, right=3.0) >>> bnv(left=4.0, right=5.0) >>> derived.bnvf.update() >>> derived.hv(left=1.0, right=2.0)
>>> derived.hrp(0)
>>> states.h = (1.0, 1.5, 1.9, 2.0, 2.1, 2.5, 3.0, ... 3.5, 3.9, 4.0, 4.1, 4.5, 5.0) >>> model.calc_rhv_v1() >>> model.calc_rhvdh_v1() >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_rhlvrdh_rhrvrdh_v1() >>> model.calc_alvdh_arvdh_ulvdh_urvdh_v1() >>> aides.alvdh alvdh(2.0, 4.0, 5.6, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0) >>> aides.arvdh arvdh(3.0, 5.5, 7.5, 8.0, 8.5, 10.5, 13.0, 13.0, 13.0, 13.0, 13.0, 13.0, 13.0) >>> aides.ulvdh ulvdh(4.123106, 4.123106, 4.123106, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0) >>> aides.urvdh urvdh(5.09902, 5.09902, 5.09902, 5.09902, 5.09902, 5.09902, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
>>> from hydpy import NumericalDifferentiator >>> numdiff = NumericalDifferentiator( ... xsequence=states.h, ... ysequences=[aides.alv, aides.arv, aides.ulv, aides.urv], ... methods=[model.calc_rhv_v1, ... model.calc_rhlvr_rhrvr_v1, ... model.calc_alv_arv_ulv_urv_v1]) >>> numdiff() d_alv/d_h: 2.0, 4.0, 5.6, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0 d_arv/d_h: 3.0, 5.5, 7.5, 8.0, 8.5, 10.5, 13.0, 13.0, 13.0, 13.0, 13.0, 13.0, 13.0 d_ulv/d_h: 4.123106, 4.123106, 4.123106, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 d_urv/d_h: 5.09902, 5.09902, 5.09902, 5.09902, 5.09902, 5.09902, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0
>>> bv(left=0.0, right=2.0) >>> bnv(4.0) >>> derived.bnvf.update() >>> derived.hv(left=1.0, right=0.0) >>> model.calc_rhv_v1() >>> model.calc_rhvdh_v1() >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_rhlvrdh_rhrvrdh_v1() >>> model.calc_alvdh_arvdh_ulvdh_urvdh_v1() >>> aides.alvdh alvdh(0.0, 2.0, 3.6, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0) >>> aides.arvdh arvdh(2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0) >>> aides.ulvdh ulvdh(4.123106, 4.123106, 4.123106, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0) >>> aides.urvdh urvdh(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0) >>> numdiff() d_alv/d_h: 0.0, 2.0, 3.6, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0 d_arv/d_h: 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0 d_ulv/d_h: 4.123106, 4.123106, 4.123106, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 d_urv/d_h: 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0
>>> hr(0.1) >>> derived.hrp.update()
>>> bv(left=2.0, right=3.0) >>> bnv(left=4.0, right=5.0) >>> derived.bnvf.update() >>> derived.hv(left=1.0, right=2.0)
>>> model.calc_rhv_v1() >>> model.calc_rhvdh_v1() >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_rhlvrdh_rhrvrdh_v1() >>> model.calc_alvdh_arvdh_ulvdh_urvdh_v1() >>> aides.alvdh alvdh(1.081965, 3.9992, 5.593775, 5.918034, 6.028465, 6.000375, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0) >>> aides.arvdh arvdh(1.602457, 5.498894, 7.499998, 8.0, 8.5, 10.5, 12.897543, 13.000468, 13.000001, 13.0, 13.0, 13.0, 13.0) >>> aides.ulvdh ulvdh(2.061553, 4.121566, 3.637142, 2.561553, 1.485963, 1.000664, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0) >>> aides.urvdh urvdh(2.54951, 5.097936, 5.099018, 5.099019, 5.099018, 5.098149, 3.04951, 1.000871, 1.000001, 1.0, 1.0, 1.0, 1.0)
>>> numdiff() d_alv/d_h: 1.081965, 3.9992, 5.593775, 5.918034, 6.028465, 6.000375, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0 d_arv/d_h: 1.602457, 5.498894, 7.499998, 8.0, 8.5, 10.5, 12.897543, 13.000468, 13.000001, 13.0, 13.0, 13.0, 13.0 d_ulv/d_h: 2.061553, 4.121566, 3.637142, 2.561553, 1.485963, 1.000664, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 d_urv/d_h: 2.54951, 5.097936, 5.099018, 5.099019, 5.099018, 5.098149, 3.04951, 1.000871, 1.000001, 1.0, 1.0, 1.0, 1.0
- class hydpy.models.lstream.lstream_model.Calc_ALVR_ARVR_ULVR_URVR_V1[source]¶
Bases:
MethodCalculate the wetted area and perimeter of both outer embankments.
- Required by the method:
- Requires the control parameters:
- Requires the derived parameter:
- Requires the aide sequences:
- Calculates the aide sequences:
Each outer embankment lies beyond its foreland. The water flowing exactly above an embankment adds to
ALVRandARVR. The theoretical surface separating water above the foreland from the water above its embankment is not contributing toULVRandURVR.Examples:
>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(11) >>> hm(1.0)
First, we show that all calculations agree with the unmodified triple trapezoid profile results when the setting the smoothing parameter
HRPto zero:>>> derived.hrp(0)
This example deals with moderate high flow conditions, where water flows over the forelands, but not over their outer embankments (
HM<H< (HM+HV), the first four or eight channel sections for the left and the right outer embankment, respectively); the second example deals with extreme high flow conditions, where water flows both over the foreland and their outer embankments ((HM+HV) <H, the last seven or three channel sections for the left and the right outer embankment, respectively):>>> states.h = 1.0, 1.5, 1.9, 2.0, 2.1, 2.5, 2.9, 3.0, 3.1, 3.5, 4.0 >>> bnvr(left=4.0, right=5.0) >>> derived.bnvrf.update() >>> derived.hv(left=1.0, right=2.0) >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_alvr_arvr_ulvr_urvr_v1() >>> aides.alvr alvr(0.0, 0.0, 0.0, 0.0, 0.02, 0.5, 1.62, 2.0, 2.42, 4.5, 8.0) >>> aides.arvr arvr(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.025, 0.625, 2.5) >>> aides.ulvr ulvr(0.0, 0.0, 0.0, 0.0, 0.412311, 2.061553, 3.710795, 4.123106, 4.535416, 6.184658, 8.246211) >>> aides.urvr urvr(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.509902, 2.54951, 5.09902)
The next example checks the special cases of a vertical outer embankment (left side) and zero-height foreland (right side):
>>> bnvr(left=0.0, right=5.0) >>> derived.bnvrf.update() >>> derived.hv(left=1.0, right=0.0) >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_alvr_arvr_ulvr_urvr_v1() >>> aides.alvr alvr(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) >>> aides.arvr arvr(0.0, 0.625, 2.025, 2.5, 3.025, 5.625, 9.025, 10.0, 11.025, 15.625, 22.5) >>> aides.ulvr ulvr(0.0, 0.0, 0.0, 0.0, 0.1, 0.5, 0.9, 1.0, 1.1, 1.5, 2.0) >>> aides.urvr urvr(0.0, 2.54951, 4.589118, 5.09902, 5.608921, 7.648529, 9.688137, 10.198039, 10.707941, 12.747549, 15.297059)
Second, we repeat both examples with a reasonable smoothing parameterisation. The primary deviations occur around the original discontinuities related to the channel bottom and the main channel’s transition to both forelands:
>>> hr(0.1) >>> derived.hrp.update() >>> bnvr(left=4.0, right=5.0) >>> derived.bnvrf.update() >>> derived.hv(left=1.0, right=2.0) >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_alvr_arvr_ulvr_urvr_v1() >>> aides.alvr alvr(0.0, 0.0, 0.0002, 0.003359, 0.0242, 0.500025, 1.62, 2.0, 2.42, 4.5, 8.0) >>> aides.arvr arvr(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00025, 0.004199, 0.03025, 0.625031, 2.5) >>> aides.ulvr ulvr(0.0, 0.000052, 0.041231, 0.168976, 0.453542, 2.061605, 3.710795, 4.123106, 4.535416, 6.184658, 8.246211) >>> aides.urvr urvr(0.0, 0.0, 0.0, 0.0, 0.0, 0.000064, 0.05099, 0.208971, 0.560892, 2.549574, 5.09902)
>>> bnvr(left=0.0, right=5.0) >>> derived.bnvrf.update() >>> derived.hv(left=1.0, right=0.0) >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_alvr_arvr_ulvr_urvr_v1() >>> aides.alvr alvr(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) >>> aides.arvr arvr(0.004199, 0.625031, 2.025, 2.5, 3.025, 5.625, 9.025, 10.0, 11.025, 15.625, 22.5) >>> aides.ulvr ulvr(0.0, 0.000013, 0.01, 0.040983, 0.11, 0.500013, 0.9, 1.0, 1.1, 1.5, 2.0) >>> aides.urvr urvr(0.208971, 2.549574, 4.589118, 5.09902, 5.608921, 7.648529, 9.688137, 10.198039, 10.707941, 12.747549, 15.297059)
- class hydpy.models.lstream.lstream_model.Calc_ALVRDH_ARVRDH_ULVRDH_URVRDH_V1[source]¶
Bases:
MethodCalculate the derivatives of the wetted area and perimeter of both outer embankments.
- Requires the control parameters:
- Requires the derived parameter:
- Requires the aide sequences:
- Calculates the aide sequences:
Examples:
In the following, we repeat the examples of the documentation on method
Calc_ALVR_ARVR_ULVR_URVR_V1and check the derivatives’ correctness by comparing the results of classNumericalDifferentiator:>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(11) >>> hm(1.0)
>>> derived.hrp(0)
>>> states.h = 1.0, 1.5, 1.9, 2.0, 2.1, 2.5, 2.9, 3.0, 3.1, 3.5, 4.0 >>> bnvr(left=4.0, right=5.0) >>> derived.bnvrf.update() >>> derived.hv(left=1.0, right=2.0) >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_rhlvrdh_rhrvrdh_v1() >>> model.calc_alvrdh_arvrdh_ulvrdh_urvrdh_v1() >>> aides.alvrdh alvrdh(0.0, 0.0, 0.0, 0.0, 0.4, 2.0, 3.6, 4.0, 4.4, 6.0, 8.0) >>> aides.arvrdh arvrdh(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 2.5, 5.0) >>> aides.ulvrdh ulvrdh(0.0, 0.0, 0.0, 4.123106, 4.123106, 4.123106, 4.123106, 4.123106, 4.123106, 4.123106, 4.123106) >>> aides.urvrdh urvrdh(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.09902, 5.09902, 5.09902, 5.09902)
>>> from hydpy import NumericalDifferentiator >>> numdiff = NumericalDifferentiator( ... xsequence=states.h, ... ysequences=[aides.alvr, aides.arvr, aides.ulvr, aides.urvr], ... methods=[model.calc_rhlvr_rhrvr_v1, ... model.calc_alvr_arvr_ulvr_urvr_v1]) >>> numdiff() d_alvr/d_h: 0.0, 0.0, 0.0, 0.0, 0.4, 2.0, 3.6, 4.0, 4.4, 6.0, 8.0 d_arvr/d_h: 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 2.5, 5.0 d_ulvr/d_h: 0.0, 0.0, 0.0, 4.123106, 4.123106, 4.123106, 4.123106, 4.123106, 4.123106, 4.123106, 4.123106 d_urvr/d_h: 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5.09902, 5.09902, 5.09902, 5.09902
>>> bnvr(left=0.0, right=5.0) >>> derived.bnvrf.update() >>> derived.hv(left=1.0, right=0.0) >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_rhlvrdh_rhrvrdh_v1() >>> model.calc_alvrdh_arvrdh_ulvrdh_urvrdh_v1() >>> aides.alvrdh alvrdh(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) >>> aides.arvrdh arvrdh(0.0, 2.5, 4.5, 5.0, 5.5, 7.5, 9.5, 10.0, 10.5, 12.5, 15.0) >>> aides.ulvrdh ulvrdh(0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0) >>> aides.urvrdh urvrdh(5.09902, 5.09902, 5.09902, 5.09902, 5.09902, 5.09902, 5.09902, 5.09902, 5.09902, 5.09902, 5.09902)
>>> numdiff() d_alvr/d_h: 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 d_arvr/d_h: 0.0, 2.5, 4.5, 5.0, 5.5, 7.5, 9.5, 10.0, 10.5, 12.5, 15.0 d_ulvr/d_h: 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 d_urvr/d_h: 5.09902, 5.09902, 5.09902, 5.09902, 5.09902, 5.09902, 5.09902, 5.09902, 5.09902, 5.09902, 5.09902
>>> hr(0.1) >>> derived.hrp.update() >>> bnvr(left=4.0, right=5.0) >>> derived.bnvrf.update() >>> derived.hv(left=1.0, right=2.0) >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_rhlvrdh_rhrvrdh_v1() >>> model.calc_alvrdh_arvrdh_ulvrdh_urvrdh_v1() >>> aides.alvrdh alvrdh(0.0, 0.0, 0.006224, 0.081965, 0.371535, 1.999625, 3.599999, 4.0, 4.4, 6.0, 8.0) >>> aides.arvrdh arvrdh(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00778, 0.102457, 0.464419, 2.499532, 5.0) >>> aides.ulvrdh ulvrdh(0.0, 0.000876, 0.641565, 2.061553, 3.48154, 4.12223, 4.123105, 4.123105, 4.123106, 4.123106, 4.123106) >>> aides.urvrdh urvrdh(0.0, 0.0, 0.0, 0.0, 0.000001, 0.001083, 0.79342, 2.54951, 4.305599, 5.097936, 5.099019)
>>> numdiff() d_alvr/d_h: 0.0, 0.0, 0.006224, 0.081965, 0.371535, 1.999625, 3.599999, 4.0, 4.4, 6.0, 8.0 d_arvr/d_h: 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00778, 0.102457, 0.464419, 2.499532, 5.0 d_ulvr/d_h: 0.0, 0.000876, 0.641565, 2.061553, 3.48154, 4.12223, 4.123105, 4.123105, 4.123106, 4.123106, 4.123106 d_urvr/d_h: 0.0, 0.0, 0.0, 0.0, 0.000001, 0.001083, 0.79342, 2.54951, 4.305599, 5.097936, 5.099019
- class hydpy.models.lstream.lstream_model.Calc_QM_V1[source]¶
Bases:
MethodCalculate the discharge of the main channel after Manning-Strickler.
- Required by the method:
- Requires the control parameter:
- Requires the derived parameter:
- Requires the aide sequences:
- Calculates the aide sequence:
- Basic equation:
\(QM = MFM \cdot \frac{AM^{5/3}}{UM^{2/3}}\)
Examples:
Note the handling of zero values for
UM(in the third subsection):>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(3) >>> derived.mfm(10.0) >>> aides.am = 3.0, 0.0, 3.0 >>> aides.um = 7.0, 7.0, 0.0 >>> model.calc_qm_v1() >>> aides.qm qm(17.053102, 0.0, 0.0)
- class hydpy.models.lstream.lstream_model.Calc_QM_V2[source]¶
Bases:
MethodCalculate the discharge of the main channel following the kinematic wave approach.
- Requires the control parameter:
- Requires the aide sequences:
- Calculates the aide sequence:
- Basic equation:
\(QM = \frac{QMDH}{AMDH} \cdot AM\)
Examples:
Note the handling of zero values for
AMDH(in the second subsection):>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(2) >>> aides.am = 4.0, 4.0 >>> aides.qmdh = 3.0, 3.0 >>> aides.amdh = 2.0, 0.0 >>> model.calc_qm_v2() >>> aides.qm qm(6.0, 0.0)
- class hydpy.models.lstream.lstream_model.Calc_QMDH_V1[source]¶
Bases:
MethodCalculate the derivative of the discharge of the main channel following method
Calc_QM_V1.- Requires the control parameter:
- Requires the derived parameter:
- Requires the aide sequences:
- Calculates the aide sequence:
- Basic equation:
\(QMDH = MFM \cdot \frac{5 \cdot AM^{2/3} \cdot AMDH}{3 \cdot UM^{2/3}} - \frac{2 \cdot AM^{5/3} \cdot UMDH}{3 \cdot UM^{5/3}}\)
Examples:
First, we apply the class
NumericalDifferentiatorto validate the calculated derivatives:>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(2) >>> bm(2.0) >>> bnm(4.0) >>> hm(2.0) >>> derived.mfm(10.0) >>> derived.hrp(0.0) >>> derived.bnmf.update() >>> states.h = 0.0, 1.0 >>> model.calc_rhm_v1() >>> model.calc_rhmdh_v1() >>> model.calc_rhv_v1() >>> model.calc_rhvdh_v1() >>> model.calc_am_um_v1() >>> model.calc_amdh_umdh_v1() >>> model.calc_qmdh_v1() >>> aides.qmdh qmdh(0.0, 94.12356)
>>> from hydpy import NumericalDifferentiator,pub >>> numdiff = NumericalDifferentiator( ... xsequence=states.h, ... ysequences=[aides.qm], ... methods=[model.calc_rhm_v1, ... model.calc_rhv_v1, ... model.calc_am_um_v1, ... model.calc_qm_v1], ... dx=1e-8) >>> with pub.options.reprdigits(5): ... numdiff() d_qm/d_h: 0.00002, 94.12356
Second, we show that zero values for
AMorUMresult in zero values forQMDH:>>> aides.am = 1.0, 0.0 >>> aides.um = 0.0, 1.0 >>> model.calc_qmdh_v1() >>> aides.qmdh qmdh(0.0, 0.0)
- class hydpy.models.lstream.lstream_model.Calc_QLV_QRV_V1[source]¶
Bases:
MethodCalculate the discharge of both forelands after Manning-Strickler.
- Required by the method:
- Requires the control parameter:
- Requires the derived parameter:
- Requires the aide sequences:
- Calculates the aide sequences:
- Basic equation:
\(QV = MFV \cdot \frac{AV^{5/3}}{UV^{2/3}}\)
Examples:
Note the handling of zero values for
ULVandURV(in the second subsection):>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(2) >>> derived.mfv(left=10.0, right=18.0) >>> aides.alv = 3.0, 3.0 >>> aides.arv = 4.0, 4.0 >>> aides.ulv = 7.0, 0.0 >>> aides.urv = 8.0, 0.0 >>> model.calc_qlv_qrv_v1() >>> aides.qlv qlv(17.053102, 0.0) >>> aides.qrv qrv(45.357158, 0.0)
- class hydpy.models.lstream.lstream_model.Calc_QLV_QRV_V2[source]¶
Bases:
MethodCalculate the discharge of both forelands following the kinematic wave approach.
- Requires the control parameter:
- Requires the aide sequences:
- Calculates the aide sequences:
- Basic equation:
\(QV = \frac{QVDH}{AVDH} \cdot AV\)
Examples:
Note the handling of zero values for
ALVDHandARVDH(in the second subsection):>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(2) >>> aides.alv = 3.0, 3.0 >>> aides.arv = 5.0, 5.0 >>> aides.qlvdh = 4.0, 4.0 >>> aides.qrvdh = 6.0, 6.0 >>> aides.alvdh = 2.0, 0.0 >>> aides.arvdh = 4.0, 0.0 >>> model.calc_qlv_qrv_v2() >>> aides.qlv qlv(6.0, 0.0) >>> aides.qrv qrv(7.5, 0.0)
- class hydpy.models.lstream.lstream_model.Calc_QLVDH_QRVDH_V1[source]¶
Bases:
MethodCalculate the derivative of both forelands’ discharge with respect to the stage following method
Calc_QLV_QRV_V1.- Requires the control parameter:
- Requires the derived parameter:
- Requires the aide sequences:
- Calculates the aide sequences:
- Basic equation:
\(QVDH = MFV \cdot \frac{5 \cdot AV^{2/3} \cdot AVDH}{3 \cdot UV^{2/3}} - \frac{2 \cdot AV^{5/3} \cdot UVDH}{3 \cdot UV^{5/3}}\)
Examples:
First, we apply the class
NumericalDifferentiatorto validate the calculated derivatives:>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(2) >>> hm(1.0) >>> bv(left=2.0, right=3.0) >>> bnv(left=4.0, right=5.0) >>> derived.bnvf.update() >>> derived.hv(left=1.0, right=2.0) >>> derived.mfv(left=10.0, right=18.0) >>> derived.hrp(0.0) >>> states.h = 0.5, 1.5 >>> model.calc_rhv_v1() >>> model.calc_rhvdh_v1() >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_rhlvrdh_rhrvrdh_v1() >>> model.calc_alv_arv_ulv_urv_v1() >>> model.calc_alvdh_arvdh_ulvdh_urvdh_v1() >>> model.calc_qlvdh_qrvdh_v1() >>> aides.qlvdh qlvdh(0.0, 29.091363) >>> aides.qrvdh qrvdh(0.0, 74.651886)
>>> from hydpy import NumericalDifferentiator >>> numdiff = NumericalDifferentiator( ... xsequence=states.h, ... ysequences=[aides.qlv, aides.qrv], ... methods=[model.calc_rhv_v1, ... model.calc_rhlvr_rhrvr_v1, ... model.calc_alv_arv_ulv_urv_v1, ... model.calc_qlv_qrv_v1])() d_qlv/d_h: 0.0, 29.091363 d_qrv/d_h: 0.0, 74.651886
Second, we show that zero values for
ALVorULVas well as forARVorURVresult in zero values forQLVDHorQRVDH, respectively:>>> aides.alv = 1.0, 0.0 >>> aides.ulv = 0.0, 1.0 >>> aides.arv = 1.0, 0.0 >>> aides.urv = 0.0, 1.0 >>> model.calc_qlvdh_qrvdh_v1() >>> aides.qlvdh qlvdh(0.0, 0.0) >>> aides.qrvdh qrvdh(0.0, 0.0)
- class hydpy.models.lstream.lstream_model.Calc_QLVR_QRVR_V1[source]¶
Bases:
MethodCalculate the discharge of both outer embankments after Manning-Strickler.
- Required by the method:
- Requires the control parameter:
- Requires the derived parameter:
- Requires the aide sequences:
- Calculates the aide sequences:
- Basic equation:
\(QVR = MFV \cdot \frac{AVR^{5/3}}{UVR^{2/3}}\)
Examples:
Note the handling of zero values for
ULVRandURVR(in the second subsection):>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(2) >>> derived.mfv(left=10.0, right=1.2) >>> aides.alvr = 3.0, 3.0 >>> aides.arvr = 4.0, 4.0 >>> aides.ulvr = 7.0, 0.0 >>> aides.urvr = 8.0, 0.0 >>> model.calc_qlvr_qrvr_v1() >>> aides.qlvr qlvr(17.053102, 0.0) >>> aides.qrvr qrvr(3.023811, 0.0)
- class hydpy.models.lstream.lstream_model.Calc_QLVR_QRVR_V2[source]¶
Bases:
MethodCalculate the discharge of both outer embankments following the kinematic wave approach.
- Requires the control parameter:
- Requires the aide sequences:
- Calculates the aide sequences:
- Basic equation:
\(QVR = \frac{QVRDH}{AVRDH} \cdot AVR\)
Examples:
Note the handling of zero values for
ALVRDHandARVRDH(in the second subsection):>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(2) >>> aides.alvr = 3.0, 3.0 >>> aides.arvr = 5.0, 5.0 >>> aides.qlvrdh = 4.0, 4.0 >>> aides.qrvrdh = 6.0, 6.0 >>> aides.alvrdh = 2.0, 0.0 >>> aides.arvrdh = 4.0, 0.0 >>> model.calc_qlvr_qrvr_v2() >>> aides.qlvr qlvr(6.0, 0.0) >>> aides.qrvr qrvr(7.5, 0.0)
- class hydpy.models.lstream.lstream_model.Calc_QLVRDH_QRVRDH_V1[source]¶
Bases:
MethodCalculate the derivative of the discharge over the outer embankments with respect to the stage following method
Calc_QLVR_QRVR_V1.- Requires the control parameter:
- Requires the derived parameter:
- Requires the aide sequences:
- Calculates the aide sequences:
- Basic equation:
\(QVRDH = MFVR \cdot \frac{5 \cdot AVR^{2/3} \cdot AVRDH}{3 \cdot UVR^{2/3}} - \frac{2 \cdot AVR{5/3} \cdot UVRDH}{3 \cdot UVR^{5/3}}\)
Examples:
First, we apply the class
NumericalDifferentiatorto validate the calculated derivatives:>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(2) >>> hm(1.0) >>> bnvr(left=4.0, right=5.0) >>> derived.bnvrf.update() >>> derived.hv(left=1.0, right=2.0) >>> derived.mfv(left=10.0, right=18.0) >>> derived.hrp(0.0) >>> states.h = 1.5, 3.5 >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_rhlvrdh_rhrvrdh_v1() >>> model.calc_alvr_arvr_ulvr_urvr_v1() >>> model.calc_alvrdh_arvrdh_ulvrdh_urvrdh_v1() >>> model.calc_qlvrdh_qrvrdh_v1() >>> aides.qlvrdh qlvrdh(0.0, 64.717418) >>> aides.qrvrdh qrvrdh(0.0, 23.501747)
>>> from hydpy import NumericalDifferentiator >>> NumericalDifferentiator( ... xsequence=states.h, ... ysequences=[aides.qlvr, aides.qrvr], ... methods=[model.calc_rhlvr_rhrvr_v1, ... model.calc_alvr_arvr_ulvr_urvr_v1, ... model.calc_qlvr_qrvr_v1])() d_qlvr/d_h: 0.0, 64.717418 d_qrvr/d_h: 0.0, 23.501747
Second, we show that zero values for
ALVRorULVRas well as forARVRorURVRresult in zero values forQLVRDHorQRVRDH, respectively:>>> aides.alvr = 1.0, 0.0 >>> aides.ulvr = 0.0, 1.0 >>> aides.arvr = 1.0, 0.0 >>> aides.urvr = 0.0, 1.0 >>> model.calc_qlvrdh_qrvrdh_v1() >>> aides.qlvrdh qlvrdh(0.0, 0.0) >>> aides.qrvrdh qrvrdh(0.0, 0.0)
- class hydpy.models.lstream.lstream_model.Calc_AG_V1[source]¶
Bases:
MethodCalculate the through wetted of the total cross-sections.
- Required by the method:
- Requires the control parameter:
- Requires the aide sequences:
- Calculates the aide sequence:
- Basic equation:
\(AG = AM+ALV+ARV+ALVR+ARVR\)
Example:
>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(2) >>> aides.am = 0.0, 1.0 >>> aides.alv = 2.0, 4.0 >>> aides.arv = 3.0, 5.0 >>> aides.alvr = 6.0, 8.0 >>> aides.arvr = 7.0, 9.0 >>> model.calc_ag_v1() >>> aides.ag ag(18.0, 27.0)
- class hydpy.models.lstream.lstream_model.Calc_QG_V1[source]¶
Bases:
MethodCalculate the discharge of the total cross-section.
- Required by the method:
- Requires the control parameter:
- Requires the aide sequences:
- Calculates the flux sequence:
- Basic equation:
\(QG = QM + QLV + QRV + QLVR + QRVR\)
Example:
>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(2) >>> aides.qm = 0.0, 1.0 >>> aides.qlv = 2.0, 4.0 >>> aides.qrv = 3.0, 5.0 >>> aides.qlvr = 6.0, 8.0 >>> aides.qrvr = 7.0, 9.0 >>> model.calc_qg_v1() >>> fluxes.qg qg(18.0, 27.0)
- class hydpy.models.lstream.lstream_model.Calc_QG_V2[source]¶
Bases:
MethodCalculate the discharge of the total cross-section based on an interpolated flow velocity.
- Requires the control parameters:
- Requires the state sequence:
- Calculates the flux sequence:
- Basic equation:
\(QG = EK \cdot \frac{1000 \cdot V_{interpolated} \cdot VG \cdot GTS}{Laen}\)
Example:
For simplicity, we define a linear between flow velocity and water storage:
>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(2) >>> laen(10.0) >>> ek(0.5) >>> vg2fg(PPoly.from_data(xs=[0.0, 1.0], ys=[0.0, 1.0])) >>> from hydpy import UnitTest >>> test = UnitTest(model, ... model.calc_qg_v2, ... last_example=3, ... parseqs=(states.vg, ... fluxes.qg)) >>> test.nexts.vg = numpy.empty((4, 2)) >>> test.nexts.vg[:, 0] = numpy.arange(-1.0, 3.0) >>> test.nexts.vg[:, 1] = numpy.arange(3.0, 7.0) >>> test() | ex. | vg | qg | ----------------------------------- | 1 | -1.0 3.0 | 0.0 900.0 | | 2 | 0.0 4.0 | 0.0 1600.0 | | 3 | 1.0 5.0 | 100.0 2500.0 |
Our example shows that a linear velocity-volume relationship results in a quadratic discharge-volume relationship. Note also that we generally set the discharge to zero for negative volumes.
For more realistic approximations of measured relationships between storage and discharge, we require larger neural networks.
- class hydpy.models.lstream.lstream_model.Calc_WBM_V1[source]¶
Bases:
MethodCalculate the water table width above the main channel.
- Requires the control parameters:
- Requires the fixed parameters:
- Requires the aide sequences:
- Calculates the aide sequence:
Examples:
Due to \(WBM = \frac{dAM}{dh}\), we can apply the class
NumericalDifferentiatorto validate the calculated water table widths:>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(5) >>> bm(4.0) >>> bnm(2.0) >>> hm(1.0) >>> hr(0.0) >>> derived.hrp.update() >>> states.h = 0.0, 0.9, 1.0, 1.1, 2.0 >>> model.calc_rhm_v1() >>> model.calc_rhmdh_v1() >>> model.calc_rhv_v1() >>> model.calc_rhvdh_v1() >>> model.calc_wbm_v1() >>> aides.wbm wbm(4.0, 7.6, 8.0, 8.0, 8.0)
>>> from hydpy import NumericalDifferentiator >>> numdiff = NumericalDifferentiator( ... xsequence=states.h, ... ysequences=[aides.am], ... methods=[model.calc_rhm_v1, ... model.calc_rhv_v1, ... model.calc_am_um_v1]) >>> numdiff() d_am/d_h: 4.0, 7.6, 8.0, 8.0, 8.0
>>> hr(0.1) >>> derived.hrp.update() >>> model.calc_rhm_v1() >>> model.calc_rhmdh_v1() >>> model.calc_rhv_v1() >>> model.calc_rhvdh_v1() >>> model.calc_wbm_v1() >>> aides.wbm wbm(2.081965, 7.593774, 7.918034, 8.028465, 8.0)
>>> numdiff() d_am/d_h: 2.081965, 7.593774, 7.918034, 8.028465, 8.0
- class hydpy.models.lstream.lstream_model.Calc_WBLV_WBRV_V1[source]¶
Bases:
MethodCalculate the water table width above both forelands.
- Requires the control parameters:
- Requires the aide sequences:
- Calculates the aide sequences:
Examples:
Due to \(WBV = \frac{dAV}{dh}\), we can apply the class
NumericalDifferentiatorto validate the calculated water table widths:>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(11) >>> bm(4.0) >>> bnm(2.0) >>> derived.bnvf.update() >>> hm(1.0) >>> bv(left=2.0, right=3.0) >>> bbv(left=10., right=40.) >>> bnv(left=10., right=20.) >>> derived.hv.update() >>> derived.hv hv(left=1.0, right=2.0) >>> hr(0.0) >>> derived.hrp.update() >>> states.h = 1.0, 1.5, 1.9, 2.0, 2.1, 2.5, 2.9, 3.0, 3.1, 3.5, 4.0 >>> model.calc_rhv_v1() >>> model.calc_rhvdh_v1() >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_rhlvrdh_rhrvrdh_v1() >>> model.calc_wblv_wbrv_v1() >>> aides.wblv wblv(2.0, 7.0, 11.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0) >>> aides.wbrv wbrv(3.0, 13.0, 21.0, 23.0, 25.0, 33.0, 41.0, 43.0, 43.0, 43.0, 43.0)
>>> from hydpy import NumericalDifferentiator >>> numdiff = NumericalDifferentiator( ... xsequence=states.h, ... ysequences=[aides.alv, aides.arv], ... methods=[model.calc_rhv_v1, ... model.calc_rhlvr_rhrvr_v1, ... model.calc_alv_arv_ulv_urv_v1]) >>> numdiff() d_alv/d_h: 2.0, 7.0, 11.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0 d_arv/d_h: 3.0, 13.0, 21.0, 23.0, 25.0, 33.0, 41.0, 43.0, 43.0, 43.0, 43.0
>>> hr(0.1) >>> derived.hrp.update() >>> model.calc_rhv_v1() >>> model.calc_rhvdh_v1() >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_rhlvrdh_rhrvrdh_v1() >>> model.calc_wblv_wbrv_v1() >>> aides.wblv wblv(1.204913, 6.998638, 10.984437, 11.795086, 12.071163, 12.000937, 12.000002, 12.0, 12.0, 12.0, 12.0) >>> aides.wbrv wbrv(1.909826, 12.997489, 20.999995, 22.999999, 25.0, 33.0, 40.96888, 42.590174, 43.142325, 43.001873, 43.000001)
>>> numdiff() d_alv/d_h: 1.204913, 6.998638, 10.984437, 11.795086, 12.071163, 12.000937, 12.000002, 12.0, 12.0, 12.0, 12.0 d_arv/d_h: 1.909826, 12.997489, 20.999995, 22.999999, 25.0, 33.0, 40.96888, 42.590174, 43.142325, 43.001873, 43.000001
- class hydpy.models.lstream.lstream_model.Calc_WBLVR_WBRVR_V1[source]¶
Bases:
MethodCalculate the water table width above both outer embankments.
- Requires the control parameters:
- Requires the aide sequences:
- Calculates the aide sequences:
Examples:
Due to \(WBVR = \frac{dAVR}{dh}\), we can apply the class
NumericalDifferentiatorto validate the calculated water table widths:>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(11) >>> hm(1.0) >>> bnvr(left=4.0, right=5.0) >>> derived.bnvrf.update() >>> derived.hv(left=1.0, right=2.0) >>> hr(0.0) >>> derived.hrp.update() >>> states.h = 1.0, 1.5, 1.9, 2.0, 2.1, 2.5, 2.9, 3.0, 3.1, 3.5, 4.0 >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_rhlvrdh_rhrvrdh_v1() >>> model.calc_wblvr_wbrvr_v1() >>> aides.wblvr wblvr(0.0, 0.0, 0.0, 0.0, 0.4, 2.0, 3.6, 4.0, 4.4, 6.0, 8.0) >>> aides.wbrvr wbrvr(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 2.5, 5.0)
>>> from hydpy import NumericalDifferentiator >>> numdiff = NumericalDifferentiator( ... xsequence=states.h, ... ysequences=[aides.alvr, aides.arvr], ... methods=[model.calc_rhlvr_rhrvr_v1, ... model.calc_alvr_arvr_ulvr_urvr_v1]) >>> numdiff() d_alvr/d_h: 0.0, 0.0, 0.0, 0.0, 0.4, 2.0, 3.6, 4.0, 4.4, 6.0, 8.0 d_arvr/d_h: 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 2.5, 5.0
>>> hr(0.1) >>> derived.hrp.update() >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_rhlvrdh_rhrvrdh_v1() >>> model.calc_wblvr_wbrvr_v1() >>> aides.wblvr wblvr(0.0, 0.0, 0.006224, 0.081965, 0.371535, 1.999625, 3.599999, 4.0, 4.4, 6.0, 8.0) >>> aides.wbrvr wbrvr(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00778, 0.102457, 0.464419, 2.499532, 5.0)
>>> numdiff() d_alvr/d_h: 0.0, 0.0, 0.006224, 0.081965, 0.371535, 1.999625, 3.599999, 4.0, 4.4, 6.0, 8.0 d_arvr/d_h: 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00778, 0.102457, 0.464419, 2.499532, 5.0
- class hydpy.models.lstream.lstream_model.Calc_WBG_V1[source]¶
Bases:
MethodCalculate the water level width of the total cross-section.
- Requires the control parameter:
- Requires the aide sequences:
- Calculates the aide sequence:
- Basic equation:
\(WBG = WBM+WLV+WRV+WLVR+WRVR\)
Example:
>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(2) >>> aides.wbm = 0.0, 1.0 >>> aides.wblv = 2.0, 4.0 >>> aides.wbrv = 3.0, 5.0 >>> aides.wblvr = 6.0, 8.0 >>> aides.wbrvr = 7.0, 9.0 >>> model.calc_wbg_v1() >>> aides.wbg wbg(18.0, 27.0)
- class hydpy.models.lstream.lstream_model.Calc_DH_V1[source]¶
Bases:
MethodDetermine the change in the stage.
- Requires the control parameters:
- Requires the flux sequences:
- Requires the aide sequence:
- Calculates the flux sequence:
- Basic equation:
\(DH = \frac{QG_{i-1}-QG_i}{WBG \cdot 1000 \cdot Laen / GTS}\)
Example:
>>> from hydpy.models.lstream import * >>> parameterstep() >>> laen(10.0) >>> gts(5) >>> aides.wbg(3.0, 3.5, 4.0, 3.5, 3.0) >>> fluxes.qz = 1.0 >>> fluxes.qg = 2.0, 3.0, 4.0, 3.0, 2.0 >>> model.calc_dh_v1() >>> fluxes.dh dh(-0.000167, -0.000143, -0.000125, 0.000143, 0.000167)
- class hydpy.models.lstream.lstream_model.Update_H_V1[source]¶
Bases:
MethodUpdate the stage.
- Requires the control parameter:
- Requires the derived parameter:
- Requires the flux sequence:
- Updates the state sequence:
- Basic equation:
\(\frac{dH}{dt} = DH\)
Example:
>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(5) >>> derived.sek(60*60) >>> fluxes.dh = -0.12, -0.1, -0.09, 0.1, 0.12 >>> fluxes.dh /= 60*60 >>> states.h(1.0, 1.2, 1.3, 1.2, 1.0) >>> model.update_h_v1() >>> states.h h(0.88, 1.1, 1.21, 1.3, 1.12)
- class hydpy.models.lstream.lstream_model.Update_VG_V1[source]¶
Bases:
MethodUpdate the water volume.
- Requires the control parameter:
- Requires the derived parameter:
- Requires the flux sequences:
- Updates the state sequence:
- Basic equation:
\(\frac{dV}{dt} = QG_{i-1}-QG_i\)
Example:
>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(5) >>> derived.sek(60*60) >>> states.vg(1.0, 1.2, 1.3, 1.2, 1.0) >>> fluxes.qza = 1.0 >>> fluxes.qg = 3.0, 2.0, 4.0, 3.0, 5.0 >>> model.update_vg_v1() >>> states.vg vg(0.9928, 1.2036, 1.2928, 1.2036, 0.9928)
- class hydpy.models.lstream.lstream_model.Calc_QA_V1[source]¶
Bases:
MethodQuery the actual outflow.
- Requires the control parameter:
- Requires the flux sequences:
- Calculates the flux sequence:
Examples:
>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(3) >>> fluxes.qz = 1.0 >>> fluxes.qg = 2.0, 3.0, 4.0 >>> model.calc_qa_v1() >>> fluxes.qa qa(4.0) >>> gts(0) >>> model.calc_qa_v1() >>> fluxes.qa qa(1.0)
- class hydpy.models.lstream.lstream_model.Pass_Q_V1[source]¶
Bases:
MethodPass the outflow to the outlet node.
- class hydpy.models.lstream.lstream_model.Return_QF_V1[source]¶
Bases:
MethodCalculate and return the “error” between the actual discharge and the discharge corresponding to the given water stage.
- Required by the method:
- Required submethods:
Calc_RHM_V1Calc_RHMDH_V1Calc_RHV_V1Calc_RHVDH_V1Calc_RHLVR_RHRVR_V1Calc_RHLVRDH_RHRVRDH_V1Calc_AM_UM_V1Calc_ALV_ARV_ULV_URV_V1Calc_ALVR_ARVR_ULVR_URVR_V1Calc_QM_V1Calc_QLV_QRV_V1Calc_QLVR_QRVR_V1Calc_AG_V1Calc_QG_V1- Requires the control parameters:
- Requires the derived parameters:
- Calculates the state sequence:
- Calculates the aide sequences:
RHMRHMDHRHVRHVDHRHLVRRHRVRRHLVRDHRHRVRDHAMUMALVARVULVURVALVRARVRULVRURVRQMQLVQRVQLVRQRVRAG- Basic equation:
\(Q(H) - QG_0\)
Method
Return_QF_V1is a helper function not intended for performing simulation runs but for easing the implementation of methodcalculate_characteristiclength()of application modellstream_v001(and similar functionalities). More specifically, it defines the target function for the iterative root search triggered by methodReturn_H_V1.While method
Return_QF_V1performs discharge calculations for all stream subsections, it evaluates only those of the first subsection. Accordingly, to avoid wasting computation time, one should not initialise more than one subsection before calling methodReturn_QF_V1(or methodsReturn_H_V1orcalculate_characteristiclength()).Example:
We reuse the example given in the main documentation on module
lstream_v001:>>> from hydpy.models.lstream import * >>> parameterstep("1d") >>> simulationstep("30m")
>>> gts(1) >>> laen(100.0) >>> gef(0.00025) >>> bm(15.0) >>> bnm(5.0) >>> skm(1.0/0.035) >>> hm(6.0) >>> bv(100.0) >>> bbv(20.0) >>> bnv(10.0) >>> bnvr(100.0) >>> skv(10.0) >>> ekm(1.0) >>> ekv(1.0) >>> hr(0.1) >>> parameters.update()
A water stage of 1 m results in a discharge of 7.7 m³/s:
>>> states.h = 1.0 >>> model.calc_rhm_v1() >>> model.calc_rhmdh_v1() >>> model.calc_rhv_v1() >>> model.calc_rhvdh_v1() >>> model.calc_rhlvr_rhrvr_v1() >>> model.calc_rhlvrdh_rhrvrdh_v1() >>> model.calc_am_um_v1() >>> model.calc_alv_arv_ulv_urv_v1() >>> model.calc_alvr_arvr_ulvr_urvr_v1() >>> model.calc_qm_v1() >>> model.calc_qlv_qrv_v1() >>> model.calc_qlvr_qrvr_v1() >>> model.calc_ag_v1() >>> model.calc_qg_v1() >>> fluxes.qg qg(7.745345)
The calculated
QGvalue serves as the “true” value. Now, when passing stage values of 0.5 and 1.0 m, methodReturn_QF_V1calculates the corresponding discharge values and returns the “errors” -5.5 m³/s (a stage of 0.5 m results in a too-small discharge value) and 0.0 m³/s (1.0 m is the “true” stage), respectively:>>> from hydpy import round_ >>> round_(model.return_qf_v1(0.5)) -5.474691 >>> round_(model.return_qf_v1(1.0)) 0.0
Note that method
Return_QF_V1does not overwrite the first entry ofQG, which would complicate its application within an iterative approach.Technical checks:
Note that method
Return_QF_V1calculates the value of sequenceQGtemporarily and resets it afterwards, and calculates all other values of the mentioned sequences without resetting:>>> from hydpy.core.testtools import check_selectedvariables >>> from hydpy.models.lstream.lstream_model import Return_QF_V1 >>> print(check_selectedvariables(Return_QF_V1)) Definitely missing: qg Possibly missing (REQUIREDSEQUENCES): Calc_RHM_V1: H Calc_RHMDH_V1: H Calc_RHV_V1: H Calc_RHVDH_V1: H Calc_RHLVR_RHRVR_V1: H Calc_RHLVRDH_RHRVRDH_V1: H Calc_AM_UM_V1: RHM and RHV Calc_ALV_ARV_ULV_URV_V1: RHV, RHLVR, and RHRVR Calc_ALVR_ARVR_ULVR_URVR_V1: RHLVR and RHRVR Calc_QM_V1: AM and UM Calc_QLV_QRV_V1: ALV, ARV, ULV, and URV Calc_QLVR_QRVR_V1: ALVR, ARVR, ULVR, and URVR Calc_AG_V1: AM, ALV, ARV, ALVR, and ARVR Calc_QG_V1: QM, QLV, QRV, QLVR, and QRVR Possibly missing (RESULTSEQUENCES): Calc_QG_V1: QG
- class hydpy.models.lstream.lstream_model.Return_H_V1[source]¶
Bases:
MethodCalculate and return the water stage corresponding to the current discharge value.
- Required submethod:
- Requires the control parameters:
- Requires the derived parameters:
- Calculates the state sequence:
- Calculates the aide sequences:
RHMRHMDHRHVRHVDHRHLVRRHRVRRHLVRDHRHRVRDHAMUMALVARVULVURVALVRARVRULVRURVRQMQLVQRVQLVRQRVRAG
Method
Return_H_V1is a helper function not for performing simulation runs but for easing the implementation of methodcalculate_characteristiclength()of application modellstream_v001(or similar functionalities). It performs a root search by applying thePegasusmethod implemented in module rootutils on the target methodReturn_QF_V1. Hence, please see the additional application notes in the documentation on methodReturn_QF_V1.Example:
We recreate the exact parameterisation as in the example of the documentation on method
Return_QF_V1:>>> from hydpy.models.lstream import * >>> simulationstep("30m") >>> parameterstep()
>>> gts(1) >>> laen(100.0) >>> gef(0.00025) >>> bm(15.0) >>> bnm(5.0) >>> skm(1.0/0.035) >>> hm(6.0) >>> bv(100.0) >>> bbv(20.0) >>> bnv(10.0) >>> bnvr(100.0) >>> skv(10.0) >>> ekm(1.0) >>> ekv(1.0) >>> hr(0.1) >>> parameters.update()
For a given discharge value of 7.7 m³/s (discussed in the documentation on method
Return_QF_V1), methodReturn_H_V1correctly determines the water stage of 1 m:>>> fluxes.qg = 7.745345 >>> from hydpy import print_values, round_ >>> round_(model.return_h_v1()) 1.0
To evaluate our implementation’s reliability, we search for water stages covering an extensive range of discharge values. The last printed column shows that method
Return_H_V1finds the correct water stage in all cases:>>> import numpy >>> for q in [0.0]+list(numpy.logspace(-6, 6, 13)): ... fluxes.qg = q ... h = model.return_h_v1() ... states.h = h ... model.calc_rhm_v1() ... model.calc_rhmdh_v1() ... model.calc_rhv_v1() ... model.calc_rhvdh_v1() ... model.calc_rhlvr_rhrvr_v1() ... model.calc_rhlvrdh_rhrvrdh_v1() ... model.calc_am_um_v1() ... model.calc_alv_arv_ulv_urv_v1() ... model.calc_alvr_arvr_ulvr_urvr_v1() ... model.calc_qm_v1() ... model.calc_qlv_qrv_v1() ... model.calc_qlvr_qrvr_v1() ... model.calc_ag_v1() ... model.calc_qg_v1() ... error = fluxes.qg[0]-q ... print_values([q, h, error]) 0.0, -10.0, 0.0 0.000001, -0.390737, 0.0 0.00001, -0.308934, 0.0 0.0001, -0.226779, 0.0 0.001, -0.143209, 0.0 0.01, -0.053833, 0.0 0.1, 0.061356, 0.0 1.0, 0.310079, 0.0 10.0, 1.150307, 0.0 100.0, 3.717833, 0.0 1000.0, 9.108276, 0.0 10000.0, 18.246131, 0.0 100000.0, 37.330632, 0.0 1000000.0, 81.363979, 0.0
Due to smoothing the water stage with respect to the channel bottom, small discharge values result in negative water stages. The lowest allowed stage is -10 m.
Through setting the regularisation parameter
HRto zero (which we do not recommend), methodReturn_H_V1should return the non-negative water stages agreeing with the original, discontinuous Manning-Strickler equation:>>> hr(0.0) >>> parameters.update() >>> for q in [0.0]+list(numpy.logspace(-6, 6, 13)): ... fluxes.qg = q ... h = model.return_h_v1() ... states.h = h ... model.calc_rhm_v1() ... model.calc_rhmdh_v1() ... model.calc_rhv_v1() ... model.calc_rhvdh_v1() ... model.calc_rhlvr_rhrvr_v1() ... model.calc_rhlvrdh_rhrvrdh_v1() ... model.calc_am_um_v1() ... model.calc_alv_arv_ulv_urv_v1() ... model.calc_alvr_arvr_ulvr_urvr_v1() ... model.calc_qm_v1() ... model.calc_qlv_qrv_v1() ... model.calc_qlvr_qrvr_v1() ... model.calc_ag_v1() ... model.calc_qg_v1() ... error = fluxes.qg[0]-q ... print_values([q, h, error]) 0.0, 0.0, 0.0 0.000001, 0.00008, 0.0 0.00001, 0.000317, 0.0 0.0001, 0.001263, 0.0 0.001, 0.005027, 0.0 0.01, 0.019992, 0.0 0.1, 0.079286, 0.0 1.0, 0.31039, 0.0 10.0, 1.150307, 0.0 100.0, 3.717833, 0.0 1000.0, 9.108276, 0.0 10000.0, 18.246131, 0.0 100000.0, 37.330632, 0.0 1000000.0, 81.363979, 0.0
- class hydpy.models.lstream.lstream_model.PegasusH(model: Model)[source]¶
Bases:
PegasusPegasus iterator for finding the correct water stage.
- METHODS: ClassVar[Tuple[Type[Method], ...]] = (<class 'hydpy.models.lstream.lstream_model.Return_QF_V1'>,)¶
- name = 'pegasush'¶
- class hydpy.models.lstream.lstream_model.ProfileMixin[source]¶
Bases:
objectMixin class for L-Stream models performing discharge calculations based on a triple trapezoid profile.
- plot_profile(labelformat: str = '%.1f')[source]¶
Plot the triple trapezoid profile and insert the discharge values at some distinct stages.
We reuse the second example given in the main documentation on module
lstream_v001:>>> from hydpy.models.lstream_v001 import * >>> parameterstep("1d") >>> simulationstep("30m") >>> laen(100.0) >>> gef(0.00025) >>> bm(15.0) >>> bnm(5.0) >>> skm(1.0/0.035) >>> hm(6.0) >>> bv(100.0) >>> bbv(20.0) >>> bnv(10.0) >>> bnvr(100.0) >>> skv(10.0) >>> ekm(1.0) >>> ekv(1.0) >>> hr(0.1) >>> gts(1) >>> parameters.update()
Calling method
plot_profile()prepares the profile plot and, depending on your matplotlib configuration, eventually prints it directly on your screen:>>> model.plot_profile() >>> from hydpy.core.testtools import save_autofig >>> save_autofig("lstream_plot_profile.png")
- prepare_hvector(nmb: int = 1000, exp: float = 2.0, hmin: float | None = None, hmax: float | None = None) Tuple[float, ...][source]¶
Prepare a vector of the stage values.
The argument nmb defines the number of stage values, exp defines their spacing (1.0 results in equidistant values), and hmin and hmax the lowest and highest water stage, respectively:
>>> from hydpy.models.lstream_v001 import * >>> parameterstep() >>> from hydpy import print_values >>> print_values(model.prepare_hvector( ... nmb=10, hmin=-1.0, hmax=8, exp=1.0)) -1.0, 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0
When not specified by the user, method
prepare_hvector()determines hmin and hmax based on the current value ofHM(-10 % and 300 %, respectively) and takes a higher sampling rate in the lower value range (by setting exp to two):>>> hm(6.0) >>> print_values(model.prepare_hvector(nmb=10)) -0.6, -0.37037, 0.318519, 1.466667, 3.074074, 5.140741, 7.666667, 10.651852, 14.096296, 18.0
- calculate_qgvector(hvector: Iterable[float]) Tuple[float, ...][source]¶
Calculate the discharge values (in m³/s) corresponding to the given stage vector.
We reuse the second example given in the main documentation on module
lstream_v001also show the results of the similar methodscalculate_agvector()andcalculate_vgvector():>>> from hydpy.models.lstream_v001 import * >>> parameterstep("1d") >>> simulationstep("30m") >>> laen(100.0) >>> gef(0.00025) >>> bm(15.0) >>> bnm(5.0) >>> skm(1.0/0.035) >>> hm(6.0) >>> bv(100.0) >>> bbv(20.0) >>> bnv(10.0) >>> bnvr(100.0) >>> skv(10.0) >>> ekm(1.0) >>> ekv(1.0) >>> hr(0.1) >>> gts(2) >>> parameters.update()
>>> from hydpy import print_values >>> print_values(model.calculate_qgvector([0.0, 1.0, 2.0])) 0.033153, 7.745345, 28.436875 >>> print_values(model.calculate_agvector([0.0, 1.0, 2.0])) 0.623138, 20.0, 50.0 >>> print_values(model.calculate_vgvector([0.0, 1.0, 2.0])) 0.031157, 1.0, 2.5
Parameter Features¶
Control parameters¶
- class hydpy.models.lstream.ControlParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)
Bases:
SubParametersControl parameters of model lstream.
- The following classes are selected:
Laen()Flusslänge (channel length) [km].Gef()Sohlgefälle (channel slope) [-].GTS()Anzahl Gewässerteilstrecken (number of channel subsections) [-].HM()Höhe Hauptgerinne (height of the main channel) [m].BM()Sohlbreite Hauptgerinne (bed width of the main channel) [m].BNM()Böschungsneigung Hauptgerinne (slope of both main channel embankments) [-].BV()Sohlbreite Vorländer (bed widths of both forelands) [m].BBV()Breite Vorlandböschungen (width of both foreland embankments) [m].BNV()Böschungsneigung Vorländer (slope of both foreland embankments) [-].BNVR()Böschungsneigung Vorlandränder (slope of both outer embankments) [-].SKM()Rauigkeitsbeiwert Hauptgerinne (roughness coefficient of the main channel) [m^(1/3)/s].SKV()Rauigkeitsbeiwert Vorländer (roughness coefficient of both forelands) [m^(1/3)/s].EKM()Kalibrierfaktor Hauptgerinne (calibration factor for the main channel) [-].EKV()Kalibrierfaktor Vorländer (calibration factor for both forelands) [m].HR()Allgemeiner Glättungsparameter für den Wasserstand (general smoothing parameter for the water stage) [mm].VG2FG()Flexibler Interpolator zur Berechnung der Fließgeschwindigkeit in Abhängigkeit zur aktuellen Wasserspeicherung einer Gewässerteilstrecke (flexible interpolator describing the relationship between the flow velocity and the water storage of individual channel subsections) [m/s].EK()Kalibrierfaktor (calibration factor) [-].
- class hydpy.models.lstream.lstream_control.Laen(subvars: SubParameters)[source]¶
Bases:
ParameterFlusslänge (channel length) [km].
- Required by the methods:
- class hydpy.models.lstream.lstream_control.Gef(subvars: SubParameters)[source]¶
Bases:
ParameterSohlgefälle (channel slope) [-].
- class hydpy.models.lstream.lstream_control.GTS(subvars: SubParameters)[source]¶
Bases:
ParameterAnzahl Gewässerteilstrecken (number of channel subsections) [-].
- Required by the methods:
Calc_AG_V1Calc_ALVDH_ARVDH_ULVDH_URVDH_V1Calc_ALVRDH_ARVRDH_ULVRDH_URVRDH_V1Calc_ALVR_ARVR_ULVR_URVR_V1Calc_ALV_ARV_ULV_URV_V1Calc_AMDH_UMDH_V1Calc_AM_UM_V1Calc_DH_V1Calc_QA_V1Calc_QG_V1Calc_QG_V2Calc_QLVDH_QRVDH_V1Calc_QLVRDH_QRVRDH_V1Calc_QLVR_QRVR_V1Calc_QLVR_QRVR_V2Calc_QLV_QRV_V1Calc_QLV_QRV_V2Calc_QMDH_V1Calc_QM_V1Calc_QM_V2Calc_RHLVRDH_RHRVRDH_V1Calc_RHLVR_RHRVR_V1Calc_RHMDH_V1Calc_RHM_V1Calc_RHVDH_V1Calc_RHV_V1Calc_WBG_V1Calc_WBLVR_WBRVR_V1Calc_WBLV_WBRV_V1Calc_WBM_V1Return_H_V1Return_QF_V1Update_H_V1Update_VG_V1
Calling the parameter
GTSprepares the shape of all 1-dimensional sequences for which each entry corresponds to an individual channel subsection:>>> from hydpy.models.lstream import * >>> parameterstep() >>> gts(3) >>> states.h h(nan, nan, nan)
- class hydpy.models.lstream.lstream_control.HM(subvars: SubParameters)[source]¶
Bases:
ParameterHöhe Hauptgerinne (height of the main channel) [m].
- Required by the methods:
Calc_RHLVRDH_RHRVRDH_V1Calc_RHLVR_RHRVR_V1Calc_RHVDH_V1Calc_RHV_V1Return_H_V1Return_QF_V1
- class hydpy.models.lstream.lstream_control.BM(subvars: SubParameters)[source]¶
Bases:
ParameterSohlbreite Hauptgerinne (bed width of the main channel) [m].
- Required by the methods:
Calc_AMDH_UMDH_V1Calc_AM_UM_V1Calc_WBM_V1Return_H_V1Return_QF_V1
- class hydpy.models.lstream.lstream_control.BNM(subvars: SubParameters)[source]¶
Bases:
ParameterBöschungsneigung Hauptgerinne (slope of both main channel embankments) [-].
- Required by the methods:
Calc_AMDH_UMDH_V1Calc_AM_UM_V1Calc_WBM_V1Return_H_V1Return_QF_V1
- class hydpy.models.lstream.lstream_control.BV(subvars: SubParameters)[source]¶
Bases:
LeftRightParameterSohlbreite Vorländer (bed widths of both forelands) [m].
- Required by the methods:
Calc_ALVDH_ARVDH_ULVDH_URVDH_V1Calc_ALV_ARV_ULV_URV_V1Calc_WBLV_WBRV_V1Return_H_V1Return_QF_V1
- class hydpy.models.lstream.lstream_control.BBV(subvars: SubParameters)[source]¶
Bases:
LeftRightParameterBreite Vorlandböschungen (width of both foreland embankments) [m].
- class hydpy.models.lstream.lstream_control.BNV(subvars: SubParameters)[source]¶
Bases:
LeftRightParameterBöschungsneigung Vorländer (slope of both foreland embankments) [-].
- Required by the methods:
Calc_ALVDH_ARVDH_ULVDH_URVDH_V1Calc_ALV_ARV_ULV_URV_V1Calc_WBLV_WBRV_V1Return_H_V1Return_QF_V1
- class hydpy.models.lstream.lstream_control.BNVR(subvars: SubParameters)[source]¶
Bases:
LeftRightParameterBöschungsneigung Vorlandränder (slope of both outer embankments) [-].
- Required by the methods:
Calc_ALVRDH_ARVRDH_ULVRDH_URVRDH_V1Calc_ALVR_ARVR_ULVR_URVR_V1Calc_WBLVR_WBRVR_V1Return_H_V1Return_QF_V1
- class hydpy.models.lstream.lstream_control.SKM(subvars: SubParameters)[source]¶
Bases:
ParameterRauigkeitsbeiwert Hauptgerinne (roughness coefficient of the main channel) [m^(1/3)/s].
- class hydpy.models.lstream.lstream_control.SKV(subvars: SubParameters)[source]¶
Bases:
LeftRightParameterRauigkeitsbeiwert Vorländer (roughness coefficient of both forelands) [m^(1/3)/s].
- class hydpy.models.lstream.lstream_control.EKM(subvars: SubParameters)[source]¶
Bases:
ParameterKalibrierfaktor Hauptgerinne (calibration factor for the main channel) [-].
- class hydpy.models.lstream.lstream_control.EKV(subvars: SubParameters)[source]¶
Bases:
LeftRightParameterKalibrierfaktor Vorländer (calibration factor for both forelands) [m].
- class hydpy.models.lstream.lstream_control.HR(subvars: SubParameters)[source]¶
Bases:
ParameterAllgemeiner Glättungsparameter für den Wasserstand (general smoothing parameter for the water stage) [mm].
- class hydpy.models.lstream.lstream_control.VG2FG(subvars: SubParameters)[source]¶
Bases:
SimpleInterpolatorFlexibler Interpolator zur Berechnung der Fließgeschwindigkeit in Abhängigkeit zur aktuellen Wasserspeicherung einer Gewässerteilstrecke (flexible interpolator describing the relationship between the flow velocity and the water storage of individual channel subsections) [m/s].
- Required by the method:
You can configure the velocity-storage relationship with all functionalities provided by classes
ANNandPPoly. Here, we define a small neural network:>>> from hydpy.models.lstream import * >>> parameterstep() >>> vg2fg(ANN(weights_input=-1.0, weights_output=0.4, ... intercepts_hidden=0.0, intercepts_output=0.2)) >>> vg2fg vg2fg( ANN( weights_input=[[-1.0]], weights_output=[[0.4]], intercepts_hidden=[[0.0]], intercepts_output=[0.2], ) ) >>> vg2fg.print_table([0.0, 1.0, inf]) x y dy/dx 0.0 0.4 -0.1 1.0 0.307577 -0.078645 inf 0.2 0.0
If you prefer a constant velocity, you can set it directly via the keyword velocity (its unit must be m/s):
>>> vg2fg(velocity=1.0) >>> vg2fg vg2fg(velocity=1.0) >>> vg2fg.print_table([0.0, 1.0]) x y dy/dx 0.0 1.0 0.0 1.0 1.0 0.0
Alternatively, the keyword timedelay allows defining the flow velocity via the number of hours it takes for a flood wave to travel through the whole channel:
>>> laen(100.0) >>> vg2fg(timedelay=27.77778) >>> vg2fg vg2fg(timedelay=27.77778)
>>> vg2fg.inputs[0] = 0.0 >>> vg2fg.calculate_values() >>> vg2fg.print_table([0.0, 1.0]) x y dy/dx 0.0 1.0 0.0 1.0 1.0 0.0
For a ten times shorter channel, the same time delay implies a ten times slower flow velocity:
>>> laen(10.0) >>> vg2fg(timedelay=27.77778) >>> vg2fg vg2fg(timedelay=27.77778) >>> vg2fg.print_table([0.0, 1.0]) x y dy/dx 0.0 0.1 0.0 1.0 0.1 0.0
- XLABEL = 'VG [million m³]'¶
- YLABEL = 'FG [m/s]'¶
- class hydpy.models.lstream.lstream_control.EK(subvars: SubParameters)[source]¶
Bases:
ParameterKalibrierfaktor (calibration factor) [-].
- Required by the method:
Derived parameters¶
- class hydpy.models.lstream.DerivedParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)
Bases:
SubParametersDerived parameters of model lstream.
- The following classes are selected:
Sek()Sekunden im Simulationszeitschritt (Number of seconds of the selected simulation time step) [s].HV()Höhe Vorländer (height of both forelands) [m].MFM()Produkt der zeitkonstanten Terme der Manning-Strickler-Formel für das Hauptgerinne (product of the time-constant terms of the Manning-Strickler equation, calculated for the main channel) [m^(1/3)/s].MFV()Produkt der zeitkonstanten Terme der Manning-Strickler-Formel für beide Vorländer (product of the time-constant terms of the Manning-Strickler equation, calculated for both forelands) [m^(1/3)/s].BNMF()Hilfsterm zur Berechnung des benetzten Böschungsumfangs im Hauptgerinne (auxiliary term for the calculation of the wetted perimeter of the slope of the main channel) [m].BNVF()Hilfsterm zur Berechnung des benetzten Böschungsumfangs der Vorländer (auxiliary term for the calculation of the wetted perimeter of the slope of both forelands) [m].BNVRF()Hilfsterm zur Berechnung des benetzten Böschungsumfangs der Vorlandränder (auxiliary term for the calculation of the wetted perimeter of the slope of both outer embankments) [m].HRP()Wasserstand-Regularisierungs-Parameter zur Verwendung in Verbindung mit Regularisierungsfunktionsmooth_logistic2()(regularisation parameter for water stage to be used when applying regularisation functionsmooth_logistic2()) [m].
- class hydpy.models.lstream.lstream_derived.Sek(subvars: SubParameters)[source]¶
Bases:
SecondsParameterSekunden im Simulationszeitschritt (Number of seconds of the selected simulation time step) [s].
- Required by the methods:
- class hydpy.models.lstream.lstream_derived.HV(subvars: SubParameters)[source]¶
Bases:
LeftRightParameterHöhe Vorländer (height of both forelands) [m].
- Required by the methods:
Calc_RHLVRDH_RHRVRDH_V1Calc_RHLVR_RHRVR_V1Return_H_V1Return_QF_V1
- update()[source]¶
Update based on \(HV=BBV/BNV\).
- Examples:
>>> from hydpy.models.lstream import * >>> parameterstep("1d") >>> bbv(left=10., right=40.) >>> bnv(left=10., right=20.) >>> derived.hv.update() >>> derived.hv hv(left=1.0, right=2.0) >>> bbv(left=10., right=0.) >>> bnv(left=0., right=20.) >>> derived.hv.update() >>> derived.hv hv(0.0)
- class hydpy.models.lstream.lstream_derived.MFM(subvars: SubParameters)[source]¶
Bases:
ParameterProdukt der zeitkonstanten Terme der Manning-Strickler-Formel für das Hauptgerinne (product of the time-constant terms of the Manning-Strickler equation, calculated for the main channel) [m^(1/3)/s].
- Required by the methods:
- class hydpy.models.lstream.lstream_derived.MFV(subvars: SubParameters)[source]¶
Bases:
LeftRightParameterProdukt der zeitkonstanten Terme der Manning-Strickler-Formel für beide Vorländer (product of the time-constant terms of the Manning-Strickler equation, calculated for both forelands) [m^(1/3)/s].
- Required by the methods:
Calc_QLVDH_QRVDH_V1Calc_QLVRDH_QRVRDH_V1Calc_QLVR_QRVR_V1Calc_QLV_QRV_V1Return_H_V1Return_QF_V1
- class hydpy.models.lstream.lstream_derived.BNMF(subvars: SubParameters)[source]¶
Bases:
ParameterHilfsterm zur Berechnung des benetzten Böschungsumfangs im Hauptgerinne (auxiliary term for the calculation of the wetted perimeter of the slope of the main channel) [m].
- Required by the methods:
- class hydpy.models.lstream.lstream_derived.BNVF(subvars: SubParameters)[source]¶
Bases:
LeftRightParameterHilfsterm zur Berechnung des benetzten Böschungsumfangs der Vorländer (auxiliary term for the calculation of the wetted perimeter of the slope of both forelands) [m].
- Required by the methods:
Calc_ALVDH_ARVDH_ULVDH_URVDH_V1Calc_ALV_ARV_ULV_URV_V1Return_H_V1Return_QF_V1
- class hydpy.models.lstream.lstream_derived.BNVRF(subvars: SubParameters)[source]¶
Bases:
LeftRightParameterHilfsterm zur Berechnung des benetzten Böschungsumfangs der Vorlandränder (auxiliary term for the calculation of the wetted perimeter of the slope of both outer embankments) [m].
- Required by the methods:
Calc_ALVRDH_ARVRDH_ULVRDH_URVRDH_V1Calc_ALVR_ARVR_ULVR_URVR_V1Return_H_V1Return_QF_V1
- class hydpy.models.lstream.lstream_derived.HRP(subvars: SubParameters)[source]¶
Bases:
ParameterWasserstand-Regularisierungs-Parameter zur Verwendung in Verbindung mit Regularisierungsfunktion
smooth_logistic2()(regularisation parameter for water stage to be used when applying regularisation functionsmooth_logistic2()) [m].- Required by the methods:
Calc_RHLVRDH_RHRVRDH_V1Calc_RHLVR_RHRVR_V1Calc_RHMDH_V1Calc_RHM_V1Calc_RHVDH_V1Calc_RHV_V1Return_H_V1Return_QF_V1
- update()[source]¶
Calculate the smoothing parameter value.
The documentation on module
smoothtoolsexplains the following example in some detail:>>> from hydpy.models.lstream import * >>> from hydpy.cythons.smoothutils import smooth_logistic2 >>> from hydpy import round_ >>> parameterstep() >>> hr(0.0) >>> derived.hrp.update() >>> round_(smooth_logistic2(0.0, derived.hrp)) 0.0 >>> hr(2.5) >>> derived.hrp.update() >>> round_(smooth_logistic2(2.5, derived.hrp)) 2.51
Fixed parameters¶
- class hydpy.models.lstream.FixedParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)
Bases:
SubParametersFixed parameters of model lstream.
- class hydpy.models.lstream.lstream_fixed.WBMin(subvars: SubParameters)[source]¶
Bases:
FixedParameterMindestwert der Wasserspiegelbreite (minimum value of the water level width [m].
- Required by the method:
In theory, the value of
WBMinshould always be zero. However, at least the numerical implementation of application modellstream_v001requires a value slightly lower than zero for reasons of numerical stability when the simulated river section is dry.
- class hydpy.models.lstream.lstream_fixed.WBReg(subvars: SubParameters)[source]¶
Bases:
FixedParameterAuf
WBMinbezogener effektiver Glättungsparameter (effectiv smoothing parameter related toWBMin) [m].- Required by the method:
Solver parameters¶
- class hydpy.models.lstream.SolverParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)
Bases:
SubParametersSolver parameters of model lstream.
- The following classes are selected:
AbsErrorMax()Absolute numerical error tolerance [m3/s].RelErrorMax()Relative numerical error tolerance [-].RelDTMin()Smallest relative integration time step size allowed [-].RelDTMax()Largest relative integration time step size allowed [-].
- class hydpy.models.lstream.lstream_solver.AbsErrorMax(subvars)[source]¶
Bases:
SolverParameterAbsolute numerical error tolerance [m3/s].
- class hydpy.models.lstream.lstream_solver.RelErrorMax(subvars)[source]¶
Bases:
SolverParameterRelative numerical error tolerance [-].
- class hydpy.models.lstream.lstream_solver.RelDTMin(subvars)[source]¶
Bases:
SolverParameterSmallest relative integration time step size allowed [-].
- class hydpy.models.lstream.lstream_solver.RelDTMax(subvars)[source]¶
Bases:
SolverParameterLargest relative integration time step size allowed [-].
Sequence Features¶
Flux sequences¶
- class hydpy.models.lstream.FluxSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)
Bases:
FluxSequencesFlux sequences of model lstream.
- The following classes are selected:
QZ()Mittlerer Zufluss in Gerinnestrecke (average inflow into the channel) [m³/s].QZA()Aktueller Zufluss in Gerinnestrecke (current inflow into the channel) [m³/s].QG()Durchfluss gesamt (total discharge) [m³/s].QA()Abfluss aus Gerinnestrecke (outflow out of the channel) [m³/s].DH()Wasserstandänderung (temporal change of the water stage) [m/s].
- class hydpy.models.lstream.lstream_fluxes.QZ(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
FluxSequenceMittlerer Zufluss in Gerinnestrecke (average inflow into the channel) [m³/s].
- Calculated by the method:
- Required by the methods:
- class hydpy.models.lstream.lstream_fluxes.QZA(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
FluxSequenceAktueller Zufluss in Gerinnestrecke (current inflow into the channel) [m³/s].
- Required by the method:
- class hydpy.models.lstream.lstream_fluxes.QG(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
FluxSequenceDurchfluss gesamt (total discharge) [m³/s].
- Calculated by the methods:
- Required by the methods:
- class hydpy.models.lstream.lstream_fluxes.QA(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
FluxSequenceAbfluss aus Gerinnestrecke (outflow out of the channel) [m³/s].
- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.lstream_fluxes.DH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
FluxSequenceWasserstandänderung (temporal change of the water stage) [m/s].
- Calculated by the method:
- Required by the method:
State sequences¶
- class hydpy.models.lstream.StateSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)
Bases:
StateSequencesState sequences of model lstream.
- class hydpy.models.lstream.lstream_states.H(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
StateSequenceWasserstand (water stage) [m].
- Calculated by the methods:
- Updated by the method:
- Required by the methods:
Calc_RHLVRDH_RHRVRDH_V1Calc_RHLVR_RHRVR_V1Calc_RHMDH_V1Calc_RHM_V1Calc_RHVDH_V1Calc_RHV_V1
- class hydpy.models.lstream.lstream_states.VG(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
StateSequenceWasservolumen (water volume) [million m³].
- Updated by the method:
- Required by the method:
Inlet sequences¶
- class hydpy.models.lstream.InletSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)
Bases:
InletSequencesInlet sequences of model lstream.
- The following classes are selected:
Q()Abfluss (runoff) [m³/s].
- class hydpy.models.lstream.lstream_inlets.Q(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
InletSequenceAbfluss (runoff) [m³/s].
- Required by the method:
Outlet sequences¶
- class hydpy.models.lstream.OutletSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)
Bases:
OutletSequencesOutlet sequences of model lstream.
- The following classes are selected:
Q()Abfluss (runoff) [m³/s].
- class hydpy.models.lstream.lstream_outlets.Q(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
OutletSequenceAbfluss (runoff) [m³/s].
- Calculated by the method:
Aide sequences¶
- class hydpy.models.lstream.AideSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)
Bases:
AideSequencesAide sequences of model lstream.
- The following classes are selected:
WBM()Wasserspiegelbreite Hauptgerinne (water level width of the main channel) [m].WBLV()Wasserspiegelbreite des linken Vorlandes (water level width of the left foreland) [m].WBRV()Wasserspiegelbreite des rechten Vorlandes (water level width of the right foreland) [m].WBLVR()Wasserspiegelbreite des linken Vorlandrandes (water level width of the left outer embankment) [m].WBRVR()Wasserspiegelbreite des rechten Vorlandrandes (water level width of the right outer embankment) [m].WBG()Wasserspiegelbreite des gesamten Querschnittes (water level width of the total cross section) [m].AM()Durchflossene Fläche Hauptgerinne (wetted area of the main channel) [m²].ALV()Durchflossene Fläche linkes Vorland (wetted area of the left foreland) [m²].ARV()Durchflossene Fläche rechtes Vorland (wetted area of the right foreland) [m²].ALVR()Durchflossene Fläche linker Vorlandrand (wetted area of the left outer embankments) [m²].ARVR()Durchflossene Fläche rechter Vorlandrand (wetted area of the right outer embankments) [m²].AG()Durchflossene Fläche gesamt (total wetted area) [m²].UM()Benetzter Umfang Hauptgerinne (wetted perimeter of the main channel) [m].ULV()Benetzter Umfang linkes Vorland (wetted perimeter of the left foreland) [m].URV()Benetzter Umfang rechtes Vorland (wetted perimeter of the right foreland) [m].ULVR()Benetzter Umfang linker Vorlandrand (wetted perimeter of the left outer embankment) [m].URVR()Benetzter Umfang rechtes Vorlandrand (wetted perimeter of the right outer embankment) [m].QM()Durchfluss Hauptgerinne (discharge of the main channel) [m³/s].QLV()Durchfluss linkes Vorland (discharge of the left foreland) [m³/s].QRV()Durchfluss rechtes Vorland (discharge of the right foreland) [m³/s].QLVR()Durchfluss linker Vorlandrand (discharge of the left outer embankment) [m³/s].QRVR()Durchfluss rechter Vorlandrand (discharge of the right outer embankment) [m³/s].RHM()Hinsichtlich der Gewässersohle regularisierter Wasserstand (stage regularised with respect to the channel bottom) [m].RHV()Hinsichtlich der des Übergangs Hauptgerinne/Vorländer regularisierter Wasserstand (stage regularised with respect to the transition from the main channel to both forelands) [m].RHLVR()Hinsichtlich der des Übergangs linkes Vorland/ linker Vorlandrand regularisierter Wasserstand (stage regularised with respect to the transition from the left foreland to the left outer embankment) [m].RHRVR()Hinsichtlich der des Übergangs rechtes Vorland/ rechter Vorlandrand regularisierter Wasserstand (stage regularised with respect to the transition from the right foreland to the right outer embankment) [m].
- class hydpy.models.lstream.lstream_aides.WBM(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceWasserspiegelbreite Hauptgerinne (water level width of the main channel) [m].
- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.WBLV(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceWasserspiegelbreite des linken Vorlandes (water level width of the left foreland) [m].
- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.WBRV(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceWasserspiegelbreite des rechten Vorlandes (water level width of the right foreland) [m].
- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.WBLVR(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceWasserspiegelbreite des linken Vorlandrandes (water level width of the left outer embankment) [m].
- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.WBRVR(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceWasserspiegelbreite des rechten Vorlandrandes (water level width of the right outer embankment) [m].
- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.WBG(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceWasserspiegelbreite des gesamten Querschnittes (water level width of the total cross section) [m].
- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.AM(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceDurchflossene Fläche Hauptgerinne (wetted area of the main channel) [m²].
- Calculated by the methods:
- Required by the methods:
- class hydpy.models.lstream.lstream_aides.ALV(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceDurchflossene Fläche linkes Vorland (wetted area of the left foreland) [m²].
- Calculated by the methods:
- Required by the methods:
Calc_AG_V1Calc_QLVDH_QRVDH_V1Calc_QLV_QRV_V1Calc_QLV_QRV_V2
- class hydpy.models.lstream.lstream_aides.ARV(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceDurchflossene Fläche rechtes Vorland (wetted area of the right foreland) [m²].
- Calculated by the methods:
- Required by the methods:
Calc_AG_V1Calc_QLVDH_QRVDH_V1Calc_QLV_QRV_V1Calc_QLV_QRV_V2
- class hydpy.models.lstream.lstream_aides.ALVR(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceDurchflossene Fläche linker Vorlandrand (wetted area of the left outer embankments) [m²].
- Calculated by the methods:
- Required by the methods:
Calc_AG_V1Calc_QLVRDH_QRVRDH_V1Calc_QLVR_QRVR_V1Calc_QLVR_QRVR_V2
- class hydpy.models.lstream.lstream_aides.ARVR(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceDurchflossene Fläche rechter Vorlandrand (wetted area of the right outer embankments) [m²].
- Calculated by the methods:
- Required by the methods:
Calc_AG_V1Calc_QLVRDH_QRVRDH_V1Calc_QLVR_QRVR_V1Calc_QLVR_QRVR_V2
- class hydpy.models.lstream.lstream_aides.AG(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceDurchflossene Fläche gesamt (total wetted area) [m²].
- Calculated by the methods:
- class hydpy.models.lstream.lstream_aides.UM(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceBenetzter Umfang Hauptgerinne (wetted perimeter of the main channel) [m].
- Calculated by the methods:
- Required by the methods:
- class hydpy.models.lstream.lstream_aides.ULV(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceBenetzter Umfang linkes Vorland (wetted perimeter of the left foreland) [m].
- Calculated by the methods:
- Required by the methods:
- class hydpy.models.lstream.lstream_aides.URV(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceBenetzter Umfang rechtes Vorland (wetted perimeter of the right foreland) [m].
- Calculated by the methods:
- Required by the methods:
- class hydpy.models.lstream.lstream_aides.ULVR(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceBenetzter Umfang linker Vorlandrand (wetted perimeter of the left outer embankment) [m].
- Calculated by the methods:
- Required by the methods:
- class hydpy.models.lstream.lstream_aides.URVR(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceBenetzter Umfang rechtes Vorlandrand (wetted perimeter of the right outer embankment) [m].
- Calculated by the methods:
- Required by the methods:
- class hydpy.models.lstream.lstream_aides.QM(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceDurchfluss Hauptgerinne (discharge of the main channel) [m³/s].
- Calculated by the methods:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.QLV(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceDurchfluss linkes Vorland (discharge of the left foreland) [m³/s].
- Calculated by the methods:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.QRV(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceDurchfluss rechtes Vorland (discharge of the right foreland) [m³/s].
- Calculated by the methods:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.QVR(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceDurchfluss Vorlandränder (discharge of both outer embankment) [m³/s].
- class hydpy.models.lstream.lstream_aides.QLVR(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceDurchfluss linker Vorlandrand (discharge of the left outer embankment) [m³/s].
- Calculated by the methods:
Calc_QLVR_QRVR_V1Calc_QLVR_QRVR_V2Return_H_V1Return_QF_V1- Required by the method:
- class hydpy.models.lstream.lstream_aides.QRVR(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceDurchfluss rechter Vorlandrand (discharge of the right outer embankment) [m³/s].
- Calculated by the methods:
Calc_QLVR_QRVR_V1Calc_QLVR_QRVR_V2Return_H_V1Return_QF_V1- Required by the method:
- class hydpy.models.lstream.lstream_aides.RHM(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceHinsichtlich der Gewässersohle regularisierter Wasserstand (stage regularised with respect to the channel bottom) [m].
- Calculated by the methods:
- Required by the methods:
- class hydpy.models.lstream.lstream_aides.RHMDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
RHM(derivative ofRHM) [m/m].- Calculated by the methods:
- Required by the methods:
- class hydpy.models.lstream.lstream_aides.RHV(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceHinsichtlich der des Übergangs Hauptgerinne/Vorländer regularisierter Wasserstand (stage regularised with respect to the transition from the main channel to both forelands) [m].
- Calculated by the methods:
- Required by the methods:
Calc_ALVDH_ARVDH_ULVDH_URVDH_V1Calc_ALV_ARV_ULV_URV_V1Calc_AMDH_UMDH_V1Calc_AM_UM_V1Calc_WBLV_WBRV_V1Calc_WBM_V1
- class hydpy.models.lstream.lstream_aides.RHVDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
RHV(derivative ofRHV) [m/m].- Calculated by the methods:
- Required by the methods:
Calc_ALVDH_ARVDH_ULVDH_URVDH_V1Calc_AMDH_UMDH_V1Calc_WBLV_WBRV_V1Calc_WBM_V1
- class hydpy.models.lstream.lstream_aides.RHLVR(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceHinsichtlich der des Übergangs linkes Vorland/ linker Vorlandrand regularisierter Wasserstand (stage regularised with respect to the transition from the left foreland to the left outer embankment) [m].
- Calculated by the methods:
- Required by the methods:
Calc_ALVDH_ARVDH_ULVDH_URVDH_V1Calc_ALVRDH_ARVRDH_ULVRDH_URVRDH_V1Calc_ALVR_ARVR_ULVR_URVR_V1Calc_ALV_ARV_ULV_URV_V1Calc_WBLVR_WBRVR_V1Calc_WBLV_WBRV_V1
- class hydpy.models.lstream.lstream_aides.RHLVRDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
RHLVR(derivative ofRHLVR) [m/m].- Calculated by the methods:
- Required by the methods:
Calc_ALVDH_ARVDH_ULVDH_URVDH_V1Calc_ALVRDH_ARVRDH_ULVRDH_URVRDH_V1Calc_WBLVR_WBRVR_V1Calc_WBLV_WBRV_V1
- class hydpy.models.lstream.lstream_aides.RHRVR(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceHinsichtlich der des Übergangs rechtes Vorland/ rechter Vorlandrand regularisierter Wasserstand (stage regularised with respect to the transition from the right foreland to the right outer embankment) [m].
- Calculated by the methods:
- Required by the methods:
Calc_ALVDH_ARVDH_ULVDH_URVDH_V1Calc_ALVRDH_ARVRDH_ULVRDH_URVRDH_V1Calc_ALVR_ARVR_ULVR_URVR_V1Calc_ALV_ARV_ULV_URV_V1Calc_WBLVR_WBRVR_V1Calc_WBLV_WBRV_V1
- class hydpy.models.lstream.lstream_aides.RHRVRDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
RHRVR(derivative ofRHRVR) [m/m].- Calculated by the methods:
- Required by the methods:
Calc_ALVDH_ARVDH_ULVDH_URVDH_V1Calc_ALVRDH_ARVRDH_ULVRDH_URVRDH_V1Calc_WBLVR_WBRVR_V1Calc_WBLV_WBRV_V1
- class hydpy.models.lstream.lstream_aides.AMDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
AM(derivative ofAM) [m²/m].- Calculated by the method:
- Required by the methods:
- class hydpy.models.lstream.lstream_aides.ALVDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
ALV(derivative ofALV) [m²/m].- Calculated by the method:
- Required by the methods:
- class hydpy.models.lstream.lstream_aides.ARVDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
ARV(derivative ofARV) [m²/m].- Calculated by the method:
- Required by the methods:
- class hydpy.models.lstream.lstream_aides.ALVRDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
ALVR(derivative ofALVR) [m²/m].- Calculated by the method:
- Required by the methods:
- class hydpy.models.lstream.lstream_aides.ARVRDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
ARVR(derivative ofARVR) [m²/m].- Calculated by the method:
- Required by the methods:
- class hydpy.models.lstream.lstream_aides.UMDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
UM(derivative ofUM) [m/m].- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.ULVDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
ULV(derivative ofULV) [m/m].- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.URVDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
URV(derivative ofURV) [m/m].- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.ULVRDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
ULVR(derivative ofULVR) [m/m].- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.URVRDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
URVR(derivative ofURVR) [m/m].- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.QMDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
QM(derivative ofQM) [m³/m].- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.QLVDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
QLV(derivative ofQLV) [m³/m].- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.QRVDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
QRV(derivative ofQRV) [m³/m].- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.QLVRDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
QLVR(derivative ofQLVR) [m³/m].- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.lstream_aides.QRVRDH(subvars: ModelSequences[ModelSequence, FastAccess])[source]¶
Bases:
AideSequenceAbleitung von
QRVR(derivative ofQRVR) [m³/m].- Calculated by the method:
- Required by the method:
- class hydpy.models.lstream.AideSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
AideSequencesAide sequences of model lstream.
- The following classes are selected:
WBM()Wasserspiegelbreite Hauptgerinne (water level width of the main channel) [m].WBLV()Wasserspiegelbreite des linken Vorlandes (water level width of the left foreland) [m].WBRV()Wasserspiegelbreite des rechten Vorlandes (water level width of the right foreland) [m].WBLVR()Wasserspiegelbreite des linken Vorlandrandes (water level width of the left outer embankment) [m].WBRVR()Wasserspiegelbreite des rechten Vorlandrandes (water level width of the right outer embankment) [m].WBG()Wasserspiegelbreite des gesamten Querschnittes (water level width of the total cross section) [m].AM()Durchflossene Fläche Hauptgerinne (wetted area of the main channel) [m²].ALV()Durchflossene Fläche linkes Vorland (wetted area of the left foreland) [m²].ARV()Durchflossene Fläche rechtes Vorland (wetted area of the right foreland) [m²].ALVR()Durchflossene Fläche linker Vorlandrand (wetted area of the left outer embankments) [m²].ARVR()Durchflossene Fläche rechter Vorlandrand (wetted area of the right outer embankments) [m²].AG()Durchflossene Fläche gesamt (total wetted area) [m²].UM()Benetzter Umfang Hauptgerinne (wetted perimeter of the main channel) [m].ULV()Benetzter Umfang linkes Vorland (wetted perimeter of the left foreland) [m].URV()Benetzter Umfang rechtes Vorland (wetted perimeter of the right foreland) [m].ULVR()Benetzter Umfang linker Vorlandrand (wetted perimeter of the left outer embankment) [m].URVR()Benetzter Umfang rechtes Vorlandrand (wetted perimeter of the right outer embankment) [m].QM()Durchfluss Hauptgerinne (discharge of the main channel) [m³/s].QLV()Durchfluss linkes Vorland (discharge of the left foreland) [m³/s].QRV()Durchfluss rechtes Vorland (discharge of the right foreland) [m³/s].QLVR()Durchfluss linker Vorlandrand (discharge of the left outer embankment) [m³/s].QRVR()Durchfluss rechter Vorlandrand (discharge of the right outer embankment) [m³/s].RHM()Hinsichtlich der Gewässersohle regularisierter Wasserstand (stage regularised with respect to the channel bottom) [m].RHV()Hinsichtlich der des Übergangs Hauptgerinne/Vorländer regularisierter Wasserstand (stage regularised with respect to the transition from the main channel to both forelands) [m].RHLVR()Hinsichtlich der des Übergangs linkes Vorland/ linker Vorlandrand regularisierter Wasserstand (stage regularised with respect to the transition from the left foreland to the left outer embankment) [m].RHRVR()Hinsichtlich der des Übergangs rechtes Vorland/ rechter Vorlandrand regularisierter Wasserstand (stage regularised with respect to the transition from the right foreland to the right outer embankment) [m].
- class hydpy.models.lstream.ControlParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParametersControl parameters of model lstream.
- The following classes are selected:
Laen()Flusslänge (channel length) [km].Gef()Sohlgefälle (channel slope) [-].GTS()Anzahl Gewässerteilstrecken (number of channel subsections) [-].HM()Höhe Hauptgerinne (height of the main channel) [m].BM()Sohlbreite Hauptgerinne (bed width of the main channel) [m].BNM()Böschungsneigung Hauptgerinne (slope of both main channel embankments) [-].BV()Sohlbreite Vorländer (bed widths of both forelands) [m].BBV()Breite Vorlandböschungen (width of both foreland embankments) [m].BNV()Böschungsneigung Vorländer (slope of both foreland embankments) [-].BNVR()Böschungsneigung Vorlandränder (slope of both outer embankments) [-].SKM()Rauigkeitsbeiwert Hauptgerinne (roughness coefficient of the main channel) [m^(1/3)/s].SKV()Rauigkeitsbeiwert Vorländer (roughness coefficient of both forelands) [m^(1/3)/s].EKM()Kalibrierfaktor Hauptgerinne (calibration factor for the main channel) [-].EKV()Kalibrierfaktor Vorländer (calibration factor for both forelands) [m].HR()Allgemeiner Glättungsparameter für den Wasserstand (general smoothing parameter for the water stage) [mm].VG2FG()Flexibler Interpolator zur Berechnung der Fließgeschwindigkeit in Abhängigkeit zur aktuellen Wasserspeicherung einer Gewässerteilstrecke (flexible interpolator describing the relationship between the flow velocity and the water storage of individual channel subsections) [m/s].EK()Kalibrierfaktor (calibration factor) [-].
- class hydpy.models.lstream.DerivedParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParametersDerived parameters of model lstream.
- The following classes are selected:
Sek()Sekunden im Simulationszeitschritt (Number of seconds of the selected simulation time step) [s].HV()Höhe Vorländer (height of both forelands) [m].MFM()Produkt der zeitkonstanten Terme der Manning-Strickler-Formel für das Hauptgerinne (product of the time-constant terms of the Manning-Strickler equation, calculated for the main channel) [m^(1/3)/s].MFV()Produkt der zeitkonstanten Terme der Manning-Strickler-Formel für beide Vorländer (product of the time-constant terms of the Manning-Strickler equation, calculated for both forelands) [m^(1/3)/s].BNMF()Hilfsterm zur Berechnung des benetzten Böschungsumfangs im Hauptgerinne (auxiliary term for the calculation of the wetted perimeter of the slope of the main channel) [m].BNVF()Hilfsterm zur Berechnung des benetzten Böschungsumfangs der Vorländer (auxiliary term for the calculation of the wetted perimeter of the slope of both forelands) [m].BNVRF()Hilfsterm zur Berechnung des benetzten Böschungsumfangs der Vorlandränder (auxiliary term for the calculation of the wetted perimeter of the slope of both outer embankments) [m].HRP()Wasserstand-Regularisierungs-Parameter zur Verwendung in Verbindung mit Regularisierungsfunktionsmooth_logistic2()(regularisation parameter for water stage to be used when applying regularisation functionsmooth_logistic2()) [m].
- class hydpy.models.lstream.FixedParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParametersFixed parameters of model lstream.
- class hydpy.models.lstream.FluxSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
FluxSequencesFlux sequences of model lstream.
- The following classes are selected:
QZ()Mittlerer Zufluss in Gerinnestrecke (average inflow into the channel) [m³/s].QZA()Aktueller Zufluss in Gerinnestrecke (current inflow into the channel) [m³/s].QG()Durchfluss gesamt (total discharge) [m³/s].QA()Abfluss aus Gerinnestrecke (outflow out of the channel) [m³/s].DH()Wasserstandänderung (temporal change of the water stage) [m/s].
- class hydpy.models.lstream.InletSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
InletSequencesInlet sequences of model lstream.
- The following classes are selected:
Q()Abfluss (runoff) [m³/s].
- class hydpy.models.lstream.OutletSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
OutletSequencesOutlet sequences of model lstream.
- The following classes are selected:
Q()Abfluss (runoff) [m³/s].
- class hydpy.models.lstream.SolverParameters(master: Parameters, cls_fastaccess: Type[FastAccessParameter] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
SubParametersSolver parameters of model lstream.
- The following classes are selected:
AbsErrorMax()Absolute numerical error tolerance [m3/s].RelErrorMax()Relative numerical error tolerance [-].RelDTMin()Smallest relative integration time step size allowed [-].RelDTMax()Largest relative integration time step size allowed [-].
- class hydpy.models.lstream.StateSequences(master: Sequences, cls_fastaccess: Type[TypeFastAccess_co] | None = None, cymodel: CyModelProtocol | None = None)¶
Bases:
StateSequencesState sequences of model lstream.