shearing_stretching_deformation

metpy.calc.shearing_stretching_deformation(u, v, dx, dy)[source]

Calculate the horizontal shearing and stretching deformation of the horizontal wind.

Parameters:
  • u ((M, N) ndarray) – x component of the wind
  • v ((M, N) ndarray) – y component of the wind
  • dx (float) – The grid spacing in the x-direction
  • dy (float) – The grid spacing in the y-direction
  • dim_order (str or None, optional) – The ordering of dimensions in passed in arrays. Can be one of None, 'xy', or 'yx'. 'xy' indicates that the dimension corresponding to x is the leading dimension, followed by y. 'yx' indicates that x is the last dimension, preceded by y. None indicates that the default ordering should be assumed, which changed in version 0.7 from ‘xy’ to ‘yx’. Can only be passed as a keyword argument, i.e. func(…, dim_order=’xy’).
Returns:

shearing, strectching (tuple of (M, N) ndarrays) – The horizontal shearing and stretching deformation, respectively

Deprecated since version 0.7.0: Function no longer has any performance benefit over individual calls to shearing_deformation and stretching_deformation and will be removed from MetPy in 0.9.0.