:py:mod:`opendrift.models.eulerdrift.readers` ============================================= .. py:module:: opendrift.models.eulerdrift.readers Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: opendrift.models.eulerdrift.readers.Reader opendrift.models.eulerdrift.readers.ConstantReader opendrift.models.eulerdrift.readers.OpendriftReader Attributes ~~~~~~~~~~ .. autoapisummary:: opendrift.models.eulerdrift.readers.logger .. py:data:: logger .. py:class:: Reader .. py:method:: variables() :abstractmethod: Get list of variables .. py:method:: read_grid(grid, var, t) :abstractmethod: Read variable for grid. Args: grid: grid to read variable for var: list of strs, name of variables to read t: datetime (UTC) Returns: v0, v1, ... tuple with each variables specified in var with same shape as `grid`. .. py:class:: ConstantReader(consts) Bases: :py:obj:`Reader` Args: consts: dict, name of var: constant .. py:method:: read_grid(grid, var, _) Read variable for grid. Args: grid: grid to read variable for var: list of strs, name of variables to read t: datetime (UTC) Returns: v0, v1, ... tuple with each variables specified in var with same shape as `grid`. .. py:method:: variables() Get list of variables .. py:method:: new_xy(x=0.5, y=0.5) :staticmethod: .. py:class:: OpendriftReader(reader) Bases: :py:obj:`Reader` Wrapper around an Opendrift reader. Args: reader: opendrift reader .. py:method:: variables() Get list of variables .. py:method:: read_grid(grid, var, t) Read variable for grid. Args: grid: grid to read variable for var: list of strs, name of variables to read t: datetime (UTC) Returns: v0, v1, ... tuple with each variables specified in var with same shape as `grid`.