opendrift.readers.reader_current_from_track

Classes

Reader

An abstract reader. Implementors provide a method to read data and specify how it is interpolated.

Module Contents

class opendrift.readers.reader_current_from_track.Reader(obslon, obslat, obstime, obsfile=None, wind_east=0, wind_north=0, windreader=None, wind_factor=0.018, name=None)[source]

Bases: opendrift.readers.basereader.BaseReader, opendrift.readers.basereader.ContinuousReader

An abstract reader. Implementors provide a method to read data and specify how it is interpolated.

This class inherits variables.Variables which inherits variables.ReaderDomain. ReaderDomain is responsible for the extent and domain of the reader, including checking for out-of-bounds and projection conversion. Variables is responsible for returning interpolated data at the requests positions or profiles. Apart from coercing the returned data into the right type for opendrift.models.basemodel, it defines the abstract interface to variables.Variables._get_variables_interpolated_() which reader-implementations must provide (_usually_ through one of the main reader-types, see: opendrift.readers).

Reader which statistically extrapolate current forcing. It uses the residual track obtained by subtracting the wind forcing component from the past observed motion of a particle.

variables = ['x_sea_water_velocity', 'y_sea_water_velocity']
proj4 = '+proj=latlong'
xmin
xmax = 180
ymin
ymax = 90
z
start_time
end_time
times

Setting this to True overrides temporal and spatial bounds checks. Also useful for readers that are constant and do not have a temporal dimension.

time_step
speed
x_sea_water_velocity
y_sea_water_velocity
get_variables(requested_variables, time=None, x=None, y=None, z=None)[source]

Obtain and return values of the requested variables at all positions (x, y, z) closest to given time.

Returns:

Dictionary with arrays of length len(x) with values at exact positions x, y and z.