xoa.dyn.flow2d

Contents

xoa.dyn.flow2d#

xoa.dyn.flow2d(u, v, xy0, duration, step, date=None)[source]#

Integrate gridded 2D velocities from initial positions

Uses a 4th-order Runge-Kutta scheme to advect particles in a 2D velocity field.

Parameters:
Returns:

xarray.Dataset – Output positions with lon and lat coordinates varying along time and particles dimensions.

Example

Advect two particles for 3 hours with a 2-hour time step:

ff = flow2d(u, v, ([1., 2.], [1., 1.5]),
            np.timedelta64(3, "h"), np.timedelta64(2, "h"),
            date="2000-01-01")

See also

xoa.interp.grid2loc