opendrift.models.eulerdrift.interp

Functions

vec_nearest(X, xp)

Find nearest element in vector X to xp.

Module Contents

opendrift.models.eulerdrift.interp.vec_nearest(X, xp)[source]

Find nearest element in vector X to xp.

Args:

X Array xp Array

Returns:
i M vector of indices [0..N] of closest element in

X[0..N, i] to xp[i]