total_deformation¶
- metpy.calc.total_deformation(u, v, dx=None, dy=None, x_dim=- 1, y_dim=- 2)¶
Calculate the horizontal total deformation of the horizontal wind.
- Parameters
u ((…, M, N)
xarray.DataArrayorpint.Quantity) – x component of the windv ((…, M, N)
xarray.DataArrayorpint.Quantity) – y component of the winddx (
pint.Quantity, optional) – The grid spacing(s) in the x-direction. If an array, there should be one item less than the size of u along the applicable axis. Optional ifxarray.DataArraywith latitude/longitude coordinates used as input.dy (
pint.Quantity, optional) – The grid spacing(s) in the y-direction. If an array, there should be one item less than the size of u along the applicable axis. Optional ifxarray.DataArraywith latitude/longitude coordinates used as input.x_dim (int, optional) – Axis number of x dimension. Defaults to -1 (implying […, Y, X] order). Automatically parsed from input if using
xarray.DataArray.y_dim (int, optional) – Axis number of y dimension. Defaults to -2 (implying […, Y, X] order). Automatically parsed from input if using
xarray.DataArray.
- Returns
(…, M, N)
xarray.DataArrayorpint.Quantity– Total Deformation
Notes
If inputs have more than two dimensions, they are assumed to have either leading dimensions of (x, y) or trailing dimensions of (y, x), depending on the value of
dim_order.Changed in version 1.0: Changed signature from
(u, v, dx, dy)See also