FvTimeSeries¶
- class tfv.timeseries.FvTimeSeries(file)¶
- get_data(**kwargs)¶
Query to extract time series data at a given location. If model data is 3D then it is depth-averaged according to the depth-averaging vertical datum and vertical limits.
- Parameters:
variable (string) – Name of time varying data set to be extracted.
site (string) – Location at which to extract the time series data.
datum ({'sigma', 'depth', 'height', 'elevation'}) – Vertical depth-averaging datum i.e sigma, depth, height, elevation, top, bottom.
limits (tuple) – Vertical depth-averaging limits (z1, z2) relative to vertical datum.
agg ({'mean', 'min', 'max'}) – Vertical aggregration function, default = ‘mean’ ‘mean’ will apply a weighted averaging routine (i.e., a depth average across the specified datum/limits)
- Returns:
data – 1D Time series data at a given location.
- Return type:
np.ndarray
- get_integral_data(site, datum, limits, time=None)¶
Query to extract data for vertical integration at a given location. Principle data is the integral limit (z2 - z1) and dz for each 3D model cell at the location.
- Parameters:
site (string) – Location at which to extract the time series data.
datum (string) – Vertical depth-averaging datum i.e sigma, depth, height, elevation, top, bottom.
limits (tuple) – Vertical depth-averaging limits relative to vertical datum.
- Returns:
(z2_z1, dz) – The elevation limits (z2 - z1) & dz for each 3D cell at a given location
- Return type:
tuple
- get_mask_vector(site, time=None)¶
Query to extract an array that defines invalid model data.
- Parameters:
site (string) – Location at which to extract the time series data.
- Returns:
mask – Logical index, True if model cell at time step is invalid (i.e dry).
- Return type:
np.ndarray
- get_raw_data(**kwargs)¶
Query to extract raw time series data at a given location.
- Parameters:
variable (string) – Name of time varying data set to be extracted.
site (string) – Location at which to extract the time series data.
- Returns:
data – The raw time series data as 1D or 2D numpy array
- Return type:
np.ndarray
- get_z_layer_faces(site, time=None)¶
Query to extract an array that defines the vertical layer faces of a 3D model at a given location.
- Parameters:
site (string) – Location at which to extract the time series data.
- Returns:
lfz – Vertical layer faces. If model is 2D returns None.
- Return type:
np.ndarray