- 积分
- 4798
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-4-13
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
参照帖子http://bbs.06climate.com/forum.php?mod=viewthread&tid=22131&extra=&page=1画垂直剖面图现在又几个问题请教各位大神。谢谢!
1.怎么把x轴用经度表示?
2.想用右边y轴用km表示高度?res@tmYRMode = "Explicit"
res@tmYRValues = (/0.3, 0.6, 0.9, 1.2, 1.5, 1.8, 2.1, 2.4, 2.7/)
res@tmYRLabels = (/0.3, 0.6, 0.9, 1.2, 1.5, 1.8, 2.1, 2.4, 2.7/)
没有成功。
3.图中有些风矢量没有对齐(如左边第四列),这是差值有问题?还是由于下垫面不平导致的?
脚本如下
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
; file handling
;************************************************
; define filename
;************************************************
; read needed variables from file
;************************************************
times = wrf_user_getvar(in,"times",-1) ; get times in the file
ntimes = dimsizes(times) ; number of times in the file
nd = dimsizes(mdims)
do it =20,ntimes-1,2 ; TIME LOOP
print("Working on time: " + times(it) )
; tc = wrf_user_getvar(in,"U",it) ; T in C
u = wrf_user_getvar(in,"U",it) ; v wind
w = wrf_user_getvar(in,"W",it) ; w wind
p = wrf_user_getvar(in, "pressure",it)
w := wrf_user_unstagger(w, w@stagger)
plane = new(4,float)
plane = (/ 2,2, mdims(nd-1)-2, mdims(nd-2)-2 /)
opts = True
; t_plane = wrf_user_intrp3d(tc ,p,"u",plane,0.,opts)
u_plane = wrf_user_intrp3d(u, p,"u",plane, 0.,opts)
w_plane = wrf_user_intrp3d(w, p,"u",plane, 0.,opts)
p_plane = wrf_user_intrp3d(p, p,"u",plane, 0.,opts)
wAve = avg(w_plane(:,104)) ; used for scaling
uAve = avg(u_plane(:,104))
scale = fabs(uAve/wAve)
wscale = w_plane*scale ; now scale
w_plane!0="level"
w_plane&level = p_plane(:, 0)
copy_VarCoords(w_plane, u_plane)
copy_VarCoords(w_plane, wscale)
;***********************************************
; create plot
;***********************************************
gsn_define_colormap(wks,"BlAqGrYeOrRevi200") ; choose color map
res@tiMainString = "Pressure/Height Vector" ; title
res@tiYAxisString = "Pressure (mb)"
res@trYMinF = 750
res@trYMaxF = 990
res@tmYLMode = "Explicit"
res@trYReverse = True
res@tmYRMode = "Explicit"
res@cnLineLabelsOn = False ; turn off line labels
res@cnFillOn = True ; turn on color fill
res@lbLabelStride = 2 ; every other color
res@gsnSpreadColors = True ; use full range of color map
res@vcRefMagnitudeF = 10.0 ; define vector ref mag
res@vcRefLengthF = 0.015 ; define length of vec ref
res@vcGlyphStyle = "CurlyVector" ; turn on curley vectors
res@vcMinDistanceF = 0.03 ; thin out vectors
res@vcMapDirection = False
plot = gsn_csm_pres_hgt_vector(wks,w_plane,u_plane,wscale,res )
end do
end
|
-
|