getting a grid from radar samples

761 views
Skip to first unread message

Gilad R

unread,
Mar 31, 2015, 7:55:24 AM3/31/15
to pyart...@googlegroups.com

Hello,

I use pyart/io/nexrad_level2.py and I can get the radar scans and rays. Is there a routine/class to make a rectangular grid from this data ?

Any idea how to decide the grid size and resolution ? I saw that NOAA radars are often 1000x800 or so

Thanks :)
   Gilad

Gilad R

unread,
Mar 31, 2015, 8:14:46 AM3/31/15
to pyart...@googlegroups.com

are there composing routine/class between radar sweeps/scans ?

Scott Collis

unread,
Mar 31, 2015, 8:36:02 AM3/31/15
to pyart...@googlegroups.com
Good morning Gilad

Py-ART has a mapping routines in pyart.map including the ability to composite multiple radars.

There is a single radar example here
http://arm-doe.github.io/pyart/dev/auto_examples/mapping/plot_map_one_radar_to_grid.html

And a multi-radar example here:

http://arm-doe.github.io/pyart/dev/auto_examples/mapping/plot_map_two_radars_to_grid.html

Here is a specific example compositing multiple NEXRAD radars over Chicago

As for deciding resolution that is tough.. Close to the radar you can go very fine, 500m or less.. away, not so much.. If you have CPU and memory to burn you can go fine everywhere and just use a variable radius of influence (Py-ART will take a go at guessing the ideal one) and just accept you are oversampling..
--
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.
For more options, visit https://groups.google.com/d/optout.

Gilad R

unread,
Mar 31, 2015, 8:48:15 AM3/31/15
to pyart...@googlegroups.com

Good morning Scott,

Thanks a lot :)

Is there a way to convert nexrad into nc file, or read it into a radar struct that can be used by pyart.map.grid_from_radars() ? (is that  
NEXRADLevel2File.get_data() or NEXRADLevel2File.scan_info()) ? I use pyart/io/nexrad_level2.py

Is there a way to compose a radar from all scans (like taking the maximum value of all scans from the lowest scan to the highest scan) ? (I didn't mean
composing two adjacent radars into one radar)

Am new to radars, so thanks for the help :)
Gilad

Scott Collis

unread,
Mar 31, 2015, 9:09:53 AM3/31/15
to pyart...@googlegroups.com
All taken care of..

1) Py-ART can directly read both archive and bzip compressed message format for level 2.. Just do a radar = pyart.io.read(radarfile)
2) The grid map uses an inverse distance weighted gate mean to map to the Cartesian grid.. It will use all gates within the radius of influence be it from another sweep or another radar.

If you want to make a "Max Z in column product" you could map the radar to a set number of levels and then just do a:
Max_z =  grid.fields['reflectivity']['data'].max(axis=2)

Even cooler you can work out the level at which max Z occurs with Level = grid.fields['reflectivity']['data'].argmax(axis=2)

The difficulty in doing direct from sweeps is that the x,y from the sweeps is not the same from sweep to sweep so some interpolation is required.

Keep in mind patience is required.. The mapping will take a few minutes.

Xin Zhang

unread,
May 19, 2018, 10:48:37 PM5/19/18
to Py-ART Users
Hi Scott,

In pyart.map.grid_from_radars, grid_shape is 3-tuple of floats Number of points in the grid (z, y, x).
So, to get composite reflectivity, should I use grid.fields['reflectivity']['data'].max(axis=0)?

By the way, what's the principle of setting grid_shape and grid_limits? When I set ''grid_shape=(6, 241, 241), grid_limits=((2000, 2000), (-123000.0, 123000.0), (-123000.0, 123000.0))"", the reflectivity is 0 except z=0.

Best regards,
Xin

Yogesh Kolte

unread,
May 19, 2018, 11:04:09 PM5/19/18
to Xin Zhang, Py-ART Users
 Hello Xin Zhang,
As per my understanding ''grid_shape=(6, 241, 241), grid_limits=((2000, 2000), (-123000.0, 123000.0), (-123000.0, 123000.0))
Means you are deviding vertical limits in 6 different levels . Haere you have given vertical limits from 2000 to 2000 so difference is zero .Please provide limit of  your radar height from mean sea level and upper limit  up to which height you want to grid data.
If I am wrong please correct me.
Thank you,
Yogesh 

Xin Zhang

unread,
May 19, 2018, 11:25:26 PM5/19/18
to godo...@gmail.com, pyart...@googlegroups.com
Hi Yogesh,

Thank you for your reply!

After the vertical limits are changed, it works fine now. But, I still have a question about the grid_shape which is number of points in the grid (z, y, x). How to determine the number of z points should use? It seems that the result of setting z points = 6 is as same as that of number larger than 6.

Best regards,
Xin

Andres Giordano

unread,
Jan 20, 2019, 10:20:03 AM1/20/19
to Py-ART Users
Hi Zhang,

grid limits are specified in kilometers so, in my experience, if radar rays don't go beyond 6 Km in altitude it has no sense to set z > 6. If you set z < 6 then there will be levels of the radar data that is not going to be mapped to the grid. Remember that radar data is like a paraboloid, if paraboloid reachs z = 8 and you set grid limit z = 5 there wil be a portion of the function that is not going to be mapped, specifically 5 < z <= 8.

Greg Pearson

unread,
Mar 18, 2019, 8:01:50 PM3/18/19
to Andres Giordano, Py-ART Users
Hi guys,

Just to correct you above - the grid_limits are specified in metres.

Thanks,
Greg
Reply all
Reply to author
Forward
0 new messages