radarx.retrieve.calibration.z_offset#

radarx.retrieve.calibration.z_offset(obj, *, dbz=None, zdr=None, kdp=None, rhohv=None, snr=None, mask=None, zdr_offset=0.0, z_range=(20.0, 45.0), bin_width=1.0, min_rhohv=0.98, min_snr=None, min_kdp=0.05, min_bin_count=100, statistic='median', dim=None, band=None, temperature=20.0, mu_lambda='cao2008', n_threads=None, engine='auto')[source]#

Offset of the reflectivity from the self-consistency of Z, ZDR and KDP in rain.

In classes of bin_width dB of the measured reflectivity, the mean ZDR (minus zdr_offset) and KDP give the reflectivity that rain must have, 10 log10(KDP / g(ZDR)), where g is the ratio of KDP to the linear reflectivity as a function of ZDR. The offset is the median (or the gate-weighted mean) over the classes of the measured minus that reflectivity; subtract it from the reflectivity. See radarx.retrieve.calibration for the method and its limits.

Use gates in rain only (mask), with the attenuation corrected (the consistency relation is for the unattenuated reflectivity; the path integral of KDP is the reference, which is why the specific attenuation must be removed from Z first) and a ZDR that is already calibrated.

Parameters:
  • obj (xarray.DataArray, xarray.Dataset or xarray.DataTree) – The reflectivity (DataArray; then zdr and kdp must be arrays), a sweep, a profile or a volume.

  • dbz, zdr, kdp, rhohv, snr (str or xarray.DataArray, optional) – Fields. Defaults DBZH, ZDR, KDP (degree km-1, for example from radarx.retrieve.estimate_kdp()) and RHOHV.

  • mask (xarray.DataArray, optional) – Boolean array of the rain gates (below the melting layer).

  • zdr_offset (float, optional) – Offset of ZDR in dB, from zdr_offset(). Default 0.

  • z_range (tuple of float, optional) – Limits of the reflectivity classes (dBZ). Default (20, 45); above that hail and resonance effects make the relations unreliable (radarx choice).

  • bin_width (float, optional) – Width of a reflectivity class in dB. Default 1, as in Ryzhkov et al. (2005).

  • min_rhohv (float, optional) – Smallest correlation coefficient. Default 0.98.

  • min_snr (float, optional) – Smallest SNR in dB; the SNR field is only used with this.

  • min_kdp (float, optional) – Smallest class mean of KDP (degree km-1) to be used. Default 0.05 (S band); take about twice as much at C band and four times at X band.

  • min_bin_count (int, optional) – Fewest gates in a class. Default 100.

  • statistic ({"median", "mean"}, optional) – Median over the classes (default) or the weighted mean.

  • dim (str or sequence of str, optional) – Dimensions to reduce, see zdr_offset().

  • band, temperature (optional) – Band and temperature of the scattering tables, see zdr_offset().

  • mu_lambda (str or sequence of float, optional) – Relation between the shape and the slope of the drop size distribution, see radarx.retrieve.dsd(). Default "cao2008".

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

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

Returns:

xarray.Dataset or xarray.DataTree – Z_OFFSET (dB), Z_OFFSET_MEDIAN, Z_OFFSET_MEAN, Z_OFFSET_STD (the spread of the class offsets), Z_OFFSET_COUNT (gates) and Z_OFFSET_BINS (classes), with the dimensions that were not reduced.

Raises:
  • KeyError – If a field is not found.

  • ValueError – For unknown options.

  • ImportError – If engine="compiled" and the compiled kernel is not available.

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

Gorgucci, E., G. Scarchilli, and V. Chandrasekar, 1992: Calibration of radars using polarimetric techniques. IEEE Trans. Geosci. Remote Sens., 30 (5), 853-858, https://doi.org/10.1109/36.175319 (the self-consistency of Z, ZDR and KDP for calibration; the paper could not be read, the title and the use are from the citing literature).

Ryzhkov, A. V., S. E. Giangrande, V. M. Melnikov, and T. J. Schuur, 2005: Calibration issues of dual-polarization radar measurements. J. Atmos. Oceanic Technol., 22 (8), 1138-1155, https://doi.org/10.1175/JTECH1772.1 (averaging in classes of 1 dB of Z; the relations of the paper are not used).

Gourley, J. J., A. J. Illingworth, and P. Tabary, 2009: Absolute calibration of radar reflectivity using redundancy of the polarization observations and implied constraints on drop shapes. J. Atmos. Oceanic Technol., 26 (4), 689-703, https://doi.org/10.1175/2008JTECHA1152.1

Cao, Q., G. Zhang, E. Brandes, T. Schuur, A. Ryzhkov, and K. Ikeda, 2008: Analysis of video disdrometer and polarimetric radar data to characterize rain microphysics in Oklahoma. J. Appl. Meteor. Climatol., 47 (8), 2238-2255, https://doi.org/10.1175/2008JAMC1732.1 (the shape-slope relation of the drop size distribution).

Examples

>>> off = radarx.retrieve.z_offset(sweep, mask=rain)
>>> z_cal = sweep.DBZH - float(off.Z_OFFSET)