xoa.dyn.get_strain

Contents

xoa.dyn.get_strain#

xoa.dyn.get_strain(u, v, dx=None, dy=None, z=None, normalize=False)[source]#

Compute the normal and shear strains, in s-1

They are \(\partial_x u - \partial_y v\) and \(\partial_x v + \partial_y u\).

Parameters:
  • u (xarray.DataArray) – Zonal and meridional velocities in m s-1 on the same collocated grid, with the X and Y dimensions found with xoa.coords.

  • v (xarray.DataArray) – Zonal and meridional velocities in m s-1 on the same collocated grid, with the X and Y dimensions found with xoa.coords.

  • dx (None, float, xarray.DataArray) – Resolutions along X and Y in meters, which default to the ones computed from the coordinates with xoa.grid.get_dx_dy().

  • dy (None, float, xarray.DataArray) – Resolutions along X and Y in meters, which default to the ones computed from the coordinates with xoa.grid.get_dx_dy().

  • z (None, xarray.DataArray) – Vertical coordinate of the levels, like the depths or heights of the sigma levels. The horizontal derivatives are then computed at constant z instead of along the levels, which are sloping. The velocities must then have a vertical dimension, which is the one of z, and the sign convention of z does not matter. See Dynamics diagnostics and polygon masks.

  • normalize (bool) – Divide the result by the absolute value of the Coriolis parameter to make it dimensionless.

Returns:

  • xarray.DataArray – Normal strain

  • xarray.DataArray – Shear strain