py_eddy_tracker.dataset.grid.compute_stencil

py_eddy_tracker.dataset.grid.compute_stencil(x, y, h, m, earth_radius, vertical=False, stencil_halfwidth=4)[source]

Compute stencil on RegularGrid

Parameters:
  • x (array) – longitude coordinates

  • y (array) – latitude coordinates

  • h (array) – 2D array to derivate

  • m (array) – mask associated to h to know where are invalid data

  • earth_radius (float) – Earth radius in m

  • vertical (bool) – if True stencil will be vertical (along y)

  • stencil_halfwidth (int) – from 1 to 4 to specify maximal kernel usable

stencil_halfwidth:

    1. :

    • (-1, 1, 0)

    • (0, -1, 1)

    • (-1, 0, 1) / 2

    1. : (1, -8, 0, 8, 1) / 12

    1. : (-1, 9, -45, 0, 45, -9, 1) / 60

    1. : (3, -32, 168, -672, 0, 672, -168, 32, 3) / 840