pytuflow.FVBCTide.ids

Contents

pytuflow.FVBCTide.ids#

FVBCTide.ids(filter_by=None)#

Returns all the available IDs for the given filter.

The filter_by argument can be used to add a filter to the returned IDs. Available filters objects for the FVBCTide class are:

  • None: default - returns all IDs

  • 2d: same as None as class only contains 2D data

  • node / code:point: returns only node IDs

  • nodestring / code:line: returns only nodestring IDs

  • timeseries: returns only IDs that have time series data.

  • section: returns only IDs that have section data (i.e. long plot data).

  • [data_type]: returns only IDs for the given data type. Shorthand data type names can be used.

Parameters:

filter_by (str, optional) – The string to filter the IDs by.

Returns:

The available IDs.

Return type:

list[str]

Examples

The below examples demonstrate how to use the filter argument to filter the returned IDs. The first example returns all IDs:

>>> bndry = FVBCTide('/path/to/fv_bc_tide.nc', '/path/to/fv_bc_tide.shp')
>>> bndry.ids()
['Ocean_pt_0', 'Ocean_pt_1', 'Ocean_pt_2', 'Ocean_pt_3', 'Ocean_pt_4', 'Ocean']