result_network.ResultCatchment

result_network.ResultCatchment(self, catchment, res1d)

Class for wrapping a single ResultData catchment.

Parameters

Name Type Description Default
catchment MIKE 1D IRes1DCatchment object. required
res1d Res1D Res1D object the catchment belongs to. required

Attributes

Name Description
area The area of the catchment.
derived_quantities A list of available derived quantities.
geometry A geometric representation of the catchment. Requires shapely.
group The TimeSeriesIdGroup assosciated with this location.
id The ID of the catchment.
quantities A list of available quantities.
type The type of the catchment.

Methods

Name Description
add_derived_quantity Add a derived quantity to the result location.
add_query Add a query to ResultNetwork.queries list.
add_to_network_result_quantity_map Add a ResultQuantity to map of all possible ResultQuantities.
add_to_result_quantity_map Add to a given result quantity map.
add_to_result_quantity_maps Add catchment result quantity to result quantity maps.
get_m1d_dataset Get IRes1DDataSet object associated with ResultCatchment.
get_query Get a QueryDataCatchment for given data item.
read Read the time series data for all quantities at this location into a DataFrame.
remove_derived_quantity Remove a derived quantity from the result location.
set_quantities Set all quantity attributes.
set_quantity Set a single quantity attribute on the obj.
set_quantity_derived Set a single derived quantity attribute on the obj.
set_static_attribute Add static attribute. This shows up in the html repr.
set_static_attributes Set static attributes. These show up in the html repr.

add_derived_quantity

result_network.ResultCatchment.add_derived_quantity(derived_quantity)

Add a derived quantity to the result location.

add_query

result_network.ResultCatchment.add_query(data_item)

Add a query to ResultNetwork.queries list.

add_to_network_result_quantity_map

result_network.ResultCatchment.add_to_network_result_quantity_map(result_quantity)

Add a ResultQuantity to map of all possible ResultQuantities.

Parameters

Name Type Description Default
result_quantity ResultQuantity ResultQuantity object to be added to the result_quantity_map. required

Returns

Type Description
TimeSeriesId The TimeSeriesId key of the added ResultQuantity

add_to_result_quantity_map

result_network.ResultCatchment.add_to_result_quantity_map(quantity_id, result_quantity, result_quantity_map)

Add to a given result quantity map.

Parameters

Name Type Description Default
quantity_id str Quantity id. required
result_quantity ResultQuantity One of the possible ResultQuantity objects corresponding to a quantity id. required
result_quantity_map dict Dictionary from quantity id to a list of ResultQuantity objects. required

add_to_result_quantity_maps

result_network.ResultCatchment.add_to_result_quantity_maps(quantity_id, result_quantity)

Add catchment result quantity to result quantity maps.

get_m1d_dataset

result_network.ResultCatchment.get_m1d_dataset(m1d_dataitem=None)

Get IRes1DDataSet object associated with ResultCatchment.

Parameters

Name Type Description Default
m1d_dataitem Ignored for ResultCatchment. None

Returns

Type Description
IRes1DDataSet IRes1DDataSet object associated with ResultCatchment.

get_query

result_network.ResultCatchment.get_query(data_item)

Get a QueryDataCatchment for given data item.

read

result_network.ResultCatchment.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

remove_derived_quantity

result_network.ResultCatchment.remove_derived_quantity(derived_quantity)

Remove a derived quantity from the result location.

set_quantities

result_network.ResultCatchment.set_quantities()

Set all quantity attributes.

set_quantity

result_network.ResultCatchment.set_quantity(obj, data_item, element_index=0)

Set a single quantity attribute on the obj.

set_quantity_derived

result_network.ResultCatchment.set_quantity_derived(derived_quantity)

Set a single derived quantity attribute on the obj.

set_static_attribute

result_network.ResultCatchment.set_static_attribute(name)

Add static attribute. This shows up in the html repr.

set_static_attributes

result_network.ResultCatchment.set_static_attributes()

Set static attributes. These show up in the html repr.