radarx.retrieve.columns.zdr_column#

radarx.retrieve.columns.zdr_column(obj, zdr=None, rhohv=None, dbz=None, *, freezing_level, threshold=1.0, min_rhohv=0.8, min_dbz=None, n_threads=None, engine='auto')[source]#

Depth of the ZDR column above the freezing level on a grid.

At every horizontal grid point, the vertically continuous depth, from the freezing level up, in which the differential reflectivity is at least threshold (Snyder et al. 2015); see radarx.retrieve.columns for the algorithm and for what the paper leaves open.

Parameters:
  • obj (xarray.DataArray or xarray.Dataset) – The differential reflectivity (DataArray) or a dataset with it, on a grid with a vertical dimension (z, altitude, height or level, in m) and any horizontal and leading (time) dimensions.

  • zdr (str or xarray.DataArray, optional) – Name of the differential reflectivity (dB) in obj or the field. Default: the first of ZDR, differential_reflectivity and corrected_differential_reflectivity.

  • rhohv (str or xarray.DataArray, optional) – The copolar correlation coefficient, to remove the grid points below min_rhohv. Default: no removal.

  • dbz (str or xarray.DataArray, optional) – The reflectivity (dBZ), used with min_dbz. Default: the first of DBZH, DBZ, reflectivity and corrected_reflectivity.

  • freezing_level (float, str or xarray.DataArray) – Height of the 0 degree Celsius level in m, in the vertical reference of the grid: a number, a field of obj (name) or a DataArray that broadcasts to the horizontal dimensions (a field in km is converted).

  • threshold (float, optional) – Differential reflectivity (dB) that a grid point needs to belong to the column. Default 1, as Snyder et al. (2015).

  • min_rhohv (float, optional) – Smallest correlation coefficient of a grid point that counts. Default 0.8 (“approximately 0.80” in the paper); used only with rhohv.

  • min_dbz (float, optional) – Smallest reflectivity (dBZ) of a grid point that counts. Default None: no condition, as in the paper; 20 dBZ keeps the noise of weak echo out of the columns (see radarx.retrieve.columns). A radarx addition.

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

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

Returns:

xarray.DataArray – ZDR_COLUMN_DEPTH (m) on the horizontal dimensions of the grid: the depth of the column, 0 where there is none and NaN where no level at or above the freezing level has a ZDR value.

Raises:
  • ValueError – For an unknown engine, a grid without a vertical dimension or with a single level.

  • KeyError – If a field is not found.

Notes

Dask and extra dimensions. The fields may have extra leading dimensions (for example time or volume): each sweep is processed on its own and the result has the same extra dimensions. Dask arrays stay lazy: the result is a dask array and nothing is computed until it is (the sweep dimensions are rechunked into one chunk).

References

Snyder, J. C., A. V. Ryzhkov, M. R. Kumjian, A. P. Khain, and J. Picca, 2015: A ZDR column detection algorithm to examine convective storm updrafts. Wea. Forecasting, 30, 1819-1844, https://doi.org/10.1175/WAF-D-15-0068.1

Examples

>>> depth = radarx.retrieve.zdr_column(grid, freezing_level=4200.0)
>>> depth = grid.radarx.zdr_column(rhohv="RHOHV", freezing_level="T0_HEIGHT")