radarx.retrieve.wind_profile.bulk_shear#

radarx.retrieve.wind_profile.bulk_shear(profile, bottom=0.0, top=6000.0, *, normal=None, dim='height', height=None, ground=None, n_threads=None, engine='auto')[source]#

Bulk wind difference (bulk shear) over a layer.

The vector difference of the (linearly interpolated) winds at top and bottom; its component along normal is the \(\Delta u\) of RKW theory (Weisman and Rotunno [1]; Rotunno et al. [2]). The 0-6 km default layer is a radarx choice, not a layer prescribed by those papers.

Parameters:
  • profile (xarray.Dataset) – u and v (m s-1) on the vertical dimension dim.

  • bottom, top (float, optional) – Layer limits (m above ground). Default 0-6 km.

  • normal (float or xarray.DataArray, optional) – Azimuth (degrees clockwise from north) of a direction, e.g. the normal to a squall line pointing toward its inflow (its direction of motion). The shear component along it is returned as shear_normal, the \(\Delta u\) of RKW theory.

  • dim (str, optional) – Vertical dimension. Default "height".

  • height (str or xarray.DataArray, optional) – Heights (m) if not the dim coordinate.

  • ground (float or xarray.DataArray, optional) – Height (m) of the ground in the units of the heights; default the lowest level with a valid wind.

  • n_threads (int, optional) – Threads for the compiled kernel. Default: all cores.

  • engine ({"auto", "compiled", "numpy"}, optional) – Kernel implementation.

Returns:

xarray.Dataset – shear_u, shear_v, shear_speed, shear_direction (the direction the shear vector points from, as for winds) and, with normal, shear_normal.

References