!pip install pycwr -i https://pypi.mirrors.ustc.edu.cn/simple/
!pip install arm-pyart -i https://pypi.mirrors.ustc.edu.cn/simple/
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
from pycwr.io import read_auto
import pyart
import cmaps
PRD = read_auto('/home/mw/input/data5692/Z_RADR_I_Z9250_20200612054800_O_DOR_SA_CAP.bin')
radar = PRD.ToPyartRadar()
grid = pyart.map.grid_from_radars(
(radar,),
gatefilters=(gatefilter,),
grid_shape=(200, 500, 500), # 设置了网格的形状为 (200, 500, 500),想计算速度快点可以减少格点数
grid_limits=( ( 0.0, 20000,),(-200000.0, 200000.0),(-200000, 200000.0)), #设置了网格的范围
grid_origin=(32.2 ,118.7), # 绘图中心
fields=["reflectivity"], # 变量)
"reflectivity",
ax=ax1,
cmap=cmap1,
vmin=0,
vmax=70,)
"reflectivity",
start,
end,
x_axis="lat",
cmap=cmap1,
vmin=0,
vmax=70,)plt.show()
import cinrad
from cinrad.io import CinradReader, StandardData
from cinrad.visualize import PPI, Section
import numpy as np
import matplotlib.pyplot as plt
f = CinradReader("/home/mw/input/data5692/Z_RADR_I_Z9250_20200612054800_O_DOR_SA_CAP.bin")
rl = [f.get_data(i, 150, 'REF') for i in f.angleindex_r]
vcs = cinrad.calc.VCS(rl)
sec = vcs.get_section(start_cart=(117.5, 32), end_cart=(118.5, 33))
fig = PPI(rl[0], dpi=50)
fig.settings['is_inline'] = False
fig.plot_cross_section(sec)
plt.show()
封面由ai绘制
prompt: color photo of a weather radar in action —c 10 —ar 2:3