Map a single radar to a Cartesian grid#

Map the reflectivity field of a single radar from Antenna coordinates to a Cartesian grid.

plot map one radar to grid

# Author: Jonathan J. Helmus (
# License: BSD 3 clause

import matplotlib.pyplot as plt
import numpy as np

import pyart
from pyart.testing import get_test_data

# read in the data
file = get_test_data("110635.mdv")
radar =

# mask out last 10 gates of each ray, this removes the "ring" around the radar.
radar.fields["reflectivity"]["data"][:, -10:] =

# exclude masked gates from the gridding
gatefilter = pyart.filters.GateFilter(radar)

# perform Cartesian mapping, limit to the reflectivity field.
grid =
    grid_shape=(1, 241, 241),
    grid_limits=((2000, 2000), (-123000.0, 123000.0), (-123000.0, 123000.0)),

# create the plot
fig = plt.figure()
ax = fig.add_subplot(111)
ax.imshow(grid.fields["reflectivity"]["data"][0], origin="lower")

Total running time of the script: (0 minutes 5.958 seconds)

Gallery generated by Sphinx-Gallery