pytuflow.BCTablesCheck

pytuflow.BCTablesCheck#

class BCTablesCheck(fpath)#

Bases: TimeSeries

Class for reading 1D and 2D BC Table Check files. These are file that end with _bc_tables_check.csv, found in the 1D and 2D check folders.

Parameters:

fpath (PathLike) – Path to the BC Table Check file.

Raises:

ResultTypeError – Raises pytuflow.results.ResultTypeError if the file does not look like a BCTablesCheck file.

Examples

Load a 1D hydraulic tables check file:

>>> from pytuflow import BCTablesCheck
>>> bndry = BCTablesCheck('path/to/_bc_tables_check.csv')

Check the boundary types in the check file:

>>> bndry.data_types()
['QT', 'SA', 'HQ']

Check the IDs for the flow boundaries (i.e. QT and SA types):

>>> bndry.ids('flow')
['FC01', 'Loc_001', 'Loc_002', 'Loc_003', 'Loc_004']

Get time-series data for boundary FC01:

>>> bndry.time_series('FC01', 'QT')
    FC01/time  FC01/QT
0       0.000     0.00
1       0.083     0.84
2       0.167     3.31
3       0.250     4.60
4       0.333     7.03
...       ...      ...
36      3.000     2.18
37      3.083     1.96
38      3.167     1.77
39      3.250     1.60
40      3.333     1.45
__init__(fpath)#
Parameters:

fpath (Path | str)

Methods

curtain

Not supported for BCTablesCheck results.

data_types

Returns all the available data types for the given context.

ids

Returns all the available IDs for the given context.

maximum

Returns the maximum values for the given locations and data types.

profile

Not supported for BCTablesCheck results.

section

Not supported for BCTablesCheck results.

time_series

Returns time-series data for the given locations and data types.

times

Returns a list of unique times in the BC Tables Check file for the given context.

Attributes

ATTRIBUTE_TYPES

DOMAIN_TYPES

GEOMETRY_TYPES

ID_COLUMNS

fpath

The path to the source output file.

tcf

Path to the parent TCF file

provider

BC Check Provider class

objs

DataFrame with all the data combinations

name

The result name

reference_time

The reference time for the output