result_network.ResultReach

result_network.ResultReach(self, reaches, res1d)

Class for wrapping a list of ResultData reaches having the same reach name.

Parameters

Name Type Description Default
reaches List[IRes1DReach] A list of MIKE 1D IRes1DReach objects having the same reach name. required
res1d Res1D Res1D object the reach belongs to. required

Attributes

Name Description
chainages List of chainages for the reach.
derived_quantities A list of available derived quantities.
end_chainage End chainage of the reach.
end_node End node of the reach.
full_flow_discharge Full flow discharge of the reach.
geometry A geometric representation of the reach. Requires shapely.
gridpoints List of gridpoints for the reach.
group The TimeSeriesIdGroup assosciated with this location.
height Height of the reach.
length Length of the reach.
n_gridpoints Number of gridpoints in the reach.
name Name of the reach.
quantities A list of available quantities.
res1d The Res1D instance that this location belongs to.
res1d_reaches List of DHI.Mike1D.ResultDataAccess.IRes1DReach corresponding to this result location.
start_chainage Start chainage of the reach.
start_node Start node of the reach.

Methods

Name Description
add_query Add a query to ResultNetwork.queries list.
get_m1d_dataset Get IRes1DDataSet object associated with ResultReach.
get_query Get a query for a data item.
interpolate_reach_critical_level Interpolate the critical level at a given chainage by linear interpolation from the bounding node critical levels.
interpolate_reach_ground_level Interpolate the ground level at a given chainage by linear interpolation from the bounding node ground levels.
read Read the time series data for all quantities at this location into a DataFrame.

add_query

result_network.ResultReach.add_query(data_item)

Add a query to ResultNetwork.queries list.

get_m1d_dataset

result_network.ResultReach.get_m1d_dataset(m1d_dataitem=None)

Get IRes1DDataSet object associated with ResultReach.

A ResultReach may consist of several IRes1DDataSet objects. Therefore, a IRes1DDataItem must be provided to identify the correct IRes1DDataSet.

Parameters

Name Type Description Default
m1d_dataitem IDataItem The IRes1DDataItem associated with the returned IRes1DDataSet. None

Returns

Name Type Description
IRes1DDataSet IRes1DDataSet object associated with ResultReach.

get_query

result_network.ResultReach.get_query(data_item)

Get a query for a data item.

interpolate_reach_critical_level

result_network.ResultReach.interpolate_reach_critical_level(chainage)

Interpolate the critical level at a given chainage by linear interpolation from the bounding node critical levels.

Parameters

Name Type Description Default
chainage float Chainage for which to interpolate the critical level. required

Returns

Name Type Description
float Interpolated critical level.

interpolate_reach_ground_level

result_network.ResultReach.interpolate_reach_ground_level(chainage)

Interpolate the ground level at a given chainage by linear interpolation from the bounding node ground levels.

Parameters

Name Type Description Default
chainage float Chainage for which to interpolate the ground level. required

Returns

Name Type Description
float Interpolated ground level.

read

result_network.ResultReach.read(column_mode=None)

Read the time series data for all quantities at this location into a DataFrame.

Parameters

Name Type Description Default
column_mode str | ColumnMode(optional) Specifies the type of column index of returned DataFrame. ‘all’ - column MultiIndex with levels matching TimeSeriesId objects. ‘compact’ - same as ‘all’, but removes levels with default values. ‘timeseries’ - column index of TimeSeriesId objects None