wolfhece.hydrology.RetentionBasin

Author: HECE - University of Liege, Pierre Archambeau, Christophe Dessers Date: 2024

Copyright (c) 2024 University of Liege. All rights reserved.

This script and its content are protected by copyright law. Unauthorized copying or distribution of this file, via any medium, is strictly prohibited.

Module Contents

class wolfhece.hydrology.RetentionBasin.RetentionBasin(_dateBegin=None, _dateEnd=None, _deltaT: int = None, _time=None, _id='J1', _name='Default name', _type='', _dictRB={}, _directDictRB={}, _tz=0, _outletNames=[], withRBDict=True, _workingDir='')[source]
property relative_filledVolume[source]

The relative_fillevolume is computed on the basis of filledvolume and initial volume

_outFlow: dict[source]
surfaceDrainedHydro: float[source]
filledVolume: wolfhece.hydrology.Outlet.np.ndarray[source]
intletsObj: dict[source]
directFluxObj: dict[source]
increment_level()[source]

This procedure increment the level in the Topo dictionary

add_inlet(toPoint, name='DEFAULT')[source]

This procedure link the inlets to the object

add_downstreamObj(toPoint, name='DEFAULT', deltaTime=0.0, tolerance=0)[source]

This procedure link the downstream element to the object tolerance indicates if the downstream objet should already exist (=0) to continue => to implement

add_directFluxObj(toPoint, name='DEFAULT')[source]

This procedure link the direct inlet elements to the object

compute_hydro(givenDirectFluxIn=[], givenInlet=[])[source]

This function computes the raw and real hydrographs.

The volume filled and then the water height in the RB at time $t$ will be evaluated will depend of the flows at time $t-1$ exept if the

Internal variables modifiedself.inlets, self.inletsRaw,

self.directFluxInRB, self.directFluxInRB_Raw, self._outFlowRaw, self._outFlow, self.filledVolume

CAUTION: - Discussion about the ceil or the floor for the timeDelay indice!!!
  • UPDATE 2023.1 now the outFlow are not delayed anymore !!!! -> IMPORTANT UPDATE

compute_one_step_hydro(i, givenDirectFluxIn: float = None, givenInlet: float = None)[source]

This function computes the raw and real hydrographs for one time step.

The volume filled and then the water height in the RB at time $t$ will be evaluated will depend of the flows at time $t-1$ exept if the

Internal variables modifiedself.inlets, self.inletsRaw,

self.directFluxInRB, self.directFluxInRB_Raw, self._outFlowRaw, self._outFlow, self.filledVolume

CAUTION: - Discussion about the ceil or the floor for the timeDelay indice!!!
  • UPDATE 2023.1 now the outFlow are not delayed anymore !!!! -> IMPORTANT UPDATE

init_all_inlets()[source]

This function initializes the inlets and directFluxInRB of the RB Internal variables modified: self.inlets, self.inletsRaw, self.directFluxInRB, self.directFluxInRB_Raw

sum_inlets(givenInlet=[])[source]

This procedure sum all the inlets of the RB Caution: inlets variable is different from directFluxIn !!

Internal variables modified: self.inlets, self.inletsRaw

sum_directFluxInRB(givenDirectFluxIn=[])[source]

This procedure computes the flux going directly inside the RB

Internal variables modified: self.directFluxInRB, self.directFluxInRB_Raw

sum_one_step_inlets(i, givenInlet: float = None)[source]
sum_one_step_directFluxInRB(i, givenDirectFluxIn: float = None)[source]

This procedure computes the flux going directly inside the RB

Internal variables modified: self.directFluxInRB, self.directFluxInRB_Raw

plot(workingDir, plotRaw=True, axis='Hours', rangeData=[], deltaMajorTicks=24.0 * 3600.0, deltaMinorTicks=3600.0, tzPlot=0, unitReservoir='[m^3]')[source]

This procedure plots: - the inlets: in color chosen randomly by matplotlib - DirectIn : in color chosen randomly by matplotlib and in ‘-.’ lines - the outlet: in black solid line - the raw outlet: in black dashed line

plot_outlet(Measures=None, rangeData=[], yrangeRain=[], yrangeData=[], ylabel=[], addData=[], dt_addData=[], beginDates_addData=[], endDates_addData=[], label_addData=[], color_addData=[], factor=1.5, graph_title='', withEvap=False, writeFile='', withDelay=True, deltaMajorTicks=-1, deltaMinorTicks=-1, tzPlot=0, figure=None)[source]
add_rain(workingDir, tzDelta=datetime.timedelta(hours=0))[source]

This function returns the a time array and a array containing the sum of all the rain in the inlets Value changed : self.rain

