partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
train | Variable.verify | Raises a |RuntimeError| if at least one of the required values
of a |Variable| object is |None| or |numpy.nan|. The descriptor
`mask` defines, which values are considered to be necessary.
Example on a 0-dimensional |Variable|:
>>> from hydpy.core.variabletools import Variable
>... | hydpy/core/variabletools.py | def verify(self) -> None:
"""Raises a |RuntimeError| if at least one of the required values
of a |Variable| object is |None| or |numpy.nan|. The descriptor
`mask` defines, which values are considered to be necessary.
Example on a 0-dimensional |Variable|:
>>> from hydpy.core.va... | def verify(self) -> None:
"""Raises a |RuntimeError| if at least one of the required values
of a |Variable| object is |None| or |numpy.nan|. The descriptor
`mask` defines, which values are considered to be necessary.
Example on a 0-dimensional |Variable|:
>>> from hydpy.core.va... | [
"Raises",
"a",
"|RuntimeError|",
"if",
"at",
"least",
"one",
"of",
"the",
"required",
"values",
"of",
"a",
"|Variable|",
"object",
"is",
"|None|",
"or",
"|numpy",
".",
"nan|",
".",
"The",
"descriptor",
"mask",
"defines",
"which",
"values",
"are",
"considered... | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/variabletools.py#L1271-L1327 | [
"def",
"verify",
"(",
"self",
")",
"->",
"None",
":",
"nmbnan",
":",
"int",
"=",
"numpy",
".",
"sum",
"(",
"numpy",
".",
"isnan",
"(",
"numpy",
".",
"array",
"(",
"self",
".",
"value",
")",
"[",
"self",
".",
"mask",
"]",
")",
")",
"if",
"nmbnan... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Variable.average_values | Average the actual values of the |Variable| object.
For 0-dimensional |Variable| objects, the result of method
|Variable.average_values| equals |Variable.value|. The
following example shows this for the sloppily defined class
`SoilMoisture`:
>>> from hydpy.core.variabletools i... | hydpy/core/variabletools.py | def average_values(self, *args, **kwargs) -> float:
"""Average the actual values of the |Variable| object.
For 0-dimensional |Variable| objects, the result of method
|Variable.average_values| equals |Variable.value|. The
following example shows this for the sloppily defined class
... | def average_values(self, *args, **kwargs) -> float:
"""Average the actual values of the |Variable| object.
For 0-dimensional |Variable| objects, the result of method
|Variable.average_values| equals |Variable.value|. The
following example shows this for the sloppily defined class
... | [
"Average",
"the",
"actual",
"values",
"of",
"the",
"|Variable|",
"object",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/variabletools.py#L1339-L1510 | [
"def",
"average_values",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"->",
"float",
":",
"try",
":",
"if",
"not",
"self",
".",
"NDIM",
":",
"return",
"self",
".",
"value",
"mask",
"=",
"self",
".",
"get_submask",
"(",
"*",
"args",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Variable.get_submask | Get a sub-mask of the mask handled by the actual |Variable| object
based on the given arguments.
See the documentation on method |Variable.average_values| for
further information. | hydpy/core/variabletools.py | def get_submask(self, *args, **kwargs) -> masktools.CustomMask:
"""Get a sub-mask of the mask handled by the actual |Variable| object
based on the given arguments.
See the documentation on method |Variable.average_values| for
further information.
"""
if args or kwargs:
... | def get_submask(self, *args, **kwargs) -> masktools.CustomMask:
"""Get a sub-mask of the mask handled by the actual |Variable| object
based on the given arguments.
See the documentation on method |Variable.average_values| for
further information.
"""
if args or kwargs:
... | [
"Get",
"a",
"sub",
"-",
"mask",
"of",
"the",
"mask",
"handled",
"by",
"the",
"actual",
"|Variable|",
"object",
"based",
"on",
"the",
"given",
"arguments",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/variabletools.py#L1517-L1538 | [
"def",
"get_submask",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"->",
"masktools",
".",
"CustomMask",
":",
"if",
"args",
"or",
"kwargs",
":",
"masks",
"=",
"self",
".",
"availablemasks",
"mask",
"=",
"masktools",
".",
"CustomMask",
"... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Variable.commentrepr | A list with comments for making string representations
more informative.
With option |Options.reprcomments| being disabled,
|Variable.commentrepr| is empty. | hydpy/core/variabletools.py | def commentrepr(self) -> List[str]:
"""A list with comments for making string representations
more informative.
With option |Options.reprcomments| being disabled,
|Variable.commentrepr| is empty.
"""
if hydpy.pub.options.reprcomments:
return [f'# {line}' for ... | def commentrepr(self) -> List[str]:
"""A list with comments for making string representations
more informative.
With option |Options.reprcomments| being disabled,
|Variable.commentrepr| is empty.
"""
if hydpy.pub.options.reprcomments:
return [f'# {line}' for ... | [
"A",
"list",
"with",
"comments",
"for",
"making",
"string",
"representations",
"more",
"informative",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/variabletools.py#L1744-L1754 | [
"def",
"commentrepr",
"(",
"self",
")",
"->",
"List",
"[",
"str",
"]",
":",
"if",
"hydpy",
".",
"pub",
".",
"options",
".",
"reprcomments",
":",
"return",
"[",
"f'# {line}'",
"for",
"line",
"in",
"textwrap",
".",
"wrap",
"(",
"objecttools",
".",
"descr... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | AddTable | Insert a table in a given worksheet.
Args:
p_workSheet (openpyxl.worksheet.worksheet.Worksheet): the worksheet where the table will be inserted. Defaults to None.
p_headerDict (collections.OrderedDict): an ordered dict that contains table header columns.
Notes:
... | Spartacus/Report.py | def AddTable(p_workSheet = None, p_headerDict = None, p_startColumn = 1, p_startRow = 1, p_headerHeight = None, p_data = None, p_mainTable = False, p_conditionalFormatting = None, p_tableStyleInfo = None, p_withFilters = True):
"""Insert a table in a given worksheet.
Args:
p_workSheet (openpyxl... | def AddTable(p_workSheet = None, p_headerDict = None, p_startColumn = 1, p_startRow = 1, p_headerHeight = None, p_data = None, p_mainTable = False, p_conditionalFormatting = None, p_tableStyleInfo = None, p_withFilters = True):
"""Insert a table in a given worksheet.
Args:
p_workSheet (openpyxl... | [
"Insert",
"a",
"table",
"in",
"a",
"given",
"worksheet",
"."
] | wind39/spartacus | python | https://github.com/wind39/spartacus/blob/622261e9c5d05c2e385d81171acb910c63aa1669/Spartacus/Report.py#L607-L1054 | [
"def",
"AddTable",
"(",
"p_workSheet",
"=",
"None",
",",
"p_headerDict",
"=",
"None",
",",
"p_startColumn",
"=",
"1",
",",
"p_startRow",
"=",
"1",
",",
"p_headerHeight",
"=",
"None",
",",
"p_data",
"=",
"None",
",",
"p_mainTable",
"=",
"False",
",",
"p_c... | 622261e9c5d05c2e385d81171acb910c63aa1669 |
train | get_controlfileheader | Return the header of a regular or auxiliary parameter control file.
The header contains the default coding information, the import command
for the given model and the actual parameter and simulation step sizes.
The first example shows that, if you pass the model argument as a
string, you have to take ... | hydpy/core/parametertools.py | def get_controlfileheader(
model: Union[str, 'modeltools.Model'],
parameterstep: timetools.PeriodConstrArg = None,
simulationstep: timetools.PeriodConstrArg = None) -> str:
"""Return the header of a regular or auxiliary parameter control file.
The header contains the default coding info... | def get_controlfileheader(
model: Union[str, 'modeltools.Model'],
parameterstep: timetools.PeriodConstrArg = None,
simulationstep: timetools.PeriodConstrArg = None) -> str:
"""Return the header of a regular or auxiliary parameter control file.
The header contains the default coding info... | [
"Return",
"the",
"header",
"of",
"a",
"regular",
"or",
"auxiliary",
"parameter",
"control",
"file",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L28-L80 | [
"def",
"get_controlfileheader",
"(",
"model",
":",
"Union",
"[",
"str",
",",
"'modeltools.Model'",
"]",
",",
"parameterstep",
":",
"timetools",
".",
"PeriodConstrArg",
"=",
"None",
",",
"simulationstep",
":",
"timetools",
".",
"PeriodConstrArg",
"=",
"None",
")"... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Constants._prepare_docstrings | Assign docstrings to the constants handled by |Constants|
to make them available in the interactive mode of Python. | hydpy/core/parametertools.py | def _prepare_docstrings(self, frame):
"""Assign docstrings to the constants handled by |Constants|
to make them available in the interactive mode of Python."""
if config.USEAUTODOC:
filename = inspect.getsourcefile(frame)
with open(filename) as file_:
sour... | def _prepare_docstrings(self, frame):
"""Assign docstrings to the constants handled by |Constants|
to make them available in the interactive mode of Python."""
if config.USEAUTODOC:
filename = inspect.getsourcefile(frame)
with open(filename) as file_:
sour... | [
"Assign",
"docstrings",
"to",
"the",
"constants",
"handled",
"by",
"|Constants|",
"to",
"make",
"them",
"available",
"in",
"the",
"interactive",
"mode",
"of",
"Python",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L106-L118 | [
"def",
"_prepare_docstrings",
"(",
"self",
",",
"frame",
")",
":",
"if",
"config",
".",
"USEAUTODOC",
":",
"filename",
"=",
"inspect",
".",
"getsourcefile",
"(",
"frame",
")",
"with",
"open",
"(",
"filename",
")",
"as",
"file_",
":",
"sources",
"=",
"fil... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Parameters.update | Call method |Parameter.update| of all "secondary" parameters.
Directly after initialisation, neither the primary (`control`)
parameters nor the secondary (`derived`) parameters of
application model |hstream_v1| are ready for usage:
>>> from hydpy.models.hstream_v1 import *
>>>... | hydpy/core/parametertools.py | def update(self) -> None:
"""Call method |Parameter.update| of all "secondary" parameters.
Directly after initialisation, neither the primary (`control`)
parameters nor the secondary (`derived`) parameters of
application model |hstream_v1| are ready for usage:
>>> from hydpy.m... | def update(self) -> None:
"""Call method |Parameter.update| of all "secondary" parameters.
Directly after initialisation, neither the primary (`control`)
parameters nor the secondary (`derived`) parameters of
application model |hstream_v1| are ready for usage:
>>> from hydpy.m... | [
"Call",
"method",
"|Parameter",
".",
"update|",
"of",
"all",
"secondary",
"parameters",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L143-L188 | [
"def",
"update",
"(",
"self",
")",
"->",
"None",
":",
"for",
"subpars",
"in",
"self",
".",
"secondary_subpars",
":",
"for",
"par",
"in",
"subpars",
":",
"try",
":",
"par",
".",
"update",
"(",
")",
"except",
"BaseException",
":",
"objecttools",
".",
"au... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Parameters.save_controls | Write the control parameters to file.
Usually, a control file consists of a header (see the documentation
on the method |get_controlfileheader|) and the string representations
of the individual |Parameter| objects handled by the `control`
|SubParameters| object.
The main functi... | hydpy/core/parametertools.py | def save_controls(self, filepath: Optional[str] = None,
parameterstep: timetools.PeriodConstrArg = None,
simulationstep: timetools.PeriodConstrArg = None,
auxfiler: 'auxfiletools.Auxfiler' = None):
"""Write the control parameters to file.
... | def save_controls(self, filepath: Optional[str] = None,
parameterstep: timetools.PeriodConstrArg = None,
simulationstep: timetools.PeriodConstrArg = None,
auxfiler: 'auxfiletools.Auxfiler' = None):
"""Write the control parameters to file.
... | [
"Write",
"the",
"control",
"parameters",
"to",
"file",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L190-L272 | [
"def",
"save_controls",
"(",
"self",
",",
"filepath",
":",
"Optional",
"[",
"str",
"]",
"=",
"None",
",",
"parameterstep",
":",
"timetools",
".",
"PeriodConstrArg",
"=",
"None",
",",
"simulationstep",
":",
"timetools",
".",
"PeriodConstrArg",
"=",
"None",
",... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Parameter._get_values_from_auxiliaryfile | Try to return the parameter values from the auxiliary control file
with the given name.
Things are a little complicated here. To understand this method, you
should first take a look at the |parameterstep| function. | hydpy/core/parametertools.py | def _get_values_from_auxiliaryfile(self, auxfile):
"""Try to return the parameter values from the auxiliary control file
with the given name.
Things are a little complicated here. To understand this method, you
should first take a look at the |parameterstep| function.
"""
... | def _get_values_from_auxiliaryfile(self, auxfile):
"""Try to return the parameter values from the auxiliary control file
with the given name.
Things are a little complicated here. To understand this method, you
should first take a look at the |parameterstep| function.
"""
... | [
"Try",
"to",
"return",
"the",
"parameter",
"values",
"from",
"the",
"auxiliary",
"control",
"file",
"with",
"the",
"given",
"name",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L920-L952 | [
"def",
"_get_values_from_auxiliaryfile",
"(",
"self",
",",
"auxfile",
")",
":",
"try",
":",
"frame",
"=",
"inspect",
".",
"currentframe",
"(",
")",
".",
"f_back",
".",
"f_back",
"while",
"frame",
":",
"namespace",
"=",
"frame",
".",
"f_locals",
"try",
":",... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Parameter.initinfo | The actual initial value of the given parameter.
Some |Parameter| subclasses define another value for class
attribute `INIT` than |None| to provide a default value.
Let's define a parameter test class and prepare a function for
initialising it and connecting the resulting instance to a... | hydpy/core/parametertools.py | def initinfo(self) -> Tuple[Union[float, int, bool], bool]:
"""The actual initial value of the given parameter.
Some |Parameter| subclasses define another value for class
attribute `INIT` than |None| to provide a default value.
Let's define a parameter test class and prepare a function... | def initinfo(self) -> Tuple[Union[float, int, bool], bool]:
"""The actual initial value of the given parameter.
Some |Parameter| subclasses define another value for class
attribute `INIT` than |None| to provide a default value.
Let's define a parameter test class and prepare a function... | [
"The",
"actual",
"initial",
"value",
"of",
"the",
"given",
"parameter",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L971-L1034 | [
"def",
"initinfo",
"(",
"self",
")",
"->",
"Tuple",
"[",
"Union",
"[",
"float",
",",
"int",
",",
"bool",
"]",
",",
"bool",
"]",
":",
"init",
"=",
"self",
".",
"INIT",
"if",
"(",
"init",
"is",
"not",
"None",
")",
"and",
"hydpy",
".",
"pub",
".",... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Parameter.get_timefactor | Factor to adjust a new value of a time-dependent parameter.
For a time-dependent parameter, its effective value depends on the
simulation step size. Method |Parameter.get_timefactor| returns
the fraction between the current simulation step size and the
current parameter step size.
... | hydpy/core/parametertools.py | def get_timefactor(cls) -> float:
"""Factor to adjust a new value of a time-dependent parameter.
For a time-dependent parameter, its effective value depends on the
simulation step size. Method |Parameter.get_timefactor| returns
the fraction between the current simulation step size and ... | def get_timefactor(cls) -> float:
"""Factor to adjust a new value of a time-dependent parameter.
For a time-dependent parameter, its effective value depends on the
simulation step size. Method |Parameter.get_timefactor| returns
the fraction between the current simulation step size and ... | [
"Factor",
"to",
"adjust",
"a",
"new",
"value",
"of",
"a",
"time",
"-",
"dependent",
"parameter",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L1037-L1093 | [
"def",
"get_timefactor",
"(",
"cls",
")",
"->",
"float",
":",
"try",
":",
"parfactor",
"=",
"hydpy",
".",
"pub",
".",
"timegrids",
".",
"parfactor",
"except",
"RuntimeError",
":",
"if",
"not",
"(",
"cls",
".",
"parameterstep",
"and",
"cls",
".",
"simulat... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Parameter.apply_timefactor | Change and return the given value(s) in accordance with
|Parameter.get_timefactor| and the type of time-dependence
of the actual parameter subclass.
.. testsetup::
>>> from hydpy import pub
>>> del pub.timegrids
For the same conversion factor returned by method... | hydpy/core/parametertools.py | def apply_timefactor(cls, values):
"""Change and return the given value(s) in accordance with
|Parameter.get_timefactor| and the type of time-dependence
of the actual parameter subclass.
.. testsetup::
>>> from hydpy import pub
>>> del pub.timegrids
For... | def apply_timefactor(cls, values):
"""Change and return the given value(s) in accordance with
|Parameter.get_timefactor| and the type of time-dependence
of the actual parameter subclass.
.. testsetup::
>>> from hydpy import pub
>>> del pub.timegrids
For... | [
"Change",
"and",
"return",
"the",
"given",
"value",
"(",
"s",
")",
"in",
"accordance",
"with",
"|Parameter",
".",
"get_timefactor|",
"and",
"the",
"type",
"of",
"time",
"-",
"dependence",
"of",
"the",
"actual",
"parameter",
"subclass",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L1100-L1152 | [
"def",
"apply_timefactor",
"(",
"cls",
",",
"values",
")",
":",
"if",
"cls",
".",
"TIME",
"is",
"True",
":",
"return",
"values",
"*",
"cls",
".",
"get_timefactor",
"(",
")",
"if",
"cls",
".",
"TIME",
"is",
"False",
":",
"return",
"values",
"/",
"cls"... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Parameter.revert_timefactor | The inverse version of method |Parameter.apply_timefactor|.
See the explanations on method Parameter.apply_timefactor| to
understand the following examples:
.. testsetup::
>>> from hydpy import pub
>>> del pub.timegrids
>>> from hydpy.core.parametertools impor... | hydpy/core/parametertools.py | def revert_timefactor(cls, values):
"""The inverse version of method |Parameter.apply_timefactor|.
See the explanations on method Parameter.apply_timefactor| to
understand the following examples:
.. testsetup::
>>> from hydpy import pub
>>> del pub.timegrids
... | def revert_timefactor(cls, values):
"""The inverse version of method |Parameter.apply_timefactor|.
See the explanations on method Parameter.apply_timefactor| to
understand the following examples:
.. testsetup::
>>> from hydpy import pub
>>> del pub.timegrids
... | [
"The",
"inverse",
"version",
"of",
"method",
"|Parameter",
".",
"apply_timefactor|",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L1155-L1186 | [
"def",
"revert_timefactor",
"(",
"cls",
",",
"values",
")",
":",
"if",
"cls",
".",
"TIME",
"is",
"True",
":",
"return",
"values",
"/",
"cls",
".",
"get_timefactor",
"(",
")",
"if",
"cls",
".",
"TIME",
"is",
"False",
":",
"return",
"values",
"*",
"cls... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Parameter.compress_repr | Try to find a compressed parameter value representation and
return it.
|Parameter.compress_repr| raises a |NotImplementedError| when
failing to find a compressed representation.
.. testsetup::
>>> from hydpy import pub
>>> del pub.timegrids
For the fol... | hydpy/core/parametertools.py | def compress_repr(self) -> Optional[str]:
"""Try to find a compressed parameter value representation and
return it.
|Parameter.compress_repr| raises a |NotImplementedError| when
failing to find a compressed representation.
.. testsetup::
>>> from hydpy import pub
... | def compress_repr(self) -> Optional[str]:
"""Try to find a compressed parameter value representation and
return it.
|Parameter.compress_repr| raises a |NotImplementedError| when
failing to find a compressed representation.
.. testsetup::
>>> from hydpy import pub
... | [
"Try",
"to",
"find",
"a",
"compressed",
"parameter",
"value",
"representation",
"and",
"return",
"it",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L1209-L1336 | [
"def",
"compress_repr",
"(",
"self",
")",
"->",
"Optional",
"[",
"str",
"]",
":",
"if",
"not",
"hasattr",
"(",
"self",
",",
"'value'",
")",
":",
"return",
"'?'",
"if",
"not",
"self",
":",
"return",
"f\"{self.NDIM * '['}{self.NDIM * ']'}\"",
"unique",
"=",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | NameParameter.compress_repr | Works as |Parameter.compress_repr|, but returns a
string with constant names instead of constant values.
See the main documentation on class |NameParameter| for
further information. | hydpy/core/parametertools.py | def compress_repr(self) -> str:
"""Works as |Parameter.compress_repr|, but returns a
string with constant names instead of constant values.
See the main documentation on class |NameParameter| for
further information.
"""
string = super().compress_repr()
if string... | def compress_repr(self) -> str:
"""Works as |Parameter.compress_repr|, but returns a
string with constant names instead of constant values.
See the main documentation on class |NameParameter| for
further information.
"""
string = super().compress_repr()
if string... | [
"Works",
"as",
"|Parameter",
".",
"compress_repr|",
"but",
"returns",
"a",
"string",
"with",
"constant",
"names",
"instead",
"of",
"constant",
"values",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L1431-L1451 | [
"def",
"compress_repr",
"(",
"self",
")",
"->",
"str",
":",
"string",
"=",
"super",
"(",
")",
".",
"compress_repr",
"(",
")",
"if",
"string",
"in",
"(",
"'?'",
",",
"'[]'",
")",
":",
"return",
"string",
"if",
"string",
"is",
"None",
":",
"values",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | ZipParameter.compress_repr | Works as |Parameter.compress_repr|, but alternatively
tries to compress by following an external classification.
See the main documentation on class |ZipParameter| for
further information. | hydpy/core/parametertools.py | def compress_repr(self) -> Optional[str]:
"""Works as |Parameter.compress_repr|, but alternatively
tries to compress by following an external classification.
See the main documentation on class |ZipParameter| for
further information.
"""
string = super().compress_repr()
... | def compress_repr(self) -> Optional[str]:
"""Works as |Parameter.compress_repr|, but alternatively
tries to compress by following an external classification.
See the main documentation on class |ZipParameter| for
further information.
"""
string = super().compress_repr()
... | [
"Works",
"as",
"|Parameter",
".",
"compress_repr|",
"but",
"alternatively",
"tries",
"to",
"compress",
"by",
"following",
"an",
"external",
"classification",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L1647-L1670 | [
"def",
"compress_repr",
"(",
"self",
")",
"->",
"Optional",
"[",
"str",
"]",
":",
"string",
"=",
"super",
"(",
")",
".",
"compress_repr",
"(",
")",
"if",
"string",
"is",
"not",
"None",
":",
"return",
"string",
"results",
"=",
"[",
"]",
"mask",
"=",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | SeasonalParameter.refresh | Update the actual simulation values based on the toy-value pairs.
Usually, one does not need to call refresh explicitly. The
"magic" methods __call__, __setattr__, and __delattr__ invoke
it automatically, when required.
Instantiate a 1-dimensional |SeasonalParameter| object:
... | hydpy/core/parametertools.py | def refresh(self) -> None:
"""Update the actual simulation values based on the toy-value pairs.
Usually, one does not need to call refresh explicitly. The
"magic" methods __call__, __setattr__, and __delattr__ invoke
it automatically, when required.
Instantiate a 1-dimensional... | def refresh(self) -> None:
"""Update the actual simulation values based on the toy-value pairs.
Usually, one does not need to call refresh explicitly. The
"magic" methods __call__, __setattr__, and __delattr__ invoke
it automatically, when required.
Instantiate a 1-dimensional... | [
"Update",
"the",
"actual",
"simulation",
"values",
"based",
"on",
"the",
"toy",
"-",
"value",
"pairs",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L1861-L1935 | [
"def",
"refresh",
"(",
"self",
")",
"->",
"None",
":",
"if",
"not",
"self",
":",
"self",
".",
"values",
"[",
":",
"]",
"=",
"0.",
"elif",
"len",
"(",
"self",
")",
"==",
"1",
":",
"values",
"=",
"list",
"(",
"self",
".",
"_toy2values",
".",
"val... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | SeasonalParameter.interp | Perform a linear value interpolation for the given `date` and
return the result.
Instantiate a 1-dimensional |SeasonalParameter| object:
>>> from hydpy.core.parametertools import SeasonalParameter
>>> class Par(SeasonalParameter):
... NDIM = 1
... TYPE = float
... | hydpy/core/parametertools.py | def interp(self, date: timetools.Date) -> float:
"""Perform a linear value interpolation for the given `date` and
return the result.
Instantiate a 1-dimensional |SeasonalParameter| object:
>>> from hydpy.core.parametertools import SeasonalParameter
>>> class Par(SeasonalParamet... | def interp(self, date: timetools.Date) -> float:
"""Perform a linear value interpolation for the given `date` and
return the result.
Instantiate a 1-dimensional |SeasonalParameter| object:
>>> from hydpy.core.parametertools import SeasonalParameter
>>> class Par(SeasonalParamet... | [
"Perform",
"a",
"linear",
"value",
"interpolation",
"for",
"the",
"given",
"date",
"and",
"return",
"the",
"result",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L1937-L2019 | [
"def",
"interp",
"(",
"self",
",",
"date",
":",
"timetools",
".",
"Date",
")",
"->",
"float",
":",
"xnew",
"=",
"timetools",
".",
"TOY",
"(",
"date",
")",
"xys",
"=",
"list",
"(",
"self",
")",
"for",
"idx",
",",
"(",
"x_1",
",",
"y_1",
")",
"in... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | RelSubweightsMixin.update | Update subclass of |RelSubweightsMixin| based on `refweights`. | hydpy/core/parametertools.py | def update(self) -> None:
"""Update subclass of |RelSubweightsMixin| based on `refweights`."""
mask = self.mask
weights = self.refweights[mask]
self[~mask] = numpy.nan
self[mask] = weights/numpy.sum(weights) | def update(self) -> None:
"""Update subclass of |RelSubweightsMixin| based on `refweights`."""
mask = self.mask
weights = self.refweights[mask]
self[~mask] = numpy.nan
self[mask] = weights/numpy.sum(weights) | [
"Update",
"subclass",
"of",
"|RelSubweightsMixin|",
"based",
"on",
"refweights",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L2476-L2481 | [
"def",
"update",
"(",
"self",
")",
"->",
"None",
":",
"mask",
"=",
"self",
".",
"mask",
"weights",
"=",
"self",
".",
"refweights",
"[",
"mask",
"]",
"self",
"[",
"~",
"mask",
"]",
"=",
"numpy",
".",
"nan",
"self",
"[",
"mask",
"]",
"=",
"weights"... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | SolverParameter.alternative_initvalue | A user-defined value to be used instead of the value of class
constant `INIT`.
See the main documentation on class |SolverParameter| for more
information. | hydpy/core/parametertools.py | def alternative_initvalue(self) -> Union[bool, int, float]:
"""A user-defined value to be used instead of the value of class
constant `INIT`.
See the main documentation on class |SolverParameter| for more
information.
"""
if self._alternative_initvalue is None:
... | def alternative_initvalue(self) -> Union[bool, int, float]:
"""A user-defined value to be used instead of the value of class
constant `INIT`.
See the main documentation on class |SolverParameter| for more
information.
"""
if self._alternative_initvalue is None:
... | [
"A",
"user",
"-",
"defined",
"value",
"to",
"be",
"used",
"instead",
"of",
"the",
"value",
"of",
"class",
"constant",
"INIT",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L2740-L2752 | [
"def",
"alternative_initvalue",
"(",
"self",
")",
"->",
"Union",
"[",
"bool",
",",
"int",
",",
"float",
"]",
":",
"if",
"self",
".",
"_alternative_initvalue",
"is",
"None",
":",
"raise",
"AttributeError",
"(",
"f'No alternative initial value for solver parameter '",... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | TOYParameter.update | Reference the actual |Indexer.timeofyear| array of the
|Indexer| object available in module |pub|.
>>> from hydpy import pub
>>> pub.timegrids = '27.02.2004', '3.03.2004', '1d'
>>> from hydpy.core.parametertools import TOYParameter
>>> toyparameter = TOYParameter(None)
>... | hydpy/core/parametertools.py | def update(self) -> None:
"""Reference the actual |Indexer.timeofyear| array of the
|Indexer| object available in module |pub|.
>>> from hydpy import pub
>>> pub.timegrids = '27.02.2004', '3.03.2004', '1d'
>>> from hydpy.core.parametertools import TOYParameter
>>> toypar... | def update(self) -> None:
"""Reference the actual |Indexer.timeofyear| array of the
|Indexer| object available in module |pub|.
>>> from hydpy import pub
>>> pub.timegrids = '27.02.2004', '3.03.2004', '1d'
>>> from hydpy.core.parametertools import TOYParameter
>>> toypar... | [
"Reference",
"the",
"actual",
"|Indexer",
".",
"timeofyear|",
"array",
"of",
"the",
"|Indexer|",
"object",
"available",
"in",
"module",
"|pub|",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/parametertools.py#L2792-L2806 | [
"def",
"update",
"(",
"self",
")",
"->",
"None",
":",
"indexarray",
"=",
"hydpy",
".",
"pub",
".",
"indexer",
".",
"timeofyear",
"self",
".",
"shape",
"=",
"indexarray",
".",
"shape",
"self",
".",
"values",
"=",
"indexarray"
] | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | get_premises_model | Support for custom company premises model
with developer friendly validation. | openinghours/utils.py | def get_premises_model():
"""
Support for custom company premises model
with developer friendly validation.
"""
try:
app_label, model_name = PREMISES_MODEL.split('.')
except ValueError:
raise ImproperlyConfigured("OPENINGHOURS_PREMISES_MODEL must be of the"
... | def get_premises_model():
"""
Support for custom company premises model
with developer friendly validation.
"""
try:
app_label, model_name = PREMISES_MODEL.split('.')
except ValueError:
raise ImproperlyConfigured("OPENINGHOURS_PREMISES_MODEL must be of the"
... | [
"Support",
"for",
"custom",
"company",
"premises",
"model",
"with",
"developer",
"friendly",
"validation",
"."
] | arteria/django-openinghours | python | https://github.com/arteria/django-openinghours/blob/6bad47509a14d65a3a5a08777455f4cc8b4961fa/openinghours/utils.py#L13-L28 | [
"def",
"get_premises_model",
"(",
")",
":",
"try",
":",
"app_label",
",",
"model_name",
"=",
"PREMISES_MODEL",
".",
"split",
"(",
"'.'",
")",
"except",
"ValueError",
":",
"raise",
"ImproperlyConfigured",
"(",
"\"OPENINGHOURS_PREMISES_MODEL must be of the\"",
"\" form ... | 6bad47509a14d65a3a5a08777455f4cc8b4961fa |
train | get_now | Allows to access global request and read a timestamp from query. | openinghours/utils.py | def get_now():
"""
Allows to access global request and read a timestamp from query.
"""
if not get_current_request:
return datetime.datetime.now()
request = get_current_request()
if request:
openinghours_now = request.GET.get('openinghours-now')
if openinghours_now:
... | def get_now():
"""
Allows to access global request and read a timestamp from query.
"""
if not get_current_request:
return datetime.datetime.now()
request = get_current_request()
if request:
openinghours_now = request.GET.get('openinghours-now')
if openinghours_now:
... | [
"Allows",
"to",
"access",
"global",
"request",
"and",
"read",
"a",
"timestamp",
"from",
"query",
"."
] | arteria/django-openinghours | python | https://github.com/arteria/django-openinghours/blob/6bad47509a14d65a3a5a08777455f4cc8b4961fa/openinghours/utils.py#L33-L44 | [
"def",
"get_now",
"(",
")",
":",
"if",
"not",
"get_current_request",
":",
"return",
"datetime",
".",
"datetime",
".",
"now",
"(",
")",
"request",
"=",
"get_current_request",
"(",
")",
"if",
"request",
":",
"openinghours_now",
"=",
"request",
".",
"GET",
".... | 6bad47509a14d65a3a5a08777455f4cc8b4961fa |
train | get_closing_rule_for_now | Returns QuerySet of ClosingRules that are currently valid | openinghours/utils.py | def get_closing_rule_for_now(location):
"""
Returns QuerySet of ClosingRules that are currently valid
"""
now = get_now()
if location:
return ClosingRules.objects.filter(company=location,
start__lte=now, end__gte=now)
return Company.objects.fi... | def get_closing_rule_for_now(location):
"""
Returns QuerySet of ClosingRules that are currently valid
"""
now = get_now()
if location:
return ClosingRules.objects.filter(company=location,
start__lte=now, end__gte=now)
return Company.objects.fi... | [
"Returns",
"QuerySet",
"of",
"ClosingRules",
"that",
"are",
"currently",
"valid"
] | arteria/django-openinghours | python | https://github.com/arteria/django-openinghours/blob/6bad47509a14d65a3a5a08777455f4cc8b4961fa/openinghours/utils.py#L47-L58 | [
"def",
"get_closing_rule_for_now",
"(",
"location",
")",
":",
"now",
"=",
"get_now",
"(",
")",
"if",
"location",
":",
"return",
"ClosingRules",
".",
"objects",
".",
"filter",
"(",
"company",
"=",
"location",
",",
"start__lte",
"=",
"now",
",",
"end__gte",
... | 6bad47509a14d65a3a5a08777455f4cc8b4961fa |
train | is_open | Is the company currently open? Pass "now" to test with a specific
timestamp. Can be used stand-alone or as a helper. | openinghours/utils.py | def is_open(location, now=None):
"""
Is the company currently open? Pass "now" to test with a specific
timestamp. Can be used stand-alone or as a helper.
"""
if now is None:
now = get_now()
if has_closing_rule_for_now(location):
return False
now_time = datetime.time(now.hou... | def is_open(location, now=None):
"""
Is the company currently open? Pass "now" to test with a specific
timestamp. Can be used stand-alone or as a helper.
"""
if now is None:
now = get_now()
if has_closing_rule_for_now(location):
return False
now_time = datetime.time(now.hou... | [
"Is",
"the",
"company",
"currently",
"open?",
"Pass",
"now",
"to",
"test",
"with",
"a",
"specific",
"timestamp",
".",
"Can",
"be",
"used",
"stand",
"-",
"alone",
"or",
"as",
"a",
"helper",
"."
] | arteria/django-openinghours | python | https://github.com/arteria/django-openinghours/blob/6bad47509a14d65a3a5a08777455f4cc8b4961fa/openinghours/utils.py#L69-L111 | [
"def",
"is_open",
"(",
"location",
",",
"now",
"=",
"None",
")",
":",
"if",
"now",
"is",
"None",
":",
"now",
"=",
"get_now",
"(",
")",
"if",
"has_closing_rule_for_now",
"(",
"location",
")",
":",
"return",
"False",
"now_time",
"=",
"datetime",
".",
"ti... | 6bad47509a14d65a3a5a08777455f4cc8b4961fa |
train | next_time_open | Returns the next possible opening hours object, or (False, None)
if location is currently open or there is no such object
I.e. when is the company open for the next time? | openinghours/utils.py | def next_time_open(location):
"""
Returns the next possible opening hours object, or (False, None)
if location is currently open or there is no such object
I.e. when is the company open for the next time?
"""
if not is_open(location):
now = get_now()
now_time = datetime.time(now.... | def next_time_open(location):
"""
Returns the next possible opening hours object, or (False, None)
if location is currently open or there is no such object
I.e. when is the company open for the next time?
"""
if not is_open(location):
now = get_now()
now_time = datetime.time(now.... | [
"Returns",
"the",
"next",
"possible",
"opening",
"hours",
"object",
"or",
"(",
"False",
"None",
")",
"if",
"location",
"is",
"currently",
"open",
"or",
"there",
"is",
"no",
"such",
"object",
"I",
".",
"e",
".",
"when",
"is",
"the",
"company",
"open",
"... | arteria/django-openinghours | python | https://github.com/arteria/django-openinghours/blob/6bad47509a14d65a3a5a08777455f4cc8b4961fa/openinghours/utils.py#L114-L148 | [
"def",
"next_time_open",
"(",
"location",
")",
":",
"if",
"not",
"is_open",
"(",
"location",
")",
":",
"now",
"=",
"get_now",
"(",
")",
"now_time",
"=",
"datetime",
".",
"time",
"(",
"now",
".",
"hour",
",",
"now",
".",
"minute",
",",
"now",
".",
"... | 6bad47509a14d65a3a5a08777455f4cc8b4961fa |
train | QJoints.refweights | A |numpy| |numpy.ndarray| with equal weights for all segment
junctions..
>>> from hydpy.models.hstream import *
>>> parameterstep('1d')
>>> states.qjoints.shape = 5
>>> states.qjoints.refweights
array([ 0.2, 0.2, 0.2, 0.2, 0.2]) | hydpy/models/hstream/hstream_states.py | def refweights(self):
"""A |numpy| |numpy.ndarray| with equal weights for all segment
junctions..
>>> from hydpy.models.hstream import *
>>> parameterstep('1d')
>>> states.qjoints.shape = 5
>>> states.qjoints.refweights
array([ 0.2, 0.2, 0.2, 0.2, 0.2])
... | def refweights(self):
"""A |numpy| |numpy.ndarray| with equal weights for all segment
junctions..
>>> from hydpy.models.hstream import *
>>> parameterstep('1d')
>>> states.qjoints.shape = 5
>>> states.qjoints.refweights
array([ 0.2, 0.2, 0.2, 0.2, 0.2])
... | [
"A",
"|numpy|",
"|numpy",
".",
"ndarray|",
"with",
"equal",
"weights",
"for",
"all",
"segment",
"junctions",
".."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/hstream/hstream_states.py#L57-L69 | [
"def",
"refweights",
"(",
"self",
")",
":",
"# pylint: disable=unsubscriptable-object",
"# due to a pylint bug (see https://github.com/PyCQA/pylint/issues/870)",
"return",
"numpy",
".",
"full",
"(",
"self",
".",
"shape",
",",
"1.",
"/",
"self",
".",
"shape",
"[",
"0",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Folder2Path.add | Add a directory and optionally its path. | hydpy/core/filetools.py | def add(self, directory, path=None) -> None:
"""Add a directory and optionally its path."""
objecttools.valid_variable_identifier(directory)
if path is None:
path = directory
setattr(self, directory, path) | def add(self, directory, path=None) -> None:
"""Add a directory and optionally its path."""
objecttools.valid_variable_identifier(directory)
if path is None:
path = directory
setattr(self, directory, path) | [
"Add",
"a",
"directory",
"and",
"optionally",
"its",
"path",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L108-L113 | [
"def",
"add",
"(",
"self",
",",
"directory",
",",
"path",
"=",
"None",
")",
"->",
"None",
":",
"objecttools",
".",
"valid_variable_identifier",
"(",
"directory",
")",
"if",
"path",
"is",
"None",
":",
"path",
"=",
"directory",
"setattr",
"(",
"self",
",",... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | FileManager.basepath | Absolute path pointing to the available working directories.
>>> from hydpy.core.filetools import FileManager
>>> filemanager = FileManager()
>>> filemanager.BASEDIR = 'basename'
>>> filemanager.projectdir = 'projectname'
>>> from hydpy import repr_, TestIO
>>> with Test... | hydpy/core/filetools.py | def basepath(self) -> str:
"""Absolute path pointing to the available working directories.
>>> from hydpy.core.filetools import FileManager
>>> filemanager = FileManager()
>>> filemanager.BASEDIR = 'basename'
>>> filemanager.projectdir = 'projectname'
>>> from hydpy impo... | def basepath(self) -> str:
"""Absolute path pointing to the available working directories.
>>> from hydpy.core.filetools import FileManager
>>> filemanager = FileManager()
>>> filemanager.BASEDIR = 'basename'
>>> filemanager.projectdir = 'projectname'
>>> from hydpy impo... | [
"Absolute",
"path",
"pointing",
"to",
"the",
"available",
"working",
"directories",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L218-L231 | [
"def",
"basepath",
"(",
"self",
")",
"->",
"str",
":",
"return",
"os",
".",
"path",
".",
"abspath",
"(",
"os",
".",
"path",
".",
"join",
"(",
"self",
".",
"projectdir",
",",
"self",
".",
"BASEDIR",
")",
")"
] | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | FileManager.availabledirs | Names and paths of the available working directories.
Available working directories are those beeing stored in the
base directory of the respective |FileManager| subclass.
Folders with names starting with an underscore are ignored
(use this for directories handling additional data files... | hydpy/core/filetools.py | def availabledirs(self) -> Folder2Path:
"""Names and paths of the available working directories.
Available working directories are those beeing stored in the
base directory of the respective |FileManager| subclass.
Folders with names starting with an underscore are ignored
(use ... | def availabledirs(self) -> Folder2Path:
"""Names and paths of the available working directories.
Available working directories are those beeing stored in the
base directory of the respective |FileManager| subclass.
Folders with names starting with an underscore are ignored
(use ... | [
"Names",
"and",
"paths",
"of",
"the",
"available",
"working",
"directories",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L234-L270 | [
"def",
"availabledirs",
"(",
"self",
")",
"->",
"Folder2Path",
":",
"directories",
"=",
"Folder2Path",
"(",
")",
"for",
"directory",
"in",
"os",
".",
"listdir",
"(",
"self",
".",
"basepath",
")",
":",
"if",
"not",
"directory",
".",
"startswith",
"(",
"'_... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | FileManager.currentdir | Name of the current working directory containing the relevant files.
To show most of the functionality of |property|
|FileManager.currentdir| (unpacking zip files on the fly is
explained in the documentation on function
(|FileManager.zip_currentdir|), we first prepare a |FileManager|
... | hydpy/core/filetools.py | def currentdir(self) -> str:
"""Name of the current working directory containing the relevant files.
To show most of the functionality of |property|
|FileManager.currentdir| (unpacking zip files on the fly is
explained in the documentation on function
(|FileManager.zip_currentdi... | def currentdir(self) -> str:
"""Name of the current working directory containing the relevant files.
To show most of the functionality of |property|
|FileManager.currentdir| (unpacking zip files on the fly is
explained in the documentation on function
(|FileManager.zip_currentdi... | [
"Name",
"of",
"the",
"current",
"working",
"directory",
"containing",
"the",
"relevant",
"files",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L273-L435 | [
"def",
"currentdir",
"(",
"self",
")",
"->",
"str",
":",
"if",
"self",
".",
"_currentdir",
"is",
"None",
":",
"directories",
"=",
"self",
".",
"availabledirs",
".",
"folders",
"if",
"len",
"(",
"directories",
")",
"==",
"1",
":",
"self",
".",
"currentd... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | FileManager.currentpath | Absolute path of the current working directory.
>>> from hydpy.core.filetools import FileManager
>>> filemanager = FileManager()
>>> filemanager.BASEDIR = 'basename'
>>> filemanager.projectdir = 'projectname'
>>> from hydpy import repr_, TestIO
>>> with TestIO():
... | hydpy/core/filetools.py | def currentpath(self) -> str:
"""Absolute path of the current working directory.
>>> from hydpy.core.filetools import FileManager
>>> filemanager = FileManager()
>>> filemanager.BASEDIR = 'basename'
>>> filemanager.projectdir = 'projectname'
>>> from hydpy import repr_, ... | def currentpath(self) -> str:
"""Absolute path of the current working directory.
>>> from hydpy.core.filetools import FileManager
>>> filemanager = FileManager()
>>> filemanager.BASEDIR = 'basename'
>>> filemanager.projectdir = 'projectname'
>>> from hydpy import repr_, ... | [
"Absolute",
"path",
"of",
"the",
"current",
"working",
"directory",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L469-L482 | [
"def",
"currentpath",
"(",
"self",
")",
"->",
"str",
":",
"return",
"os",
".",
"path",
".",
"join",
"(",
"self",
".",
"basepath",
",",
"self",
".",
"currentdir",
")"
] | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | FileManager.filenames | Names of the files contained in the the current working directory.
Files names starting with underscores are ignored:
>>> from hydpy.core.filetools import FileManager
>>> filemanager = FileManager()
>>> filemanager.BASEDIR = 'basename'
>>> filemanager.projectdir = 'projectname'... | hydpy/core/filetools.py | def filenames(self) -> List[str]:
"""Names of the files contained in the the current working directory.
Files names starting with underscores are ignored:
>>> from hydpy.core.filetools import FileManager
>>> filemanager = FileManager()
>>> filemanager.BASEDIR = 'basename'
... | def filenames(self) -> List[str]:
"""Names of the files contained in the the current working directory.
Files names starting with underscores are ignored:
>>> from hydpy.core.filetools import FileManager
>>> filemanager = FileManager()
>>> filemanager.BASEDIR = 'basename'
... | [
"Names",
"of",
"the",
"files",
"contained",
"in",
"the",
"the",
"current",
"working",
"directory",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L485-L505 | [
"def",
"filenames",
"(",
"self",
")",
"->",
"List",
"[",
"str",
"]",
":",
"return",
"sorted",
"(",
"fn",
"for",
"fn",
"in",
"os",
".",
"listdir",
"(",
"self",
".",
"currentpath",
")",
"if",
"not",
"fn",
".",
"startswith",
"(",
"'_'",
")",
")"
] | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | FileManager.filepaths | Absolute path names of the files contained in the current
working directory.
Files names starting with underscores are ignored:
>>> from hydpy.core.filetools import FileManager
>>> filemanager = FileManager()
>>> filemanager.BASEDIR = 'basename'
>>> filemanager.projectd... | hydpy/core/filetools.py | def filepaths(self) -> List[str]:
"""Absolute path names of the files contained in the current
working directory.
Files names starting with underscores are ignored:
>>> from hydpy.core.filetools import FileManager
>>> filemanager = FileManager()
>>> filemanager.BASEDIR ... | def filepaths(self) -> List[str]:
"""Absolute path names of the files contained in the current
working directory.
Files names starting with underscores are ignored:
>>> from hydpy.core.filetools import FileManager
>>> filemanager = FileManager()
>>> filemanager.BASEDIR ... | [
"Absolute",
"path",
"names",
"of",
"the",
"files",
"contained",
"in",
"the",
"current",
"working",
"directory",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L508-L530 | [
"def",
"filepaths",
"(",
"self",
")",
"->",
"List",
"[",
"str",
"]",
":",
"path",
"=",
"self",
".",
"currentpath",
"return",
"[",
"os",
".",
"path",
".",
"join",
"(",
"path",
",",
"name",
")",
"for",
"name",
"in",
"self",
".",
"filenames",
"]"
] | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | FileManager.zip_currentdir | Pack the current working directory in a `zip` file.
|FileManager| subclasses allow for manual packing and automatic
unpacking of working directories. The only supported format is `zip`.
To avoid possible inconsistencies, origin directories and zip
files are removed after packing or unp... | hydpy/core/filetools.py | def zip_currentdir(self) -> None:
"""Pack the current working directory in a `zip` file.
|FileManager| subclasses allow for manual packing and automatic
unpacking of working directories. The only supported format is `zip`.
To avoid possible inconsistencies, origin directories and zip
... | def zip_currentdir(self) -> None:
"""Pack the current working directory in a `zip` file.
|FileManager| subclasses allow for manual packing and automatic
unpacking of working directories. The only supported format is `zip`.
To avoid possible inconsistencies, origin directories and zip
... | [
"Pack",
"the",
"current",
"working",
"directory",
"in",
"a",
"zip",
"file",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L532-L603 | [
"def",
"zip_currentdir",
"(",
"self",
")",
"->",
"None",
":",
"with",
"zipfile",
".",
"ZipFile",
"(",
"f'{self.currentpath}.zip'",
",",
"'w'",
")",
"as",
"zipfile_",
":",
"for",
"filepath",
",",
"filename",
"in",
"zip",
"(",
"self",
".",
"filepaths",
",",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | NetworkManager.load_files | Read all network files of the current working directory, structure
their contents in a |selectiontools.Selections| object, and return it. | hydpy/core/filetools.py | def load_files(self) -> selectiontools.Selections:
"""Read all network files of the current working directory, structure
their contents in a |selectiontools.Selections| object, and return it.
"""
devicetools.Node.clear_all()
devicetools.Element.clear_all()
selections = se... | def load_files(self) -> selectiontools.Selections:
"""Read all network files of the current working directory, structure
their contents in a |selectiontools.Selections| object, and return it.
"""
devicetools.Node.clear_all()
devicetools.Element.clear_all()
selections = se... | [
"Read",
"all",
"network",
"files",
"of",
"the",
"current",
"working",
"directory",
"structure",
"their",
"contents",
"in",
"a",
"|selectiontools",
".",
"Selections|",
"object",
"and",
"return",
"it",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L731-L763 | [
"def",
"load_files",
"(",
"self",
")",
"->",
"selectiontools",
".",
"Selections",
":",
"devicetools",
".",
"Node",
".",
"clear_all",
"(",
")",
"devicetools",
".",
"Element",
".",
"clear_all",
"(",
")",
"selections",
"=",
"selectiontools",
".",
"Selections",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | NetworkManager.save_files | Save the |Selection| objects contained in the given |Selections|
instance to separate network files. | hydpy/core/filetools.py | def save_files(self, selections) -> None:
"""Save the |Selection| objects contained in the given |Selections|
instance to separate network files."""
try:
currentpath = self.currentpath
selections = selectiontools.Selections(selections)
for selection in selecti... | def save_files(self, selections) -> None:
"""Save the |Selection| objects contained in the given |Selections|
instance to separate network files."""
try:
currentpath = self.currentpath
selections = selectiontools.Selections(selections)
for selection in selecti... | [
"Save",
"the",
"|Selection|",
"objects",
"contained",
"in",
"the",
"given",
"|Selections|",
"instance",
"to",
"separate",
"network",
"files",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L765-L779 | [
"def",
"save_files",
"(",
"self",
",",
"selections",
")",
"->",
"None",
":",
"try",
":",
"currentpath",
"=",
"self",
".",
"currentpath",
"selections",
"=",
"selectiontools",
".",
"Selections",
"(",
"selections",
")",
"for",
"selection",
"in",
"selections",
"... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | NetworkManager.delete_files | Delete the network files corresponding to the given selections
(e.g. a |list| of |str| objects or a |Selections| object). | hydpy/core/filetools.py | def delete_files(self, selections) -> None:
"""Delete the network files corresponding to the given selections
(e.g. a |list| of |str| objects or a |Selections| object)."""
try:
currentpath = self.currentpath
for selection in selections:
name = str(selectio... | def delete_files(self, selections) -> None:
"""Delete the network files corresponding to the given selections
(e.g. a |list| of |str| objects or a |Selections| object)."""
try:
currentpath = self.currentpath
for selection in selections:
name = str(selectio... | [
"Delete",
"the",
"network",
"files",
"corresponding",
"to",
"the",
"given",
"selections",
"(",
"e",
".",
"g",
".",
"a",
"|list|",
"of",
"|str|",
"objects",
"or",
"a",
"|Selections|",
"object",
")",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L781-L797 | [
"def",
"delete_files",
"(",
"self",
",",
"selections",
")",
"->",
"None",
":",
"try",
":",
"currentpath",
"=",
"self",
".",
"currentpath",
"for",
"selection",
"in",
"selections",
":",
"name",
"=",
"str",
"(",
"selection",
")",
"if",
"name",
"==",
"'compl... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | ControlManager.load_file | Return the namespace of the given file (and eventually of its
corresponding auxiliary subfiles) as a |dict|.
By default, the internal registry is cleared when a control file and
all its corresponding auxiliary files have been loaded. You can
change this behaviour by passing `False` for... | hydpy/core/filetools.py | def load_file(self, element=None, filename=None, clear_registry=True):
"""Return the namespace of the given file (and eventually of its
corresponding auxiliary subfiles) as a |dict|.
By default, the internal registry is cleared when a control file and
all its corresponding auxiliary fil... | def load_file(self, element=None, filename=None, clear_registry=True):
"""Return the namespace of the given file (and eventually of its
corresponding auxiliary subfiles) as a |dict|.
By default, the internal registry is cleared when a control file and
all its corresponding auxiliary fil... | [
"Return",
"the",
"namespace",
"of",
"the",
"given",
"file",
"(",
"and",
"eventually",
"of",
"its",
"corresponding",
"auxiliary",
"subfiles",
")",
"as",
"a",
"|dict|",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L810-L834 | [
"def",
"load_file",
"(",
"self",
",",
"element",
"=",
"None",
",",
"filename",
"=",
"None",
",",
"clear_registry",
"=",
"True",
")",
":",
"if",
"not",
"filename",
":",
"filename",
"=",
"element",
".",
"name",
"type",
"(",
"self",
")",
".",
"_workingpat... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | ControlManager.read2dict | Read the control parameters from the given path (and its
auxiliary paths, where appropriate) and store them in the given
|dict| object `info`.
Note that the |dict| `info` can be used to feed information
into the execution of control files. Use this method only if you
are comple... | hydpy/core/filetools.py | def read2dict(cls, filename, info):
"""Read the control parameters from the given path (and its
auxiliary paths, where appropriate) and store them in the given
|dict| object `info`.
Note that the |dict| `info` can be used to feed information
into the execution of control files. ... | def read2dict(cls, filename, info):
"""Read the control parameters from the given path (and its
auxiliary paths, where appropriate) and store them in the given
|dict| object `info`.
Note that the |dict| `info` can be used to feed information
into the execution of control files. ... | [
"Read",
"the",
"control",
"parameters",
"from",
"the",
"given",
"path",
"(",
"and",
"its",
"auxiliary",
"paths",
"where",
"appropriate",
")",
"and",
"store",
"them",
"in",
"the",
"given",
"|dict|",
"object",
"info",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L837-L865 | [
"def",
"read2dict",
"(",
"cls",
",",
"filename",
",",
"info",
")",
":",
"if",
"not",
"filename",
".",
"endswith",
"(",
"'.py'",
")",
":",
"filename",
"+=",
"'.py'",
"path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"cls",
".",
"_workingpath",
",",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | ControlManager.save_file | Save the given text under the given control filename and the
current path. | hydpy/core/filetools.py | def save_file(self, filename, text):
"""Save the given text under the given control filename and the
current path."""
if not filename.endswith('.py'):
filename += '.py'
path = os.path.join(self.currentpath, filename)
with open(path, 'w', encoding="utf-8") as file_:
... | def save_file(self, filename, text):
"""Save the given text under the given control filename and the
current path."""
if not filename.endswith('.py'):
filename += '.py'
path = os.path.join(self.currentpath, filename)
with open(path, 'w', encoding="utf-8") as file_:
... | [
"Save",
"the",
"given",
"text",
"under",
"the",
"given",
"control",
"filename",
"and",
"the",
"current",
"path",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L873-L880 | [
"def",
"save_file",
"(",
"self",
",",
"filename",
",",
"text",
")",
":",
"if",
"not",
"filename",
".",
"endswith",
"(",
"'.py'",
")",
":",
"filename",
"+=",
"'.py'",
"path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"self",
".",
"currentpath",
",",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | ConditionManager.load_file | Read and return the content of the given file.
If the current directory is not defined explicitly, the directory
name is constructed with the actual simulation start date. If
such an directory does not exist, it is created immediately. | hydpy/core/filetools.py | def load_file(self, filename):
"""Read and return the content of the given file.
If the current directory is not defined explicitly, the directory
name is constructed with the actual simulation start date. If
such an directory does not exist, it is created immediately.
"""
... | def load_file(self, filename):
"""Read and return the content of the given file.
If the current directory is not defined explicitly, the directory
name is constructed with the actual simulation start date. If
such an directory does not exist, it is created immediately.
"""
... | [
"Read",
"and",
"return",
"the",
"content",
"of",
"the",
"given",
"file",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L889-L913 | [
"def",
"load_file",
"(",
"self",
",",
"filename",
")",
":",
"_defaultdir",
"=",
"self",
".",
"DEFAULTDIR",
"try",
":",
"if",
"not",
"filename",
".",
"endswith",
"(",
"'.py'",
")",
":",
"filename",
"+=",
"'.py'",
"try",
":",
"self",
".",
"DEFAULTDIR",
"... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | ConditionManager.save_file | Save the given text under the given condition filename and the
current path.
If the current directory is not defined explicitly, the directory
name is constructed with the actual simulation end date. If
such an directory does not exist, it is created immediately. | hydpy/core/filetools.py | def save_file(self, filename, text):
"""Save the given text under the given condition filename and the
current path.
If the current directory is not defined explicitly, the directory
name is constructed with the actual simulation end date. If
such an directory does not exist, i... | def save_file(self, filename, text):
"""Save the given text under the given condition filename and the
current path.
If the current directory is not defined explicitly, the directory
name is constructed with the actual simulation end date. If
such an directory does not exist, i... | [
"Save",
"the",
"given",
"text",
"under",
"the",
"given",
"condition",
"filename",
"and",
"the",
"current",
"path",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L915-L940 | [
"def",
"save_file",
"(",
"self",
",",
"filename",
",",
"text",
")",
":",
"_defaultdir",
"=",
"self",
".",
"DEFAULTDIR",
"try",
":",
"if",
"not",
"filename",
".",
"endswith",
"(",
"'.py'",
")",
":",
"filename",
"+=",
"'.py'",
"try",
":",
"self",
".",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | SequenceManager.load_file | Load data from an "external" data file an pass it to
the given |IOSequence|. | hydpy/core/filetools.py | def load_file(self, sequence):
"""Load data from an "external" data file an pass it to
the given |IOSequence|."""
try:
if sequence.filetype_ext == 'npy':
sequence.series = sequence.adjust_series(
*self._load_npy(sequence))
elif sequence... | def load_file(self, sequence):
"""Load data from an "external" data file an pass it to
the given |IOSequence|."""
try:
if sequence.filetype_ext == 'npy':
sequence.series = sequence.adjust_series(
*self._load_npy(sequence))
elif sequence... | [
"Load",
"data",
"from",
"an",
"external",
"data",
"file",
"an",
"pass",
"it",
"to",
"the",
"given",
"|IOSequence|",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L1415-L1430 | [
"def",
"load_file",
"(",
"self",
",",
"sequence",
")",
":",
"try",
":",
"if",
"sequence",
".",
"filetype_ext",
"==",
"'npy'",
":",
"sequence",
".",
"series",
"=",
"sequence",
".",
"adjust_series",
"(",
"*",
"self",
".",
"_load_npy",
"(",
"sequence",
")",... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | SequenceManager.save_file | Write the date stored in |IOSequence.series| of the given
|IOSequence| into an "external" data file. | hydpy/core/filetools.py | def save_file(self, sequence, array=None):
"""Write the date stored in |IOSequence.series| of the given
|IOSequence| into an "external" data file. """
if array is None:
array = sequence.aggregate_series()
try:
if sequence.filetype_ext == 'nc':
self... | def save_file(self, sequence, array=None):
"""Write the date stored in |IOSequence.series| of the given
|IOSequence| into an "external" data file. """
if array is None:
array = sequence.aggregate_series()
try:
if sequence.filetype_ext == 'nc':
self... | [
"Write",
"the",
"date",
"stored",
"in",
"|IOSequence",
".",
"series|",
"of",
"the",
"given",
"|IOSequence|",
"into",
"an",
"external",
"data",
"file",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L1450-L1476 | [
"def",
"save_file",
"(",
"self",
",",
"sequence",
",",
"array",
"=",
"None",
")",
":",
"if",
"array",
"is",
"None",
":",
"array",
"=",
"sequence",
".",
"aggregate_series",
"(",
")",
"try",
":",
"if",
"sequence",
".",
"filetype_ext",
"==",
"'nc'",
":",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | SequenceManager.open_netcdf_reader | Prepare a new |NetCDFInterface| object for reading data. | hydpy/core/filetools.py | def open_netcdf_reader(self, flatten=False, isolate=False, timeaxis=1):
"""Prepare a new |NetCDFInterface| object for reading data."""
self._netcdf_reader = netcdftools.NetCDFInterface(
flatten=bool(flatten),
isolate=bool(isolate),
timeaxis=int(timeaxis)) | def open_netcdf_reader(self, flatten=False, isolate=False, timeaxis=1):
"""Prepare a new |NetCDFInterface| object for reading data."""
self._netcdf_reader = netcdftools.NetCDFInterface(
flatten=bool(flatten),
isolate=bool(isolate),
timeaxis=int(timeaxis)) | [
"Prepare",
"a",
"new",
"|NetCDFInterface|",
"object",
"for",
"reading",
"data",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L1528-L1533 | [
"def",
"open_netcdf_reader",
"(",
"self",
",",
"flatten",
"=",
"False",
",",
"isolate",
"=",
"False",
",",
"timeaxis",
"=",
"1",
")",
":",
"self",
".",
"_netcdf_reader",
"=",
"netcdftools",
".",
"NetCDFInterface",
"(",
"flatten",
"=",
"bool",
"(",
"flatten... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | SequenceManager.open_netcdf_writer | Prepare a new |NetCDFInterface| object for writing data. | hydpy/core/filetools.py | def open_netcdf_writer(self, flatten=False, isolate=False, timeaxis=1):
"""Prepare a new |NetCDFInterface| object for writing data."""
self._netcdf_writer = netcdftools.NetCDFInterface(
flatten=bool(flatten),
isolate=bool(isolate),
timeaxis=int(timeaxis)) | def open_netcdf_writer(self, flatten=False, isolate=False, timeaxis=1):
"""Prepare a new |NetCDFInterface| object for writing data."""
self._netcdf_writer = netcdftools.NetCDFInterface(
flatten=bool(flatten),
isolate=bool(isolate),
timeaxis=int(timeaxis)) | [
"Prepare",
"a",
"new",
"|NetCDFInterface|",
"object",
"for",
"writing",
"data",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/filetools.py#L1572-L1577 | [
"def",
"open_netcdf_writer",
"(",
"self",
",",
"flatten",
"=",
"False",
",",
"isolate",
"=",
"False",
",",
"timeaxis",
"=",
"1",
")",
":",
"self",
".",
"_netcdf_writer",
"=",
"netcdftools",
".",
"NetCDFInterface",
"(",
"flatten",
"=",
"bool",
"(",
"flatten... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_nkor_v1 | Adjust the given precipitation values.
Required control parameters:
|NHRU|
|KG|
Required input sequence:
|Nied|
Calculated flux sequence:
|NKor|
Basic equation:
:math:`NKor = KG \\cdot Nied`
Example:
>>> from hydpy.models.lland import *
>>> paramet... | hydpy/models/lland/lland_model.py | def calc_nkor_v1(self):
"""Adjust the given precipitation values.
Required control parameters:
|NHRU|
|KG|
Required input sequence:
|Nied|
Calculated flux sequence:
|NKor|
Basic equation:
:math:`NKor = KG \\cdot Nied`
Example:
>>> from hydpy.models.lla... | def calc_nkor_v1(self):
"""Adjust the given precipitation values.
Required control parameters:
|NHRU|
|KG|
Required input sequence:
|Nied|
Calculated flux sequence:
|NKor|
Basic equation:
:math:`NKor = KG \\cdot Nied`
Example:
>>> from hydpy.models.lla... | [
"Adjust",
"the",
"given",
"precipitation",
"values",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L13-L44 | [
"def",
"calc_nkor_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"inp",
"=",
"self",
".",
"sequences",
".",
"inputs",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"f... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_tkor_v1 | Adjust the given air temperature values.
Required control parameters:
|NHRU|
|KT|
Required input sequence:
|TemL|
Calculated flux sequence:
|TKor|
Basic equation:
:math:`TKor = KT + TemL`
Example:
>>> from hydpy.models.lland import *
>>> parameters... | hydpy/models/lland/lland_model.py | def calc_tkor_v1(self):
"""Adjust the given air temperature values.
Required control parameters:
|NHRU|
|KT|
Required input sequence:
|TemL|
Calculated flux sequence:
|TKor|
Basic equation:
:math:`TKor = KT + TemL`
Example:
>>> from hydpy.models.lland ... | def calc_tkor_v1(self):
"""Adjust the given air temperature values.
Required control parameters:
|NHRU|
|KT|
Required input sequence:
|TemL|
Calculated flux sequence:
|TKor|
Basic equation:
:math:`TKor = KT + TemL`
Example:
>>> from hydpy.models.lland ... | [
"Adjust",
"the",
"given",
"air",
"temperature",
"values",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L47-L78 | [
"def",
"calc_tkor_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"inp",
"=",
"self",
".",
"sequences",
".",
"inputs",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"f... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_et0_v1 | Calculate reference evapotranspiration after Turc-Wendling.
Required control parameters:
|NHRU|
|KE|
|KF|
|HNN|
Required input sequence:
|Glob|
Required flux sequence:
|TKor|
Calculated flux sequence:
|ET0|
Basic equation:
:math:`ET0 = KE \\cdot
... | hydpy/models/lland/lland_model.py | def calc_et0_v1(self):
"""Calculate reference evapotranspiration after Turc-Wendling.
Required control parameters:
|NHRU|
|KE|
|KF|
|HNN|
Required input sequence:
|Glob|
Required flux sequence:
|TKor|
Calculated flux sequence:
|ET0|
Basic equation:
... | def calc_et0_v1(self):
"""Calculate reference evapotranspiration after Turc-Wendling.
Required control parameters:
|NHRU|
|KE|
|KF|
|HNN|
Required input sequence:
|Glob|
Required flux sequence:
|TKor|
Calculated flux sequence:
|ET0|
Basic equation:
... | [
"Calculate",
"reference",
"evapotranspiration",
"after",
"Turc",
"-",
"Wendling",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L81-L126 | [
"def",
"calc_et0_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"inp",
"=",
"self",
".",
"sequences",
".",
"inputs",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fa... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_et0_wet0_v1 | Correct the given reference evapotranspiration and update the
corresponding log sequence.
Required control parameters:
|NHRU|
|KE|
|WfET0|
Required input sequence:
|PET|
Calculated flux sequence:
|ET0|
Updated log sequence:
|WET0|
Basic equations:
:... | hydpy/models/lland/lland_model.py | def calc_et0_wet0_v1(self):
"""Correct the given reference evapotranspiration and update the
corresponding log sequence.
Required control parameters:
|NHRU|
|KE|
|WfET0|
Required input sequence:
|PET|
Calculated flux sequence:
|ET0|
Updated log sequence:
|... | def calc_et0_wet0_v1(self):
"""Correct the given reference evapotranspiration and update the
corresponding log sequence.
Required control parameters:
|NHRU|
|KE|
|WfET0|
Required input sequence:
|PET|
Calculated flux sequence:
|ET0|
Updated log sequence:
|... | [
"Correct",
"the",
"given",
"reference",
"evapotranspiration",
"and",
"update",
"the",
"corresponding",
"log",
"sequence",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L129-L192 | [
"def",
"calc_et0_wet0_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"inp",
"=",
"self",
".",
"sequences",
".",
"inputs",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_evpo_v1 | Calculate land use and month specific values of potential
evapotranspiration.
Required control parameters:
|NHRU|
|Lnk|
|FLn|
Required derived parameter:
|MOY|
Required flux sequence:
|ET0|
Calculated flux sequence:
|EvPo|
Additional requirements:
|... | hydpy/models/lland/lland_model.py | def calc_evpo_v1(self):
"""Calculate land use and month specific values of potential
evapotranspiration.
Required control parameters:
|NHRU|
|Lnk|
|FLn|
Required derived parameter:
|MOY|
Required flux sequence:
|ET0|
Calculated flux sequence:
|EvPo|
A... | def calc_evpo_v1(self):
"""Calculate land use and month specific values of potential
evapotranspiration.
Required control parameters:
|NHRU|
|Lnk|
|FLn|
Required derived parameter:
|MOY|
Required flux sequence:
|ET0|
Calculated flux sequence:
|EvPo|
A... | [
"Calculate",
"land",
"use",
"and",
"month",
"specific",
"values",
"of",
"potential",
"evapotranspiration",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L195-L276 | [
"def",
"calc_evpo_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"der",
"=",
"self",
".",
"parameters",
".",
"derived",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_nbes_inzp_v1 | Calculate stand precipitation and update the interception storage
accordingly.
Required control parameters:
|NHRU|
|Lnk|
Required derived parameter:
|KInz|
Required flux sequence:
|NKor|
Calculated flux sequence:
|NBes|
Updated state sequence:
|Inzp|
... | hydpy/models/lland/lland_model.py | def calc_nbes_inzp_v1(self):
"""Calculate stand precipitation and update the interception storage
accordingly.
Required control parameters:
|NHRU|
|Lnk|
Required derived parameter:
|KInz|
Required flux sequence:
|NKor|
Calculated flux sequence:
|NBes|
Updat... | def calc_nbes_inzp_v1(self):
"""Calculate stand precipitation and update the interception storage
accordingly.
Required control parameters:
|NHRU|
|Lnk|
Required derived parameter:
|KInz|
Required flux sequence:
|NKor|
Calculated flux sequence:
|NBes|
Updat... | [
"Calculate",
"stand",
"precipitation",
"and",
"update",
"the",
"interception",
"storage",
"accordingly",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L279-L394 | [
"def",
"calc_nbes_inzp_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"der",
"=",
"self",
".",
"parameters",
".",
"derived",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_evi_inzp_v1 | Calculate interception evaporation and update the interception
storage accordingly.
Required control parameters:
|NHRU|
|Lnk|
|TRefT|
|TRefN|
Required flux sequence:
|EvPo|
Calculated flux sequence:
|EvI|
Updated state sequence:
|Inzp|
Basic equatio... | hydpy/models/lland/lland_model.py | def calc_evi_inzp_v1(self):
"""Calculate interception evaporation and update the interception
storage accordingly.
Required control parameters:
|NHRU|
|Lnk|
|TRefT|
|TRefN|
Required flux sequence:
|EvPo|
Calculated flux sequence:
|EvI|
Updated state sequen... | def calc_evi_inzp_v1(self):
"""Calculate interception evaporation and update the interception
storage accordingly.
Required control parameters:
|NHRU|
|Lnk|
|TRefT|
|TRefN|
Required flux sequence:
|EvPo|
Calculated flux sequence:
|EvI|
Updated state sequen... | [
"Calculate",
"interception",
"evaporation",
"and",
"update",
"the",
"interception",
"storage",
"accordingly",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L397-L459 | [
"def",
"calc_evi_inzp_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"sta",
"=",
"self",
".",
"sequences",
".",
"states",
".",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_sbes_v1 | Calculate the frozen part of stand precipitation.
Required control parameters:
|NHRU|
|TGr|
|TSp|
Required flux sequences:
|TKor|
|NBes|
Calculated flux sequence:
|SBes|
Examples:
In the first example, the threshold temperature of seven hydrological
... | hydpy/models/lland/lland_model.py | def calc_sbes_v1(self):
"""Calculate the frozen part of stand precipitation.
Required control parameters:
|NHRU|
|TGr|
|TSp|
Required flux sequences:
|TKor|
|NBes|
Calculated flux sequence:
|SBes|
Examples:
In the first example, the threshold temperat... | def calc_sbes_v1(self):
"""Calculate the frozen part of stand precipitation.
Required control parameters:
|NHRU|
|TGr|
|TSp|
Required flux sequences:
|TKor|
|NBes|
Calculated flux sequence:
|SBes|
Examples:
In the first example, the threshold temperat... | [
"Calculate",
"the",
"frozen",
"part",
"of",
"stand",
"precipitation",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L462-L519 | [
"def",
"calc_sbes_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"for",
"k",
"in",
"range",
"(",
"con",
".",
"nhru",
")",
"... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_wgtf_v1 | Calculate the potential snowmelt.
Required control parameters:
|NHRU|
|Lnk|
|GTF|
|TRefT|
|TRefN|
|RSchmelz|
|CPWasser|
Required flux sequence:
|TKor|
Calculated fluxes sequence:
|WGTF|
Basic equation:
:math:`WGTF = max(GTF \\cdot (TKor - T... | hydpy/models/lland/lland_model.py | def calc_wgtf_v1(self):
"""Calculate the potential snowmelt.
Required control parameters:
|NHRU|
|Lnk|
|GTF|
|TRefT|
|TRefN|
|RSchmelz|
|CPWasser|
Required flux sequence:
|TKor|
Calculated fluxes sequence:
|WGTF|
Basic equation:
:math:`... | def calc_wgtf_v1(self):
"""Calculate the potential snowmelt.
Required control parameters:
|NHRU|
|Lnk|
|GTF|
|TRefT|
|TRefN|
|RSchmelz|
|CPWasser|
Required flux sequence:
|TKor|
Calculated fluxes sequence:
|WGTF|
Basic equation:
:math:`... | [
"Calculate",
"the",
"potential",
"snowmelt",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L522-L601 | [
"def",
"calc_wgtf_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"for",
"k",
"in",
"range",
"(",
"con",
".",
"nhru",
")",
"... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_schm_wats_v1 | Calculate the actual amount of water melting within the snow cover.
Required control parameters:
|NHRU|
|Lnk|
Required flux sequences:
|SBes|
|WGTF|
Calculated flux sequence:
|Schm|
Updated state sequence:
|WATS|
Basic equations:
:math:`\\frac{dWATS}{dt... | hydpy/models/lland/lland_model.py | def calc_schm_wats_v1(self):
"""Calculate the actual amount of water melting within the snow cover.
Required control parameters:
|NHRU|
|Lnk|
Required flux sequences:
|SBes|
|WGTF|
Calculated flux sequence:
|Schm|
Updated state sequence:
|WATS|
Basic equa... | def calc_schm_wats_v1(self):
"""Calculate the actual amount of water melting within the snow cover.
Required control parameters:
|NHRU|
|Lnk|
Required flux sequences:
|SBes|
|WGTF|
Calculated flux sequence:
|Schm|
Updated state sequence:
|WATS|
Basic equa... | [
"Calculate",
"the",
"actual",
"amount",
"of",
"water",
"melting",
"within",
"the",
"snow",
"cover",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L604-L666 | [
"def",
"calc_schm_wats_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"sta",
"=",
"self",
".",
"sequences",
".",
"states",
".",... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_wada_waes_v1 | Calculate the actual water release from the snow cover.
Required control parameters:
|NHRU|
|Lnk|
|PWMax|
Required flux sequences:
|NBes|
Calculated flux sequence:
|WaDa|
Updated state sequence:
|WAeS|
Basic equations:
:math:`\\frac{dWAeS}{dt} = NBes - ... | hydpy/models/lland/lland_model.py | def calc_wada_waes_v1(self):
"""Calculate the actual water release from the snow cover.
Required control parameters:
|NHRU|
|Lnk|
|PWMax|
Required flux sequences:
|NBes|
Calculated flux sequence:
|WaDa|
Updated state sequence:
|WAeS|
Basic equations:
... | def calc_wada_waes_v1(self):
"""Calculate the actual water release from the snow cover.
Required control parameters:
|NHRU|
|Lnk|
|PWMax|
Required flux sequences:
|NBes|
Calculated flux sequence:
|WaDa|
Updated state sequence:
|WAeS|
Basic equations:
... | [
"Calculate",
"the",
"actual",
"water",
"release",
"from",
"the",
"snow",
"cover",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L669-L729 | [
"def",
"calc_wada_waes_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"sta",
"=",
"self",
".",
"sequences",
".",
"states",
".",... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_evb_v1 | Calculate the actual water release from the snow cover.
Required control parameters:
|NHRU|
|Lnk|
|NFk|
|GrasRef_R|
Required state sequence:
|BoWa|
Required flux sequences:
|EvPo|
|EvI|
Calculated flux sequence:
|EvB|
Basic equations:
:math:... | hydpy/models/lland/lland_model.py | def calc_evb_v1(self):
"""Calculate the actual water release from the snow cover.
Required control parameters:
|NHRU|
|Lnk|
|NFk|
|GrasRef_R|
Required state sequence:
|BoWa|
Required flux sequences:
|EvPo|
|EvI|
Calculated flux sequence:
|EvB|
... | def calc_evb_v1(self):
"""Calculate the actual water release from the snow cover.
Required control parameters:
|NHRU|
|Lnk|
|NFk|
|GrasRef_R|
Required state sequence:
|BoWa|
Required flux sequences:
|EvPo|
|EvI|
Calculated flux sequence:
|EvB|
... | [
"Calculate",
"the",
"actual",
"water",
"release",
"from",
"the",
"snow",
"cover",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L732-L793 | [
"def",
"calc_evb_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"sta",
"=",
"self",
".",
"sequences",
".",
"states",
".",
"fa... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_qbb_v1 | Calculate the amount of base flow released from the soil.
Required control parameters:
|NHRU|
|Lnk|
|Beta|
|FBeta|
Required derived parameter:
|WB|
|WZ|
Required state sequence:
|BoWa|
Calculated flux sequence:
|QBB|
Basic equations:
:math:`... | hydpy/models/lland/lland_model.py | def calc_qbb_v1(self):
"""Calculate the amount of base flow released from the soil.
Required control parameters:
|NHRU|
|Lnk|
|Beta|
|FBeta|
Required derived parameter:
|WB|
|WZ|
Required state sequence:
|BoWa|
Calculated flux sequence:
|QBB|
... | def calc_qbb_v1(self):
"""Calculate the amount of base flow released from the soil.
Required control parameters:
|NHRU|
|Lnk|
|Beta|
|FBeta|
Required derived parameter:
|WB|
|WZ|
Required state sequence:
|BoWa|
Calculated flux sequence:
|QBB|
... | [
"Calculate",
"the",
"amount",
"of",
"base",
"flow",
"released",
"from",
"the",
"soil",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L796-L896 | [
"def",
"calc_qbb_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"der",
"=",
"self",
".",
"parameters",
".",
"derived",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_qib1_v1 | Calculate the first inflow component released from the soil.
Required control parameters:
|NHRU|
|Lnk|
|NFk|
|DMin|
Required derived parameter:
|WB|
Required state sequence:
|BoWa|
Calculated flux sequence:
|QIB1|
Basic equation:
:math:`QIB1 = DMi... | hydpy/models/lland/lland_model.py | def calc_qib1_v1(self):
"""Calculate the first inflow component released from the soil.
Required control parameters:
|NHRU|
|Lnk|
|NFk|
|DMin|
Required derived parameter:
|WB|
Required state sequence:
|BoWa|
Calculated flux sequence:
|QIB1|
Basic eq... | def calc_qib1_v1(self):
"""Calculate the first inflow component released from the soil.
Required control parameters:
|NHRU|
|Lnk|
|NFk|
|DMin|
Required derived parameter:
|WB|
Required state sequence:
|BoWa|
Calculated flux sequence:
|QIB1|
Basic eq... | [
"Calculate",
"the",
"first",
"inflow",
"component",
"released",
"from",
"the",
"soil",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L899-L969 | [
"def",
"calc_qib1_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"der",
"=",
"self",
".",
"parameters",
".",
"derived",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_qib2_v1 | Calculate the first inflow component released from the soil.
Required control parameters:
|NHRU|
|Lnk|
|NFk|
|DMin|
|DMax|
Required derived parameter:
|WZ|
Required state sequence:
|BoWa|
Calculated flux sequence:
|QIB2|
Basic equation:
:mat... | hydpy/models/lland/lland_model.py | def calc_qib2_v1(self):
"""Calculate the first inflow component released from the soil.
Required control parameters:
|NHRU|
|Lnk|
|NFk|
|DMin|
|DMax|
Required derived parameter:
|WZ|
Required state sequence:
|BoWa|
Calculated flux sequence:
|QIB2|
... | def calc_qib2_v1(self):
"""Calculate the first inflow component released from the soil.
Required control parameters:
|NHRU|
|Lnk|
|NFk|
|DMin|
|DMax|
Required derived parameter:
|WZ|
Required state sequence:
|BoWa|
Calculated flux sequence:
|QIB2|
... | [
"Calculate",
"the",
"first",
"inflow",
"component",
"released",
"from",
"the",
"soil",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L972-L1049 | [
"def",
"calc_qib2_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"der",
"=",
"self",
".",
"parameters",
".",
"derived",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_qdb_v1 | Calculate direct runoff released from the soil.
Required control parameters:
|NHRU|
|Lnk|
|NFk|
|BSf|
Required state sequence:
|BoWa|
Required flux sequence:
|WaDa|
Calculated flux sequence:
|QDB|
Basic equations:
:math:`QDB = \\Bigl \\lbrace
... | hydpy/models/lland/lland_model.py | def calc_qdb_v1(self):
"""Calculate direct runoff released from the soil.
Required control parameters:
|NHRU|
|Lnk|
|NFk|
|BSf|
Required state sequence:
|BoWa|
Required flux sequence:
|WaDa|
Calculated flux sequence:
|QDB|
Basic equations:
:ma... | def calc_qdb_v1(self):
"""Calculate direct runoff released from the soil.
Required control parameters:
|NHRU|
|Lnk|
|NFk|
|BSf|
Required state sequence:
|BoWa|
Required flux sequence:
|WaDa|
Calculated flux sequence:
|QDB|
Basic equations:
:ma... | [
"Calculate",
"direct",
"runoff",
"released",
"from",
"the",
"soil",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L1052-L1131 | [
"def",
"calc_qdb_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"sta",
"=",
"self",
".",
"sequences",
".",
"states",
".",
"fa... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_bowa_v1 | Update soil moisture and correct fluxes if necessary.
Required control parameters:
|NHRU|
|Lnk|
Required flux sequence:
|WaDa|
Updated state sequence:
|BoWa|
Required (and eventually corrected) flux sequences:
|EvB|
|QBB|
|QIB1|
|QIB2|
|QDB|
... | hydpy/models/lland/lland_model.py | def calc_bowa_v1(self):
"""Update soil moisture and correct fluxes if necessary.
Required control parameters:
|NHRU|
|Lnk|
Required flux sequence:
|WaDa|
Updated state sequence:
|BoWa|
Required (and eventually corrected) flux sequences:
|EvB|
|QBB|
|QIB1... | def calc_bowa_v1(self):
"""Update soil moisture and correct fluxes if necessary.
Required control parameters:
|NHRU|
|Lnk|
Required flux sequence:
|WaDa|
Updated state sequence:
|BoWa|
Required (and eventually corrected) flux sequences:
|EvB|
|QBB|
|QIB1... | [
"Update",
"soil",
"moisture",
"and",
"correct",
"fluxes",
"if",
"necessary",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L1134-L1216 | [
"def",
"calc_bowa_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"sta",
"=",
"self",
".",
"sequences",
".",
"states",
".",
"f... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_qbgz_v1 | Aggregate the amount of base flow released by all "soil type" HRUs
and the "net precipitation" above water areas of type |SEE|.
Water areas of type |SEE| are assumed to be directly connected with
groundwater, but not with the stream network. This is modelled by
adding their (positive or negative) "net... | hydpy/models/lland/lland_model.py | def calc_qbgz_v1(self):
"""Aggregate the amount of base flow released by all "soil type" HRUs
and the "net precipitation" above water areas of type |SEE|.
Water areas of type |SEE| are assumed to be directly connected with
groundwater, but not with the stream network. This is modelled by
adding th... | def calc_qbgz_v1(self):
"""Aggregate the amount of base flow released by all "soil type" HRUs
and the "net precipitation" above water areas of type |SEE|.
Water areas of type |SEE| are assumed to be directly connected with
groundwater, but not with the stream network. This is modelled by
adding th... | [
"Aggregate",
"the",
"amount",
"of",
"base",
"flow",
"released",
"by",
"all",
"soil",
"type",
"HRUs",
"and",
"the",
"net",
"precipitation",
"above",
"water",
"areas",
"of",
"type",
"|SEE|",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L1219-L1281 | [
"def",
"calc_qbgz_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"sta",
"=",
"self",
".",
"sequences",
".",
"states",
".",
"f... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_qigz1_v1 | Aggregate the amount of the first interflow component released
by all HRUs.
Required control parameters:
|NHRU|
|FHRU|
Required flux sequence:
|QIB1|
Calculated state sequence:
|QIGZ1|
Basic equation:
:math:`QIGZ1 = \\Sigma(FHRU \\cdot QIB1)`
Example:
... | hydpy/models/lland/lland_model.py | def calc_qigz1_v1(self):
"""Aggregate the amount of the first interflow component released
by all HRUs.
Required control parameters:
|NHRU|
|FHRU|
Required flux sequence:
|QIB1|
Calculated state sequence:
|QIGZ1|
Basic equation:
:math:`QIGZ1 = \\Sigma(FHRU \\cd... | def calc_qigz1_v1(self):
"""Aggregate the amount of the first interflow component released
by all HRUs.
Required control parameters:
|NHRU|
|FHRU|
Required flux sequence:
|QIB1|
Calculated state sequence:
|QIGZ1|
Basic equation:
:math:`QIGZ1 = \\Sigma(FHRU \\cd... | [
"Aggregate",
"the",
"amount",
"of",
"the",
"first",
"interflow",
"component",
"released",
"by",
"all",
"HRUs",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L1284-L1317 | [
"def",
"calc_qigz1_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"sta",
"=",
"self",
".",
"sequences",
".",
"states",
".",
"... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_qigz2_v1 | Aggregate the amount of the second interflow component released
by all HRUs.
Required control parameters:
|NHRU|
|FHRU|
Required flux sequence:
|QIB2|
Calculated state sequence:
|QIGZ2|
Basic equation:
:math:`QIGZ2 = \\Sigma(FHRU \\cdot QIB2)`
Example:
... | hydpy/models/lland/lland_model.py | def calc_qigz2_v1(self):
"""Aggregate the amount of the second interflow component released
by all HRUs.
Required control parameters:
|NHRU|
|FHRU|
Required flux sequence:
|QIB2|
Calculated state sequence:
|QIGZ2|
Basic equation:
:math:`QIGZ2 = \\Sigma(FHRU \\c... | def calc_qigz2_v1(self):
"""Aggregate the amount of the second interflow component released
by all HRUs.
Required control parameters:
|NHRU|
|FHRU|
Required flux sequence:
|QIB2|
Calculated state sequence:
|QIGZ2|
Basic equation:
:math:`QIGZ2 = \\Sigma(FHRU \\c... | [
"Aggregate",
"the",
"amount",
"of",
"the",
"second",
"interflow",
"component",
"released",
"by",
"all",
"HRUs",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L1320-L1353 | [
"def",
"calc_qigz2_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"sta",
"=",
"self",
".",
"sequences",
".",
"states",
".",
"... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_qdgz_v1 | Aggregate the amount of total direct flow released by all HRUs.
Required control parameters:
|Lnk|
|NHRU|
|FHRU|
Required flux sequence:
|QDB|
|NKor|
|EvI|
Calculated flux sequence:
|QDGZ|
Basic equation:
:math:`QDGZ = \\Sigma(FHRU \\cdot QDB) +
... | hydpy/models/lland/lland_model.py | def calc_qdgz_v1(self):
"""Aggregate the amount of total direct flow released by all HRUs.
Required control parameters:
|Lnk|
|NHRU|
|FHRU|
Required flux sequence:
|QDB|
|NKor|
|EvI|
Calculated flux sequence:
|QDGZ|
Basic equation:
:math:`QDGZ = \... | def calc_qdgz_v1(self):
"""Aggregate the amount of total direct flow released by all HRUs.
Required control parameters:
|Lnk|
|NHRU|
|FHRU|
Required flux sequence:
|QDB|
|NKor|
|EvI|
Calculated flux sequence:
|QDGZ|
Basic equation:
:math:`QDGZ = \... | [
"Aggregate",
"the",
"amount",
"of",
"total",
"direct",
"flow",
"released",
"by",
"all",
"HRUs",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L1356-L1411 | [
"def",
"calc_qdgz_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"flu",
".",
"qdgz",
"=",
"0.",
"for",
"k",
"in",
"range",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_qdgz1_qdgz2_v1 | Seperate total direct flow into a small and a fast component.
Required control parameters:
|A1|
|A2|
Required flux sequence:
|QDGZ|
Calculated state sequences:
|QDGZ1|
|QDGZ2|
Basic equation:
:math:`QDGZ2 = \\frac{(QDGZ-A2)^2}{QDGZ+A1-A2}`
:math:`QDGZ1 = Q... | hydpy/models/lland/lland_model.py | def calc_qdgz1_qdgz2_v1(self):
"""Seperate total direct flow into a small and a fast component.
Required control parameters:
|A1|
|A2|
Required flux sequence:
|QDGZ|
Calculated state sequences:
|QDGZ1|
|QDGZ2|
Basic equation:
:math:`QDGZ2 = \\frac{(QDGZ-A2)^2... | def calc_qdgz1_qdgz2_v1(self):
"""Seperate total direct flow into a small and a fast component.
Required control parameters:
|A1|
|A2|
Required flux sequence:
|QDGZ|
Calculated state sequences:
|QDGZ1|
|QDGZ2|
Basic equation:
:math:`QDGZ2 = \\frac{(QDGZ-A2)^2... | [
"Seperate",
"total",
"direct",
"flow",
"into",
"a",
"small",
"and",
"a",
"fast",
"component",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L1414-L1520 | [
"def",
"calc_qdgz1_qdgz2_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"sta",
"=",
"self",
".",
"sequences",
".",
"states",
".... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_qbga_v1 | Perform the runoff concentration calculation for base flow.
The working equation is the analytical solution of the linear storage
equation under the assumption of constant change in inflow during
the simulation time step.
Required derived parameter:
|KB|
Required flux sequence:
|QBGZ|... | hydpy/models/lland/lland_model.py | def calc_qbga_v1(self):
"""Perform the runoff concentration calculation for base flow.
The working equation is the analytical solution of the linear storage
equation under the assumption of constant change in inflow during
the simulation time step.
Required derived parameter:
|KB|
Requi... | def calc_qbga_v1(self):
"""Perform the runoff concentration calculation for base flow.
The working equation is the analytical solution of the linear storage
equation under the assumption of constant change in inflow during
the simulation time step.
Required derived parameter:
|KB|
Requi... | [
"Perform",
"the",
"runoff",
"concentration",
"calculation",
"for",
"base",
"flow",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L1523-L1583 | [
"def",
"calc_qbga_v1",
"(",
"self",
")",
":",
"der",
"=",
"self",
".",
"parameters",
".",
"derived",
".",
"fastaccess",
"old",
"=",
"self",
".",
"sequences",
".",
"states",
".",
"fastaccess_old",
"new",
"=",
"self",
".",
"sequences",
".",
"states",
".",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_qiga1_v1 | Perform the runoff concentration calculation for the first
interflow component.
The working equation is the analytical solution of the linear storage
equation under the assumption of constant change in inflow during
the simulation time step.
Required derived parameter:
|KI1|
Required st... | hydpy/models/lland/lland_model.py | def calc_qiga1_v1(self):
"""Perform the runoff concentration calculation for the first
interflow component.
The working equation is the analytical solution of the linear storage
equation under the assumption of constant change in inflow during
the simulation time step.
Required derived paramet... | def calc_qiga1_v1(self):
"""Perform the runoff concentration calculation for the first
interflow component.
The working equation is the analytical solution of the linear storage
equation under the assumption of constant change in inflow during
the simulation time step.
Required derived paramet... | [
"Perform",
"the",
"runoff",
"concentration",
"calculation",
"for",
"the",
"first",
"interflow",
"component",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L1586-L1647 | [
"def",
"calc_qiga1_v1",
"(",
"self",
")",
":",
"der",
"=",
"self",
".",
"parameters",
".",
"derived",
".",
"fastaccess",
"old",
"=",
"self",
".",
"sequences",
".",
"states",
".",
"fastaccess_old",
"new",
"=",
"self",
".",
"sequences",
".",
"states",
".",... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_qiga2_v1 | Perform the runoff concentration calculation for the second
interflow component.
The working equation is the analytical solution of the linear storage
equation under the assumption of constant change in inflow during
the simulation time step.
Required derived parameter:
|KI2|
Required s... | hydpy/models/lland/lland_model.py | def calc_qiga2_v1(self):
"""Perform the runoff concentration calculation for the second
interflow component.
The working equation is the analytical solution of the linear storage
equation under the assumption of constant change in inflow during
the simulation time step.
Required derived parame... | def calc_qiga2_v1(self):
"""Perform the runoff concentration calculation for the second
interflow component.
The working equation is the analytical solution of the linear storage
equation under the assumption of constant change in inflow during
the simulation time step.
Required derived parame... | [
"Perform",
"the",
"runoff",
"concentration",
"calculation",
"for",
"the",
"second",
"interflow",
"component",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L1650-L1711 | [
"def",
"calc_qiga2_v1",
"(",
"self",
")",
":",
"der",
"=",
"self",
".",
"parameters",
".",
"derived",
".",
"fastaccess",
"old",
"=",
"self",
".",
"sequences",
".",
"states",
".",
"fastaccess_old",
"new",
"=",
"self",
".",
"sequences",
".",
"states",
".",... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_qdga1_v1 | Perform the runoff concentration calculation for "slow" direct runoff.
The working equation is the analytical solution of the linear storage
equation under the assumption of constant change in inflow during
the simulation time step.
Required derived parameter:
|KD1|
Required state sequence:... | hydpy/models/lland/lland_model.py | def calc_qdga1_v1(self):
"""Perform the runoff concentration calculation for "slow" direct runoff.
The working equation is the analytical solution of the linear storage
equation under the assumption of constant change in inflow during
the simulation time step.
Required derived parameter:
|KD... | def calc_qdga1_v1(self):
"""Perform the runoff concentration calculation for "slow" direct runoff.
The working equation is the analytical solution of the linear storage
equation under the assumption of constant change in inflow during
the simulation time step.
Required derived parameter:
|KD... | [
"Perform",
"the",
"runoff",
"concentration",
"calculation",
"for",
"slow",
"direct",
"runoff",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L1714-L1774 | [
"def",
"calc_qdga1_v1",
"(",
"self",
")",
":",
"der",
"=",
"self",
".",
"parameters",
".",
"derived",
".",
"fastaccess",
"old",
"=",
"self",
".",
"sequences",
".",
"states",
".",
"fastaccess_old",
"new",
"=",
"self",
".",
"sequences",
".",
"states",
".",... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_qdga2_v1 | Perform the runoff concentration calculation for "fast" direct runoff.
The working equation is the analytical solution of the linear storage
equation under the assumption of constant change in inflow during
the simulation time step.
Required derived parameter:
|KD2|
Required state sequence:... | hydpy/models/lland/lland_model.py | def calc_qdga2_v1(self):
"""Perform the runoff concentration calculation for "fast" direct runoff.
The working equation is the analytical solution of the linear storage
equation under the assumption of constant change in inflow during
the simulation time step.
Required derived parameter:
|KD... | def calc_qdga2_v1(self):
"""Perform the runoff concentration calculation for "fast" direct runoff.
The working equation is the analytical solution of the linear storage
equation under the assumption of constant change in inflow during
the simulation time step.
Required derived parameter:
|KD... | [
"Perform",
"the",
"runoff",
"concentration",
"calculation",
"for",
"fast",
"direct",
"runoff",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L1777-L1837 | [
"def",
"calc_qdga2_v1",
"(",
"self",
")",
":",
"der",
"=",
"self",
".",
"parameters",
".",
"derived",
".",
"fastaccess",
"old",
"=",
"self",
".",
"sequences",
".",
"states",
".",
"fastaccess_old",
"new",
"=",
"self",
".",
"sequences",
".",
"states",
".",... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_q_v1 | Calculate the final runoff.
Note that, in case there are water areas, their |NKor| values are
added and their |EvPo| values are subtracted from the "potential"
runoff value, if possible. This hold true for |WASSER| only and is
due to compatibility with the original LARSIM implementation. Using land
... | hydpy/models/lland/lland_model.py | def calc_q_v1(self):
"""Calculate the final runoff.
Note that, in case there are water areas, their |NKor| values are
added and their |EvPo| values are subtracted from the "potential"
runoff value, if possible. This hold true for |WASSER| only and is
due to compatibility with the original LARSIM i... | def calc_q_v1(self):
"""Calculate the final runoff.
Note that, in case there are water areas, their |NKor| values are
added and their |EvPo| values are subtracted from the "potential"
runoff value, if possible. This hold true for |WASSER| only and is
due to compatibility with the original LARSIM i... | [
"Calculate",
"the",
"final",
"runoff",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L1840-L2002 | [
"def",
"calc_q_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"sta",
"=",
"self",
".",
"sequences",
".",
"states",
".",
"fast... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | pass_q_v1 | Update the outlet link sequence.
Required derived parameter:
|QFactor|
Required flux sequences:
|lland_fluxes.Q|
Calculated flux sequence:
|lland_outlets.Q|
Basic equation:
:math:`Q_{outlets} = QFactor \\cdot Q_{fluxes}` | hydpy/models/lland/lland_model.py | def pass_q_v1(self):
"""Update the outlet link sequence.
Required derived parameter:
|QFactor|
Required flux sequences:
|lland_fluxes.Q|
Calculated flux sequence:
|lland_outlets.Q|
Basic equation:
:math:`Q_{outlets} = QFactor \\cdot Q_{fluxes}`
"""
der = self.par... | def pass_q_v1(self):
"""Update the outlet link sequence.
Required derived parameter:
|QFactor|
Required flux sequences:
|lland_fluxes.Q|
Calculated flux sequence:
|lland_outlets.Q|
Basic equation:
:math:`Q_{outlets} = QFactor \\cdot Q_{fluxes}`
"""
der = self.par... | [
"Update",
"the",
"outlet",
"link",
"sequence",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/lland/lland_model.py#L2005-L2023 | [
"def",
"pass_q_v1",
"(",
"self",
")",
":",
"der",
"=",
"self",
".",
"parameters",
".",
"derived",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"out",
"=",
"self",
".",
"sequences",
".",
"outlets",
".",
"fas... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | calc_outputs_v1 | Performs the actual interpolation or extrapolation.
Required control parameters:
|XPoints|
|YPoints|
Required derived parameter:
|NmbPoints|
|NmbBranches|
Required flux sequence:
|Input|
Calculated flux sequence:
|Outputs|
Examples:
As a simple examp... | hydpy/models/hbranch/hbranch_model.py | def calc_outputs_v1(self):
"""Performs the actual interpolation or extrapolation.
Required control parameters:
|XPoints|
|YPoints|
Required derived parameter:
|NmbPoints|
|NmbBranches|
Required flux sequence:
|Input|
Calculated flux sequence:
|Outputs|
Ex... | def calc_outputs_v1(self):
"""Performs the actual interpolation or extrapolation.
Required control parameters:
|XPoints|
|YPoints|
Required derived parameter:
|NmbPoints|
|NmbBranches|
Required flux sequence:
|Input|
Calculated flux sequence:
|Outputs|
Ex... | [
"Performs",
"the",
"actual",
"interpolation",
"or",
"extrapolation",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/hbranch/hbranch_model.py#L11-L94 | [
"def",
"calc_outputs_v1",
"(",
"self",
")",
":",
"con",
"=",
"self",
".",
"parameters",
".",
"control",
".",
"fastaccess",
"der",
"=",
"self",
".",
"parameters",
".",
"derived",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | pick_input_v1 | Updates |Input| based on |Total|. | hydpy/models/hbranch/hbranch_model.py | def pick_input_v1(self):
"""Updates |Input| based on |Total|."""
flu = self.sequences.fluxes.fastaccess
inl = self.sequences.inlets.fastaccess
flu.input = 0.
for idx in range(inl.len_total):
flu.input += inl.total[idx][0] | def pick_input_v1(self):
"""Updates |Input| based on |Total|."""
flu = self.sequences.fluxes.fastaccess
inl = self.sequences.inlets.fastaccess
flu.input = 0.
for idx in range(inl.len_total):
flu.input += inl.total[idx][0] | [
"Updates",
"|Input|",
"based",
"on",
"|Total|",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/hbranch/hbranch_model.py#L97-L103 | [
"def",
"pick_input_v1",
"(",
"self",
")",
":",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"inl",
"=",
"self",
".",
"sequences",
".",
"inlets",
".",
"fastaccess",
"flu",
".",
"input",
"=",
"0.",
"for",
"idx",
"in",
"range",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | pass_outputs_v1 | Updates |Branched| based on |Outputs|. | hydpy/models/hbranch/hbranch_model.py | def pass_outputs_v1(self):
"""Updates |Branched| based on |Outputs|."""
der = self.parameters.derived.fastaccess
flu = self.sequences.fluxes.fastaccess
out = self.sequences.outlets.fastaccess
for bdx in range(der.nmbbranches):
out.branched[bdx][0] += flu.outputs[bdx] | def pass_outputs_v1(self):
"""Updates |Branched| based on |Outputs|."""
der = self.parameters.derived.fastaccess
flu = self.sequences.fluxes.fastaccess
out = self.sequences.outlets.fastaccess
for bdx in range(der.nmbbranches):
out.branched[bdx][0] += flu.outputs[bdx] | [
"Updates",
"|Branched|",
"based",
"on",
"|Outputs|",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/hbranch/hbranch_model.py#L106-L112 | [
"def",
"pass_outputs_v1",
"(",
"self",
")",
":",
"der",
"=",
"self",
".",
"parameters",
".",
"derived",
".",
"fastaccess",
"flu",
"=",
"self",
".",
"sequences",
".",
"fluxes",
".",
"fastaccess",
"out",
"=",
"self",
".",
"sequences",
".",
"outlets",
".",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Model.connect | Connect the |LinkSequence| instances handled by the actual model
to the |NodeSequence| instances handled by one inlet node and
multiple oulet nodes.
The HydPy-H-Branch model passes multiple output values to different
outlet nodes. This requires additional information regarding the
... | hydpy/models/hbranch/hbranch_model.py | def connect(self):
"""Connect the |LinkSequence| instances handled by the actual model
to the |NodeSequence| instances handled by one inlet node and
multiple oulet nodes.
The HydPy-H-Branch model passes multiple output values to different
outlet nodes. This requires additional ... | def connect(self):
"""Connect the |LinkSequence| instances handled by the actual model
to the |NodeSequence| instances handled by one inlet node and
multiple oulet nodes.
The HydPy-H-Branch model passes multiple output values to different
outlet nodes. This requires additional ... | [
"Connect",
"the",
"|LinkSequence|",
"instances",
"handled",
"by",
"the",
"actual",
"model",
"to",
"the",
"|NodeSequence|",
"instances",
"handled",
"by",
"one",
"inlet",
"node",
"and",
"multiple",
"oulet",
"nodes",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/hbranch/hbranch_model.py#L125-L193 | [
"def",
"connect",
"(",
"self",
")",
":",
"nodes",
"=",
"self",
".",
"element",
".",
"inlets",
"total",
"=",
"self",
".",
"sequences",
".",
"inlets",
".",
"total",
"if",
"total",
".",
"shape",
"!=",
"(",
"len",
"(",
"nodes",
")",
",",
")",
":",
"t... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Nmb.update | Determine the number of response functions.
>>> from hydpy.models.arma import *
>>> parameterstep('1d')
>>> responses(((1., 2.), (1.,)), th_3=((1.,), (1., 2., 3.)))
>>> derived.nmb.update()
>>> derived.nmb
nmb(2)
Note that updating parameter `nmb` sets the shape... | hydpy/models/arma/arma_derived.py | def update(self):
"""Determine the number of response functions.
>>> from hydpy.models.arma import *
>>> parameterstep('1d')
>>> responses(((1., 2.), (1.,)), th_3=((1.,), (1., 2., 3.)))
>>> derived.nmb.update()
>>> derived.nmb
nmb(2)
Note that updating p... | def update(self):
"""Determine the number of response functions.
>>> from hydpy.models.arma import *
>>> parameterstep('1d')
>>> responses(((1., 2.), (1.,)), th_3=((1.,), (1., 2., 3.)))
>>> derived.nmb.update()
>>> derived.nmb
nmb(2)
Note that updating p... | [
"Determine",
"the",
"number",
"of",
"response",
"functions",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/arma/arma_derived.py#L16-L45 | [
"def",
"update",
"(",
"self",
")",
":",
"pars",
"=",
"self",
".",
"subpars",
".",
"pars",
"responses",
"=",
"pars",
".",
"control",
".",
"responses",
"fluxes",
"=",
"pars",
".",
"model",
".",
"sequences",
".",
"fluxes",
"self",
"(",
"len",
"(",
"resp... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | AR_Order.update | Determine the total number of AR coefficients.
>>> from hydpy.models.arma import *
>>> parameterstep('1d')
>>> responses(((1., 2.), (1.,)), th_3=((1.,), (1., 2., 3.)))
>>> derived.ar_order.update()
>>> derived.ar_order
ar_order(2, 1) | hydpy/models/arma/arma_derived.py | def update(self):
"""Determine the total number of AR coefficients.
>>> from hydpy.models.arma import *
>>> parameterstep('1d')
>>> responses(((1., 2.), (1.,)), th_3=((1.,), (1., 2., 3.)))
>>> derived.ar_order.update()
>>> derived.ar_order
ar_order(2, 1)
... | def update(self):
"""Determine the total number of AR coefficients.
>>> from hydpy.models.arma import *
>>> parameterstep('1d')
>>> responses(((1., 2.), (1.,)), th_3=((1.,), (1., 2., 3.)))
>>> derived.ar_order.update()
>>> derived.ar_order
ar_order(2, 1)
... | [
"Determine",
"the",
"total",
"number",
"of",
"AR",
"coefficients",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/arma/arma_derived.py#L94-L106 | [
"def",
"update",
"(",
"self",
")",
":",
"responses",
"=",
"self",
".",
"subpars",
".",
"pars",
".",
"control",
".",
"responses",
"self",
".",
"shape",
"=",
"len",
"(",
"responses",
")",
"self",
"(",
"responses",
".",
"ar_orders",
")"
] | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | AR_Coefs.update | Determine all AR coefficients.
>>> from hydpy.models.arma import *
>>> parameterstep('1d')
>>> responses(((1., 2.), (1.,)), th_3=((1.,), (1., 2., 3.)))
>>> derived.ar_coefs.update()
>>> derived.ar_coefs
ar_coefs([[1.0, 2.0],
[1.0, nan]])
Note t... | hydpy/models/arma/arma_derived.py | def update(self):
"""Determine all AR coefficients.
>>> from hydpy.models.arma import *
>>> parameterstep('1d')
>>> responses(((1., 2.), (1.,)), th_3=((1.,), (1., 2., 3.)))
>>> derived.ar_coefs.update()
>>> derived.ar_coefs
ar_coefs([[1.0, 2.0],
... | def update(self):
"""Determine all AR coefficients.
>>> from hydpy.models.arma import *
>>> parameterstep('1d')
>>> responses(((1., 2.), (1.,)), th_3=((1.,), (1., 2., 3.)))
>>> derived.ar_coefs.update()
>>> derived.ar_coefs
ar_coefs([[1.0, 2.0],
... | [
"Determine",
"all",
"AR",
"coefficients",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/arma/arma_derived.py#L132-L154 | [
"def",
"update",
"(",
"self",
")",
":",
"pars",
"=",
"self",
".",
"subpars",
".",
"pars",
"coefs",
"=",
"pars",
".",
"control",
".",
"responses",
".",
"ar_coefs",
"self",
".",
"shape",
"=",
"coefs",
".",
"shape",
"self",
"(",
"coefs",
")",
"pars",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | MA_Coefs.update | Determine all MA coefficients.
>>> from hydpy.models.arma import *
>>> parameterstep('1d')
>>> responses(((1., 2.), (1.,)), th_3=((1.,), (1., 2., 3.)))
>>> derived.ma_coefs.update()
>>> derived.ma_coefs
ma_coefs([[1.0, nan, nan],
[1.0, 2.0, 3.0]])
... | hydpy/models/arma/arma_derived.py | def update(self):
"""Determine all MA coefficients.
>>> from hydpy.models.arma import *
>>> parameterstep('1d')
>>> responses(((1., 2.), (1.,)), th_3=((1.,), (1., 2., 3.)))
>>> derived.ma_coefs.update()
>>> derived.ma_coefs
ma_coefs([[1.0, nan, nan],
... | def update(self):
"""Determine all MA coefficients.
>>> from hydpy.models.arma import *
>>> parameterstep('1d')
>>> responses(((1., 2.), (1.,)), th_3=((1.,), (1., 2., 3.)))
>>> derived.ma_coefs.update()
>>> derived.ma_coefs
ma_coefs([[1.0, nan, nan],
... | [
"Determine",
"all",
"MA",
"coefficients",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/models/arma/arma_derived.py#L161-L183 | [
"def",
"update",
"(",
"self",
")",
":",
"pars",
"=",
"self",
".",
"subpars",
".",
"pars",
"coefs",
"=",
"pars",
".",
"control",
".",
"responses",
".",
"ma_coefs",
"self",
".",
"shape",
"=",
"coefs",
".",
"shape",
"self",
"(",
"coefs",
")",
"pars",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | _prepare_docstrings | Assign docstrings to the corresponding attributes of class `Options`
to make them available in the interactive mode of Python. | hydpy/core/optiontools.py | def _prepare_docstrings():
"""Assign docstrings to the corresponding attributes of class `Options`
to make them available in the interactive mode of Python."""
if config.USEAUTODOC:
source = inspect.getsource(Options)
docstrings = source.split('"""')[3::2]
attributes = [line.strip()... | def _prepare_docstrings():
"""Assign docstrings to the corresponding attributes of class `Options`
to make them available in the interactive mode of Python."""
if config.USEAUTODOC:
source = inspect.getsource(Options)
docstrings = source.split('"""')[3::2]
attributes = [line.strip()... | [
"Assign",
"docstrings",
"to",
"the",
"corresponding",
"attributes",
"of",
"class",
"Options",
"to",
"make",
"them",
"available",
"in",
"the",
"interactive",
"mode",
"of",
"Python",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/optiontools.py#L211-L220 | [
"def",
"_prepare_docstrings",
"(",
")",
":",
"if",
"config",
".",
"USEAUTODOC",
":",
"source",
"=",
"inspect",
".",
"getsource",
"(",
"Options",
")",
"docstrings",
"=",
"source",
".",
"split",
"(",
"'\"\"\"'",
")",
"[",
"3",
":",
":",
"2",
"]",
"attrib... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Selections.nodes | A |set| containing the |Node| objects of all handled
|Selection| objects.
>>> from hydpy import Selection, Selections
>>> selections = Selections(
... Selection('sel1', ['node1', 'node2'], ['element1']),
... Selection('sel2', ['node1', 'node3'], ['element2']))
>>... | hydpy/core/selectiontools.py | def nodes(self) -> devicetools.Nodes:
"""A |set| containing the |Node| objects of all handled
|Selection| objects.
>>> from hydpy import Selection, Selections
>>> selections = Selections(
... Selection('sel1', ['node1', 'node2'], ['element1']),
... Selection('sel... | def nodes(self) -> devicetools.Nodes:
"""A |set| containing the |Node| objects of all handled
|Selection| objects.
>>> from hydpy import Selection, Selections
>>> selections = Selections(
... Selection('sel1', ['node1', 'node2'], ['element1']),
... Selection('sel... | [
"A",
"|set|",
"containing",
"the",
"|Node|",
"objects",
"of",
"all",
"handled",
"|Selection|",
"objects",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/selectiontools.py#L160-L174 | [
"def",
"nodes",
"(",
"self",
")",
"->",
"devicetools",
".",
"Nodes",
":",
"nodes",
"=",
"devicetools",
".",
"Nodes",
"(",
")",
"for",
"selection",
"in",
"self",
":",
"nodes",
"+=",
"selection",
".",
"nodes",
"return",
"nodes"
] | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Selections.elements | A |set| containing the |Node| objects of all handled
|Selection| objects.
>>> from hydpy import Selection, Selections
>>> selections = Selections(
... Selection('sel1', ['node1'], ['element1']),
... Selection('sel2', ['node1'], ['element2', 'element3']))
>>> sele... | hydpy/core/selectiontools.py | def elements(self) -> devicetools.Elements:
"""A |set| containing the |Node| objects of all handled
|Selection| objects.
>>> from hydpy import Selection, Selections
>>> selections = Selections(
... Selection('sel1', ['node1'], ['element1']),
... Selection('sel2',... | def elements(self) -> devicetools.Elements:
"""A |set| containing the |Node| objects of all handled
|Selection| objects.
>>> from hydpy import Selection, Selections
>>> selections = Selections(
... Selection('sel1', ['node1'], ['element1']),
... Selection('sel2',... | [
"A",
"|set|",
"containing",
"the",
"|Node|",
"objects",
"of",
"all",
"handled",
"|Selection|",
"objects",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/selectiontools.py#L177-L191 | [
"def",
"elements",
"(",
"self",
")",
"->",
"devicetools",
".",
"Elements",
":",
"elements",
"=",
"devicetools",
".",
"Elements",
"(",
")",
"for",
"selection",
"in",
"self",
":",
"elements",
"+=",
"selection",
".",
"elements",
"return",
"elements"
] | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Selections.__getiterable | Try to convert the given argument to a |list| of |Selection|
objects and return it. | hydpy/core/selectiontools.py | def __getiterable(value): # ToDo: refactor
"""Try to convert the given argument to a |list| of |Selection|
objects and return it.
"""
if isinstance(value, Selection):
return [value]
try:
for selection in value:
if not isinstance(selectio... | def __getiterable(value): # ToDo: refactor
"""Try to convert the given argument to a |list| of |Selection|
objects and return it.
"""
if isinstance(value, Selection):
return [value]
try:
for selection in value:
if not isinstance(selectio... | [
"Try",
"to",
"convert",
"the",
"given",
"argument",
"to",
"a",
"|list|",
"of",
"|Selection|",
"objects",
"and",
"return",
"it",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/selectiontools.py#L237-L253 | [
"def",
"__getiterable",
"(",
"value",
")",
":",
"# ToDo: refactor",
"if",
"isinstance",
"(",
"value",
",",
"Selection",
")",
":",
"return",
"[",
"value",
"]",
"try",
":",
"for",
"selection",
"in",
"value",
":",
"if",
"not",
"isinstance",
"(",
"selection",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Selections.assignrepr | Return a |repr| string with a prefixed assignment. | hydpy/core/selectiontools.py | def assignrepr(self, prefix='') -> str:
"""Return a |repr| string with a prefixed assignment."""
with objecttools.repr_.preserve_strings(True):
with hydpy.pub.options.ellipsis(2, optional=True):
prefix += '%s(' % objecttools.classname(self)
repr_ = objecttools... | def assignrepr(self, prefix='') -> str:
"""Return a |repr| string with a prefixed assignment."""
with objecttools.repr_.preserve_strings(True):
with hydpy.pub.options.ellipsis(2, optional=True):
prefix += '%s(' % objecttools.classname(self)
repr_ = objecttools... | [
"Return",
"a",
"|repr|",
"string",
"with",
"a",
"prefixed",
"assignment",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/selectiontools.py#L303-L310 | [
"def",
"assignrepr",
"(",
"self",
",",
"prefix",
"=",
"''",
")",
"->",
"str",
":",
"with",
"objecttools",
".",
"repr_",
".",
"preserve_strings",
"(",
"True",
")",
":",
"with",
"hydpy",
".",
"pub",
".",
"options",
".",
"ellipsis",
"(",
"2",
",",
"opti... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Selection.search_upstream | Return the network upstream of the given starting point, including
the starting point itself.
>>> from hydpy.core.examples import prepare_full_example_2
>>> hp, pub, _ = prepare_full_example_2()
You can pass both |Node| and |Element| objects and, optionally,
the name of the new... | hydpy/core/selectiontools.py | def search_upstream(self, device: devicetools.Device,
name: str = 'upstream') -> 'Selection':
"""Return the network upstream of the given starting point, including
the starting point itself.
>>> from hydpy.core.examples import prepare_full_example_2
>>> hp, pub, ... | def search_upstream(self, device: devicetools.Device,
name: str = 'upstream') -> 'Selection':
"""Return the network upstream of the given starting point, including
the starting point itself.
>>> from hydpy.core.examples import prepare_full_example_2
>>> hp, pub, ... | [
"Return",
"the",
"network",
"upstream",
"of",
"the",
"given",
"starting",
"point",
"including",
"the",
"starting",
"point",
"itself",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/selectiontools.py#L434-L517 | [
"def",
"search_upstream",
"(",
"self",
",",
"device",
":",
"devicetools",
".",
"Device",
",",
"name",
":",
"str",
"=",
"'upstream'",
")",
"->",
"'Selection'",
":",
"try",
":",
"selection",
"=",
"Selection",
"(",
"name",
")",
"if",
"isinstance",
"(",
"dev... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Selection.select_upstream | Restrict the current selection to the network upstream of the given
starting point, including the starting point itself.
See the documentation on method |Selection.search_upstream| for
additional information. | hydpy/core/selectiontools.py | def select_upstream(self, device: devicetools.Device) -> 'Selection':
"""Restrict the current selection to the network upstream of the given
starting point, including the starting point itself.
See the documentation on method |Selection.search_upstream| for
additional information.
... | def select_upstream(self, device: devicetools.Device) -> 'Selection':
"""Restrict the current selection to the network upstream of the given
starting point, including the starting point itself.
See the documentation on method |Selection.search_upstream| for
additional information.
... | [
"Restrict",
"the",
"current",
"selection",
"to",
"the",
"network",
"upstream",
"of",
"the",
"given",
"starting",
"point",
"including",
"the",
"starting",
"point",
"itself",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/selectiontools.py#L533-L543 | [
"def",
"select_upstream",
"(",
"self",
",",
"device",
":",
"devicetools",
".",
"Device",
")",
"->",
"'Selection'",
":",
"upstream",
"=",
"self",
".",
"search_upstream",
"(",
"device",
")",
"self",
".",
"nodes",
"=",
"upstream",
".",
"nodes",
"self",
".",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Selection.search_modeltypes | Return a |Selection| object containing only the elements
currently handling models of the given types.
>>> from hydpy.core.examples import prepare_full_example_2
>>> hp, pub, _ = prepare_full_example_2()
You can pass both |Model| objects and names and, as a keyword
argument, th... | hydpy/core/selectiontools.py | def search_modeltypes(self, *models: ModelTypesArg,
name: str = 'modeltypes') -> 'Selection':
"""Return a |Selection| object containing only the elements
currently handling models of the given types.
>>> from hydpy.core.examples import prepare_full_example_2
>>... | def search_modeltypes(self, *models: ModelTypesArg,
name: str = 'modeltypes') -> 'Selection':
"""Return a |Selection| object containing only the elements
currently handling models of the given types.
>>> from hydpy.core.examples import prepare_full_example_2
>>... | [
"Return",
"a",
"|Selection|",
"object",
"containing",
"only",
"the",
"elements",
"currently",
"handling",
"models",
"of",
"the",
"given",
"types",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/selectiontools.py#L559-L635 | [
"def",
"search_modeltypes",
"(",
"self",
",",
"*",
"models",
":",
"ModelTypesArg",
",",
"name",
":",
"str",
"=",
"'modeltypes'",
")",
"->",
"'Selection'",
":",
"try",
":",
"typelist",
"=",
"[",
"]",
"for",
"model",
"in",
"models",
":",
"if",
"not",
"is... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Selection.select_modeltypes | Restrict the current |Selection| object to all elements
containing the given model types (removes all nodes).
See the documentation on method |Selection.search_modeltypes| for
additional information. | hydpy/core/selectiontools.py | def select_modeltypes(self, *models: ModelTypesArg) -> 'Selection':
"""Restrict the current |Selection| object to all elements
containing the given model types (removes all nodes).
See the documentation on method |Selection.search_modeltypes| for
additional information.
"""
... | def select_modeltypes(self, *models: ModelTypesArg) -> 'Selection':
"""Restrict the current |Selection| object to all elements
containing the given model types (removes all nodes).
See the documentation on method |Selection.search_modeltypes| for
additional information.
"""
... | [
"Restrict",
"the",
"current",
"|Selection|",
"object",
"to",
"all",
"elements",
"containing",
"the",
"given",
"model",
"types",
"(",
"removes",
"all",
"nodes",
")",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/selectiontools.py#L637-L646 | [
"def",
"select_modeltypes",
"(",
"self",
",",
"*",
"models",
":",
"ModelTypesArg",
")",
"->",
"'Selection'",
":",
"self",
".",
"nodes",
"=",
"devicetools",
".",
"Nodes",
"(",
")",
"self",
".",
"elements",
"=",
"self",
".",
"search_modeltypes",
"(",
"*",
... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Selection.search_nodenames | Return a new selection containing all nodes of the current
selection with a name containing at least one of the given substrings.
>>> from hydpy.core.examples import prepare_full_example_2
>>> hp, pub, _ = prepare_full_example_2()
Pass the (sub)strings as positional arguments and, opti... | hydpy/core/selectiontools.py | def search_nodenames(self, *substrings: str, name: str = 'nodenames') -> \
'Selection':
"""Return a new selection containing all nodes of the current
selection with a name containing at least one of the given substrings.
>>> from hydpy.core.examples import prepare_full_example_2
... | def search_nodenames(self, *substrings: str, name: str = 'nodenames') -> \
'Selection':
"""Return a new selection containing all nodes of the current
selection with a name containing at least one of the given substrings.
>>> from hydpy.core.examples import prepare_full_example_2
... | [
"Return",
"a",
"new",
"selection",
"containing",
"all",
"nodes",
"of",
"the",
"current",
"selection",
"with",
"a",
"name",
"containing",
"at",
"least",
"one",
"of",
"the",
"given",
"substrings",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/selectiontools.py#L659-L721 | [
"def",
"search_nodenames",
"(",
"self",
",",
"*",
"substrings",
":",
"str",
",",
"name",
":",
"str",
"=",
"'nodenames'",
")",
"->",
"'Selection'",
":",
"try",
":",
"selection",
"=",
"Selection",
"(",
"name",
")",
"for",
"node",
"in",
"self",
".",
"node... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Selection.select_nodenames | Restrict the current selection to all nodes with a name
containing at least one of the given substrings (does not
affect any elements).
See the documentation on method |Selection.search_nodenames| for
additional information. | hydpy/core/selectiontools.py | def select_nodenames(self, *substrings: str) -> 'Selection':
"""Restrict the current selection to all nodes with a name
containing at least one of the given substrings (does not
affect any elements).
See the documentation on method |Selection.search_nodenames| for
additional in... | def select_nodenames(self, *substrings: str) -> 'Selection':
"""Restrict the current selection to all nodes with a name
containing at least one of the given substrings (does not
affect any elements).
See the documentation on method |Selection.search_nodenames| for
additional in... | [
"Restrict",
"the",
"current",
"selection",
"to",
"all",
"nodes",
"with",
"a",
"name",
"containing",
"at",
"least",
"one",
"of",
"the",
"given",
"substrings",
"(",
"does",
"not",
"affect",
"any",
"elements",
")",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/selectiontools.py#L723-L732 | [
"def",
"select_nodenames",
"(",
"self",
",",
"*",
"substrings",
":",
"str",
")",
"->",
"'Selection'",
":",
"self",
".",
"nodes",
"=",
"self",
".",
"search_nodenames",
"(",
"*",
"substrings",
")",
".",
"nodes",
"return",
"self"
] | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Selection.deselect_nodenames | Restrict the current selection to all nodes with a name
not containing at least one of the given substrings (does not
affect any elements).
See the documentation on method |Selection.search_nodenames| for
additional information. | hydpy/core/selectiontools.py | def deselect_nodenames(self, *substrings: str) -> 'Selection':
"""Restrict the current selection to all nodes with a name
not containing at least one of the given substrings (does not
affect any elements).
See the documentation on method |Selection.search_nodenames| for
addition... | def deselect_nodenames(self, *substrings: str) -> 'Selection':
"""Restrict the current selection to all nodes with a name
not containing at least one of the given substrings (does not
affect any elements).
See the documentation on method |Selection.search_nodenames| for
addition... | [
"Restrict",
"the",
"current",
"selection",
"to",
"all",
"nodes",
"with",
"a",
"name",
"not",
"containing",
"at",
"least",
"one",
"of",
"the",
"given",
"substrings",
"(",
"does",
"not",
"affect",
"any",
"elements",
")",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/selectiontools.py#L734-L743 | [
"def",
"deselect_nodenames",
"(",
"self",
",",
"*",
"substrings",
":",
"str",
")",
"->",
"'Selection'",
":",
"self",
".",
"nodes",
"-=",
"self",
".",
"search_nodenames",
"(",
"*",
"substrings",
")",
".",
"nodes",
"return",
"self"
] | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Selection.search_elementnames | Return a new selection containing all elements of the current
selection with a name containing at least one of the given substrings.
>>> from hydpy.core.examples import prepare_full_example_2
>>> hp, pub, _ = prepare_full_example_2()
Pass the (sub)strings as positional arguments and, o... | hydpy/core/selectiontools.py | def search_elementnames(self, *substrings: str,
name: str = 'elementnames') -> 'Selection':
"""Return a new selection containing all elements of the current
selection with a name containing at least one of the given substrings.
>>> from hydpy.core.examples import pre... | def search_elementnames(self, *substrings: str,
name: str = 'elementnames') -> 'Selection':
"""Return a new selection containing all elements of the current
selection with a name containing at least one of the given substrings.
>>> from hydpy.core.examples import pre... | [
"Return",
"a",
"new",
"selection",
"containing",
"all",
"elements",
"of",
"the",
"current",
"selection",
"with",
"a",
"name",
"containing",
"at",
"least",
"one",
"of",
"the",
"given",
"substrings",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/selectiontools.py#L745-L806 | [
"def",
"search_elementnames",
"(",
"self",
",",
"*",
"substrings",
":",
"str",
",",
"name",
":",
"str",
"=",
"'elementnames'",
")",
"->",
"'Selection'",
":",
"try",
":",
"selection",
"=",
"Selection",
"(",
"name",
")",
"for",
"element",
"in",
"self",
"."... | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Selection.select_elementnames | Restrict the current selection to all elements with a name
containing at least one of the given substrings (does not
affect any nodes).
See the documentation on method |Selection.search_elementnames| for
additional information. | hydpy/core/selectiontools.py | def select_elementnames(self, *substrings: str) -> 'Selection':
"""Restrict the current selection to all elements with a name
containing at least one of the given substrings (does not
affect any nodes).
See the documentation on method |Selection.search_elementnames| for
addition... | def select_elementnames(self, *substrings: str) -> 'Selection':
"""Restrict the current selection to all elements with a name
containing at least one of the given substrings (does not
affect any nodes).
See the documentation on method |Selection.search_elementnames| for
addition... | [
"Restrict",
"the",
"current",
"selection",
"to",
"all",
"elements",
"with",
"a",
"name",
"containing",
"at",
"least",
"one",
"of",
"the",
"given",
"substrings",
"(",
"does",
"not",
"affect",
"any",
"nodes",
")",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/selectiontools.py#L808-L817 | [
"def",
"select_elementnames",
"(",
"self",
",",
"*",
"substrings",
":",
"str",
")",
"->",
"'Selection'",
":",
"self",
".",
"elements",
"=",
"self",
".",
"search_elementnames",
"(",
"*",
"substrings",
")",
".",
"elements",
"return",
"self"
] | 1bc6a82cf30786521d86b36e27900c6717d3348d |
train | Selection.deselect_elementnames | Restrict the current selection to all elements with a name
not containing at least one of the given substrings. (does
not affect any nodes).
See the documentation on method |Selection.search_elementnames| for
additional information. | hydpy/core/selectiontools.py | def deselect_elementnames(self, *substrings: str) -> 'Selection':
"""Restrict the current selection to all elements with a name
not containing at least one of the given substrings. (does
not affect any nodes).
See the documentation on method |Selection.search_elementnames| for
... | def deselect_elementnames(self, *substrings: str) -> 'Selection':
"""Restrict the current selection to all elements with a name
not containing at least one of the given substrings. (does
not affect any nodes).
See the documentation on method |Selection.search_elementnames| for
... | [
"Restrict",
"the",
"current",
"selection",
"to",
"all",
"elements",
"with",
"a",
"name",
"not",
"containing",
"at",
"least",
"one",
"of",
"the",
"given",
"substrings",
".",
"(",
"does",
"not",
"affect",
"any",
"nodes",
")",
"."
] | hydpy-dev/hydpy | python | https://github.com/hydpy-dev/hydpy/blob/1bc6a82cf30786521d86b36e27900c6717d3348d/hydpy/core/selectiontools.py#L819-L828 | [
"def",
"deselect_elementnames",
"(",
"self",
",",
"*",
"substrings",
":",
"str",
")",
"->",
"'Selection'",
":",
"self",
".",
"elements",
"-=",
"self",
".",
"search_elementnames",
"(",
"*",
"substrings",
")",
".",
"elements",
"return",
"self"
] | 1bc6a82cf30786521d86b36e27900c6717d3348d |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.