Python】用Py"/>
【Python】用Py
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')
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')
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')
参考
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
4、A Real-Time Four-Dimensional Doppler Dealiasing Scheme in: Journal of Atmospheric and Oceanic Technology Volume 18 Issue 10 (2001)
更多推荐
【Python】用Py
发布评论