pyart.map.polar_to_cartesian#

pyart.map.polar_to_cartesian(radar_sweep, field_name, cart_res=75, max_range=None, mapping=None)[source]#

Interpolates a PPI or RHI scan in polar coordinates to a regular cartesian grid of South-North and West-East coordinates (for PPI) or distance at ground and altitude coordinates (for RHI)

Parameters:
  • radar (Radar) – Radar instance as generated py pyart

  • sweep (int) – Sweep number to project to cartesian coordinates.

  • field_name (str) – Name of the radar field to be interpolated

  • cart_res (int, optional) – Resolution (in m.) of the cartesian grid to which polar data is interpolated

  • max_range (int, optional) – Maximal allowed range (in m.) from radar for gates to be interpolated

  • mapping (dict, optional) – Dictionnary of mapping indexes (from polar to cartesian), gets returned by the function (see below). Can be used as input when interpolating sequentially several variables for the same scan, to save significant time

Returns:

  • coords (tuple of 2 arrays) – 2D coordinates of the cartesian grid

  • cart_data (2D array) – Interpolated radar measurements (on the cartesian grid)

  • mapping, (dict) – Dictionnary of mapping indexes (from polar to cartesian),which contains the indexes mapping the polar grid to the cartesian grid as well as some metadata.