pytuflow.BCTablesCheck.ids#
- BCTablesCheck.ids(filter_by=None, internal_id=False)#
Returns all the available IDs for the given context.
The context is an optional input that can be used to filter the return further. Valid contexts for this class are:
None
- no filtering, returns all the IDs in the file.
Boundary Type
[type]
- returns all the times for a given boundary type (e.g.QT
)
ID
[id]
- returns all the times for a given ID (e.g.FC01
)
Data Type
[data_type]
- returns all the times for a given data type (e.g.flow
)
Combine contexts:
[context1]/[context2] ...
: Combine multiple contexts to filter the times further (use/
delim).
- Parameters:
filter_by (str, optional) – Context to filter the IDs.
internal_id (bool, optional) – Return the internal ID instead of the name e.g.
BC000001
. Default isFalse
.
- Returns:
List of available IDs.
- Return type:
list[str]
Examples
Get all the boundary types in the model:
>>> bndry = BCTablesCheck('path/to/_bc_tables_check.csv') >>> bndry.data_types() ['QT', 'SA', 'HQ']
Get all flow boundary types:
>>> bndry.ids('flow') ['FC01', 'FC04']
Get the boundary type for
FC01
:>>> bndry.ids('FC01') ['QT']