Mapping raw radar data to 1km resolution reflectivity grid

160 views
Skip to first unread message

Adam Conway

unread,
Apr 3, 2020, 12:25:35 AM4/3/20
to Py-ART Users
Hello,

I have a large amount of historic radar data which I'm wanting to map to a 2D-grid centered around the radar station (say 250x250km at 1km resolution). The data is originally in SIGMET-Iris format and I've managed to import it into Radar objects and convert it using grid_from_radars().

The main field I'm interested in is the reflectivity and I was wanting to export this in a (50,50) numpy array.

The data is from radar stations in New Zealand so I'm also trying to grid it using the New Zealand Transverse Mercator 2000 projection (http://epsg.io/2193).

What is the best (and most efficent) way for me todo this? I'm also unsure what z-value I should be using in the grid_shape and grid_limits.

My current code is:

import cartopy.crs as ccrs
import matplotlib.pyplot as plt
import pyart
from pyproj import CRS

# Use NZTM2000 projection
crs = CRS.from_proj4("+proj=tmerc +lat_0=0 +lon_0=173 +k=0.9996 +x_0=1600000 +y_0=10000000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs")

# Read from raw data
radar_a = pyart.io.read('AKL170101000003.RAWVOLA.bz2')    
radar_b = pyart.io.read('AKL170101000342.RAWVOLB.bz2')    

# Convert to grid using NZTM2000
grid = pyart.map.grid_from_radars((radar_a, radar_b), 
                                    grid_shape=(4, 250,250), 
                                    grid_limits=((0.,8000.,),(-250000.,250000.), (-250000.,250000.)),
                                    grid_projection=crs.to_dict(),
                                    weighting_function = 'Barnes2',
                                    fields=['reflectivity'])
# create the plot
fig = plt.figure()
ax = fig.add_subplot(111)
ax.imshow(grid.fields['reflectivity']['data'][0], origin='lower')
plt.show()

This results in an empty plot. When I comment out grid_projection line it results in a plot with data. Both of these are attached.

Thanks,
Adam

without_projection.png
with_projection.png

Zach Sherman

unread,
Apr 3, 2020, 1:13:27 AM4/3/20
to Py-ART Users
Hi Adam,

I'm not too sure on the projection issue, I'm wondering if there is some format issue, but the dictionary structure looks fine, maybe someone else has insight on that. For z you could set shape to 1, and index that data when plugging into an array. And shape, for equal spacing, add a 1 to your shapes for 251. But everything else looks fine, the use of fields for just reflectivity etc. Adding a gatefilter would probably help with speed.

Zach S.

Adam Conway

unread,
Apr 3, 2020, 4:09:33 AM4/3/20
to Py-ART Users
Hi Zach,


Thanks for the help. Which gates would you recommend filtering for speed?

Could anyone recommend methods/changes to remove clutter/noise (or improve the data) before saving it to a grid?

I've been doing some research but I am still a beginner in the field.


Adam

Collis, Scott M.

unread,
Apr 3, 2020, 10:08:23 AM4/3/20
to Adam Conway, Py-ART Users

For one any gate that has a FillValue (eg -999 et al)

You only want to be gridding valid returns. Our experience with NEXRAD, depending on the scene, this can speed things up over a factor of two.

 

I -think- it was gatefilter.exclude_invalid

--
You received this message because you are subscribed to the Google Groups "Py-ART Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyart-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyart-users/bb7cbb35-2231-45a1-8215-f165c9a57de9%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages