radarx.retrieve.columns.kdp_column#

radarx.retrieve.columns.kdp_column(obj, kdp=None, rhohv=None, dbz=None, *, freezing_level, threshold=0.75, slab_depth=2000.0, min_rhohv=0.8, min_dbz=None, smooth=1.0, min_depth=1000.0, n_threads=None, engine='auto')[source]#

KDP columns above the freezing level on a grid.

KDP is integrated in a slab above the freezing level and smoothed, the maxima of the integral are the cores of the columns and a watershed segmentation gives their extent (van Lier-Walqui et al. 2016); see radarx.retrieve.columns for the algorithm and for what the paper leaves open.

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

  • kdp (str or xarray.DataArray, optional) – Name of the specific differential phase (degrees km-1) in obj or the field. Default: the first of KDP and specific_differential_phase.

  • 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) – Specific differential phase (degrees km-1) of a level that counts for the top and the thickness of a column. Default 0.75, the S-band value of the paper; use 1.5 at C band.

  • slab_depth (float, optional) – Depth (m) of the slab above the freezing level. Default 2000.

  • min_rhohv (float, optional) – Smallest correlation coefficient of a grid point that counts. Default 0.8; used only with rhohv.

  • min_dbz (float, optional) – Smallest reflectivity (dBZ) of a grid point that counts. Default None.

  • smooth (float, optional) – Width (standard deviation, grid cells) of the Gaussian filter of the slab integral. Default 1; 0 or None for none.

  • min_depth (float, optional) – A grid column belongs to a KDP column where the smoothed integral is at least that of a layer of this depth (m) with KDP equal to threshold. Default 1000.

  • 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 kernels and falls back to NumPy.

Returns:

xarray.Dataset – On the horizontal grid: KDP_SLAB_INTEGRAL (degree, the integral of the positive KDP in the slab), KDP_SLAB_DEPTH (m, the thickness of the levels of the slab with KDP at or above threshold), KDP_COLUMN_TOP (m, the height of the highest such level above the freezing level, NaN where there is none) and KDP_COLUMN_OBJECT (the number of the KDP column of the grid point, 0 for none; the numbers run from 1 in every volume).

Raises:
  • ValueError – For an unknown engine, a grid without a vertical dimension or with a single level, or a field without the horizontal dimensions y and x.

  • 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

van Lier-Walqui, M., A. M. Fridlind, A. S. Ackerman, S. Collis, J. Helmus, D. R. MacGorman, K. North, P. Kollias, and D. J. Posselt, 2016: On polarimetric radar signatures of deep convection for model evaluation: Columns of specific differential phase observed during MC3E. Mon. Wea. Rev., 144, 737-758, https://doi.org/10.1175/MWR-D-15-0100.1

Examples

>>> cols = radarx.retrieve.kdp_column(grid, freezing_level=4200.0)
>>> cols.KDP_COLUMN_TOP