0 介绍
Py-ART 被 大气辐射测量 (ARM) 气候研究机构用于处理来自许多降水和云雷达的数据,但其设计目的是让雷达和大气界的其他人可以使用它来检查、处理和分析来自多种天气雷达的数据。
下面为使用Py-ART提供的两种速度退模糊的方法(dealias_region_based和dealias_fourdd)的实施个例。
1 实现
# First import needed modules.
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
import numpy as np
import pyart
# Read the radar data.
radar = pyart.io.read('xxx')
fig = plt.figure(figsize=[8,16])
ax = plt.subplot(2,1,1,projection=ccrs.PlateCarree())
display = pyart.graph.RadarMapDisplay(radar)
display.plot_ppi_map('reflectivity', sweep=2, resolution='50m',
vmin=0, vmax=60,cmap='gist_ncar',
projection=ccrs.PlateCarree())
ax2 = plt.subplot(2,1,2,projection=ccrs.PlateCarree())
display = pyart.graph.RadarMapDisplay(radar)
display.plot_ppi_map('velocity', sweep=2, resolution='50m',
vmin=-15, vmax=15,
projection=ccrs.PlateCarree(), cmap='bwr')
# plt.show()
plt.savefig('region_plot_ppi_map.jpg')
![原始雷达的反射率和径向速度](https://img-blog.csdnimg.cn/0f9ce42d2a75472fa9d9166d2f40a59a.jpg?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBA5a6J6L6-5YWF,size_20,color_FFFFFF,t_70,g_se,x_16)
1.1 dealias_region_based
radar.instrument_parameters['nyquist_velocity']['data']
vel_texture = pyart.retrieve.calculate_velocity_texture(radar, vel_field='velocity', wind_size=3, nyq=16.524973)
radar.add_field('velocity_texture', vel_texture, replace_existing=True)
# Set up the gatefilter to be based on the velocity texture.
gatefilter = pyart.filters.GateFilter(radar)
gatefilter.exclude_above('velocity_texture', 3)
nyq = radar.instrument_parameters['nyquist_velocity']['data'][0]
velocity_dealiased = pyart.correct.dealias_region_based(radar, vel_field='velocity', nyquist_vel=nyq,
centered=True, gatefilter=gatefilter)
radar.add_field('corrected_velocity', velocity_dealiased, replace_existing=True)
# Plot the new velocities, which now look much more realistic.
fig = plt.figure(figsize=[8, 8])
display = pyart.graph.RadarMapDisplay(radar)
display.plot_ppi_map('corrected_velocity', sweep=2, resolution='50m',
vmin=-30, vmax=30,
projection=ccrs.PlateCarree(), cmap='bwr',
gatefilter=gatefilter)
# plt.show()
plt.savefig('region_plot_ppi_map_corrected_velocity.jpg')
![dealias_region_based结果](https://img-blog.csdnimg.cn/f009bbcce7144087b3d64d1dacf3bb4c.jpg?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBA5a6J6L6-5YWF,size_20,color_FFFFFF,t_70,g_se,x_16)
1.2 dealias_fourdd
原理:利用径向速度在空间和时间四维的连续性来实现速度退模糊。详情见参考4。
radar.instrument_parameters['nyquist_velocity']['data']
vel_texture = pyart.retrieve.calculate_velocity_texture(radar, vel_field='velocity', wind_size=3, nyq=16.524973)
radar.add_field('velocity_texture', vel_texture, replace_existing=True)
sond_name = "xxx"
dt,profile = pyart.io.read_arm_sonde_vap(sond_name,radar=radar)
gatefilter = pyart.filters.GateFilter(radar)
gatefilter.exclude_transition()
gatefilter.exclude_invalid('velocity')
gatefilter.exclude_invalid('reflectivity')
gatefilter.exclude_outside('reflectivity',0,80)
gatefilter.exclude_above('velocity_texture', 3)
velocity_dealiased = pyart.correct.dealias_fourdd(radar, vel_field='velocity',
sonde_profile=profile,gatefilter=gatefilter)
radar.add_field('corrected_velocity', velocity_dealiased, replace_existing=True)
# Plot the new velocities, which now look much more realistic.
fig = plt.figure(figsize=[8, 8])
display = pyart.graph.RadarMapDisplay(radar)
display.plot_ppi_map('corrected_velocity', sweep=2, resolution='50m',
vmin=-41, vmax=41,cmap='bwr',
projection=ccrs.PlateCarree(),
gatefilter=gatefilter)
# plt.show()
plt.savefig('fourdd_plot_ppi_map_corrected_velocity.jpg')
![dealias_fourdd结果](https://img-blog.csdnimg.cn/80cf602d97b64e0588bbf5cfdbd56950.jpg?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBA5a6J6L6-5YWF,size_20,color_FFFFFF,t_70,g_se,x_16)
参考
1、 The Python ARM Radar Toolkit - Py-ART — Py-ART 1.11.7.dev+60158b2 documentation
2、 pyart.correct.dealias_fourdd — Py-ART 1.11.7.dev+60158b2 documentation
3、Dealiasing Velocity — Py-ART 1.11.7.dev+60158b2 documentation