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.
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