sentence1
stringlengths
52
3.87M
sentence2
stringlengths
1
47.2k
label
stringclasses
1 value
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. Required control parameters: |NHRU| |Lnk| |TRefT| |TRefN| Required flux sequence: |EvPo| Calculated flux sequence: |EvI| Updated state sequence: |Inzp| Basic equatio...
entailment
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. 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 ...
entailment
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. 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...
entailment
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. Required control parameters: |NHRU| |Lnk| Required flux sequences: |SBes| |WGTF| Calculated flux sequence: |Schm| Updated state sequence: |WATS| Basic equations: :math:`\\frac{dWATS}{dt...
entailment
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. 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 - ...
entailment
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. Required control parameters: |NHRU| |Lnk| |NFk| |GrasRef_R| Required state sequence: |BoWa| Required flux sequences: |EvPo| |EvI| Calculated flux sequence: |EvB| Basic equations: :math:...
entailment
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. Required control parameters: |NHRU| |Lnk| |Beta| |FBeta| Required derived parameter: |WB| |WZ| Required state sequence: |BoWa| Calculated flux sequence: |QBB| Basic equations: :math:`...
entailment
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. Required control parameters: |NHRU| |Lnk| |NFk| |DMin| Required derived parameter: |WB| Required state sequence: |BoWa| Calculated flux sequence: |QIB1| Basic equation: :math:`QIB1 = DMi...
entailment
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. Required control parameters: |NHRU| |Lnk| |NFk| |DMin| |DMax| Required derived parameter: |WZ| Required state sequence: |BoWa| Calculated flux sequence: |QIB2| Basic equation: :mat...
entailment
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. 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 ...
entailment
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. Required control parameters: |NHRU| |Lnk| Required flux sequence: |WaDa| Updated state sequence: |BoWa| Required (and eventually corrected) flux sequences: |EvB| |QBB| |QIB1| |QIB2| |QDB| ...
entailment
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|. 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...
entailment
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. Required control parameters: |NHRU| |FHRU| Required flux sequence: |QIB1| Calculated state sequence: |QIGZ1| Basic equation: :math:`QIGZ1 = \\Sigma(FHRU \\cdot QIB1)` Example: ...
entailment
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. Required control parameters: |NHRU| |FHRU| Required flux sequence: |QIB2| Calculated state sequence: |QIGZ2| Basic equation: :math:`QIGZ2 = \\Sigma(FHRU \\cdot QIB2)` Example: ...
entailment
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. Required control parameters: |Lnk| |NHRU| |FHRU| Required flux sequence: |QDB| |NKor| |EvI| Calculated flux sequence: |QDGZ| Basic equation: :math:`QDGZ = \\Sigma(FHRU \\cdot QDB) + ...
entailment
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. 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...
entailment
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. 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|...
entailment
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. 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...
entailment
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. 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...
entailment
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. 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:...
entailment
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. 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:...
entailment
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. 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 ...
entailment
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. 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}`
entailment
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. Required control parameters: |XPoints| |YPoints| Required derived parameter: |NmbPoints| |NmbBranches| Required flux sequence: |Input| Calculated flux sequence: |Outputs| Examples: As a simple examp...
entailment
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|.
entailment
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|.
entailment
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. The HydPy-H-Branch model passes multiple output values to different outlet nodes. This requires additional information regarding the ...
entailment
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. >>> 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...
entailment
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. >>> 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)
entailment
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. >>> 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...
entailment
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. >>> 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]]) ...
entailment
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.
entailment
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. >>> from hydpy import Selection, Selections >>> selections = Selections( ... Selection('sel1', ['node1', 'node2'], ['element1']), ... Selection('sel2', ['node1', 'node3'], ['element2'])) >>...
entailment
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. >>> from hydpy import Selection, Selections >>> selections = Selections( ... Selection('sel1', ['node1'], ['element1']), ... Selection('sel2', ['node1'], ['element2', 'element3'])) >>> sele...
entailment
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.
entailment
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.
entailment
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. >>> 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...
entailment
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. See the documentation on method |Selection.search_upstream| for additional information.
entailment
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. >>> 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...
entailment
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). See the documentation on method |Selection.search_modeltypes| for additional information.
entailment
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. >>> from hydpy.core.examples import prepare_full_example_2 >>> hp, pub, _ = prepare_full_example_2() Pass the (sub)strings as positional arguments and, opti...
entailment
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). See the documentation on method |Selection.search_nodenames| for additional information.
entailment
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). See the documentation on method |Selection.search_nodenames| for additional information.
entailment
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. >>> from hydpy.core.examples import prepare_full_example_2 >>> hp, pub, _ = prepare_full_example_2() Pass the (sub)strings as positional arguments and, o...
entailment
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). See the documentation on method |Selection.search_elementnames| for additional information.
entailment
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). See the documentation on method |Selection.search_elementnames| for additional information.
entailment
def copy(self, name: str) -> 'Selection': """Return a new |Selection| object with the given name and copies of the handles |Nodes| and |Elements| objects based on method |Devices.copy|.""" return type(self)(name, copy.copy(self.nodes), copy.copy(self.elements))
Return a new |Selection| object with the given name and copies of the handles |Nodes| and |Elements| objects based on method |Devices.copy|.
entailment
def save_networkfile(self, filepath: Union[str, None] = None, write_nodes: bool = True) -> None: """Save the selection as a network file. >>> from hydpy.core.examples import prepare_full_example_2 >>> _, pub, TestIO = prepare_full_example_2() In most cases, one...
Save the selection as a network file. >>> from hydpy.core.examples import prepare_full_example_2 >>> _, pub, TestIO = prepare_full_example_2() In most cases, one should conveniently write network files via method |NetworkManager.save_files| of class |NetworkManager|. However, ...
entailment
def assignrepr(self, prefix: str) -> str: """Return a |repr| string with a prefixed assignment.""" with objecttools.repr_.preserve_strings(True): with hydpy.pub.options.ellipsis(2, optional=True): with objecttools.assignrepr_tuple.always_bracketed(False): ...
Return a |repr| string with a prefixed assignment.
entailment
def calc_qpin_v1(self): """Calculate the input discharge portions of the different response functions. Required derived parameters: |Nmb| |MaxQ| |DiffQ| Required flux sequence: |QIn| Calculated flux sequences: |QPIn| Examples: Initialize an arma model w...
Calculate the input discharge portions of the different response functions. Required derived parameters: |Nmb| |MaxQ| |DiffQ| Required flux sequence: |QIn| Calculated flux sequences: |QPIn| Examples: Initialize an arma model with three different response fu...
entailment
def calc_login_v1(self): """Refresh the input log sequence for the different MA processes. Required derived parameters: |Nmb| |MA_Order| Required flux sequence: |QPIn| Updated log sequence: |LogIn| Example: Assume there are three response functions, involving one...
Refresh the input log sequence for the different MA processes. Required derived parameters: |Nmb| |MA_Order| Required flux sequence: |QPIn| Updated log sequence: |LogIn| Example: Assume there are three response functions, involving one, two and three MA coeff...
entailment
def calc_qma_v1(self): """Calculate the discharge responses of the different MA processes. Required derived parameters: |Nmb| |MA_Order| |MA_Coefs| Required log sequence: |LogIn| Calculated flux sequence: |QMA| Examples: Assume there are three response func...
Calculate the discharge responses of the different MA processes. Required derived parameters: |Nmb| |MA_Order| |MA_Coefs| Required log sequence: |LogIn| Calculated flux sequence: |QMA| Examples: Assume there are three response functions, involving one, two and ...
entailment
def calc_qar_v1(self): """Calculate the discharge responses of the different AR processes. Required derived parameters: |Nmb| |AR_Order| |AR_Coefs| Required log sequence: |LogOut| Calculated flux sequence: |QAR| Examples: Assume there are four response func...
Calculate the discharge responses of the different AR processes. Required derived parameters: |Nmb| |AR_Order| |AR_Coefs| Required log sequence: |LogOut| Calculated flux sequence: |QAR| Examples: Assume there are four response functions, involving zero, one, tw...
entailment
def calc_qpout_v1(self): """Calculate the ARMA results for the different response functions. Required derived parameter: |Nmb| Required flux sequences: |QMA| |QAR| Calculated flux sequence: |QPOut| Examples: Initialize an arma model with three different response ...
Calculate the ARMA results for the different response functions. Required derived parameter: |Nmb| Required flux sequences: |QMA| |QAR| Calculated flux sequence: |QPOut| Examples: Initialize an arma model with three different response functions: >>> from hyd...
entailment
def calc_logout_v1(self): """Refresh the log sequence for the different AR processes. Required derived parameters: |Nmb| |AR_Order| Required flux sequence: |QPOut| Updated log sequence: |LogOut| Example: Assume there are four response functions, involving zero, o...
Refresh the log sequence for the different AR processes. Required derived parameters: |Nmb| |AR_Order| Required flux sequence: |QPOut| Updated log sequence: |LogOut| Example: Assume there are four response functions, involving zero, one, two and three AR coef...
entailment
def calc_qout_v1(self): """Sum up the results of the different response functions. Required derived parameter: |Nmb| Required flux sequences: |QPOut| Calculated flux sequence: |QOut| Examples: Initialize an arma model with three different response functions: >...
Sum up the results of the different response functions. Required derived parameter: |Nmb| Required flux sequences: |QPOut| Calculated flux sequence: |QOut| Examples: Initialize an arma model with three different response functions: >>> from hydpy.models.arma impor...
entailment
def pick_q_v1(self): """Update inflow.""" flu = self.sequences.fluxes.fastaccess inl = self.sequences.inlets.fastaccess flu.qin = 0. for idx in range(inl.len_q): flu.qin += inl.q[idx][0]
Update inflow.
entailment
def update(self): """Determine the number of branches""" con = self.subpars.pars.control self(con.ypoints.shape[0])
Determine the number of branches
entailment
def update(self): """Update value based on :math:`HV=BBV/BNV`. Required Parameters: |BBV| |BNV| Examples: >>> from hydpy.models.lstream import * >>> parameterstep('1d') >>> bbv(left=10., right=40.) >>> bnv(left=10., right=...
Update value based on :math:`HV=BBV/BNV`. Required Parameters: |BBV| |BNV| Examples: >>> from hydpy.models.lstream import * >>> parameterstep('1d') >>> bbv(left=10., right=40.) >>> bnv(left=10., right=20.) >>> derived....
entailment
def update(self): """Update value based on the actual |calc_qg_v1| method. Required derived parameter: |H| Note that the value of parameter |lstream_derived.QM| is directly related to the value of parameter |HM| and indirectly related to all parameters values releva...
Update value based on the actual |calc_qg_v1| method. Required derived parameter: |H| Note that the value of parameter |lstream_derived.QM| is directly related to the value of parameter |HM| and indirectly related to all parameters values relevant for method |calc_qg_v1|. H...
entailment
def update(self): """Determines in how many segments the whole reach needs to be divided to approximate the desired lag time via integer rounding. Adjusts the shape of sequence |QJoints| additionally. Required control parameters: |Lag| Calculated derived parameters: ...
Determines in how many segments the whole reach needs to be divided to approximate the desired lag time via integer rounding. Adjusts the shape of sequence |QJoints| additionally. Required control parameters: |Lag| Calculated derived parameters: |NmbSegments| ...
entailment
def update(self): """Update |C1| based on :math:`c_1 = \\frac{Damp}{1+Damp}`. Examples: The first examples show the calculated value of |C1| for the lowest possible value of |Lag|, the lowest possible value, and an intermediate value: >>> from hydpy.mod...
Update |C1| based on :math:`c_1 = \\frac{Damp}{1+Damp}`. Examples: The first examples show the calculated value of |C1| for the lowest possible value of |Lag|, the lowest possible value, and an intermediate value: >>> from hydpy.models.hstream import * ...
entailment
def update(self): """Update |C2| based on :math:`c_2 = 1.-c_1-c_3`. Examples: The following examples show the calculated value of |C2| are clipped when to low or to high: >>> from hydpy.models.hstream import * >>> parameterstep('1d') >>> der...
Update |C2| based on :math:`c_2 = 1.-c_1-c_3`. Examples: The following examples show the calculated value of |C2| are clipped when to low or to high: >>> from hydpy.models.hstream import * >>> parameterstep('1d') >>> derived.c1 = 0.6 >>>...
entailment
def view(data, enc=None, start_pos=None, delimiter=None, hdr_rows=None, idx_cols=None, sheet_index=0, transpose=False, wait=None, recycle=None, detach=None, metavar=None, title=None): """View the supplied data in an interactive, graphical table widget. data: When a valid path or IO object, re...
View the supplied data in an interactive, graphical table widget. data: When a valid path or IO object, read it as a tabular text file. When a valid URI, a Blaze object is constructed and visualized. Any other supported datatype is visualized directly and incrementally *without copyin...
entailment
def gather_registries() -> Tuple[Dict, Mapping, Mapping]: """Get and clear the current |Node| and |Element| registries. Function |gather_registries| is thought to be used by class |Tester| only. """ id2devices = copy.copy(_id2devices) registry = copy.copy(_registry) selection = copy.copy(_selec...
Get and clear the current |Node| and |Element| registries. Function |gather_registries| is thought to be used by class |Tester| only.
entailment
def reset_registries(dicts: Tuple[Dict, Mapping, Mapping]): """Reset the current |Node| and |Element| registries. Function |reset_registries| is thought to be used by class |Tester| only. """ dict_ = globals() dict_['_id2devices'] = dicts[0] dict_['_registry'] = dicts[1] dict_['_selection']...
Reset the current |Node| and |Element| registries. Function |reset_registries| is thought to be used by class |Tester| only.
entailment
def _get_pandasindex(): """ >>> from hydpy import pub >>> pub.timegrids = '2004.01.01', '2005.01.01', '1d' >>> from hydpy.core.devicetools import _get_pandasindex >>> _get_pandasindex() # doctest: +ELLIPSIS DatetimeIndex(['2004-01-01 12:00:00', '2004-01-02 12:00:00', ... ...
>>> from hydpy import pub >>> pub.timegrids = '2004.01.01', '2005.01.01', '1d' >>> from hydpy.core.devicetools import _get_pandasindex >>> _get_pandasindex() # doctest: +ELLIPSIS DatetimeIndex(['2004-01-01 12:00:00', '2004-01-02 12:00:00', ... '2004-12-30 12:00:00', '2004-12-31 ...
entailment
def startswith(self, name: str) -> List[str]: """Return a list of all keywords starting with the given string. >>> from hydpy.core.devicetools import Keywords >>> keywords = Keywords('first_keyword', 'second_keyword', ... 'keyword_3', 'keyword_4', ... ...
Return a list of all keywords starting with the given string. >>> from hydpy.core.devicetools import Keywords >>> keywords = Keywords('first_keyword', 'second_keyword', ... 'keyword_3', 'keyword_4', ... 'keyboard') >>> keywords.startswith(...
entailment
def endswith(self, name: str) -> List[str]: """Return a list of all keywords ending with the given string. >>> from hydpy.core.devicetools import Keywords >>> keywords = Keywords('first_keyword', 'second_keyword', ... 'keyword_3', 'keyword_4', ... ...
Return a list of all keywords ending with the given string. >>> from hydpy.core.devicetools import Keywords >>> keywords = Keywords('first_keyword', 'second_keyword', ... 'keyword_3', 'keyword_4', ... 'keyboard') >>> keywords.endswith('key...
entailment
def contains(self, name: str) -> List[str]: """Return a list of all keywords containing the given string. >>> from hydpy.core.devicetools import Keywords >>> keywords = Keywords('first_keyword', 'second_keyword', ... 'keyword_3', 'keyword_4', ... ...
Return a list of all keywords containing the given string. >>> from hydpy.core.devicetools import Keywords >>> keywords = Keywords('first_keyword', 'second_keyword', ... 'keyword_3', 'keyword_4', ... 'keyboard') >>> keywords.contains('keyw...
entailment
def update(self, *names: Any) -> None: """Before updating, the given names are checked to be valid variable identifiers. >>> from hydpy.core.devicetools import Keywords >>> keywords = Keywords('first_keyword', 'second_keyword', ... 'keyword_3', 'keyword_4', ...
Before updating, the given names are checked to be valid variable identifiers. >>> from hydpy.core.devicetools import Keywords >>> keywords = Keywords('first_keyword', 'second_keyword', ... 'keyword_3', 'keyword_4', ... 'keyboard') ...
entailment
def add(self, name: Any) -> None: """Before adding a new name, it is checked to be valid variable identifiers. >>> from hydpy.core.devicetools import Keywords >>> keywords = Keywords('first_keyword', 'second_keyword', ... 'keyword_3', 'keyword_4', ......
Before adding a new name, it is checked to be valid variable identifiers. >>> from hydpy.core.devicetools import Keywords >>> keywords = Keywords('first_keyword', 'second_keyword', ... 'keyword_3', 'keyword_4', ... 'keyboard') >>> ...
entailment
def add_device(self, device: Union[DeviceType, str]) -> None: """Add the given |Node| or |Element| object to the actual |Nodes| or |Elements| object. You can pass either a string or a device: >>> from hydpy import Nodes >>> nodes = Nodes() >>> nodes.add_device('old_node...
Add the given |Node| or |Element| object to the actual |Nodes| or |Elements| object. You can pass either a string or a device: >>> from hydpy import Nodes >>> nodes = Nodes() >>> nodes.add_device('old_node') >>> nodes Nodes("old_node") >>> nodes.add_devi...
entailment
def remove_device(self, device: Union[DeviceType, str]) -> None: """Remove the given |Node| or |Element| object from the actual |Nodes| or |Elements| object. You can pass either a string or a device: >>> from hydpy import Node, Nodes >>> nodes = Nodes('node_x', 'node_y') ...
Remove the given |Node| or |Element| object from the actual |Nodes| or |Elements| object. You can pass either a string or a device: >>> from hydpy import Node, Nodes >>> nodes = Nodes('node_x', 'node_y') >>> node_x, node_y = nodes >>> nodes.remove_device(Node('node_y'))...
entailment
def keywords(self) -> Set[str]: """A set of all keywords of all handled devices. In addition to attribute access via device names, |Nodes| and |Elements| objects allow for attribute access via keywords, allowing for an efficient search of certain groups of devices. Let us use th...
A set of all keywords of all handled devices. In addition to attribute access via device names, |Nodes| and |Elements| objects allow for attribute access via keywords, allowing for an efficient search of certain groups of devices. Let us use the example from above, where the nodes `na` ...
entailment
def copy(self: DevicesTypeBound) -> DevicesTypeBound: """Return a shallow copy of the actual |Nodes| or |Elements| object. Method |Devices.copy| returns a semi-flat copy of |Nodes| or |Elements| objects, due to their devices being not copyable: >>> from hydpy import Nodes >>> o...
Return a shallow copy of the actual |Nodes| or |Elements| object. Method |Devices.copy| returns a semi-flat copy of |Nodes| or |Elements| objects, due to their devices being not copyable: >>> from hydpy import Nodes >>> old = Nodes('x', 'y') >>> import copy >>> new = co...
entailment
def prepare_allseries(self, ramflag: bool = True) -> None: """Call methods |Node.prepare_simseries| and |Node.prepare_obsseries|.""" self.prepare_simseries(ramflag) self.prepare_obsseries(ramflag)
Call methods |Node.prepare_simseries| and |Node.prepare_obsseries|.
entailment
def prepare_simseries(self, ramflag: bool = True) -> None: """Call method |Node.prepare_simseries| of all handled |Node| objects.""" for node in printtools.progressbar(self): node.prepare_simseries(ramflag)
Call method |Node.prepare_simseries| of all handled |Node| objects.
entailment
def prepare_obsseries(self, ramflag: bool = True) -> None: """Call method |Node.prepare_obsseries| of all handled |Node| objects.""" for node in printtools.progressbar(self): node.prepare_obsseries(ramflag)
Call method |Node.prepare_obsseries| of all handled |Node| objects.
entailment
def init_models(self) -> None: """Call method |Element.init_model| of all handle |Element| objects. We show, based the `LahnH` example project, that method |Element.init_model| prepares the |Model| objects of all elements, including building the required connections and updating the ...
Call method |Element.init_model| of all handle |Element| objects. We show, based the `LahnH` example project, that method |Element.init_model| prepares the |Model| objects of all elements, including building the required connections and updating the derived parameters: >>> from...
entailment
def save_controls(self, parameterstep: 'timetools.PeriodConstrArg' = None, simulationstep: 'timetools.PeriodConstrArg' = None, auxfiler: 'Optional[auxfiletools.Auxfiler]' = None): """Save the control parameters of the |Model| object handled by each |Element| o...
Save the control parameters of the |Model| object handled by each |Element| object and eventually the ones handled by the given |Auxfiler| object.
entailment
def load_conditions(self) -> None: """Save the initial conditions of the |Model| object handled by each |Element| object.""" for element in printtools.progressbar(self): element.model.sequences.load_conditions()
Save the initial conditions of the |Model| object handled by each |Element| object.
entailment
def save_conditions(self) -> None: """Save the calculated conditions of the |Model| object handled by each |Element| object.""" for element in printtools.progressbar(self): element.model.sequences.save_conditions()
Save the calculated conditions of the |Model| object handled by each |Element| object.
entailment
def conditions(self) -> \ Dict[str, Dict[str, Dict[str, Union[float, numpy.ndarray]]]]: """A nested dictionary containing the values of all |ConditionSequence| objects of all currently handled models. See the documentation on property |HydPy.conditions| for further informati...
A nested dictionary containing the values of all |ConditionSequence| objects of all currently handled models. See the documentation on property |HydPy.conditions| for further information.
entailment
def prepare_allseries(self, ramflag: bool = True) -> None: """Call method |Element.prepare_allseries| of all handled |Element| objects.""" for element in printtools.progressbar(self): element.prepare_allseries(ramflag)
Call method |Element.prepare_allseries| of all handled |Element| objects.
entailment
def prepare_inputseries(self, ramflag: bool = True) -> None: """Call method |Element.prepare_inputseries| of all handled |Element| objects.""" for element in printtools.progressbar(self): element.prepare_inputseries(ramflag)
Call method |Element.prepare_inputseries| of all handled |Element| objects.
entailment
def prepare_fluxseries(self, ramflag: bool = True) -> None: """Call method |Element.prepare_fluxseries| of all handled |Element| objects.""" for element in printtools.progressbar(self): element.prepare_fluxseries(ramflag)
Call method |Element.prepare_fluxseries| of all handled |Element| objects.
entailment
def prepare_stateseries(self, ramflag: bool = True) -> None: """Call method |Element.prepare_stateseries| of all handled |Element| objects.""" for element in printtools.progressbar(self): element.prepare_stateseries(ramflag)
Call method |Element.prepare_stateseries| of all handled |Element| objects.
entailment
def extract_new(cls) -> DevicesTypeUnbound: """Gather all "new" |Node| or |Element| objects. See the main documentation on module |devicetools| for further information. """ devices = cls.get_handlerclass()(*_selection[cls]) _selection[cls].clear() return devices
Gather all "new" |Node| or |Element| objects. See the main documentation on module |devicetools| for further information.
entailment
def get_double(self, group: str) -> pointerutils.Double: """Return the |Double| object appropriate for the given |Element| input or output group and the actual |Node.deploymode|. Method |Node.get_double| should be of interest for framework developers only (and eventually for model devel...
Return the |Double| object appropriate for the given |Element| input or output group and the actual |Node.deploymode|. Method |Node.get_double| should be of interest for framework developers only (and eventually for model developers). Let |Node| object `node1` handle different simulati...
entailment
def plot_simseries(self, **kwargs: Any) -> None: """Plot the |IOSequence.series| of the |Sim| sequence object. See method |Node.plot_allseries| for further information. """ self.__plot_series([self.sequences.sim], kwargs)
Plot the |IOSequence.series| of the |Sim| sequence object. See method |Node.plot_allseries| for further information.
entailment
def plot_obsseries(self, **kwargs: Any) -> None: """Plot the |IOSequence.series| of the |Obs| sequence object. See method |Node.plot_allseries| for further information. """ self.__plot_series([self.sequences.obs], kwargs)
Plot the |IOSequence.series| of the |Obs| sequence object. See method |Node.plot_allseries| for further information.
entailment
def assignrepr(self, prefix: str = '') -> str: """Return a |repr| string with a prefixed assignment.""" lines = ['%sNode("%s", variable="%s",' % (prefix, self.name, self.variable)] if self.keywords: subprefix = '%skeywords=' % (' '*(len(prefix)+5)) with o...
Return a |repr| string with a prefixed assignment.
entailment
def model(self) -> 'modeltools.Model': """The |Model| object handled by the actual |Element| object. Directly after their initialisation, elements do not know which model they require: >>> from hydpy import Element >>> hland = Element('hland', outlets='outlet') >>> hlan...
The |Model| object handled by the actual |Element| object. Directly after their initialisation, elements do not know which model they require: >>> from hydpy import Element >>> hland = Element('hland', outlets='outlet') >>> hland.model Traceback (most recent call last):...
entailment
def init_model(self, clear_registry: bool = True) -> None: """Load the control file of the actual |Element| object, initialise its |Model| object, build the required connections via (an eventually overridden version of) method |Model.connect| of class |Model|, and update its derived par...
Load the control file of the actual |Element| object, initialise its |Model| object, build the required connections via (an eventually overridden version of) method |Model.connect| of class |Model|, and update its derived parameter values via calling (an eventually overridden version) o...
entailment
def variables(self) -> Set[str]: """A set of all different |Node.variable| values of the |Node| objects directly connected to the actual |Element| object. Suppose there is an element connected to five nodes, which (partly) represent different variables: >>> from hydpy import El...
A set of all different |Node.variable| values of the |Node| objects directly connected to the actual |Element| object. Suppose there is an element connected to five nodes, which (partly) represent different variables: >>> from hydpy import Element, Node >>> element = Element('T...
entailment
def prepare_allseries(self, ramflag: bool = True) -> None: """Prepare the |IOSequence.series| objects of all `input`, `flux` and `state` sequences of the model handled by this element. Call this method before a simulation run, if you need access to (nearly) all simulated series of the h...
Prepare the |IOSequence.series| objects of all `input`, `flux` and `state` sequences of the model handled by this element. Call this method before a simulation run, if you need access to (nearly) all simulated series of the handled model after the simulation run is finished. By...
entailment
def plot_inputseries( self, names: Optional[Iterable[str]] = None, average: bool = False, **kwargs: Any) \ -> None: """Plot (the selected) |InputSequence| |IOSequence.series| values. We demonstrate the functionalities of method |Element.plot_inputseries| base...
Plot (the selected) |InputSequence| |IOSequence.series| values. We demonstrate the functionalities of method |Element.plot_inputseries| based on the `Lahn` example project: >>> from hydpy.core.examples import prepare_full_example_2 >>> hp, _, _ = prepare_full_example_2(lastdate='1997-0...
entailment
def plot_fluxseries( self, names: Optional[Iterable[str]] = None, average: bool = False, **kwargs: Any) \ -> None: """Plot the `flux` series of the handled model. See the documentation on method |Element.plot_inputseries| for additional information. "...
Plot the `flux` series of the handled model. See the documentation on method |Element.plot_inputseries| for additional information.
entailment
def plot_stateseries( self, names: Optional[Iterable[str]] = None, average: bool = False, **kwargs: Any) \ -> None: """Plot the `state` series of the handled model. See the documentation on method |Element.plot_inputseries| for additional information. ...
Plot the `state` series of the handled model. See the documentation on method |Element.plot_inputseries| for additional information.
entailment