- 积分
- 2139
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-4-15
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
想画某一垂直剖面的风矢量图。为了合成矢量时 垂直风速能很好地体现出来,在画矢量图时将w扩大了10倍,但画出的图不太对。
ncl脚本:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
begin
a = addfile("cntl.nc","r")
type = "png"
wks = gsn_open_wks(type,"21")
res = True
time = 37
u = wrf_user_getvar(a,"ua",time) ; u averaged to mass point
v = wrf_user_getvar(a,"va",time) ; v averaged to mass point
w = wrf_user_getvar(a,"wa",time) ; w averaged to mass point
z = wrf_user_getvar(a,"z",time)
;----------------------------插值-------------------------------------------;
startlon = 109.68
startlat = 19.91
endlon = 110.46
endlat = 19.24
xy = wrf_user_ll_to_ij(a,(/startlon,endlon/),(/startlat,endlat/),res)
plane = new(4,float)
plane = (/ xy(0,0),xy(1,0),xy(0,1),xy(1,1) /) ;AB经纬度对应网格点
alfa = atan2((endlat-startlat),(endlon-startlon)) ;计算线段AB与x轴方向的夹角
uv = u*cos(alfa)+v*sin(alfa)
uvcross = wrf_user_intrp3d(uv,z,"v",plane,alfa,True) ;xy合成量插值到高度上
wcross = wrf_user_intrp3d(w,z,"v",plane,alfa,True) ;w插值到高度上
;-----------------------------画图-------------------------------------------;
vcres = True
vcres@vcGlyphStyle = "LineArrow"
vector = wrf_vector(a,wks,uvcross,(wcross*10),vcres)
cnres = True
cnres@cnFillOn = True
cnres@cnLinesOn = False
contour = wrf_contour(a,wks,uvcross,cnres)
plot = wrf_overlays(a,wks,(/contour,vector/),True)
end
之前用grads画的图是正确的,二者对比明显是我的ncl脚本的问题。
有木有好心的大神 请教一下哪一步出了问题呢?
|
|