- 积分
- 7833
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-8-30
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
def cinrad_plot_profile(file):
# 'longitude': 122.1,
# 'latitude': 30.03,
# 'altitude': 35.7
# 画一个透明图
#fig = PPI(data, dpi=300, style="transparent")
#extent = fig.geoax.get_extent(crs=ccrs.PlateCarree()) # 这个是透明图的边界位置经纬度
f = cinrad.io.read_auto(file)
rl = list(f.iter_tilt(230, "REF"))
cr = cinrad.calc.quick_cr(rl)
fig = PPI(cr, dpi=500, style="white", add_city_names=True)
fig.geoax.scatter(
x=122.34, y=30.3, s=200, c="r", marker="."
)
fig.settings["is_inline"] = False # notebook模式下需要这一行,正常不需要
vcs = cinrad.calc.VCS(rl)
sec = vcs.get_section(start_cart=(121., 30.3), end_cart=(123., 30.3)) # 传入经纬度坐标
# sec = vcs.get_section(start_polar=(113, 250), end_polar=(114, 28)) # 传入极坐标
# 附加操作
fig.plot_range_rings([50, 100, 150, 200, , color="white", linewidth=1) # 用这个来画圈
fig.gridlines(draw_labels=True, linewidth=1, color="white") # 用这个来画经纬度网格线
fig.plot_cross_section(sec, linecolor="red")
fig("plot_profile.png")
|
|