pylag.atmosphere_data_reader module

Atmosphere data reader for reading atmospheric data on an Arakawa A-grid

Note

atmosphere_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.atmosphere_data_reader.AtmosphereDataReader(config, mediator)

Bases: DataReader

AtmosphereDataReader for atmospheric inputs on a Arakawa A-grid

Objects of type AtmosphereDataReader are intended to manage all access to atmospheric 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.