radarx.retrieve.cappi.create_cappi#

radarx.retrieve.cappi.create_cappi(radar, height, method='cartesian_idw', vertical_tolerance=None, apply_filter=False, *, fields=None, sweeps=None, x=None, y=None, x_res=1000.0, y_res=1000.0, padding=0.0)[source]#

Create a Constant Altitude Plan Position Indicator (CAPPI).

Parameters:
  • radar (xarray.DataTree) – Georeferenced radar volume containing one or more sweep groups.

  • height (float) – Target CAPPI altitude in meters.

  • method ({) – “cartesian_idw”, “polar_vertical_interpolation”, “height_window_composite”,

  • }, optional – CAPPI retrieval method. "cartesian_idw" performs 3D anisotropic inverse-distance weighting on a regular x/y grid. "polar_vertical_interpolation" retains the native azimuth/range geometry and interpolates vertically across sweeps. "height_window_composite" forms a CAPPI-like composite by selecting the nearest gates within a prescribed vertical window after sweep alignment. Legacy aliases "cartesian", "polar", and "pseudo_cappi" are also accepted.

  • vertical_tolerance (float or None, optional) – Maximum vertical distance above and below the requested CAPPI height, in meters, used by the selected retrieval method. If omitted, a method-specific default is used.

  • apply_filter (bool, optional) – Apply built-in gate filtering when supported by the selected method. Currently this is used by method="height_window_composite".

  • fields (list[str] or None, optional) – Radar variables to retrieve. If omitted, likely 2D radar fields are selected automatically.

  • sweeps (list[str] or None, optional) – Sweep names to include in the retrieval. If omitted, all available sweep groups are used.

  • x, y (array-like or None, optional) – Target Cartesian grid coordinates in meters. Used only with method="cartesian_idw".

  • x_res, y_res (float, optional) – Cartesian output spacing in meters when x and y are not supplied. Used only with method="cartesian_idw".

  • padding (float, optional) – Extra padding, in meters, applied to the Cartesian output domain. Used only with method="cartesian_idw".

Returns:

xarray.Dataset – CAPPI dataset in either Cartesian (y, x) or native polar (azimuth, range) geometry, depending on the selected method.