radarx.retrieve.satellite_match.match_dpr#

radarx.retrieve.satellite_match.match_dpr(obj, dpr, *, gr_fields=None, dpr_fields=None, dims=('scan', 'ray', 'bin'), footprint_diameter=5000.0, beamwidth=None, min_range=15000.0, max_range=100000.0, min_fraction=0.5, weighting='uniform', k_e=1.3333333333333333, max_time_difference=None, n_threads=None, engine='auto')[source]#

Match the volumes of a ground radar and of the GPM DPR.

For every DPR footprint between min_range and max_range from the radar and every sweep of the ground radar, the fields of both radars are averaged over their common volume, with the parallax of the DPR ray taken into account. See the module documentation for the geometry and for the choices of radarx.

Parameters:
  • obj (xarray.DataTree or xarray.Dataset) – Ground radar volume (sweeps with azimuth, elevation, range and the radar site latitude, longitude and altitude), or one sweep.

  • dpr (xarray.Dataset) – The DPR swath with the dimensions dims (scan, ray, bin): Longitude and Latitude of the rays (scan, ray; at the ellipsoid), localZenithAngle (scan, ray; degrees), height of the range bins above the ellipsoid (scan, ray, bin; m) and the fields to match, e.g. zFactorFinal. The names are those of the products 2A-DPR, 2A-Ku and 2A-Ka (PRE group for localZenithAngle and height, SLV for zFactorFinal and paramDSD); longitude, latitude and zenith are accepted too. An optional time (scan) gives time_difference.

  • gr_fields (str, list of str or dict, optional) – Fields of the ground radar to match. Default: the reflectivity. A dict maps the name to "db" (mean in linear units, for dBZ, ZDR and other quantities in dB) or "mean" (arithmetic mean); a name alone takes "db" where the units are dB or dBZ.

  • dpr_fields (str, list of str or dict, optional) – Fields of the DPR to match, like gr_fields. Default: zFactorFinal.

  • dims (tuple of str, optional) – Names of the scan, ray and bin dimensions of dpr.

  • footprint_diameter (float, optional) – Diameter of the DPR footprint (m). Default 5000.

  • beamwidth (float, optional) – Half-power beamwidth of the ground radar (degrees). Default: the radar_beam_width_h of the volume, else 1.

  • min_range, max_range (float, optional) – Footprints from min_range to max_range (m) from the radar, measured at the ellipsoid. Default 15 km and 100 km.

  • min_fraction (float, optional) – Smallest fraction of the gates of the disc and of the bins of the beam that must have a value for a mean. Default 0.5.

  • weighting ({"uniform", "gaussian"}, optional) – Weights of the gates and bins in the volume. Default "uniform".

  • k_e (float, optional) – Effective Earth radius factor. Default 4/3.

  • max_time_difference (float, optional) – Where both times are known, volumes more than this many seconds apart are set to NaN. Default: no limit.

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

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

Returns:

xarray.Dataset – On the dimensions footprint and sweep: gr_<name> and dpr_<name> (the means), ..._std (standard deviation of the values in the volume, in the units of the field) and ..._fraction (fraction of the gates or bins that have a value), gr_gates and dpr_bins (number of gates and bins in the volume), match_longitude, match_latitude, match_height (m, the centre of the volume), ground_range (m), valid (True where every mean has a value) and time_difference (s, ground radar minus DPR, where both times are known). Coordinates: scan and ray of the footprint, its longitude and latitude and the elevation of the sweep.

Raises:
  • TypeError – For an input that is not an xarray object.

  • KeyError – If a field or a variable of the swath is missing, or no sweep has the fields.

  • ValueError – For unknown options, a swath with the wrong dimensions, or a footprint that is not a positive diameter.

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

Notes

Dask. This function computes the dask array: the gates of every sweep and the footprints of the swath are read into memory. The input is loaded into memory and the result is held in memory.

References

Schwaller, M. R., and K. R. Morris, 2011: A ground validation network for the Global Precipitation Measurement mission. J. Atmos. Oceanic Technol., 28, 301-319, https://doi.org/10.1175/2010JTECHA1403.1

Seto, S., T. Iguchi, R. Meneghini, J. Awaka, T. Kubota, T. Masaki, and N. Takahashi, 2021: The precipitation rate retrieval algorithms for the GPM Dual-frequency Precipitation Radar. J. Meteor. Soc. Japan, 99, 205-237, https://doi.org/10.2151/jmsj.2021-011

Doviak, R. J., and D. S. Zrnic, 1993: Doppler Radar and Weather Observations, 2nd ed. Academic Press, ISBN 0-12-221422-6 (book, no DOI).

Examples

>>> m = radarx.retrieve.match_dpr(vol, dpr, dpr_fields="zFactorFinal")
>>> radarx.retrieve.match_statistics(m.gr_DBZH, m.dpr_zFactorFinal)