result_network.ResultGlobalData

result_network.ResultGlobalData(self, data_item, global_datas, res1d)

Class for wrapping ResultData global data items.

By itself it is also a dict, which contains mapping between data item quantity ID and IDataItem object.

Parameters

Name Type Description Default
data_item IDataItem MIKE 1D IDataItem object for a global data item. required
global_datas ResultGlobalDatas object. A wrapper object for all global data items. required
res1d Res1D Res1D object the global data belongs to. required

Attributes

Name Description
derived_quantities A list of available derived quantities.
group The TimeSeriesIdGroup assosciated with this location.
quantities A list of available quantities.

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 global data result quantity to result quantity maps.
get_m1d_dataset Get IRes1DDataSet object associated with ResultGlobalData.
get_query Get a QueryDataGlobal 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 quantities for ResultGlobalData.
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.

add_derived_quantity

result_network.ResultGlobalData.add_derived_quantity(derived_quantity)

Add a derived quantity to the result location.

add_query

result_network.ResultGlobalData.add_query(data_item)

Add a query to ResultNetwork.queries list.

add_to_network_result_quantity_map

result_network.ResultGlobalData.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.ResultGlobalData.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.ResultGlobalData.add_to_result_quantity_maps(quantity_id, result_quantity)

Add global data result quantity to result quantity maps.

get_m1d_dataset

result_network.ResultGlobalData.get_m1d_dataset(m1d_dataitem=None)

Get IRes1DDataSet object associated with ResultGlobalData.

Parameters

Name Type Description Default
m1d_dataitem Ignored for ResultGlobalData. None

Returns

Type Description
IRes1DDataSet IRes1DDataSet object associated with ResultGlobalData.

get_query

result_network.ResultGlobalData.get_query(data_item)

Get a QueryDataGlobal for given data item.

read

result_network.ResultGlobalData.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.ResultGlobalData.remove_derived_quantity(derived_quantity)

Remove a derived quantity from the result location.

set_quantities

result_network.ResultGlobalData.set_quantities()

Set quantities for ResultGlobalData.

Here only a single data item is used for ResultGlobalData. Also the quantity attribute is assigned to self.global_data.

set_quantity

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

Set a single quantity attribute on the obj.

set_quantity_derived

result_network.ResultGlobalData.set_quantity_derived(derived_quantity)

Set a single derived quantity attribute on the obj.

set_static_attribute

result_network.ResultGlobalData.set_static_attribute(name)

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