pylag.fvcom_data_reader module
The FVCOM data reader should be used to read input data generated by FVCOM.
Note
fvcom_data_reader is implemented in Cython. Only a small portion of the API is exposed in Python with accompanying documentation. However, more details can be found in pylag.data_reader, where a set of python wrappers have been implemented.
- class pylag.fvcom_data_reader.FVCOMDataReader(config, mediator)
Bases:
DataReader
DataReader for FVCOM input data
Objects of type FVCOMDataReader are intended to manage all access to FVCOM data objects, including data describing the model grid as well as FVCOM output variables. Provided are methods for searching the model grid for host horizontal elements and for interpolating gridded field data to a given point in space and time.
- Parameters
config (ConfigParser) – Configuration object.
mediator (Mediator) – Mediator object for managing access to data read from file.
- get_grid_names(self)
Return a list of grid names
- get_xmin(self) DTYPE_FLOAT_t
- get_ymin(self) DTYPE_FLOAT_t
- read_data(self, DTYPE_FLOAT_t time)
Read in time dependent variable data from file?
time is used to test if new data should be read in from file. If this is the case, arrays containing time-dependent variable data are updated.
- Parameters
time (float) – The current time.
- setup_data_access(self, start_datetime, end_datetime)
Set up access to time-dependent variables.
- Parameters
start_datetime (Datetime) – Datetime object corresponding to the simulation start time.
end_datetime (Datetime) – Datetime object corresponding to the simulation end time.
- pylag.fvcom_data_reader.sigma_to_z(const DTYPE_FLOAT_t[:, ::1] sigma, const DTYPE_FLOAT_t[::1] h, const DTYPE_FLOAT_t[::1] zeta)