volume_to_h(volume)[source]
h_to_volume(h)[source]
read_zv(fileName, typeOfInterpolation='linear')[source]
convert_index_global_to_local(i, lagTime=0.0)[source]
convert_data_global_to_local(dataGlob)[source]
convert_index_global_to_other_global(i, timeDelayOut=0.0, timeDelta=0.0)[source]
convert_data_global_to_other_global(vector, timeDelayOut=0.0, timeDelta=0.0)[source]
convert_time_global_to_local(time)[source]
get_outFlow(whichOutFlow='', typeOutFlow='Net', unit='m3/s', lag: float = 0.0)[source]
get_outFlow_noDelay(whichOutFlow='', unit='m3/s')[source]

This function returns the total outlet of the basin and considers t0=0 at the outlet of the subbasin without considering timeDelay (the time of the real outlet of the whole potential catchment)

get_outFlowRaw_noDelay(whichOutFlow='', unit='m3/s')[source]

This function returns the total raw outlet of the basin and considers t0=0 at the outlet of the subbasin without considering timeDelay (the time of the real outlet of the whole potential catchment)

get_inlets_noDelay(unit='m3/s') wolfhece.hydrology.Outlet.np.ndarray[source]

This function returns the total inlets of the basin and considers t0=0 at the outlet of the subbasin without considering timeDelay (the time of the real outlet of the whole potential catchment)

get_inlets(unit: str = 'm3/s', lag: float = 0.0)[source]
get_direct_insideRB_inlets(unit: str = 'm3/s', lag: float = 0.0) wolfhece.hydrology.Outlet.np.ndarray[source]
write_height_reservoir(workingDir)[source]
compute_final(Qres, Qstream, step)[source]
get_surface_proportions(show=True)[source]
find_outFlow_peak(whichOutFlow='')[source]
get_outFlow_peak(noDelay=False, whichOutFlow='')[source]
compute_Q_from_V(givenDirectFluxIn=[], givenInlet=[], average_steps=1)[source]

This function computes the raw and real hydrographs.

The volume filled and then the water height in the RB at time $t$ will be evaluated will depend of the flows at time $t-1$ exept if the

Internal variables modifiedself.inlets, self.inletsRaw,

self.directFluxInRB, self.directFluxInRB_Raw, self.outFlowRaw, self.outFlow, self.filledVolume

read_volume(fileName: str, tzDelta=datetime.timedelta(hours=0))[source]
compute_derivative(data, indexData, indexSimul=None, nbStep=1)[source]
construct_surfaceDrainedHydro()[source]

Calculates the total surface drained hydrology by summing up the surface drained hydrology values from the directFluxObj and intletsObj modules. Cautions: when there are several outflows in a module, the surfaceDrainedHydro is added only once, towards the natural outlet of the module (by convention the first outflow).

Returns:

None

unuse(mask=[])[source]
activate(effSubs: list = [], effSubsSort: list = [], mask: list = [], onlyItself: bool = False)[source]
reset_timeDelay(keepDelta=False, keepDeltaAll=False, upStreamTime=0.0)[source]
find_timeDelayObj()[source]
update_timeDelay()[source]
add_timeDelay(deltaT=0.0, reset=False, resetAll=False)[source]
get_inletsName()[source]
get_inletCoords()[source]
get_zone() wolfhece.hydrology.SubBasin.zone[source]

Return a zone instance to insert in viewer

get_timeDelays(timeDelays={})[source]
get_timeDelays_inlets()[source]
save_timeDelays()[source]
get_value_outlet(wolfarray)[source]
get_iDSorted()[source]
get_outFlow_names() list[source]
update_upstream_hydro(level_min: int = 1, update_upstream: bool = True)[source]
update_hydro(update_upstream: bool = True, level_min: int = 1)[source]
get_outFlow_global(whichOutFlow='', typeOutFlow='Net')[source]

The outFlow global property. Returns the outFlow in the global time, i.e. the hydrograph to which the timeDelay is applied.

convert_mmh_2_m3s(value)[source]
convert_m3s_2_mmh(value)[source]
set_volume(volume: wolfhece.hydrology.Outlet.np.ndarray, time: wolfhece.hydrology.Outlet.np.ndarray = None)[source]
evaluate_objective_function(unit='mm/h') wolfhece.hydrology.Outlet.np.ndarray[source]
update_from_RBdict(dict_RB={})[source]
init_time_simulation(dateBegin: wolfhece.hydrology.Dumping.datetime.datetime, dateEnd: wolfhece.hydrology.Dumping.datetime.datetime, deltaT: float, tz: int = 0)[source]
init_internal_variable()[source]