radarx.retrieve.disdrometer.match_radar#

radarx.retrieve.disdrometer.match_radar(obj, radar, *, sweep=0, data_vars=None, window='60s', delay=None, radius=None, band='S', temperature=20.0, qc='relative', n_threads=None, engine='auto')[source]#

Pair disdrometer spectra with the radar gate above the instrument.

Parameters:
  • obj (xarray.Dataset) – Disdrometer data of one station (counts and the scalar coordinates latitude, longitude, altitude), e.g. from radarx.io.read_parsivel(); or the output of process_disdrometer()/number_concentration() with an ND variable and the station coordinates.

  • radar (xarray.DataTree, xarray.Dataset or sequence of them) – Radar volumes or sweeps, see radar_at_location().

  • sweep, data_vars, radius (optional) – See radar_at_location().

  • window (str or numpy.timedelta64, optional) – Length of the disdrometer averaging window centred on each radar time (plus delay). Default 60 s.

  • delay (None, "fall", str or numpy.timedelta64, optional) – Time drops take from the radar gate to the instrument: none (default), a fixed lag, or "fall" for the height of the gate above the instrument divided by the terminal fall speed at the mass-weighted mean diameter of the (undelayed) window (the Atlas et al. 1973 law, at least 0.1 m s-1, without density correction: a radarx choice). Advection by the wind is not modelled.

  • band, temperature, qc, engine, n_threads (optional) – Options of process_disdrometer() for the radar variables of the averaged spectra.

Returns:

xarray.Dataset – On the radar time: the radar fields and gate geometry of radar_at_location(), the window-averaged ND and, with the suffix _disdrometer, the radar variables (DBZH, ZDR, KDP, …) and moment quantities (RAIN_RATE, DM, D0, NW, LWC, NT) of the averaged spectra, with n_records and delay (s).

Notes

The windows, delay and averaging are radarx’s own construction (no published method); delay="fall" uses the fall speed of Atlas et al. (1973) at the mass-weighted mean diameter.

Dask. This function computes the dask array: it pairs the spectra with the gates above one location. The input is loaded into memory and the result is held in memory.

References

Atlas, D., R. C. Srivastava, and R. S. Sekhon, 1973: Doppler radar characteristics of precipitation at vertical incidence. Rev. Geophys., 11 (1), 1-35, https://doi.org/10.1029/RG011i001p00001

Examples

>>> pairs = match_radar(pips, [vol1, vol2, vol3], window="60s")
...
>>> (pairs.DBZH - pairs.DBZH_disdrometer).mean()