pylag.arakawa_a_data_reader module
Data reader for input data defined on an Arakawa A-grid.
Note
arakawa_a_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.arakawa_a_data_reader.ArakawaADataReader(config, mediator)
Bases:
DataReaderDataReader for inputs defined on an Arakawa A-grid
Objects of type ArakawaADataReader are intended to manage all access to data objects defined on a Arakawa A-grid, including data describing the model grid itself as well as model 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 minimum x-value for the domain
- Returns:
The minimum value of x across the grid.
- Return type:
- get_ymin(self) DTYPE_FLOAT_t
Get minimum y-value for the domain
- Returns:
The minimum value of y across the grid.
- Return type:
- 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.