opendrift.readers.interpolation

Submodules

Attributes

logger

horizontal_interpolation_methods

vertical_interpolation_methods

Classes

Nearest2DInterpolator

NDImage2DInterpolator

LinearND2DInterpolator

Linear2DInterpolator

Nearest1DInterpolator

Linear1DInterpolator

ReaderBlock

Class to store and interpolate the output from a reader with data on a regular (structured) grid.

Functions

expand_numpy_array(data)

fill_NaN_towards_seafloor(array)

Extrapolate NaN-values (missing) towards seafloor

Package Contents

opendrift.readers.interpolation.logger
opendrift.readers.interpolation.expand_numpy_array(data)[source]
class opendrift.readers.interpolation.Nearest2DInterpolator(xgrid, ygrid, x, y)[source]
x
y
xi
yi
__call__(array2d)[source]
class opendrift.readers.interpolation.NDImage2DInterpolator(xgrid, ygrid, x, y)[source]
x
y
xi
yi
__call__(array2d)[source]
class opendrift.readers.interpolation.LinearND2DInterpolator(xgrid, ygrid, x, y)[source]
logger
block_x
block_y
x
y
__call__(array2d)[source]
class opendrift.readers.interpolation.Linear2DInterpolator(xgrid, ygrid, x, y)[source]
logger
x
y
xi
yi
__call__(array2d)[source]
opendrift.readers.interpolation.horizontal_interpolation_methods
class opendrift.readers.interpolation.Nearest1DInterpolator(zgrid, z)[source]
zi
__call__(array2d)[source]
class opendrift.readers.interpolation.Linear1DInterpolator(zgrid, z)[source]
index_above
index_below
weight_above
xi
__call__(array2d)[source]
opendrift.readers.interpolation.vertical_interpolation_methods
opendrift.readers.interpolation.fill_NaN_towards_seafloor(array)[source]

Extrapolate NaN-values (missing) towards seafloor

class opendrift.readers.interpolation.ReaderBlock(data_dict, interpolation_horizontal='linearNDFast', interpolation_vertical='linear')[source]

Class to store and interpolate the output from a reader with data on a regular (structured) grid.

x
y
time
data_dict
_initialize_interpolator(x, y, z=None)[source]
interpolate(x, y, z=None, variables=None, profiles=[], profiles_depth=None)[source]
_interpolate_horizontal_layers(data, nearest=False)[source]

Interpolate all layers of 3d (or 2d) array.

covers_positions(x, y, z=None)[source]

Check if given positions are covered by this reader block.