pytuflow.FVBCTide.time_series#
- FVBCTide.time_series(locations, data_types, time_fmt='relative', *args, **kwargs)#
Returns a time-series DataFrame for the given location(s) and data type(s).
It’s possible to pass in a well known shorthand for the data type e.g.
hforwater level.The returned column names will be in the format
obj/data_type/locatione.g.point/level/Ocean_pt_0. Thedata_typename in the column heading will be identical to the data type name passed into the function e.g. ifhis used instead ofwater level, then the return will bepoint/h/Ocean_pt_0.- Parameters:
locations (str | list[str]) – The location to extract the time series data for. If
Noneis passed in, all locations will be returned for the given data_types.data_types (str | list[str]) – The data type to extract the time series data for. If
Noneis passed in, all data types will be returned for the given locations.time_fmt (str, optional) – The format for the time column. Options are
relativeorabsolute.
- Returns:
The time series data.
- Return type:
pd.DataFrame
Examples
Extracting flow for a given channel.
>>> bndry = FVBCTide('/path/to/fv_bc_tide.nc', '/path/to/fv_bc_tide.shp') >>> bndry.time_series('ds1', 'q') time point/level/Ocean_pt_0 289258.00 -0.228474 289258.25 -0.196456 289258.50 -0.160042 289258.75 -0.119967 289259.00 -0.076996 ... ... 290025.00 0.073840 290025.25 0.018794 290025.50 -0.034604 290025.75 -0.085668 290026.00 -0.133717