- 积分
- 774
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2020-11-5
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 推开世界的门 于 2021-9-17 22:20 编辑
大佬们,我想做一副在北纬15°位置的垂直速度—纬向风场图,但是gsn_csm_pres_hgt_vector函数的第二项(data项)不知道怎么设置,官网给出的例子是设置为同样维度的温度,希望大佬们能够指点一下,帮忙检查一下我的代码是否正确,先谢谢各位大佬了。还有一个小问题就是绘制垂直速度—纬向风场图时level是否要求从上到下或者从下到下。以下为我的代码和图像:
beginf1=addfile("F:/vertical_velocity/annual/vertical_velocity.nc","r")
w=f1->z(0,{1000:200},{15},{100:150})
f2=addfile("F:/u_wind/annual/u_wind.nc","r")
u=f2->uw(0,{1000:200},{15},{100:150})
f3=addfile("f:/temperature/annual/temperature.nc","r")
t=f3->tc(0,{1000:200},{15},{100:150})
wAve = avg(w) ; used for scaling
uAve = avg(u)
scale = fabs(uAve/wAve)
wscale = w*scale ; now scale
print(scale)
copy_VarCoords(w, wscale)
wks = gsn_open_wks ("png", "F:/test/vertical velocity and latitude" ) ; send graphics to PNG file
res = True ; plot mods desired
res@tiMainString = "vertical velocity and latitude" ; title
res@cnLineLabelsOn = False ; turn off line labels
res@cnFillOn = True ; turn on color fill
res@cnFillPalette = "BlAqGrYeOrReVi200" ; choose color map
res@lbLabelStride = 2 ; every other color
res@vcRefMagnitudeF = 3.0 ; define vector ref mag
res@vcRefLengthF = 0.045 ; define length of vec ref
res@vcGlyphStyle = "CurlyVector" ; turn on curly vectors
res@vcMinDistanceF = 0.01 ; thin out vectors
res@vcMapDirection = False
res@vcLineArrowThicknessF=2.0
plot = gsn_csm_pres_hgt_vector(wks,t,u,wscale,res )
end
|
-
图二
|