radarx.grid.ugrid.to_uxarray#

radarx.grid.ugrid.to_uxarray(obj, variables=None)[source]#

Convert a radar sweep into a uxarray dataset with one face per gate.

Parameters:
Returns:

uxarray.UxDataset – Dataset on the n_face dimension with a UGRID grid (.uxgrid). Faces are ordered by azimuth, then range; azimuth and range of each face are kept as coordinates.

Raises:
  • ImportError – If uxarray is not installed.

  • ValueError – If obj is not a PPI sweep or lacks the radar site location.

Notes

Dask. This function computes the dask array: uxarray builds its grid and variables in memory. The input is loaded into memory and the result is held in memory.

Examples

>>> sweep = dtree["sweep_0"].to_dataset(inherit="all_coords")
>>> uxds = sweep.radarx.to_uxarray(["DBZH"])
>>> uxds["DBZH"].plot()  # gate polygons