- 积分
- 20092
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-2-16
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 lleoiu 于 2017-9-14 11:27 编辑
2017.9.14:
在NCL的6.2之后的版本中,gsn_csm_pres_hgt_vector函数里默认的vcMapDirection=False
“This resource now defaults to False for this function in NCL V6.2.0.”
http://www.ncl.ucar.edu/Document ... es_hgt_vector.shtml
用NCL画垂直剖面图的时候,总是感觉水平方向上的矢量要比垂直方向上的大(垂直方向上已经乘上了-100),并且画出来的垂直方向总是与GRADS画的方向相反。如图1(NCL),图2(grads)。
fig1
这是NCL默认的设置。
The problem is that by default NCL maps the vector direction into the underlying coordinate space. This is good when drawing on a map projection, but for vertical plots where the two coordinate axes have different units that have very different numerical spacing between the coordinate values it leads to distortion. There is a simple fix, which is to set the resource vcMapDirection to False.
加上res@vcMapDirection = False这一设置之后,画的图与GRADS一样,垂直方向上只需乘上100即可。如图3.
- begin
-
- f2 = addfile("/data/NCEP-2.5/monthly/pressure/vwnd.mon.mean.nc","r")
- f3 = addfile("/data/NCEP-2.5/monthly/pressure/omega.mon.mean.nc","r")
- vwnd1 = short2flt(f2->vwnd(7,0:11,{0:90},{95:110}))
- vwnd11 = dim_avg_n_Wrap(vwnd1,2)
- omega1 = short2flt(f3->omega(7,0:11,{0:90},{95:110})) ;{45:20}
- omega11 = dim_avg_n_Wrap(omega1,2)
- w = omega11*100.
-
- wks = gsn_open_wks("eps","vv5")
- gsn_define_colormap(wks,"gui_default")
- res = True
- res@cnLinesOn = False
- res@cnLineLabelsOn = False
- res@cnInfoLabelOn = False
- res@tmXTOn = False ; and right tickmarks.
- res@tmYROn = False
- res@vcRefMagnitudeF = 5.
- res@vcRefAnnoString1On = True
- res@vcRefAnnoString1 = "5m/s"
- res@vcRefAnnoOrthogonalPosF = -1.095
- res@vcRefAnnoString2On = False
- res@vcRefLengthF = 0.027
- res@vcGlyphStyle = "LineArrow
- res@vcMinDistanceF = 0.008
- res@vcMapDirection = False
- res@vpWidthF = 0.75
- res@vpHeightF = 0.6
- res@tiMainFontHeightF = 0.02
- res@gsnLeftString = ""
- res@gsnRightString = ""
- res@tiYAxisString = "p/hPa"
- res@tmYRMode = "Automatic"
- res@tmXBMode = "Explicit"
- plot = gsn_csm_pres_hgt_vector(wks,vwnd11,vwnd11,w,res)
- end
复制代码
|
评分
-
查看全部评分
|