opendrift.models.eulerdrift.readers

Attributes

logger

Classes

Reader

ConstantReader

Args:

OpendriftReader

Wrapper around an Opendrift reader.

Module Contents

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

consts
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

r
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.