xoa.core.grid.shift

Contents

xoa.core.grid.shift#

xoa.core.grid.shift(a, axis=-1, direction=1, mode='edge', lon=False)[source]#

Move an array by half a grid cell along an axis, keeping its size

Parameters:
  • a (array_like)

  • axis (int)

  • direction (int) – Positive to move up, and negative to move down

  • mode ({"edge", "linear_extrap"}) – How the end value is obtained

  • lon (bool) – The values are longitudes in degrees: differences are taken across the dateline and a result between points on each side of it is put in [-180, 180[ if the input has negative values and else in [0, 360[