llake¶
The L-Lake model defines the methods and classes required for performing lake and dam retention processes as implemented in LARSIM.
Method Features¶
-
class
hydpy.models.llake.llake_model.
Model
[source]¶ Bases:
hydpy.core.modeltools.AdHocModel
Base model for HydPy-L-Lake.
- The following “inlet update methods” are called in the given sequence at the beginning of each simulation step:
Pick_Q_V1
Update the inlet link sequence.
- The following “run methods” are called in the given sequence during each simulation step:
Solve_DV_DT_V1
Solve the differential equation of HydPy-L.Interp_W_V1
Calculate the actual water stage based on linear interpolation.Corr_DW_V1
Adjust the water stage drop to the highest value allowed and correct the associated fluxes.Modify_QA_V1
Add water to or remove water from the calculated lake outflow.
- The following “outlet update methods” are called in the given sequence at the end of each simulation step:
Pass_Q_V1
Update the outlet link sequence.
- 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:
Interp_V_V1
Calculate the actual water volume based on linear interpolation.Calc_VQ_V1
Calculate the auxiliary term.Interp_QA_V1
Calculate the lake outflow based on linear interpolation.Calc_V_QA_V1
Update the stored water volume based on the equation of continuity.
-
class
hydpy.models.llake.llake_model.
Solve_DV_DT_V1
[source]¶ Bases:
hydpy.core.modeltools.Method
Solve the differential equation of HydPy-L.
- Requires the derived parameter:
- Updates the state sequence:
- Calculates the flux sequence:
- Calculates the aide sequence:
At the moment, HydPy-L only implements a simple numerical solution of its underlying ordinary differential equation. To increase the accuracy (or sometimes even to prevent instability) of this approximation, one can set the value of parameter
MaxDT
to a value smaller than the actual simulation step size. MethodSolve_DV_DT_V1
then applies the methods related to the numerical approximation multiple times and aggregates the results.Note that the order of convergence is one only. It is hard to tell how short the internal simulation step needs to be to ensure a certain degree of accuracy. In most cases one hour or very often even one day should be sufficient to gain acceptable results. However, this strongly depends on the given water stage-volume-discharge relationship. Hence it seems advisable to always define a few test waves and apply the llake model with different
MaxDT
values. Afterwards, select aMaxDT
value lower than one which results in acceptable approximations for all test waves. The computation time of the llake mode per substep is rather small, so always include a safety factor.Of course, an adaptive step size determination would be much more convenient…
Note that method
Solve_DV_DT_V1
calls the versions of calc_vq, interp_qa and calc_v_qa selected by the respective application model. Hence, also their parameter and sequence specifications need to be considered.- Basic equation:
\(\frac{dV}{dt}= QZ - QA(V)\)
-
class
hydpy.models.llake.llake_model.
Calc_VQ_V1
[source]¶ Bases:
hydpy.core.modeltools.Method
Calculate the auxiliary term.
- Requires the derived parameters:
- Requires the flux sequence:
- Requires the aide sequence:
- Calculates the aide sequence:
- Basic equation:
\(VQ = 2 \cdot V + \frac{Seconds}{NmbSubsteps} \cdot QZ\)
Example:
The following example shows that the auxiliary term vq does not depend on the (outer) simulation step size but on the (inner) calculation step size defined by parameter maxdt:
>>> from hydpy.models.llake import * >>> parameterstep("1d") >>> simulationstep("12h") >>> maxdt("6h") >>> derived.seconds.update() >>> derived.nmbsubsteps.update() >>> fluxes.qz = 2. >>> aides.v = 1e5 >>> model.calc_vq_v1() >>> aides.vq vq(243200.0)
-
class
hydpy.models.llake.llake_model.
Interp_QA_V1
[source]¶ Bases:
hydpy.core.modeltools.Method
Calculate the lake outflow based on linear interpolation.
- Requires the control parameters:
- Requires the derived parameters:
- Requires the aide sequence:
- Calculates the aide sequence:
Examples:
In preparation for the following examples, define a short simulation time period with a simulation step size of 12 hours and initialize the required model object:
>>> from hydpy import pub >>> pub.timegrids = "2000.01.01","2000.01.04", "12h" >>> from hydpy.models.llake import * >>> parameterstep()
Next, for the sake of brevity, define a test function:
>>> def test(*vqs): ... for vq in vqs: ... aides.vq(vq) ... model.interp_qa_v1() ... print(repr(aides.vq), repr(aides.qa))
The following three relationships between the auxiliary term vq and the tabulated discharge q are taken as examples. Each one is valid for one of the first three days in January and is defined via five nodes:
>>> n(5) >>> derived.toy.update() >>> derived.vq(_1_1_6=[0., 1., 2., 2., 3.], ... _1_2_6=[0., 1., 2., 2., 3.], ... _1_3_6=[0., 1., 2., 3., 4.]) >>> q(_1_1_6=[0., 0., 0., 0., 0.], ... _1_2_6=[0., 2., 5., 6., 9.], ... _1_3_6=[0., 2., 1., 3., 2.])
In the first example, discharge does not depend on the actual value of the auxiliary term and is always zero:
>>> model.idx_sim = pub.timegrids.init["2000.01.01"] >>> test(0., .75, 1., 4./3., 2., 7./3., 3., 10./3.) vq(0.0) qa(0.0) vq(0.75) qa(0.0) vq(1.0) qa(0.0) vq(1.333333) qa(0.0) vq(2.0) qa(0.0) vq(2.333333) qa(0.0) vq(3.0) qa(0.0) vq(3.333333) qa(0.0)
The seconds example demonstrates that relationships are allowed to contain jumps, which is the case for the (vq,`q`) pairs (2,6) and (2,7). Also it demonstrates that when the highest vq value is exceeded linear extrapolation based on the two highest (vq,`q`) pairs is performed:
>>> model.idx_sim = pub.timegrids.init["2000.01.02"] >>> test(0., .75, 1., 4./3., 2., 7./3., 3., 10./3.) vq(0.0) qa(0.0) vq(0.75) qa(1.5) vq(1.0) qa(2.0) vq(1.333333) qa(3.0) vq(2.0) qa(5.0) vq(2.333333) qa(7.0) vq(3.0) qa(9.0) vq(3.333333) qa(10.0)
The third example shows that the relationships do not need to be arranged monotonously increasing. Particualarly for the extrapolation range, this could result in negative values of qa, which is avoided by setting it to zero in such cases:
>>> model.idx_sim = pub.timegrids.init["2000.01.03"] >>> test(.5, 1.5, 2.5, 3.5, 4.5, 10.) vq(0.5) qa(1.0) vq(1.5) qa(1.5) vq(2.5) qa(2.0) vq(3.5) qa(2.5) vq(4.5) qa(1.5) vq(10.0) qa(0.0)
-
class
hydpy.models.llake.llake_model.
Calc_V_QA_V1
[source]¶ Bases:
hydpy.core.modeltools.Method
Update the stored water volume based on the equation of continuity.
- Requires the derived parameters:
- Requires the flux sequence:
- Updates the aide sequences:
Note that for too high outflow values, which would result in overdraining the lake, the outflow is trimmed.
- Basic Equation:
\(\frac{dV}{dt}= QZ - QA\)
Examples:
Prepare a lake model with an initial storage of 100.000 m³ and an inflow of 2 m³/s and a (potential) outflow of 6 m³/s:
>>> from hydpy.models.llake import * >>> parameterstep() >>> simulationstep("12h") >>> maxdt("6h") >>> derived.seconds.update() >>> derived.nmbsubsteps.update() >>> aides.v = 1e5 >>> fluxes.qz = 2. >>> aides.qa = 6.
Through calling method calc_v_qa_v1 three times with the same inflow and outflow values, the storage is emptied after the second step and outflow is equal to inflow after the third step:
>>> model.calc_v_qa_v1() >>> aides.v v(13600.0) >>> aides.qa qa(6.0) >>> model.new2old() >>> model.calc_v_qa_v1() >>> aides.v v(0.0) >>> aides.qa qa(2.62963) >>> model.new2old() >>> model.calc_v_qa_v1() >>> aides.v v(0.0) >>> aides.qa qa(2.0)
Note that the results of method
Calc_V_QA_V1
are not based depend on the (outer) simulation step size but on the (inner) calculation step size defined by parameter maxdt.
-
class
hydpy.models.llake.llake_model.
Interp_W_V1
[source]¶ Bases:
hydpy.core.modeltools.Method
Calculate the actual water stage based on linear interpolation.
Examples:
Prepare a model object:
>>> from hydpy.models.llake import * >>> parameterstep("1d") >>> simulationstep("12h")
For the sake of brevity, define a test function:
>>> def test(*vs): ... for v in vs: ... states.v.new = v ... model.interp_w_v1() ... print(repr(states.v), repr(states.w))
Define a simple w-v relationship consisting of three nodes and calculate the water stages for different volumes:
>>> n(3) >>> v(0., 2., 4.) >>> w(-1., 1., 2.)
Perform the interpolation for a few test points:
>>> test(0., .5, 2., 3., 4., 5.) v(0.0) w(-1.0) v(0.5) w(-0.5) v(2.0) w(1.0) v(3.0) w(1.5) v(4.0) w(2.0) v(5.0) w(2.5)
The reference water stage of the relationship can be selected arbitrarily. Even negative water stages are returned, as is demonstrated by the first two calculations. For volumes outside the range of the (v,`w`) pairs, the outer two highest pairs are used for linear extrapolation.
-
class
hydpy.models.llake.llake_model.
Interp_V_V1
[source]¶ Bases:
hydpy.core.modeltools.Method
Calculate the actual water volume based on linear interpolation.
Examples:
Prepare a model object:
>>> from hydpy.models.llake import * >>> parameterstep("1d") >>> simulationstep("12h")
For the sake of brevity, define a test function:
>>> def test(*ws): ... for w in ws: ... states.w.new = w ... model.interp_v_v1() ... print(repr(states.w), repr(states.v))
Define a simple v-w relationship consisting of three nodes and calculate the water stages for different volumes:
>>> n(3) >>> w(-1., 1., 2.) >>> v(0., 2., 4.)
Perform the interpolation for a few test points:
>>> test(-1., -.5, 1., 1.5, 2., 2.5) w(-1.0) v(0.0) w(-0.5) v(0.5) w(1.0) v(2.0) w(1.5) v(3.0) w(2.0) v(4.0) w(2.5) v(5.0)
The reference water stage of the relationship can be selected arbitrarily, hence even the negative water contained in the given example is allowed. For volumes outside the range of the (w,`v`) pairs, the outer two highest pairs are used for linear extrapolation.
-
class
hydpy.models.llake.llake_model.
Corr_DW_V1
[source]¶ Bases:
hydpy.core.modeltools.Method
Adjust the water stage drop to the highest value allowed and correct the associated fluxes.
- Requires the control parameter:
- Requires the derived parameters:
- Requires the flux sequence:
- Updates the flux sequence:
- Updates the state sequences:
Note that method
Corr_DW_V1
calls the method interp_v of the respective application model. Hence the requirements of the actual interp_v need to be considered additionally.- Basic Restriction:
\(W_{old} - W_{new} \leq MaxDW\)
Examples:
In preparation for the following examples, define a short simulation time period with a simulation step size of 12 hours and initialize the required model object:
>>> from hydpy import pub >>> pub.timegrids = "2000.01.01", "2000.01.04", "12h" >>> from hydpy.models.llake import * >>> parameterstep("1d") >>> derived.toy.update() >>> derived.seconds.update()
Select the first half of the second day of January as the simulation step relevant for the following examples:
>>> model.idx_sim = pub.timegrids.init["2000.01.02"]
The following tests are based on method
Interp_V_V1
for the interpolation of the stored water volume based on the corrected water stage:>>> model.interp_v = model.interp_v_v1
For the sake of simplicity, the underlying w-v relationship is assumed to be linear:
>>> n(2.) >>> w(0., 1.) >>> v(0., 1e6)
The maximum drop in water stage for the first half of the second day of January is set to 0.4 m/d. Note that, due to the difference between the parameter step size and the simulation step size, the actual value used for calculation is 0.2 m/12h:
>>> maxdw(_1_1_18=.1, ... _1_2_6=.4, ... _1_2_18=.1) >>> maxdw maxdw(toy_1_1_18_0_0=0.1, toy_1_2_6_0_0=0.4, toy_1_2_18_0_0=0.1) >>> from hydpy import round_ >>> round_(maxdw.value[2]) 0.2
Define old and new water stages and volumes in agreement with the given linear relationship:
>>> states.w.old = 1. >>> states.v.old = 1e6 >>> states.w.new = .9 >>> states.v.new = 9e5
Also define an inflow and an outflow value. Note the that the latter is set to zero, which is inconsistent with the actual water stage drop defined above, but done for didactic reasons:
>>> fluxes.qz = 1. >>> fluxes.qa = 0.
Calling the
Corr_DW_V1
method does not change the values of either of following sequences, as the actual drop (0.1 m/12h) is smaller than the allowed drop (0.2 m/12h):>>> model.corr_dw_v1() >>> states.w w(0.9) >>> states.v v(900000.0) >>> fluxes.qa qa(0.0)
Note that the values given above are not recalculated, which can clearly be seen for the lake outflow, which is still zero.
Through setting the new value of the water stage to 0.6 m, the actual drop (0.4 m/12h) exceeds the allowed drop (0.2 m/12h). Hence the water stage is trimmed and the other values are recalculated:
>>> states.w.new = .6 >>> model.corr_dw_v1() >>> states.w w(0.8) >>> states.v v(800000.0) >>> fluxes.qa qa(5.62963)
Through setting the maximum water stage drop to zero, method
Corr_DW_V1
is effectively disabled. Regardless of the actual change in water stage, no trimming or recalculating is performed:>>> maxdw.toy_01_02_06 = 0. >>> states.w.new = .6 >>> model.corr_dw_v1() >>> states.w w(0.6) >>> states.v v(800000.0) >>> fluxes.qa qa(5.62963)
-
class
hydpy.models.llake.llake_model.
Modify_QA_V1
[source]¶ Bases:
hydpy.core.modeltools.Method
Add water to or remove water from the calculated lake outflow.
- Requires the control parameter:
- Requires the derived parameter:
- Updates the flux sequence:
- Basic Equation:
\(QA = QA* - Verzw\)
- Examples:
In preparation for the following examples, define a short simulation time period with a simulation step size of 12 hours and initialize the required model object:
>>> from hydpy import pub >>> pub.timegrids = "2000.01.01", "2000.01.04", "12h" >>> from hydpy.models.llake import * >>> parameterstep("1d") >>> derived.toy.update()
Select the first half of the second day of January as the simulation step relevant for the following examples:
>>> model.idx_sim = pub.timegrids.init["2000.01.02"]
Assume that, in accordance with previous calculations, the original outflow value is 3 m³/s:
>>> fluxes.qa = 3.0
Prepare the shape of parameter verzw (usually, this is done automatically when calling parameter n):
>>> verzw.shape = (None,)
Set the value of the abstraction on the first half of the second day of January to 2 m³/s:
>>> verzw(_1_1_18=0.0, ... _1_2_6=2.0, ... _1_2_18=0.0)
In the first example verzw is simply subtracted from qa:
>>> model.modify_qa_v1() >>> fluxes.qa qa(1.0)
In the second example verzw exceeds qa, resulting in a zero outflow value:
>>> model.modify_qa_v1() >>> fluxes.qa qa(0.0)
The last example demonstrates, that “negative abstractions” are allowed, resulting in an increase in simulated outflow:
>>> verzw.toy_1_2_6 = -2.0 >>> model.modify_qa_v1() >>> fluxes.qa qa(2.0)
-
class
hydpy.models.llake.llake_model.
Pick_Q_V1
[source]¶ Bases:
hydpy.core.modeltools.Method
Update the inlet link sequence.
-
class
hydpy.models.llake.llake_model.
Pass_Q_V1
[source]¶ Bases:
hydpy.core.modeltools.Method
Update the outlet link sequence.
Parameter Features¶
Control parameters¶
-
class
hydpy.models.llake.
ControlParameters
(master: hydpy.core.parametertools.Parameters, cls_fastaccess: Optional[Type[hydpy.core.parametertools.FastAccessParameter]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None) Bases:
hydpy.core.variabletools.SubVariables
[hydpy.core.parametertools.Parameters
,Parameter
,hydpy.core.parametertools.FastAccessParameter
]Control parameters of model llake.
- The following classes are selected:
N()
Anzahl Interpolationsstützstellen (number of nodes for the interpolation between water state, volume and discharge) [-].W()
Wasserstand (water stage) [m].V()
Wasservolumen bei vorgegebenem Wasserstand (water volume for a given water stage) [m³].Q()
Üblicher Seeausfluss bei vorgegebenem Wasserstand (sea outlet discharge for a given water stage) [m³/s].MaxDT()
Maximale interne Rechenschrittweite (maximum of the internal step size) [T].MaxDW()
Maximale Absenkgeschwindigkeit (maximum drop in water level) [m/T].Verzw()
Zu- oder Abschlag des Seeausflusses (addition to or abstraction from the seas outlet discharge) [m³/s].
-
class
hydpy.models.llake.llake_control.
N
(subvars: SubVariablesType)[source]¶ Bases:
hydpy.core.variabletools.Variable
[hydpy.core.parametertools.SubParameters
,hydpy.core.parametertools.FastAccessParameter
]Anzahl Interpolationsstützstellen (number of nodes for the interpolation between water state, volume and discharge) [-].
- Required by the methods:
Parameter
N
determines the length of all 1- and 2-dimensional parameters of HydPy-L-Lake. This requires that the value of the respectiveN
instance is set before any of the values of these 1- and 2-dimensional parameters are set. Changing the value of theN
instance necessitates setting their values again.Examples:
>>> from hydpy.models.llake import * >>> parameterstep("1d") >>> simulationstep("12h") >>> n(5)
For “simple” 1-dimensional parameters, the shape depends on the value of
N
only:>>> w.shape (5,)
For time varying parameters (derived from
SeasonalParameter
), it also depends on the defined number simulation steps per leap year:>>> verzw.shape (732,) >>> q.shape (732, 5)
-
TYPE
¶
-
class
hydpy.models.llake.llake_control.
W
(subvars: SubVariablesType)[source]¶ Bases:
hydpy.core.variabletools.Variable
[hydpy.core.parametertools.SubParameters
,hydpy.core.parametertools.FastAccessParameter
]Wasserstand (water stage) [m].
- Required by the methods:
-
TYPE
¶
-
class
hydpy.models.llake.llake_control.
V
(subvars: SubVariablesType)[source]¶ Bases:
hydpy.core.variabletools.Variable
[hydpy.core.parametertools.SubParameters
,hydpy.core.parametertools.FastAccessParameter
]Wasservolumen bei vorgegebenem Wasserstand (water volume for a given water stage) [m³].
- Required by the methods:
-
TYPE
¶
-
class
hydpy.models.llake.llake_control.
Q
(subvars)[source]¶ Bases:
hydpy.core.variabletools.Variable
[hydpy.core.parametertools.SubParameters
,hydpy.core.parametertools.FastAccessParameter
]Üblicher Seeausfluss bei vorgegebenem Wasserstand (sea outlet discharge for a given water stage) [m³/s].
- Required by the method:
-
TYPE
¶
-
class
hydpy.models.llake.llake_control.
MaxDT
(subvars: SubVariablesType)[source]¶ Bases:
hydpy.core.variabletools.Variable
[hydpy.core.parametertools.SubParameters
,hydpy.core.parametertools.FastAccessParameter
]Maximale interne Rechenschrittweite (maximum of the internal step size) [T].
Examples:
Initialize a llake model and set different time step length for parameterstep, simulationstep and maxdt:
>>> from hydpy.models.llake import * >>> parameterstep("1d") >>> simulationstep("12h") >>> maxdt maxdt(?) >>> maxdt("1h")
Internally, the value of maxdt is stored in seconds, but in string representations it is shown as a
Period
string:>>> maxdt.value 3600.0 >>> maxdt maxdt("1h")
Note that maxdt only defines the maximum internal step size, not the one actually used. Hence, maxdt is e.g. allowed to be larger than the actual simulation step size:
>>> maxdt("2d") >>> maxdt maxdt("2d")
It is allowed the set the number of seconds directly or modify it by mathematical operations:
>>> maxdt.value = 60. >>> maxdt maxdt("1m") >>> maxdt *= 120. >>> maxdt maxdt("2h")
However, for the more secure way of calling the object trying to pass an argument which cannot be converted to a Period instance unambiguously results in an exception:
>>> maxdt(60.) Traceback (most recent call last): ... TypeError: While trying the set the value of parameter `maxdt` of the lake model handled by element `?`, the following error occurred: While trying to initialise a `Period` object based argument `60.0`, the following error occurred: The supplied argument must be either an instance of `Period`, `datetime.timedelta`, or `str`, but the given type is `float`. (An example: set `max dt` to 3600 seconds by writing `maxdt("1h"))
-
TYPE
¶
-
-
class
hydpy.models.llake.llake_control.
MaxDW
(subvars)[source]¶ Bases:
hydpy.core.variabletools.Variable
[hydpy.core.parametertools.SubParameters
,hydpy.core.parametertools.FastAccessParameter
]Maximale Absenkgeschwindigkeit (maximum drop in water level) [m/T].
- Required by the method:
-
TYPE
¶
-
class
hydpy.models.llake.llake_control.
Verzw
(subvars)[source]¶ Bases:
hydpy.core.variabletools.Variable
[hydpy.core.parametertools.SubParameters
,hydpy.core.parametertools.FastAccessParameter
]Zu- oder Abschlag des Seeausflusses (addition to or abstraction from the seas outlet discharge) [m³/s].
- Required by the method:
-
TYPE
¶
Derived parameters¶
-
class
hydpy.models.llake.
DerivedParameters
(master: hydpy.core.parametertools.Parameters, cls_fastaccess: Optional[Type[hydpy.core.parametertools.FastAccessParameter]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None) Bases:
hydpy.core.variabletools.SubVariables
[hydpy.core.parametertools.Parameters
,Parameter
,hydpy.core.parametertools.FastAccessParameter
]Derived parameters of model llake.
- The following classes are selected:
TOY()
References thetimeofyear
index array provided by the instance of classIndexer
available in modulepub
. [-].Seconds()
Length of the actual simulation step size in seconds [s].NmbSubsteps()
Number of the internal simulation steps [-].VQ()
Hilfsterm (auxiliary term): math:VdtQ = 2 cdot + dt cdot Q` [m³].
-
class
hydpy.models.llake.llake_derived.
TOY
(subvars: SubVariablesType)[source]¶ Bases:
hydpy.core.variabletools.Variable
[hydpy.core.parametertools.SubParameters
,hydpy.core.parametertools.FastAccessParameter
]References the
timeofyear
index array provided by the instance of classIndexer
available in modulepub
. [-].- Required by the methods:
-
class
hydpy.models.llake.llake_derived.
Seconds
(subvars: SubVariablesType)[source]¶ Bases:
hydpy.core.variabletools.Variable
[hydpy.core.parametertools.SubParameters
,hydpy.core.parametertools.FastAccessParameter
]Length of the actual simulation step size in seconds [s].
- Required by the methods:
-
class
hydpy.models.llake.llake_derived.
NmbSubsteps
(subvars: SubVariablesType)[source]¶ Bases:
hydpy.core.variabletools.Variable
[hydpy.core.parametertools.SubParameters
,hydpy.core.parametertools.FastAccessParameter
]Number of the internal simulation steps [-].
- Required by the methods:
-
TYPE
¶
-
update
()[source]¶ Determine the number of substeps.
Initialize a llake model and assume a simulation step size of 12 hours:
>>> from hydpy.models.llake import * >>> parameterstep("1d") >>> simulationstep("12h") >>> derived.seconds.update()
If the maximum internal step size is also set to 12 hours, there is only one internal calculation step per outer simulation step:
>>> maxdt("12h") >>> derived.nmbsubsteps.update() >>> derived.nmbsubsteps nmbsubsteps(1)
Assigning smaller values to maxdt increases nmbstepsize:
>>> maxdt("1h") >>> derived.nmbsubsteps.update() >>> derived.nmbsubsteps nmbsubsteps(12)
In case the simulationstep is not a whole multiple of dwmax, the value of nmbsubsteps is rounded up:
>>> maxdt("59m") >>> derived.nmbsubsteps.update() >>> derived.nmbsubsteps nmbsubsteps(13)
Even for maxdt values exceeding the simulationstep, the value of numbsubsteps does not become smaller than one:
>>> maxdt("2d") >>> derived.nmbsubsteps.update() >>> derived.nmbsubsteps nmbsubsteps(1)
-
class
hydpy.models.llake.llake_derived.
VQ
(subvars)[source]¶ Bases:
hydpy.core.variabletools.Variable
[hydpy.core.parametertools.SubParameters
,hydpy.core.parametertools.FastAccessParameter
]Hilfsterm (auxiliary term): math:VdtQ = 2 cdot + dt cdot Q` [m³].
- Required by the method:
-
TYPE
¶
-
update
()[source]¶ Calulate the auxilary term.
>>> from hydpy import pub >>> pub.timegrids = "2000-01-01", "2001-01-01", "12h" >>> from hydpy.models.llake import * >>> parameterstep("1d") >>> n(3) >>> v(0., 1e5, 1e6) >>> q(_1=[0., 1., 2.], _7=[0., 2., 5.]) >>> maxdt("12h") >>> derived.seconds.update() >>> derived.nmbsubsteps.update() >>> derived.vq.update() >>> derived.vq vq(toy_1_1_0_0_0=[0.0, 243200.0, 2086400.0], toy_7_1_0_0_0=[0.0, 286400.0, 2216000.0])
Sequence Features¶
Flux sequences¶
-
class
hydpy.models.llake.
FluxSequences
(master: hydpy.core.sequencetools.Sequences, cls_fastaccess: Optional[Type[FastAccessType]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None) Bases:
hydpy.core.sequencetools.OutputSequences
[FluxSequence
]Flux sequences of model llake.
-
class
hydpy.models.llake.llake_fluxes.
QZ
(subvars: SubVariablesType)[source]¶ Bases:
hydpy.core.sequencetools.OutputSequence
[hydpy.core.sequencetools.FluxSequences
]Seezufluss (inflow into the lake) [m³/s].
- Calculated by the method:
- Required by the methods:
-
class
hydpy.models.llake.llake_fluxes.
QA
(subvars: SubVariablesType)[source]¶ Bases:
hydpy.core.sequencetools.OutputSequence
[hydpy.core.sequencetools.FluxSequences
]Seeausfluss (outflow from the lake) [m³/s].
- Calculated by the method:
- Updated by the methods:
- Required by the method:
State sequences¶
-
class
hydpy.models.llake.
StateSequences
(master: hydpy.core.sequencetools.Sequences, cls_fastaccess: Optional[Type[FastAccessType]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None) Bases:
hydpy.core.sequencetools.OutputSequences
[StateSequence
]State sequences of model llake.
-
class
hydpy.models.llake.llake_states.
V
(subvars: SubVariablesType)[source]¶ Bases:
hydpy.core.sequencetools.OutputSequence
[hydpy.core.sequencetools.StateSequences
],hydpy.core.sequencetools.ConditionSequence
[hydpy.core.sequencetools.StateSequences
,hydpy.core.sequencetools.FastAccessOutputSequence
]Wasservolumen (water volume) [m³].
- Calculated by the method:
- Updated by the methods:
- Required by the method:
-
class
hydpy.models.llake.llake_states.
W
(subvars: SubVariablesType)[source]¶ Bases:
hydpy.core.sequencetools.OutputSequence
[hydpy.core.sequencetools.StateSequences
],hydpy.core.sequencetools.ConditionSequence
[hydpy.core.sequencetools.StateSequences
,hydpy.core.sequencetools.FastAccessOutputSequence
]Wasserstand (water stage) [m].
- Calculated by the method:
- Updated by the method:
- Required by the method:
Inlet sequences¶
-
class
hydpy.models.llake.
InletSequences
(master: hydpy.core.sequencetools.Sequences, cls_fastaccess: Optional[Type[FastAccessType]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None) Bases:
hydpy.core.sequencetools.LinkSequences
[InletSequence
]Inlet sequences of model llake.
- The following classes are selected:
Q()
Abfluss (runoff) [m³/s].
Outlet sequences¶
-
class
hydpy.models.llake.
OutletSequences
(master: hydpy.core.sequencetools.Sequences, cls_fastaccess: Optional[Type[FastAccessType]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None) Bases:
hydpy.core.sequencetools.LinkSequences
[OutletSequence
]Outlet sequences of model llake.
- The following classes are selected:
Q()
Abfluss (runoff) [m³/s].
Aide sequences¶
-
class
hydpy.models.llake.
AideSequences
(master: hydpy.core.sequencetools.Sequences, cls_fastaccess: Optional[Type[FastAccessType]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None) Bases:
hydpy.core.sequencetools.ModelSequences
[AideSequence
,hydpy.core.variabletools.FastAccess
]Aide sequences of model llake.
-
class
hydpy.models.llake.llake_aides.
QA
(subvars: SubVariablesType)[source]¶ Bases:
hydpy.core.sequencetools.ModelSequence
[hydpy.core.sequencetools.AideSequences
,hydpy.core.variabletools.FastAccess
]Seeausfluss (outflow from the lake) [m³/s].
- Calculated by the method:
- Updated by the method:
-
class
hydpy.models.llake.llake_aides.
VQ
(subvars: SubVariablesType)[source]¶ Bases:
hydpy.core.sequencetools.ModelSequence
[hydpy.core.sequencetools.AideSequences
,hydpy.core.variabletools.FastAccess
]Hilfsterm (auxiliary term) [m³].
- Calculated by the method:
- Required by the method:
-
class
hydpy.models.llake.llake_aides.
V
(subvars: SubVariablesType)[source]¶ Bases:
hydpy.core.sequencetools.ModelSequence
[hydpy.core.sequencetools.AideSequences
,hydpy.core.variabletools.FastAccess
]Wasservolumen (water volume) [m³].
- Calculated by the method:
- Updated by the method:
- Required by the method:
-
class
hydpy.models.llake.
AideSequences
(master: hydpy.core.sequencetools.Sequences, cls_fastaccess: Optional[Type[FastAccessType]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None)¶ Bases:
hydpy.core.sequencetools.ModelSequences
[AideSequence
,hydpy.core.variabletools.FastAccess
]Aide sequences of model llake.
-
class
hydpy.models.llake.
ControlParameters
(master: hydpy.core.parametertools.Parameters, cls_fastaccess: Optional[Type[hydpy.core.parametertools.FastAccessParameter]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None)¶ Bases:
hydpy.core.variabletools.SubVariables
[hydpy.core.parametertools.Parameters
,Parameter
,hydpy.core.parametertools.FastAccessParameter
]Control parameters of model llake.
- The following classes are selected:
N()
Anzahl Interpolationsstützstellen (number of nodes for the interpolation between water state, volume and discharge) [-].W()
Wasserstand (water stage) [m].V()
Wasservolumen bei vorgegebenem Wasserstand (water volume for a given water stage) [m³].Q()
Üblicher Seeausfluss bei vorgegebenem Wasserstand (sea outlet discharge for a given water stage) [m³/s].MaxDT()
Maximale interne Rechenschrittweite (maximum of the internal step size) [T].MaxDW()
Maximale Absenkgeschwindigkeit (maximum drop in water level) [m/T].Verzw()
Zu- oder Abschlag des Seeausflusses (addition to or abstraction from the seas outlet discharge) [m³/s].
-
class
hydpy.models.llake.
DerivedParameters
(master: hydpy.core.parametertools.Parameters, cls_fastaccess: Optional[Type[hydpy.core.parametertools.FastAccessParameter]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None)¶ Bases:
hydpy.core.variabletools.SubVariables
[hydpy.core.parametertools.Parameters
,Parameter
,hydpy.core.parametertools.FastAccessParameter
]Derived parameters of model llake.
- The following classes are selected:
TOY()
References thetimeofyear
index array provided by the instance of classIndexer
available in modulepub
. [-].Seconds()
Length of the actual simulation step size in seconds [s].NmbSubsteps()
Number of the internal simulation steps [-].VQ()
Hilfsterm (auxiliary term): math:VdtQ = 2 cdot + dt cdot Q` [m³].
-
class
hydpy.models.llake.
FluxSequences
(master: hydpy.core.sequencetools.Sequences, cls_fastaccess: Optional[Type[FastAccessType]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None)¶ Bases:
hydpy.core.sequencetools.OutputSequences
[FluxSequence
]Flux sequences of model llake.
-
class
hydpy.models.llake.
InletSequences
(master: hydpy.core.sequencetools.Sequences, cls_fastaccess: Optional[Type[FastAccessType]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None)¶ Bases:
hydpy.core.sequencetools.LinkSequences
[InletSequence
]Inlet sequences of model llake.
- The following classes are selected:
Q()
Abfluss (runoff) [m³/s].
-
class
hydpy.models.llake.
OutletSequences
(master: hydpy.core.sequencetools.Sequences, cls_fastaccess: Optional[Type[FastAccessType]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None)¶ Bases:
hydpy.core.sequencetools.LinkSequences
[OutletSequence
]Outlet sequences of model llake.
- The following classes are selected:
Q()
Abfluss (runoff) [m³/s].
-
class
hydpy.models.llake.
StateSequences
(master: hydpy.core.sequencetools.Sequences, cls_fastaccess: Optional[Type[FastAccessType]] = None, cymodel: Optional[hydpy.core.typingtools.CyModelProtocol] = None)¶ Bases:
hydpy.core.sequencetools.OutputSequences
[StateSequence
]State sequences of model llake.