radarx.retrieve.vertical_profiles.melting_layer_ppi#

radarx.retrieve.vertical_profiles.melting_layer_ppi(volumes, *, dbz='auto', rhohv='auto', zdr='auto', elevation_range=(4.0, 10.0), sector=20.0, percentiles=(80.0, 20.0), rhohv_range=(0.9, 0.97), zdr_range=(0.8, 2.5), dbz_range=(30.0, 47.0), window=500.0, height_max=6000.0, min_points=20, azimuth_step=1.0, n_threads=None, engine='auto')[source]#

Melting-layer top and bottom from the PPIs of a volume.

This is the radial-profile method of Giangrande et al. (2008) [1] for PPIs at moderate elevation, where the melting layer shows as a ring of low rhohv with a Z and ZDR enhancement. On every ray the gates with 0.90 < rhohv < 0.97 below 6 km are flagged as melting-layer points if the maxima of Z and ZDR in a window of 500 m above them are between 30 and 47 dBZ and between 0.8 and 2.5 dB (the thresholds and the window of the journal paper as given in melting_layer(), the sector width of the conference version of the paper [2]). The height of a gate is its beam height (4/3 Earth model, as in qvp()). The bottom and top of the layer are the 20th and 80th percentile of the heights of the points of all rays within a running azimuthal window (Ryzhkov and Krause 2022 [3], who describe this designation, p. 530), here 20 degrees wide [2]. The sweeps with elevations between 4 and 10 degrees are used together [2], where the signature is pronounced and the beam does not blur the layer.

Unlike the azimuthal mean of a QVP, the result keeps the dependence on the azimuth, and the sweeps are not averaged before the detection. It is meant for the layer at heights and ranges where the beam at 4 to 10 degrees crosses it, that is for a layer between about 1 and 6 km. The effect of the beam width on the layer (which Ryzhkov and Krause 2022 correct with simulated profiles, a method that is not implemented here) is not corrected.

Parameters:
  • volumes (xarray.DataTree, xarray.Dataset or sequence of them) – A radar volume with sweep_* groups (xradar layout), a sweep, or a sequence of volumes in time order. The sweeps with an elevation in elevation_range that have Z, ZDR and rhohv are used. A sweep given directly is used whatever its elevation (with a warning if it is outside the range).

  • dbz, rhohv, zdr (str, optional) – Variable names; "auto" (default) looks for common names and the CF standard names.

  • elevation_range (tuple of float, optional) – Elevations (degrees) of the sweeps used. Default (4, 10).

  • sector (float, optional) – Width (degrees) of the azimuthal window. Default 20. The window of a target azimuth contains the points of the rays within half of it on both sides.

  • percentiles (tuple of float, optional) – Percentiles of the heights of the points that give the top and the bottom. Default (80, 20).

  • rhohv_range, zdr_range, dbz_range (tuple of float, optional) – Ranges of rhohv at the gate (strictly between), of the maximum of ZDR (dB) and of the maximum of Z (dBZ) above it. Defaults (0.90, 0.97), (0.8, 2.5) and (30, 47).

  • window (float, optional) – Height (m) of the window above the gate in which the maxima are searched. Default 500.

  • height_max (float, optional) – Gates must be below this height (m above sea level). Default 6000.

  • min_points (int, optional) – Minimum number of points in a window for a top and a bottom. Default 20 (the paper leaves this a parameter; the value is radarx’s choice).

  • azimuth_step (float, optional) – Spacing (degrees) of the azimuths of the result. Default 1.

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

  • engine ({"auto", "compiled", "numpy"}, optional) – Implementation to use.

Returns:

xarray.Dataset – melting_layer_top, melting_layer_bottom (m above sea level) and melting_layer_points (number of points) on azimuth; the same for all azimuths together as melting_layer_top_all, melting_layer_bottom_all and melting_layer_points_all. A sequence of volumes adds the time dimension. NaN where there are fewer than min_points points.

Notes

Left out: the weighting of the elevations (the conference paper says the higher elevations are weighted), the fuzzy-logic filter of clutter and hail, the use of earlier volumes and of model values where nothing is found, and the gaps filled in time, all of which belong to the operational algorithm.

Dask. This function computes the dask array: the result combines the gates of all sweeps of the volume. The input is loaded into memory and the result is held in memory.

References

Examples

>>> ml = radarx.retrieve.melting_layer_ppi(dtree)
>>> ml = dtree.radarx.melting_layer_ppi(sector=30.0)