pytuflow.FVBCTide.times

Contents

pytuflow.FVBCTide.times#

FVBCTide.times(filter_by=None, fmt='relative')#

Returns all the available times for the given filter.

The filter_by is an optional input that can be used to filter the return further. Valid filters for the FVBCTide class are:

  • None: default - returns all available times

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

  • node / code:point: returns only node times

  • nodestring / code:line: returns only nodestring times

  • [id]: returns only data types for the given ID.

  • [data_type]: returns only times for the given data type.

Parameters:
  • filter_by (str, optional) – The string to filter the times by.

  • fmt (str, optional) – The format for the times. Options are relative or absolute.

Returns:

The available times in the requested format.

Return type:

list[TimeLike]

Examples

>>> bndry = FVBCTide('/path/to/fv_bc_tide.nc', '/path/to/fv_bc_tide.shp')
>>> bndry.times()
[0.0, 0.016666666666666666, ..., 3.0]
>>> bndry.times(fmt='absolute')
[Timestamp('2021-01-01 00:00:00'), Timestamp('2021-01-01 00:01:00'), ..., Timestamp('2021-01-01 03:00:00')]