【Python】用Py

编程入门 行业动态 更新时间:2024-10-26 12:25:46

【<a href=https://www.elefans.com/category/jswz/34/1770869.html style=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')

dealias_region_based结果

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结果

参考

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

本文发布于:2024-02-12 06:49:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1686673.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Python   Py

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!