radarx.grid.ugrid.gate_corners#
- radarx.grid.ugrid.gate_corners(obj)[source]#
Compute the geographic corner nodes of every gate of a sweep.
- Parameters:
obj (
xarray.Datasetorxarray.DataArray) – PPI sweep onazimuthandrangedimensions withelevationand the radar sitelatitude/longitude(altitudeoptional) as coordinates or variables.- Returns:
node_lon, node_lat (
numpy.ndarray) – Corner longitudes and latitudes, shape(n_ray_edges, n_range + 1), wheren_ray_edgesisn_rayfor a full 360 degree sweep andn_ray + 1otherwise.order (
numpy.ndarray) – Ray indices that sort the sweep by azimuth; faces follow this order.full_circle (
bool) – Whether the sweep closes on itself.
Notes
Nodes lie halfway between gate centres in range, azimuth and elevation (a radarx convention, see the module docstring); the first and last edge of a sector extend by half a spacing. A sweep counts as a full circle if no gap between sorted azimuths exceeds twice the median spacing (a radarx threshold). The ground distance of each corner uses the 4/3 Earth model of Doviak and Zrnić (1993), Eqs. 2.28b-d (book, no DOI), through xradar.