- 安装
pip install cinrad -i https:mirrors.aliyun.com/pypi/simple
- 读取文件
import cinrad filename = r"Z_RADA_C_BABJ_20220720060001_P_DOR_Z9518_BASE_20220821_090303.bin.bz2" f = cinrad.io.StandardData(filename) print(f) print(f.name, "雷达角度:", f.el)
# 查看包含的产品类型 print(f.available_product(0))# 获取雷达扫描仰角
print(f.get_elevation_angles())
# 层数list print(f.angleindex_r) - 查看数据类型
ele = 0 #选择第1个仰角 radius = 400 #绘制图像的范围大小,单位km r = f.get_data(ele,radius,"REF") #选择反射率数据 print(r)
- 雷达回波等
组合反射率 rl = list(f.iter_tilt(230, 'REF')) cinrad.easycalc.quick_cr(rl,resolution=[230, 366]) cr = cinrad.calc.quick_cr([f.get_data(i, 400, 'REF') for i in f.angleindex_r]) print(cr) ppi出图 fig = cinrad.visualize.PPI(r, dpi=999, add_city_names=True) print(fig) 回波顶高 et = cinrad.calc.quick_et([f.get_data(i, 400, 'REF') for i in f.angleindex_r]) print(et) cr.CR.plot() plt.show() fig = plt.figure() ax = Axes3D(fig) # 创建三维绘图空间 X = r.longitude.values.flatten() # 读取ppi中经度纬度高度和反射率数值,并转化成一维 Y = r.latitude.values.flatten() Z = r.height.values.flatten() value = r.REF.values.flatten() ax.scatter(X, Y, Z, c=value) # 绘制散点图 plt.show()
参考: https://cloud.tencent.com/developer/article/1736532
标签:bz2,get,fig,cr,print,cinrad,REF,读取 From: https://www.cnblogs.com/luochunxi/p/16627467.html