radarx.grid.gates.grid_rhi#

radarx.grid.gates.grid_rhi(obj, data_vars=None, azimuth=None, distance=None, z=None, *, weighting='cressman', roi=500.0, roi_range_factor=0.0, roi_height_factor=0.0, beamwidth=None, min_gates=1, k_e=1.3333333333333333, motion=None, time=None, range_resolution=None, n_threads=None, engine='auto')[source]#

Grid radar gates onto a vertical section through the radar.

The section is the plane of the azimuth azimuth through the radar; the points are distance metres from the radar along that azimuth at the heights z. The gates of an RHI sweep (a fixed azimuth and the elevation varying along the ray) fall in the plane, those of other azimuths and of PPI sweeps are weighted by their distance from it, so a few RHIs in nearby azimuths, or a PPI volume, also give a section. The weights and the radius are those of grid_gates(), to which the parameters not listed here refer.

Parameters:
  • obj (xarray.DataTree) – Radar volume with sweep_* groups and the radar site.

  • data_vars (str or list of str, optional) – Fields to grid. By default every field present in the lowest sweep.

  • azimuth (float, optional) – Azimuth of the plane in degrees clockwise from north. Default: the mean azimuth of the gates of the volume, which is the azimuth of an RHI.

  • distance (array-like) – Horizontal distances from the radar along the plane, in metres.

  • z (array-like) – Target heights above sea level, in metres.

  • roi (float, optional) – Radius of influence in metres. Default 500, smaller than for grid_gates(), as an RHI is dense in the plane.

  • range_resolution (float, optional) – Half-power width of the weight along the beam for weighting="beam", in metres. Default: the gate spacing.

Returns:

xarray.Dataset – Gridded fields on (z, distance) as float32, with the scalar coordinates azimuth, the radar site and time.

See also

grid_gates

Notes

Weights and radius as in grid_gates() (Cressman 1959 [1], Barnes 1964 [2], the radius functions of Py-ART [3], beam geometry of Doviak and Zrnić 1993 [4]). Choices of radarx: the plane is vertical and straight (the section follows a great circle only to the extent that the Cartesian frame of the radar does) and the default azimuth and radius.

Dask. This function computes the dask array: the result is interpolated from the gates of all sweeps. The input is loaded into memory and the result is held in memory.

References

Examples

>>> d = np.arange(1000.0, 60e3, 500.0)
>>> z = np.arange(0.0, 15e3, 250.0)
>>> section = radarx.grid.grid_rhi(
...     rhi, "DBZH", azimuth=270.0, distance=d, z=z
... )