if you haven't install cartopy, for all platforms installing cartopy can be done with:
conda install -c conda-forge cartopy
and you can install pycwr with pip:
pip install pycwr
git clone https://github.com/YvZheng/pycwr.git
cd pycwr
python setup.py install
from pycwr.io.auto_io import radar_io
file = r"./Z_RADR_I_Z9898_20190828192401_O_DOR_SAD_CAP_FMT.bin.bz2"
data = radar_io(file)
NRadar = data.ToPRD()
PyartRadar = data.ToPyartRadar()
The data structure of the PRD is as follows:
import matplotlib.pyplot as plt
import cartopy.crs as ccrs
from pycwr.draw.RadarPlot import Graph, GraphMap
ax = plt.axes(projection=ccrs.PlateCarree())
graph = GraphMap(NRadar, ccrs.PlateCarree())
graph.plot_ppi_map(ax, 0, "dBZ", cmap="pyart_NWSRef")
ax.set_title("example of PPI with map", fontsize=16)
plt.show()
fig, ax = plt.subplots()
graph = Graph(NRadar)
graph.plot_ppi(ax, 0, "dBZ", cmap="pyart_NWSRef")
graph.add_rings(ax, [0, 50, 100, 150, 200, 250, 300])
ax.set_title("example of PPI", fontsize=16)
ax.set_xlabel("Distance From Radar In East (km)", fontsize=14)
ax.set_ylabel("Distance From Radar In North (km)", fontsize=14)
fig, ax = plt.subplots()
graph = GraphMap(NRadar, ccrs.PlateCarree())
graph.plot_vcs_map(ax, (120.8, 27.8), (122.9, 26.8), "dBZ", cmap="pyart_NWSRef")
ax.set_ylim([0,15])
ax.set_ylabel("Height (km)", fontsize=14)
ax.set_xlabel("Latitude, Longitude", fontsize=14)
ax.set_title("VCS exmaple", fontsize=16)
plt.show()
fig, ax = plt.subplots()
graph = Graph(NRadar)
graph.plot_vcs(ax, (0,0), (150, 0), "dBZ", cmap="pyart_NWSRef")
ax.set_ylim([0,15])
ax.set_ylabel("Height (km)", fontsize=14)
ax.set_xlabel("Distance From Section Start (Uints:km)", fontsize=14)
ax.set_title("VCS exmaple", fontsize=16)
plt.show()
python scripts/LaunchGUI.py
The main window opens as shown below:
more example via: exmaple
Yu Zheng - Nanjing University of Information Science and Technology, School of Atmospheric Physics
Nan Li - Nanjing University of Information Science and Technology, School of Atmospheric Physics
Wei Ming - Nanjing University of Information Science and Technology, School of Atmospheric Physics
Zhigang Chu - Nanjing University of Information Science and Technology, School of Atmospheric Physics
Sihui Fan - Nanjing University of Information Science and Technology, School of Atmospheric Physics
Pengcheng Jia - Nanjing University of Information Science and Technology, School of Atmospheric Physics
Yang Li - Nanjing University of Information Science and Technology, School of Atmospheric Physics
Xin Zhang - Nanjing University of Information Science and Technology, School of Atmospheric Physics
Xingchao Lv - Nanjing University of Information Science and Technology, School of Atmospheric Physics
Shuai Zhang - Nanjing University of Information Science and Technology, School of Atmospheric Physics
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。