radarx.grid.grid.grid_radar#

radarx.grid.grid.grid_radar(dtree, data_vars=None, pseudo_cappi=True, x_lim=(-100000.0, 100000.0), y_lim=(-100000.0, 100000.0), z_lim=(0, 10000.0), x_step=1000, y_step=1000, z_step=250, x_smth=0.2, y_smth=0.2, z_smth=1)[source]#

Interpolate radar data to a 3D grid and optionally create a pseudo-CAPPI.

Parameters:
  • dtree (xradar.DataTree) – Input radar DataTree containing radar sweeps.

  • data_vars (list of str, optional) – List of variables to interpolate. If None, all variables in the dataset are used. Defaults to None.

  • pseudo_cappi (bool, optional) – If True, extrapolates data to lower altitudes to create a pseudo-CAPPI. Defaults to True.

  • x_lim (tuple of float, optional) – Range of x-coordinates (meters) for the Cartesian grid. Defaults to (-100e3, 100e3).

  • y_lim (tuple of float, optional) – Range of y-coordinates (meters) for the Cartesian grid. Defaults to (-100e3, 100e3).

  • z_lim (tuple of float, optional) – Range of z-coordinates (meters) for the Cartesian grid. Defaults to (0, 16e3).

  • x_step (int, optional) – Grid resolution in the x-direction (meters). Defaults to 500.

  • y_step (int, optional) – Grid resolution in the y-direction (meters). Defaults to 500.

  • z_step (int, optional) – Grid resolution in the z-direction (meters). Defaults to 250.

  • x_smth (float, optional) – Smoothing factor for the x-dimension. Defaults to 0.2.

  • y_smth (float, optional) – Smoothing factor for the y-dimension. Defaults to 0.2.

  • z_smth (float, optional) – Smoothing factor for the z-dimension. Defaults to 1.

Returns:

xarray.Dataset – Interpolated dataset with the specified variables and 3D grid. Includes longitude and latitude coordinates for the grid.

Notes

  • The pseudo-CAPPI is created by extrapolating data from higher altitudes to fill missing values at lower altitudes.

  • Interpolation is performed using Barnes interpolation.