| 
 
	积分2499贡献 精华在线时间 小时注册时间2016-9-25最后登录1970-1-1 
 | 
 
| 
本人NCL小白,最近刚开始学习NCL,在绘制全球速度势和辐散风场图的时候,发现画出的图很奇怪:如下图:辐合中心在非洲那块对应的是正的速度势,而在亚洲那块同样是辐合中心却对应负的速度势,这很明显是错误的。
x
登录后查看更多精彩内容~您需要 登录 才可以下载或查看,没有帐号?立即注册 
  
 在家园的其他帖子看过之后有建议说加上*@scale_factor+@add_offset对变量进行处理,处理之后画出下图:跟图1简直天差地别!
 
 但是后来我看我用的资料(NCEP再分析资料),里面显示scale_factor=1,add_offset=0,这说明加不加这个变量处理完全是一样的!!!根本不可能画出完全不同的两幅图,这是为什么?我百思不得其解呐。。。求大神解答!!!万分感激!
 
 
 NCL脚本如下:
 begin
 ;*************************************************
 ; open file and read in data: data are on a gaussian grid
 ;*************************************************
 f1= addfile ("./wjunb/data/uwnd.mon.ltm.nc", "r")
 f2= addfile ("./wjunb/data/vwnd.mon.ltm.nc", "r")
 
 U  = f1->uwnd(0,9,:,:)                         ; (time,level,lat,lon)
 u=U*U@scale_factor + U@add_offset
 
 V  = f2->vwnd(0,9,:,:)
 v=V*V@scale_factor + V@add_offset
 ;*************************************************
 ; calculate divergence on a gaussian grid
 ;*************************************************
 div = uv2dvG_Wrap(u,v)
 ;*************************************************
 ; calculate velocity potential
 ;*************************************************
 chi = ilapsG_Wrap (div , 0)
 chi = (/chi/1e6/)                     ; arbitrary scale
 chi@long_name = "velocity potential"
 chi@units     = "m/s"
 ;*************************************************
 ; calculate divergent wind component
 ; --
 ; note: the calculation uses a procedure, so memory
 ; must be preallocated.
 ;*************************************************
 ud    = new ( dimsizes(u), typeof(u), u@_FillValue )
 vd    = new ( dimsizes(v), typeof(v), v@_FillValue )
 
 dv2uvg(div,ud,vd) ; div  ==> divergent  wind components
 
 copy_VarCoords(u, ud )
 copy_VarCoords(u, vd )
 ud@long_name  = "Zonal Divergent Wind"
 ud@units      = u@units
 vd@long_name  = "Meridional Divergent Wind"
 vd@units      = v@units
 ;*************************************************
 ; plot results
 ;*************************************************
 wks  = gsn_open_wks("png","wind")
 gsn_define_colormap(wks, "temp_diff_18lev")
 
 res                      = True
 res@mpFillOn             = False
 res@mpGeophysicalLineThicknessF=2.5
 res@pmTickMarkDisplayMode = "Always"
 
 res@cnFillOn             = True               ; color on
 res@cnLinesOn            = False              ; turn off contour lines
 res@cnLevelSelectionMode="ExplicitLevels"
 res@cnLevels=(/-10,-8,-6,-4,-2,2,4,6,8,10,12/)
 res@cnFillColors=(/4,6,8,9,10,11,12,14,15,16,17,18/)
 
 res@gsnScalarContour     = True
 res@vcRefMagnitudeF      = 10
 res@vcRefLengthF         = 0.050
 res@vcLineArrowThicknessF= 2
 res@vcGlyphStyle         = "CurlyVector"
 res@vcMinDistanceF       = 0.012
 res@vcRefAnnoOrthogonalPosF  = -0.13
 
 res@gsnCenterString      = "Divergent Wind_Velocity Potential"
 res@gsnLeftString        ="Jan"
 
 plot=gsn_csm_vector_scalar_map(wks,ud,vd,chi,res)
 end
 
 
 | 
 
  
  |