radarx.retrieve.dual_frequency.dual_frequency_ratio#

radarx.retrieve.dual_frequency.dual_frequency_ratio(dbz_ka, dbz_w, *, pia_ka=None, pia_w=None, match='exact', tolerance=None, calibration='kw2', frequencies=None, temperature=0.0)[source]#

Dual-frequency ratio in dB of the reflectivities of two radars.

DFR = (dbz_ka + pia_ka) - (dbz_w + pia_w): the reflectivity at the lower frequency (Ka band) minus the reflectivity at the higher one (W band), each corrected for its two-way path attenuation (radarx.retrieve.cloud_attenuation), in dB.

Parameters:
  • dbz_ka, dbz_w (xarray.DataArray) – The reflectivity (dBZ) at the lower and the higher frequency, with coordinates to match them (time, range or height).

  • pia_ka, pia_w (float or xarray.DataArray, optional) – Two-way path-integrated attenuation (dB, positive) at the two frequencies, for example PIA_GAS + PIA_CLOUD_LIQUID. Default: none.

  • match ({"exact", "nearest", "interp"}, optional) – How the fields are put on the same coordinates. "exact" (default) keeps the coordinate values the two fields share; "nearest" takes the nearest value of dbz_w for every coordinate value of dbz_ka (within tolerance); "interp" interpolates dbz_w linearly to the coordinates of dbz_ka.

  • tolerance (dict, optional) – For "nearest": the largest distance per dimension (for time a numpy.timedelta64), as a dict {dim: value}. Default: none.

  • calibration ({"kw2", "liquid"}, optional) – The convention of the reflectivities. "kw2" (default): the equivalent reflectivity factor with the dielectric factor of water \(|K_w|^2 = 0.93\) at both frequencies, as the retrievals of this module assume. "liquid": calibrated so that cloud droplets of the same size distribution give the same dBZ at both frequencies, with \(|K_w(f)|^2\) of liquid water at each frequency, the convention of Cloudnet (and CloudnetPy). The ratio is then converted to "kw2", which adds \(10 \log_{10} (|K_w(f_{Ka})|^2 / |K_w(f_W)|^2)\) (1.1 dB for 35 and 94 GHz at 0 degrees Celsius), so that ice particles in the Rayleigh regime have a ratio of zero. Needs frequencies.

  • frequencies (tuple of float, optional) – The lower and the higher frequency in GHz, for calibration="liquid".

  • temperature (float, optional) – Temperature of the water in degrees Celsius for its dielectric factor, for calibration="liquid". Default 0.

Returns:

xarray.DataArray – DFR (dB) on the matched coordinates; NaN where either field is missing.

Raises:
  • ValueError – For an unknown match or calibration, or calibration="liquid" without two increasing frequencies (GHz).

  • TypeError – If a reflectivity is not a DataArray.

Notes

A ratio below zero is possible in noise and for calibration offsets of a few tenths of a dB; the retrievals of radarx.retrieve.dual_frequency accept values down to tolerance below the smallest tabulated ratio.

References

Hogan, R. J., A. J. Illingworth, and H. Sauvageot, 2000: Measuring crystal size in cirrus using 35- and 94-GHz radars. J. Atmos. Oceanic Technol., 17, 27-37, https://doi.org/10.1175/1520-0426(2000)017<0027:MCSICU>2.0.CO;2

Tukiainen, S., E. O’Connor, and A. Korpinen, 2020: CloudnetPy: A Python package for processing cloud remote sensing data. J. Open Source Softw., 5, 2123, https://doi.org/10.21105/joss.02123

Examples

>>> dfr = dual_frequency_ratio(ka.DBZ, w.DBZ, pia_ka=pia_ka.PIA_GAS, pia_w=pia_w.PIA_GAS,
...                            match="nearest")