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_rangeandmax_rangefrom 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.DataTreeorxarray.Dataset) – Ground radar volume (sweeps withazimuth,elevation,rangeand the radar sitelatitude,longitudeandaltitude), or one sweep.dpr (
xarray.Dataset) – The DPR swath with the dimensionsdims(scan, ray, bin):LongitudeandLatitudeof the rays (scan, ray; at the ellipsoid),localZenithAngle(scan, ray; degrees),heightof 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 (PREgroup forlocalZenithAngleandheight,SLVforzFactorFinalandparamDSD);longitude,latitudeandzenithare accepted too. An optionaltime(scan) givestime_difference.gr_fields (
str,listofstrordict, 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 theunitsare dB or dBZ.dpr_fields (
str,listofstrordict, optional) – Fields of the DPR to match, likegr_fields. Default:zFactorFinal.dims (
tupleofstr, optional) – Names of the scan, ray and bin dimensions ofdpr.footprint_diameter (
float, optional) – Diameter of the DPR footprint (m). Default 5000.beamwidth (
float, optional) – Half-power beamwidth of the ground radar (degrees). Default: theradar_beam_width_hof the volume, else 1.min_range, max_range (
float, optional) – Footprints frommin_rangetomax_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 dimensionsfootprintandsweep:gr_<name>anddpr_<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_gatesanddpr_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) andtime_difference(s, ground radar minus DPR, where both times are known). Coordinates:scanandrayof the footprint, itslongitudeandlatitudeand theelevationof 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)