pylag.waves_data_reader module

Waves data reader for reading waves data on an Arakawa A-grid

Note

waves_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.waves_data_reader.WavesDataReader(config, mediator)

Bases: DataReader

WavesDataReader for wave model inputs on an Arakawa A-grid

Objects of type WavesDataReader are intended to manage all access to wave data defined on a Arakawa A-grid, including data describing the grid as well as atmospheric 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

Returns

List of grid names on which which input data are defined.

Return type

list [str]

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.