首页 > 代码库 > NCL 垂直风场剖面图

NCL 垂直风场剖面图

原文地址:用NCL画垂直风场剖面图实例作者:diny

load  "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load  "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load  "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load  "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"

begin
   f1 = addfile("vwnd.mon.mean.nc","r")
   f2 = addfile("omega.mon.mean.nc","r")
   f3 = addfile("rhum.mon.mean.nc","r")
    v     = f1->vwnd(0,:,:,100)
    w     = f2->omega(0,:,:,100)
    rh    = f3->rhum(0,:,:,100)

    vv = v*0.01+187.65
    ww = w*0.001+28.765
    rhum = rh*0.01+302.65
    copy_VarCoords(rh,rhum)
    copy_VarCoords(v,vv)
    copy_VarCoords(w,ww)
    wAve   = avg(ww)           ; used for scaling
    vAve   = avg(vv)
    scale  = fabs(vAve/wAve)
    wscale = ww*scale

    wks   = gsn_open_wks ("eps", "h_long" )
; ===========================
; shade less than -10 and
; greater than +10
; ===========================
 res   = True
 res@tiMainString    = "January 1988"
 res@cnLevelSpacingF = 5.0

 res@vcRefMagnitudeF = 25.0
 res@vcRefLengthF    = 0.045
; res@mpRightCornerLonF       = 60.0
; res@mpLeftCornerLonF       = 0.0
 plot  = gsn_csm_pres_hgt_vector(wks,rhum,vv,wscale,res )   ; place holder


end
效果如图:

[转载]用NCL画垂直风场剖面图实例

NCL 垂直风场剖面图