opendrift.models.eulerdrift.readers

Module Contents

Classes

Reader

ConstantReader

Args:

OpendriftReader

Wrapper around an Opendrift reader.

Attributes

logger

opendrift.models.eulerdrift.readers.logger
class opendrift.models.eulerdrift.readers.Reader[source]
abstract variables()[source]

Get list of variables

abstract read_grid(grid, var, t)[source]

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.

class opendrift.models.eulerdrift.readers.ConstantReader(consts)[source]

Bases: Reader

Args:

consts: dict, name of var: constant

read_grid(grid, var, _)[source]

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.

variables()[source]

Get list of variables

static new_xy(x=0.5, y=0.5)[source]
class opendrift.models.eulerdrift.readers.OpendriftReader(reader)[source]

Bases: Reader

Wrapper around an Opendrift reader.

Args:

reader: opendrift reader

variables()[source]

Get list of variables

read_grid(grid, var, t)[source]

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.