- 积分
- 2206
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2022-1-8
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
begin
fix = addfile("D:/bccm/u.nc", "r")
fiy = addfile("D:/bccm/v.nc", "r")
fi1 = addfile("D:/bccm/t_z.nc", "r")
z=fi1->z(9,{500},:,:)
u = fix->u(9,{500},:,:)
v = fiy->v(9,{500},:,:)
spd = sqrt(u^2+v^2)
copy_VarMeta(u,spd)
;---Graphics
wks = gsn_open_wks("png",get_script_prefix_name()) ; send graphics to PNG file
gsn_define_colormap(wks, "BlWhRe")
res = True ; plot mods desired
res@vcMonoLineArrowColor = True ; 彩色箭头
res@gsnSpreadColors = True ; 6.1.0 后默认即为 True
; 设置地图范围
res@mpMinLatF = 20
res@mpMaxLatF = 45
res@mpMinLonF = 70
res@mpMaxLonF = 110
plot = gsn_vector_map(wks, u, v, res)
end
我如果这样写就不会报错,但是地图有问题,设置的地图范围也也不生效
res@vcMonoLineArrowColor = True ; 彩色箭头
res@vcRefLengthF = 0.1 ; 单位长度箭头的长度
res@vcRefMagnitudeF = 20 ; 单位长度箭头的数值
res@vcRefAnnoArrowUseVecColor = False ; 右下角的图例中的箭头保持原来的颜色
res@gsnSpreadColors = True ; 6.1.0 后默认即为 True
res@gsnAddCyclic = False
res@vcMinMagnitudeF = 0.5
res@vcMinDistanceF = 0.02
;res@vcGlyphStyle = "WindBarb"
res@gsnDraw = False
res@gsnFrame = False
如果像上面这样加一些资源参数就会报错
报错:
fatal:VectorPlotDraw: VVECTR - VECTOR NDC LENGTH TOO GREAT
fatal:VectorPlotDraw: error drawing vectors
fatal:VectorPlotDraw: draw error
fatal:PlotManagerDraw: error in plot draw
fatal:_NhlPlotManagerDraw: Draw error
fatal:VectorPlotDraw: VVECTR - VECTOR NDC LENGTH TOO GREAT
fatal:VectorPlotDraw: error drawing vectors
fatal:VectorPlotDraw: draw error
fatal:PlotManagerDraw: error in plot draw
fatal:_NhlPlotManagerDraw: Draw error
|
-
|