result_network.ResultGridPoint
result_network.ResultGridPoint(self, reach, gridpoint, data_items, result_reach, res1d, tag='')
Class for wrapping a single ResultData grid point.
Parameters
Name | Type | Description | Default |
---|---|---|---|
reach |
MIKE 1D IRes1DReach object. | required | |
gridpoint |
MIKE 1D IRes1DGridPoint object. | required | |
data_items |
list of IDataItem objects | A list of IDataItem objects (vector data object) the gridpoint has values defined on. | required |
res1d |
Res1D | Res1D object the grid point belongs to. | required |
Attributes
Name | Type | Description |
---|---|---|
structure_data_items | list of IDataItem object. | List of IDataItem objects belonging to a structures defined on the current grid point. |
Methods
Name | Description |
---|---|
add_data_item | Add data item to grid point data items list. |
add_derived_quantity | Add a derived quantity to the result location. |
add_query | Add a query to ResultNetwork.queries list. |
add_structure_data_item | Add data item to structure data items 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 grid point result quantity to result quantity maps. |
get_m1d_dataset | Get IRes1DDataSet object associated with ResultGridPoint. |
get_query | Get a QueryDataReach 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_data_item
result_network.ResultGridPoint.add_data_item(data_item, element_index)
Add data item to grid point data items list.
add_derived_quantity
result_network.ResultGridPoint.add_derived_quantity(derived_quantity)
Add a derived quantity to the result location.
add_query
result_network.ResultGridPoint.add_query(data_item)
Add a query to ResultNetwork.queries list.
add_structure_data_item
result_network.ResultGridPoint.add_structure_data_item(data_item)
Add data item to structure data items list.
add_to_network_result_quantity_map
result_network.ResultGridPoint.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.ResultGridPoint.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.ResultGridPoint.add_to_result_quantity_maps(quantity_id, result_quantity)
Add grid point result quantity to result quantity maps.
get_m1d_dataset
result_network.ResultGridPoint.get_m1d_dataset(m1d_dataitem=None)
Get IRes1DDataSet object associated with ResultGridPoint.
This is the reach IRes1DDataSet object because grid points do not have a corresponding IRes1DDataSet object.
Parameters
Name | Type | Description | Default |
---|---|---|---|
m1d_dataitem |
Ignored for ResultGridPoint. | None |
Returns
Type | Description |
---|---|
IRes1DDataSet | IRes1DDataSet object associated with ResultGridPoint. |
get_query
result_network.ResultGridPoint.get_query(data_item)
Get a QueryDataReach for given data item.
read
result_network.ResultGridPoint.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.ResultGridPoint.remove_derived_quantity(derived_quantity)
Remove a derived quantity from the result location.
set_quantities
result_network.ResultGridPoint.set_quantities()
Set all quantity attributes.
set_quantity
result_network.ResultGridPoint.set_quantity(obj, data_item, element_index=0)
Set a single quantity attribute on the obj.
set_quantity_derived
result_network.ResultGridPoint.set_quantity_derived(derived_quantity)
Set a single derived quantity attribute on the obj.
set_static_attribute
result_network.ResultGridPoint.set_static_attribute(name)
Add static attribute. This shows up in the html repr.
set_static_attributes
result_network.ResultGridPoint.set_static_attributes()
Set static attributes. These show up in the html repr.