Plot CAPPI for a single radar with nearest gate / Or Plot PPI with constrained range

988 views
Skip to first unread message

Chou Tat Hoi

unread,
Feb 24, 2016, 11:37:20 PM2/24/16
to Py-ART Users
Dear all,

I try to plot 3km CAPPI rainfall(base on dBZ) with some non overlap data (different elevation angles). How ever the result looks have a strong smooth compared with Sigmet iris system (code shows at below). And it also take a long time to plot it. If I have any mistake in grid it ? And because those are non overlap data, is there any way to plot CAPPI with nearest gate? (Without interpolation will become faster?) If not, is there any way to plot PPI with constrained range? So that I could plot different sweep with different range and pile them up as a filled CAPP. Thank you. 




min_z = 2800
max_z = 3200

def retrieve_filter_radar(filenameA, filenameB, filenameC, min_z, max_z):

radarA = pyart.io.read_sigmet(filenameA)
radarB = pyart.io.read_sigmet(filenameB)
radarC = pyart.io.read_sigmet(filenameC)
grid_filtered = pyart.map.grid_from_radars(
(radarA, radarB, radarC),
grid_shape=(1, 2500, 2500),
grid_limits=((min_z, max_z), (-260000.0, 260000.0), (-260000.0, 260000.0)),
#weighting_function='Cressman',
fields=['reflectivity'],
gridding_algo="map_gates_to_grid",
weighting_function='BARNES',
refl_filter_flag=True,   max_refl=75)

grid_filtered.fields['reflectivity_masked'] = {
'data': np.ma.masked_less(grid_filtered.fields['reflectivity']['data'], 0)}
raw_data = grid_filtered.fields['reflectivity_masked']['data'][:]
rain_rate = (10.0**(raw_data/10.0)/200.0)**(5.0/8.0)
        rain_rate_dic = {
            'data': rain_rate,
            'standard_name': 'rain_rate',
            'long_name': 'Rain rate',
            'units': 'mm',    # or whatever the correct units are for this retrieval
        }
        #insert rain_rate into grid
grid_filtered.add_field('rain_rate',rain_rate_dic)
grid_filtered.fields['rain_rate_masked'] = {
'data': np.ma.masked_less(grid_filtered.fields['rain_rate']['data'], 0.1)}
return grid_filtered
cappi.png

Chou Tat Hoi

unread,
Feb 25, 2016, 10:49:49 PM2/25/16
to Py-ART Users
After modified the interpolation, the smooth effect become lower. And dis_beam looks like is the best roi function in our cast, but I don't understand those parameters. Temporary using dist instead of it.

def retrieve_filter_radar(filenameA, filenameB, filenameC, min_z, max_z):

radarA = pyart.io.read_sigmet(filenameA)
radarB = pyart.io.read_sigmet(filenameB)
radarC = pyart.io.read_sigmet(filenameC)
grid_filtered = pyart.map.grid_from_radars(
(radarA, radarB, radarC),
grid_shape=(1, 500, 500),
grid_limits=((min_z, max_z), (-260000.0, 260000.0), (-260000.0, 260000.0)),
#weighting_function='Cressman',
fields=['reflectivity'],
gridding_algo="map_gates_to_grid",
weighting_function='BARNES',
#weighting_function='Cressman',
#roi_func='constant', constant_roi=4540.0,
roi_func='dist', constant_roi=250.0, z_factor=0.00776, xy_factor=0.00776,
#roi_func='dist', constant_roi=250.0, z_factor=0.0082, xy_factor=0.0082,
refl_filter_flag=True,   max_refl=75)

grid_filtered.fields['reflectivity_masked'] = {
'data': np.ma.masked_less(grid_filtered.fields['reflectivity']['data'], 7)}
raw_data = grid_filtered.fields['reflectivity_masked']['data'][:]
rain_rate = (10.0**(raw_data/10.0)/200.0)**(5.0/8.0)
        rain_rate_dic = {
            'data': rain_rate,
            'standard_name': 'rain_rate',
            'long_name': 'Rain rate',
            'units': 'mm',    # or whatever the correct units are for this retrieval
        }
        #insert rain_rate into grid
grid_filtered.add_field('rain_rate',rain_rate_dic)
grid_filtered.fields['rain_rate_masked'] = {
'data': np.ma.masked_less(grid_filtered.fields['rain_rate']['data'], 0.15)}
return grid_filtered
  

Jonathan Helmus

unread,
Feb 29, 2016, 3:44:43 PM2/29/16
to pyart...@googlegroups.com
The gridding algorithm in Py-ART searches for all radar gates within a given radius of influence and interpolates the grid point by weighting all values within this radius according to their distance from the grid pixel center.  Various parameters influence how the radius of influence is determined as outlines in the map_to_grid documentation [1].  These parameters can be a bit confusing to understand and adjust.  It is possible to visualize the ROI by setting the map_roi parameter to True and then plotting the 'ROI' field which can be helpful for finding good values for the ROI values.

    Gridding is currently the only method for creating a CAPPI in Py-ART.  Unfortunately creating this grid and plotting it on a geographic map can take some time.  Py-ART does not yet have the ability to do a nearest neighbor mapping although such a feature would be a welcome addition to the package.  Using a set of  gatefilters it may be possible to plot select range gates from a series of sweeps which would approximate a CAPPI but I have not tried this.

Cheers,

    - Jonathan Helmus



[1] http://arm-doe.github.io/pyart-docs-travis/user_reference/generated/pyart.map.map_to_grid.html
--
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.

Ali Alshaqah

unread,
Jan 30, 2018, 4:50:27 PM1/30/18
to Py-ART Users
Hi Jon,

Could you please provide us with some examples of generating CAPPI from single and multiple Radar with some explanation .
Reply all
Reply to author
Forward
0 new messages