radarx.retrieve.shear.azimuthal_shear_layer_max#

radarx.retrieve.shear.azimuthal_shear_layer_max(obj, field=None, layer=(0.0, 2000.0), *, reference=None, shear=None, window=(750.0, 2500.0), weights='uniform', min_valid_fraction=0.5, median_filter=None, mask=None, exclude=None, nodata='auto', dbz=None, min_dbz=None, reflectivity_distance=5000.0, rotation='cyclonic', n_threads=None, engine='auto')[source]#

Layer-maximum azimuthal shear over the tilts of a volume.

The maximum, at every position of a reference tilt, of the LLSD azimuthal shear of all tilts whose beam centre is inside a height layer at that position; the MRMS products are the layers 0 to 2 km (near-surface rotation) and 3 to 6 km (mid-level rotation) above ground level (Smith et al. 2016 [1]).

Parameters:
  • obj (xarray.DataTree) – A volume with sweep_* nodes, with velocity dealiased (see radarx.retrieve.dealias_velocity()), or with an azimuthal shear field if shear is given.

  • field (str, optional) – Dealiased radial velocity (m s⁻¹). Default: the first of VRADH, VRAD, VRADV, VEL, VELOCITY, velocity that a sweep holds. Not needed if shear is given.

  • layer (tuple of float, optional) – Bottom and top of the layer in metres above the radar. Default (0, 2000); use (3000, 6000) for the mid-level product. The MRMS layers are above ground level; the terrain under the beam is not known, so the heights are those of the beam centre above the radar (4/3 Earth model, see radarx.fundamentals.geometry.beam_height_at_ground_range()), which equal heights above ground over flat terrain.

  • reference (str, optional) – Name of the sweep whose rays and gates the result is defined on. Default: the sweep with the lowest elevation that holds field.

  • shear (str, optional) – Name of an azimuthal shear field already in the sweeps (for example from .radarx.assign(azimuthal_shear(...))). Default None: the shear is computed here with llsd().

  • window, weights, min_valid_fraction, median_filter, mask, exclude, nodata – Options of llsd() for the shear computed here.

  • dbz (str, optional) – Reflectivity field for min_dbz. Default: the first of DBZH, DBZ and reflectivity in the volume.

  • min_dbz (float, optional) – If given (MRMS: 20 dBZ), the shear of a tilt is left out at gates with no reflectivity of at least this value within reflectivity_distance, before the maximum is taken (Smith et al. 2016 [1]). When a sweep holds no reflectivity (the split Doppler cuts of NEXRAD), that of the sweep within 0.2 degrees of its elevation angle is used. Default None: no reflectivity test.

  • reflectivity_distance (float, optional) – Distance (m) in the plane of the sweep. Default 5000, the MRMS value.

  • rotation ({"cyclonic", "anticyclonic", "both"}, optional) – "cyclonic" (default) takes the largest value (positive shear, the mesocyclones of the Northern Hemisphere), "anticyclonic" the smallest (most negative) and "both" the value of largest magnitude, with its sign.

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

  • engine ({"auto", "compiled", "numpy"}, optional) – Implementation to use. "auto" (default) prefers the compiled kernel and falls back to NumPy; both give the same values.

Returns:

xarray.Dataset – On the grid and coordinates of the reference sweep: azimuthal_shear_layer_max in s⁻¹ (float32, NaN where no tilt of the layer has data) and layer_max_elevation, the elevation angle of the tilt that gave the maximum (degrees, NaN where none).

Notes

For each gate of the reference sweep (azimuth \(\theta\), ground range \(s\)), every tilt with elevation \(\alpha\) has its beam centre at the height of the 4/3 Earth model at that ground range. If that height is in the layer, the value of the tilt at the nearest ray (within 1.5 ray spacings) and nearest gate (within half a gate) at the same ground range is a candidate, and the layer maximum is the largest candidate. Repeated cuts of one elevation (SAILS) count as further tilts. The shear of each tilt is the LLSD of the tilt’s own grid, so the velocity and the shear are not interpolated between tilts.

What is taken from the literature, from Smith et al. (2016) [1]: the layers 0 to 2 km and 3 to 6 km, the maximum over the tilts “at each range”, and the removal of shear that is not in or near a storm cell (reflectivity of 20 dBZ within 5 km) before the maximum. The MRMS products are made on a 3-D grid from many radars and updated every 2 minutes; this function is the single-radar equivalent on the polar grid of one volume, and the choice of the reference grid, the nearest-gate sampling and the beam heights are radarx’s. The MRMS pre-processing of velocity (the dealiasing of Jing and Wiener 1993, and the LLSD window, which Smith et al. do not give) is not reproduced; median_filter (Smith and Elmore 2004 [2]) and window are options. Miller et al. (2013, doi 10.1175/WAF-D-12-00065.1) is cited for the LLSD maximum within a layer, but the paper has not been compared and nothing here is attributed to it.

Dask. This function computes the dask array: it takes the maximum over the tilts of the volume. The input is loaded into memory and the result is held in memory.

References

Examples

>>> low = radarx.retrieve.azimuthal_shear_layer_max(dtree)
>>> mid = dtree.radarx.azimuthal_shear_layer_max(layer=(3000.0, 6000.0))