radarx.retrieve.tornado.rotation_couplets#

radarx.retrieve.tornado.rotation_couplets(obj, field=None, *, threshold=0.006, window=(750.0, 2500.0), min_area=500000.0, diameter=5000.0, min_dbz=None, rotation='cyclonic', min_tilts=None, link_distance=5000.0, max_skip=0, median_filter=None)[source]#

Rotation couplets: compact maxima of LLSD azimuthal shear.

Parameters:
  • obj (xarray.Dataset or xarray.DataTree) – A georeferenced PPI sweep (x and y coordinates, e.g. from dtree.xradar.georeference()) with dealiased radial velocity, or a volume whose sweeps holding the velocity are processed one by one.

  • field (str, optional) – Dealiased radial velocity (m s⁻¹). Default: the dealiased velocity that the sweep holds (VRADH_dealiased, the name that radarx.retrieve.dealias_velocity() gives it), else the first of VRADH, VRAD, VRADV, VEL, VELOCITY, velocity, radial_velocity. The name used is the attribute source_field of the result. A field that is passed is used as it is; velocity that is not dealiased shows the fold lines as couplets.

  • threshold (float, optional) – Azimuthal shear (s⁻¹, its magnitude for the chosen rotation) above which gates belong to a candidate circulation. Default 0.006, the threshold that Veillette et al. (2025) [3] apply to the azimuthal shear field of their feature-based baselines (appendix); the same value is credited here to the NWS Tornado Probability Algorithm (Sandmæl et al. 2023 [1]) on the 0.5° tilt, not checked against the paper.

  • window (tuple of float, optional) – LLSD window (range_m, azimuth_m), see radarx.retrieve.llsd() and Mahalik et al. (2019) [2]. Default (750, 2500), a radarx choice not checked against Mahalik et al. or Sandmæl et al.

  • min_area (float, optional) – Smallest area (m²) of a region above the threshold. Default 0.5 km², a radarx choice without a published source.

  • diameter (float, optional) – Length (m) of the arc, centred on the shear peak, along which the largest velocity difference delta_v is measured at the range of the peak. Default 5 km, a radarx choice without a published source.

  • min_dbz (float, optional) – If given, only gates with at least this reflectivity (dBZ) count.

  • rotation ({"cyclonic", "anticyclonic", "both"}, optional) – Sense of rotation to detect. "cyclonic" (default) is positive azimuthal shear, the mesocyclones of the Northern Hemisphere; "anticyclonic" is negative shear, which is the sense of mesocyclones in the Southern Hemisphere (and of anticyclonic tornadoes in the north); "both" uses the magnitude of the shear. The reported azimuthal_shear keeps its sign.

  • min_tilts (int, optional) – Vertical continuity (volumes only): keep the couplets that are part of a chain of couplets on at least this many tilts, that is on this many distinct elevation angles (repeated cuts of one angle count once). Default None: every couplet is kept, as before. The variable n_tilts, the number of tilts of the chain through the couplet, is added when it is given.

  • link_distance (float, optional) – Largest horizontal distance (m) between the peaks of two couplets of the same sense of rotation on neighbouring tilts for them to be linked. Default 5000, a radarx choice (the NSSL Mesocyclone Detection Algorithm derives a maximum feature distance from the sizes of the two features; that formula is not used here).

  • max_skip (int, optional) – Tilts that may be missing between two linked couplets: when no couplet of the tilt directly below matches, up to max_skip tilts further down are searched, as the algorithm description does for one tilt. Default 0: couplets must be on consecutive tilts.

  • median_filter (None, True or int, optional) – Median filter of the velocity before the LLSD fit, see radarx.retrieve.llsd() (Smith and Elmore 2004). Default None: none.

Returns:

xarray.Dataset or xarray.DataTree – One entry per couplet along couplet, strongest shear first: azimuthal_shear (peak), delta_v, rotational_velocity (delta_v / 2) and area, with the azimuth, range (and x, y) of the peak. A DataTree input gives a DataTree with one such node per sweep that has the velocity. With min_tilts, also n_tilts.

Raises:
  • ValueError – If a sweep has no x and y coordinates (georeference the volume first), or no sweep holds the velocity.

  • KeyError – If a sweep is given that does not hold the velocity.

Notes

A couplet is an 8-connected region of gates with LLSD azimuthal shear at or above threshold (and optionally min_dbz); the peak shear, the velocity difference along the azimuth at the range of the peak (the inbound and outbound extremes within diameter of arc, as in the usual description of rotational velocity; not checked against a reference) and the area are reported, and rotational_velocity is delta_v / 2 (the usual definition of rotational velocity, not taken from the cited papers). This is a simplified physical diagnostic, not the Tornado Probability Algorithm of Sandmæl et al. (2023) [1], which is a machine- learning model on LLSD-derived features; the region extraction, minimum area, delta_v measurement and all sizes other than the 0.006 s⁻¹ threshold are radarx choices.

Vertical continuity (min_tilts). The tilts of the volume are ordered by elevation angle. From a couplet the chain is followed up and down: on the next tilt the nearest couplet of the same sense of rotation within link_distance of the current peak is taken, and the chain goes on from it. The couplet is kept when its chain spans min_tilts tilts. This follows the association of shear features across elevation angles of the WSR-88D Mesocyclone Detection Algorithm as described in its algorithm description [4]: a feature at one elevation angle is correlated with a feature at the previous angle when their centres are closer than a maximum feature distance (the description takes the first match in its list; the nearest is taken here), and a second previous angle is tried when the first has no match; a vortex with two or more features is “3-D shear” or a mesocyclone. Not taken from it: the distance (its formula is not used), the thresholds on shear, momentum and aspect of its features, and the time continuity it also requires. The published algorithm papers (Stumpf et al. 1998; Mitchell et al. 1998) have not been compared. The association is made on the (few) couplets in Python: the numerical work is the LLSD.

Dask. This function computes the dask array: the number of couplets depends on the data. The input is loaded into memory and the result is held in memory.

References