Search is not available for this dataset
text stringlengths 75 104k |
|---|
def solve_dv_dt_v1(self):
"""Solve the differential equation of HydPy-L.
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 v... |
def calc_vq_v1(self):
"""Calculate the auxiliary term.
Required derived parameters:
|Seconds|
|NmbSubsteps|
Required flux sequence:
|QZ|
Required aide sequence:
|llake_aides.V|
Calculated aide sequence:
|llake_aides.VQ|
Basic equation:
:math:`VQ = 2 \\cdo... |
def interp_qa_v1(self):
"""Calculate the lake outflow based on linear interpolation.
Required control parameters:
|N|
|llake_control.Q|
Required derived parameters:
|llake_derived.TOY|
|llake_derived.VQ|
Required aide sequence:
|llake_aides.VQ|
Calculated aide seque... |
def calc_v_qa_v1(self):
"""Update the stored water volume based on the equation of continuity.
Note that for too high outflow values, which would result in overdraining
the lake, the outflow is trimmed.
Required derived parameters:
|Seconds|
|NmbSubsteps|
Required flux sequence:
... |
def interp_w_v1(self):
"""Calculate the actual water stage based on linear interpolation.
Required control parameters:
|N|
|llake_control.V|
|llake_control.W|
Required state sequence:
|llake_states.V|
Calculated state sequence:
|llake_states.W|
Examples:
Pr... |
def corr_dw_v1(self):
"""Adjust the water stage drop to the highest value allowed and correct
the associated fluxes.
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.
... |
def modify_qa_v1(self):
"""Add water to or remove water from the calculated lake outflow.
Required control parameter:
|Verzw|
Required derived parameter:
|llake_derived.TOY|
Updated flux sequence:
|llake_fluxes.QA|
Basic Equation:
:math:`QA = QA* - Verzw`
Examples:
... |
def pass_q_v1(self):
"""Update the outlet link sequence."""
flu = self.sequences.fluxes.fastaccess
out = self.sequences.outlets.fastaccess
out.q[0] += flu.qa |
def thresholds(self):
"""Threshold values of the response functions."""
return numpy.array(
sorted(self._key2float(key) for key in self._coefs), dtype=float) |
def prepare_arrays(sim=None, obs=None, node=None, skip_nan=False):
"""Prepare and return two |numpy| arrays based on the given arguments.
Note that many functions provided by module |statstools| apply function
|prepare_arrays| internally (e.g. |nse|). But you can also apply it
manually, as shown in th... |
def nse(sim=None, obs=None, node=None, skip_nan=False):
"""Calculate the efficiency criteria after Nash & Sutcliffe.
If the simulated values predict the observed values as well
as the average observed value (regarding the the mean square
error), the NSE value is zero:
>>> from hydpy import nse
... |
def bias_abs(sim=None, obs=None, node=None, skip_nan=False):
"""Calculate the absolute difference between the means of the simulated
and the observed values.
>>> from hydpy import round_
>>> from hydpy import bias_abs
>>> round_(bias_abs(sim=[2.0, 2.0, 2.0], obs=[1.0, 2.0, 3.0]))
0.0
>>> ro... |
def std_ratio(sim=None, obs=None, node=None, skip_nan=False):
"""Calculate the ratio between the standard deviation of the simulated
and the observed values.
>>> from hydpy import round_
>>> from hydpy import std_ratio
>>> round_(std_ratio(sim=[1.0, 2.0, 3.0], obs=[1.0, 2.0, 3.0]))
0.0
>>> ... |
def corr(sim=None, obs=None, node=None, skip_nan=False):
"""Calculate the product-moment correlation coefficient after Pearson.
>>> from hydpy import round_
>>> from hydpy import corr
>>> round_(corr(sim=[0.5, 1.0, 1.5], obs=[1.0, 2.0, 3.0]))
1.0
>>> round_(corr(sim=[4.0, 2.0, 0.0], obs=[1.0, 2... |
def hsepd_pdf(sigma1, sigma2, xi, beta,
sim=None, obs=None, node=None, skip_nan=False):
"""Calculate the probability densities based on the
heteroskedastic skewed exponential power distribution.
For convenience, the required parameters of the probability density
function as well as the si... |
def hsepd_manual(sigma1, sigma2, xi, beta,
sim=None, obs=None, node=None, skip_nan=False):
"""Calculate the mean of the logarithmised probability densities of the
'heteroskedastic skewed exponential power distribution.
The following examples are taken from the documentation of function
... |
def hsepd(sim=None, obs=None, node=None, skip_nan=False,
inits=None, return_pars=False, silent=True):
"""Calculate the mean of the logarithmised probability densities of the
'heteroskedastic skewed exponential power distribution.
Function |hsepd| serves the same purpose as function |hsepd_manual|... |
def calc_mean_time(timepoints, weights):
"""Return the weighted mean of the given timepoints.
With equal given weights, the result is simply the mean of the given
time points:
>>> from hydpy import calc_mean_time
>>> calc_mean_time(timepoints=[3., 7.],
... weights=[2., 2.])
... |
def calc_mean_time_deviation(timepoints, weights, mean_time=None):
"""Return the weighted deviation of the given timepoints from their mean
time.
With equal given weights, the is simply the standard deviation of the
given time points:
>>> from hydpy import calc_mean_time_deviation
>>> calc_mea... |
def evaluationtable(nodes, criteria, nodenames=None,
critnames=None, skip_nan=False):
"""Return a table containing the results of the given evaluation
criteria for the given |Node| objects.
First, we define two nodes with different simulation and observation
data (see function |prep... |
def set_primary_parameters(self, **kwargs):
"""Set all primary parameters at once."""
given = sorted(kwargs.keys())
required = sorted(self._PRIMARY_PARAMETERS)
if given == required:
for (key, value) in kwargs.items():
setattr(self, key, value)
else:
... |
def primary_parameters_complete(self):
"""True/False flag that indicates wheter the values of all primary
parameters are defined or not."""
for primpar in self._PRIMARY_PARAMETERS.values():
if primpar.__get__(self) is None:
return False
return True |
def update(self):
"""Delete the coefficients of the pure MA model and also all MA and
AR coefficients of the ARMA model. Also calculate or delete the values
of all secondary iuh parameters, depending on the completeness of the
values of the primary parameters.
"""
del se... |
def delay_response_series(self):
"""A tuple of two numpy arrays, which hold the time delays and the
associated iuh values respectively."""
delays = []
responses = []
sum_responses = 0.
for t in itertools.count(self.dt_response/2., self.dt_response):
delays.app... |
def plot(self, threshold=None, **kwargs):
"""Plot the instanteneous unit hydrograph.
The optional argument allows for defining a threshold of the cumulative
sum uf the hydrograph, used to adjust the largest value of the x-axis.
It must be a value between zero and one.
"""
... |
def moment1(self):
"""The first time delay weighted statistical moment of the
instantaneous unit hydrograph."""
delays, response = self.delay_response_series
return statstools.calc_mean_time(delays, response) |
def moment2(self):
"""The second time delay weighted statistical momens of the
instantaneous unit hydrograph."""
moment1 = self.moment1
delays, response = self.delay_response_series
return statstools.calc_mean_time_deviation(
delays, response, moment1) |
def calc_secondary_parameters(self):
"""Determine the values of the secondary parameters `a` and `b`."""
self.a = self.x/(2.*self.d**.5)
self.b = self.u/(2.*self.d**.5) |
def calc_secondary_parameters(self):
"""Determine the value of the secondary parameter `c`."""
self.c = 1./(self.k*special.gamma(self.n)) |
def trim(self, lower=None, upper=None):
"""Trim values in accordance with :math:`WAeS \\leq PWMax \\cdot WATS`,
or at least in accordance with if :math:`WATS \\geq 0`.
>>> from hydpy.models.lland import *
>>> parameterstep('1d')
>>> nhru(7)
>>> pwmax(2.0)
>>> sta... |
def trim(self, lower=None, upper=None):
"""Trim values in accordance with :math:`WAeS \\leq PWMax \\cdot WATS`.
>>> from hydpy.models.lland import *
>>> parameterstep('1d')
>>> nhru(7)
>>> pwmax(2.)
>>> states.wats = 0., 0., 0., 5., 5., 5., 5.
>>> states.waes(-1.... |
def trim(self, lower=None, upper=None):
"""Trim values in accordance with :math:`BoWa \\leq NFk`.
>>> from hydpy.models.lland import *
>>> parameterstep('1d')
>>> nhru(5)
>>> nfk(200.)
>>> states.bowa(-100.,0., 100., 200., 300.)
>>> states.bowa
bowa(0.0, ... |
def post(self, request, pk):
""" Clean the data and save opening hours in the database.
Old opening hours are purged before new ones are saved.
"""
location = self.get_object()
# open days, disabled widget data won't make it into request.POST
present_prefixes = [x.split('... |
def get(self, request, pk):
""" Initialize the editing form
1. Build opening_hours, a lookup dictionary to populate the form
slots: keys are day numbers, values are lists of opening
hours for that day.
2. Build days, a list of days with 2 slot forms each.
3. Build ... |
def calc_qjoints_v1(self):
"""Apply the routing equation.
Required derived parameters:
|NmbSegments|
|C1|
|C2|
|C3|
Updated state sequence:
|QJoints|
Basic equation:
:math:`Q_{space+1,time+1} =
c1 \\cdot Q_{space,time+1} +
c2 \\cdot Q_{space,time} +
... |
def pick_q_v1(self):
"""Assign the actual value of the inlet sequence to the upper joint
of the subreach upstream."""
inl = self.sequences.inlets.fastaccess
new = self.sequences.states.fastaccess_new
new.qjoints[0] = 0.
for idx in range(inl.len_q):
new.qjoints[0] += inl.q[idx][0] |
def pass_q_v1(self):
"""Assing the actual value of the lower joint of of the subreach
downstream to the outlet sequence."""
der = self.parameters.derived.fastaccess
new = self.sequences.states.fastaccess_new
out = self.sequences.outlets.fastaccess
out.q[0] += new.qjoints[der.nmbsegments] |
def _detect_encoding(data=None):
"""Return the default system encoding. If data is passed, try
to decode the data with the default system encoding or from a short
list of encoding types to test.
Args:
data - list of lists
Returns:
enc - system encoding
"""
import locale
... |
def parameterstep(timestep=None):
"""Define a parameter time step size within a parameter control file.
Argument:
* timestep(|Period|): Time step size.
Function parameterstep should usually be be applied in a line
immediately behind the model import. Defining the step size of time
dependent... |
def reverse_model_wildcard_import():
"""Clear the local namespace from a model wildcard import.
Calling this method should remove the critical imports into the local
namespace due the last wildcard import of a certain application model.
It is thought for securing the successive preperation of different... |
def prepare_model(module: Union[types.ModuleType, str],
timestep: PeriodABC.ConstrArg = None):
"""Prepare and return the model of the given module.
In usual HydPy projects, each hydrological model instance is prepared
in an individual control file. This allows for "polluting" the
nam... |
def simulationstep(timestep):
""" Define a simulation time step size for testing purposes within a
parameter control file.
Using |simulationstep| only affects the values of time dependent
parameters, when `pub.timegrids.stepsize` is not defined. It thus has
no influence on usual hydpy simulations ... |
def controlcheck(controldir='default', projectdir=None, controlfile=None):
"""Define the corresponding control file within a condition file.
Function |controlcheck| serves similar purposes as function
|parameterstep|. It is the reason why one can interactively
access the state and/or the log sequences... |
def update(self):
"""Update |RelSoilArea| based on |Area|, |ZoneArea|, and |ZoneType|.
>>> from hydpy.models.hland import *
>>> parameterstep('1d')
>>> nmbzones(4)
>>> zonetype(FIELD, FOREST, GLACIER, ILAKE)
>>> area(100.0)
>>> zonearea(10.0, 20.0, 30.0, 40.0)
... |
def update(self):
"""Update |TTM| based on :math:`TTM = TT+DTTM`.
>>> from hydpy.models.hland import *
>>> parameterstep('1d')
>>> nmbzones(1)
>>> zonetype(FIELD)
>>> tt(1.0)
>>> dttm(-2.0)
>>> derived.ttm.update()
>>> derived.ttm
ttm(-1.0... |
def update(self):
"""Update |UH| based on |MaxBaz|.
.. note::
This method also updates the shape of log sequence |QUH|.
|MaxBaz| determines the end point of the triangle. A value of
|MaxBaz| being not larger than the simulation step size is
identical with applying... |
def update(self):
"""Update |QFactor| based on |Area| and the current simulation
step size.
>>> from hydpy.models.hland import *
>>> parameterstep('1d')
>>> simulationstep('12h')
>>> area(50.0)
>>> derived.qfactor.update()
>>> derived.qfactor
qfac... |
def nmb_neurons(self) -> Tuple[int, ...]:
"""Number of neurons of the hidden layers.
>>> from hydpy import ANN
>>> ann = ANN(None)
>>> ann(nmb_inputs=2, nmb_neurons=(2, 1), nmb_outputs=3)
>>> ann.nmb_neurons
(2, 1)
>>> ann.nmb_neurons = (3,)
>>> ann.nmb_n... |
def shape_weights_hidden(self) -> Tuple[int, int, int]:
"""Shape of the array containing the activation of the hidden neurons.
The first integer value is the number of connection between the
hidden layers, the second integer value is maximum number of
neurons of all hidden layers feedin... |
def nmb_weights_hidden(self) -> int:
"""Number of hidden weights.
>>> from hydpy import ANN
>>> ann = ANN(None)
>>> ann(nmb_inputs=2, nmb_neurons=(4, 3, 2), nmb_outputs=3)
>>> ann.nmb_weights_hidden
18
"""
nmb = 0
for idx_layer in range(self.nmb_l... |
def verify(self) -> None:
"""Raise a |RuntimeError| if the network's shape is not defined
completely.
>>> from hydpy import ANN
>>> ANN(None).verify()
Traceback (most recent call last):
...
RuntimeError: The shape of the the artificial neural network \
parameter ... |
def assignrepr(self, prefix) -> str:
"""Return a string representation of the actual |anntools.ANN| object
that is prefixed with the given string."""
prefix = '%s%s(' % (prefix, self.name)
blanks = len(prefix)*' '
lines = [
objecttools.assignrepr_value(
... |
def plot(self, xmin, xmax, idx_input=0, idx_output=0, points=100,
**kwargs) -> None:
"""Plot the relationship between a certain input (`idx_input`) and a
certain output (`idx_output`) variable described by the actual
|anntools.ANN| object.
Define the lower and the upper bou... |
def refresh(self) -> None:
"""Prepare the actual |anntools.SeasonalANN| object for calculations.
Dispite all automated refreshings explained in the general
documentation on class |anntools.SeasonalANN|, it is still possible
to destroy the inner consistency of a |anntools.SeasonalANN| in... |
def verify(self) -> None:
"""Raise a |RuntimeError| and removes all handled neural networks,
if the they are defined inconsistently.
Dispite all automated safety checks explained in the general
documentation on class |anntools.SeasonalANN|, it is still possible
to destroy the in... |
def shape(self) -> Tuple[int, ...]:
"""The shape of array |anntools.SeasonalANN.ratios|."""
return tuple(int(sub) for sub in self.ratios.shape) |
def _set_shape(self, shape):
"""Private on purpose."""
try:
shape = (int(shape),)
except TypeError:
pass
shp = list(shape)
shp[0] = timetools.Period('366d')/self.simulationstep
shp[0] = int(numpy.ceil(round(shp[0], 10)))
getattr(self.fastac... |
def toys(self) -> Tuple[timetools.TOY, ...]:
"""A sorted |tuple| of all contained |TOY| objects."""
return tuple(toy for (toy, _) in self) |
def plot(self, xmin, xmax, idx_input=0, idx_output=0, points=100,
**kwargs) -> None:
"""Call method |anntools.ANN.plot| of all |anntools.ANN| objects
handled by the actual |anntools.SeasonalANN| object.
"""
for toy, ann_ in self:
ann_.plot(xmin, xmax,
... |
def specstring(self):
"""The string corresponding to the current values of `subgroup`,
`state`, and `variable`.
>>> from hydpy.core.itemtools import ExchangeSpecification
>>> spec = ExchangeSpecification('hland_v1', 'fluxes.qt')
>>> spec.specstring
'fluxes.qt'
>>... |
def collect_variables(self, selections) -> None:
"""Apply method |ExchangeItem.insert_variables| to collect the
relevant target variables handled by the devices of the given
|Selections| object.
We prepare the `LahnH` example project to be able to use its
|Selections| object:
... |
def insert_variables(
self, device2variable, exchangespec, selections) -> None:
"""Determine the relevant target or base variables (as defined by
the given |ExchangeSpecification| object ) handled by the given
|Selections| object and insert them into the given `device2variable`
... |
def update_variable(self, variable, value) -> None:
"""Assign the given value(s) to the given target or base variable.
If the assignment fails, |ChangeItem.update_variable| raises an
error like the following:
>>> from hydpy.core.examples import prepare_full_example_2
>>> hp, pu... |
def update_variables(self) -> None:
"""Assign the current objects |ChangeItem.value| to the values
of the target variables.
We use the `LahnH` project in the following:
>>> from hydpy.core.examples import prepare_full_example_2
>>> hp, pub, TestIO = prepare_full_example_2()
... |
def collect_variables(self, selections) -> None:
"""Apply method |ChangeItem.collect_variables| of the base class
|ChangeItem| and also apply method |ExchangeItem.insert_variables|
of class |ExchangeItem| to collect the relevant base variables
handled by the devices of the given |Selecti... |
def update_variables(self) -> None:
"""Add the general |ChangeItem.value| with the |Device| specific base
variable and assign the result to the respective target variable.
>>> from hydpy.core.examples import prepare_full_example_2
>>> hp, pub, TestIO = prepare_full_example_2()
>... |
def collect_variables(self, selections) -> None:
"""Apply method |ExchangeItem.collect_variables| of the base class
|ExchangeItem| and determine the `ndim` attribute of the current
|ChangeItem| object afterwards.
The value of `ndim` depends on whether the values of the target
va... |
def yield_name2value(self, idx1=None, idx2=None) \
-> Iterator[Tuple[str, str]]:
"""Sequentially return name-value-pairs describing the current state
of the target variables.
The names are automatically generated and contain both the name of
the |Device| of the respective |V... |
def iso_day_to_weekday(d):
"""
Returns the weekday's name given a ISO weekday number;
"today" if today is the same weekday.
"""
if int(d) == utils.get_now().isoweekday():
return _("today")
for w in WEEKDAYS:
if w[0] == int(d):
return w[1] |
def is_open(location=None, attr=None):
"""
Returns False if the location is closed, or the OpeningHours object
to show the location is currently open.
"""
obj = utils.is_open(location)
if obj is False:
return False
if attr is not None:
return getattr(obj, attr)
return obj |
def is_open_now(location=None, attr=None):
"""
Returns False if the location is closed, or the OpeningHours object
to show the location is currently open.
Same as `is_open` but passes `now` to `utils.is_open` to bypass `get_now()`.
"""
obj = utils.is_open(location, now=datetime.datetime.now())
... |
def opening_hours(location=None, concise=False):
"""
Creates a rendered listing of hours.
"""
template_name = 'openinghours/opening_hours_list.html'
days = [] # [{'hours': '9:00am to 5:00pm', 'name': u'Monday'}, {'hours...
# Without `location`, choose the first company.
if location:
... |
def prepare_everything(self):
"""Convenience method to make the actual |HydPy| instance runable."""
self.prepare_network()
self.init_models()
self.load_conditions()
with hydpy.pub.options.warnmissingobsfile(False):
self.prepare_nodeseries()
self.prepare_models... |
def prepare_network(self):
"""Load all network files as |Selections| (stored in module |pub|)
and assign the "complete" selection to the |HydPy| object."""
hydpy.pub.selections = selectiontools.Selections()
hydpy.pub.selections += hydpy.pub.networkmanager.load_files()
self.update... |
def save_controls(self, parameterstep=None, simulationstep=None,
auxfiler=None):
"""Call method |Elements.save_controls| of the |Elements| object
currently handled by the |HydPy| object.
We use the `LahnH` example project to demonstrate how to write
a complete set ... |
def networkproperties(self):
"""Print out some properties of the network defined by the |Node| and
|Element| objects currently handled by the |HydPy| object."""
print('Number of nodes: %d' % len(self.nodes))
print('Number of elements: %d' % len(self.elements))
print('Number of en... |
def numberofnetworks(self):
"""The number of distinct networks defined by the|Node| and
|Element| objects currently handled by the |HydPy| object."""
sels1 = selectiontools.Selections()
sels2 = selectiontools.Selections()
complete = selectiontools.Selection('complete',
... |
def endnodes(self):
"""|Nodes| object containing all |Node| objects currently handled by
the |HydPy| object which define a downstream end point of a network."""
endnodes = devicetools.Nodes()
for node in self.nodes:
for element in node.exits:
if ((element in s... |
def variables(self):
"""Sorted list of strings summarizing all variables handled by the
|Node| objects"""
variables = set([])
for node in self.nodes:
variables.add(node.variable)
return sorted(variables) |
def simindices(self):
"""Tuple containing the start and end index of the simulation period
regarding the initialization period defined by the |Timegrids| object
stored in module |pub|."""
return (hydpy.pub.timegrids.init[hydpy.pub.timegrids.sim.firstdate],
hydpy.pub.timeg... |
def open_files(self, idx=0):
"""Call method |Devices.open_files| of the |Nodes| and |Elements|
objects currently handled by the |HydPy| object."""
self.elements.open_files(idx=idx)
self.nodes.open_files(idx=idx) |
def update_devices(self, selection=None):
"""Determines the order, in which the |Node| and |Element| objects
currently handled by the |HydPy| objects need to be processed during
a simulation time step. Optionally, a |Selection| object for defining
new |Node| and |Element| objects can be... |
def methodorder(self):
"""A list containing all methods of all |Node| and |Element| objects
that need to be processed during a simulation time step in the
order they must be called."""
funcs = []
for node in self.nodes:
if node.deploymode == 'oldsim':
... |
def doit(self):
"""Perform a simulation run over the actual simulation time period
defined by the |Timegrids| object stored in module |pub|."""
idx_start, idx_end = self.simindices
self.open_files(idx_start)
methodorder = self.methodorder
for idx in printtools.progressbar... |
def pic_inflow_v1(self):
"""Update the inlet link sequence.
Required inlet sequence:
|dam_inlets.Q|
Calculated flux sequence:
|Inflow|
Basic equation:
:math:`Inflow = Q`
"""
flu = self.sequences.fluxes.fastaccess
inl = self.sequences.inlets.fastaccess
flu.inflow = in... |
def pic_inflow_v2(self):
"""Update the inlet link sequences.
Required inlet sequences:
|dam_inlets.Q|
|dam_inlets.S|
|dam_inlets.R|
Calculated flux sequence:
|Inflow|
Basic equation:
:math:`Inflow = Q + S + R`
"""
flu = self.sequences.fluxes.fastaccess
inl = ... |
def pic_totalremotedischarge_v1(self):
"""Update the receiver link sequence."""
flu = self.sequences.fluxes.fastaccess
rec = self.sequences.receivers.fastaccess
flu.totalremotedischarge = rec.q[0] |
def pic_loggedrequiredremoterelease_v1(self):
"""Update the receiver link sequence."""
log = self.sequences.logs.fastaccess
rec = self.sequences.receivers.fastaccess
log.loggedrequiredremoterelease[0] = rec.d[0] |
def pic_loggedrequiredremoterelease_v2(self):
"""Update the receiver link sequence."""
log = self.sequences.logs.fastaccess
rec = self.sequences.receivers.fastaccess
log.loggedrequiredremoterelease[0] = rec.s[0] |
def pic_loggedallowedremoterelieve_v1(self):
"""Update the receiver link sequence."""
log = self.sequences.logs.fastaccess
rec = self.sequences.receivers.fastaccess
log.loggedallowedremoterelieve[0] = rec.r[0] |
def update_loggedtotalremotedischarge_v1(self):
"""Log a new entry of discharge at a cross section far downstream.
Required control parameter:
|NmbLogEntries|
Required flux sequence:
|TotalRemoteDischarge|
Calculated flux sequence:
|LoggedTotalRemoteDischarge|
Example:
... |
def calc_waterlevel_v1(self):
"""Determine the water level based on an artificial neural network
describing the relationship between water level and water stage.
Required control parameter:
|WaterVolume2WaterLevel|
Required state sequence:
|WaterVolume|
Calculated aide sequence:
... |
def calc_allowedremoterelieve_v2(self):
"""Calculate the allowed maximum relieve another location
is allowed to discharge into the dam.
Required control parameters:
|HighestRemoteRelieve|
|WaterLevelRelieveThreshold|
Required derived parameter:
|WaterLevelRelieveSmoothPar|
Requi... |
def calc_requiredremotesupply_v1(self):
"""Calculate the required maximum supply from another location
that can be discharged into the dam.
Required control parameters:
|HighestRemoteSupply|
|WaterLevelSupplyThreshold|
Required derived parameter:
|WaterLevelSupplySmoothPar|
Requ... |
def calc_naturalremotedischarge_v1(self):
"""Try to estimate the natural discharge of a cross section far downstream
based on the last few simulation steps.
Required control parameter:
|NmbLogEntries|
Required log sequences:
|LoggedTotalRemoteDischarge|
|LoggedOutflow|
Calculate... |
def calc_remotedemand_v1(self):
"""Estimate the discharge demand of a cross section far downstream.
Required control parameter:
|RemoteDischargeMinimum|
Required derived parameters:
|dam_derived.TOY|
Required flux sequence:
|dam_derived.TOY|
Calculated flux sequence:
|Rem... |
def calc_remotefailure_v1(self):
"""Estimate the shortfall of actual discharge under the required discharge
of a cross section far downstream.
Required control parameters:
|NmbLogEntries|
|RemoteDischargeMinimum|
Required derived parameters:
|dam_derived.TOY|
Required log sequen... |
def calc_requiredremoterelease_v1(self):
"""Guess the required release necessary to not fall below the threshold
value at a cross section far downstream with a certain level of certainty.
Required control parameter:
|RemoteDischargeSafety|
Required derived parameters:
|RemoteDischargeSmoot... |
def calc_requiredremoterelease_v2(self):
"""Get the required remote release of the last simulation step.
Required log sequence:
|LoggedRequiredRemoteRelease|
Calculated flux sequence:
|RequiredRemoteRelease|
Basic equation:
:math:`RequiredRemoteRelease = LoggedRequiredRemoteRelease`... |
def calc_allowedremoterelieve_v1(self):
"""Get the allowed remote relieve of the last simulation step.
Required log sequence:
|LoggedAllowedRemoteRelieve|
Calculated flux sequence:
|AllowedRemoteRelieve|
Basic equation:
:math:`AllowedRemoteRelieve = LoggedAllowedRemoteRelieve`
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.