stretching_deformation¶
- 
metpy.calc.stretching_deformation(u, v, dx, dy)[source]¶
- Calculate the 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 or ndarray) – 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. 
- dy (float or ndarray) – 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. 
- 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.- Noneindicates that the default ordering should be assumed, which is ‘yx’. Can only be passed as a keyword argument, i.e. func(…, dim_order=’xy’).
 
- Returns
- (M, N) ndarray – Stretching Deformation 
 - See also - 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.