爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 6315|回复: 1

[作图] 请问风速矢量剖面图如何添加直线?

[复制链接]

新浪微博达人勋

发表于 2020-9-21 11:35:30 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
试过用gsn_polyline的方法添加gsn_polyline(wks,plot,(/36,36/),(/ 1000,10 /),lnres)
lnres="True"
lnres@gsLineThicknessF = 3.0
lnres@gsLineColor = "Red"
;---Draw plot from pole to pole at 170E
plot  = gsn_csm_pres_hgt_vector(wks,u(0,:,:,{103}),v(0,:,:,{103}),\
                                wscale(0,:,:,{103}),res )  
draw(plot)
print(plot)
gsn_polyline(wks,plot,(/36,36/),(/ 1000,10 /),lnres)
frame(wks)
end



用print(plot)输出了:
Variable: plot
Type: obj
Total Size: 4 bytes
            1 values
Number of Dimensions: 1
Dimensions and sizes:   [1]
Coordinates:
Number Of Attributes: 4
  data :        vector_data     scalarFieldClass        9
  contour :     vector_contour  contourPlotClass        11
  sfdata :      vector_data     scalarFieldClass        9
  vcdata :      vector_data     vectorFieldClass        61



但是最终的错误显示为:
fatal:Argument type mismatch on argument (4) of (gsn_polyline) can not coerce
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 76 in file u.ncl





感觉是数组维度 的不匹配,请问应该怎么修改呀?


vector.png
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2020-9-21 15:14:09 | 显示全部楼层

回帖奖励 +10 金钱

lnres="True" 这句是字符串啊,应该是
lnres=True
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表