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" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/popRemap.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl" begin wlatS = -5 wlatN = 5 wlonL = 0 wlonR = 360 levU = 100 levD = 1000 yrStrt = 1871 yrLast = 2008 typepic = "png" dir = "/work5/liy/20CR" dirp = "/work5/liy/hadisst-2013-before" picturefile = dirp+"/picture/Ave_"+yrStrt+"-"+yrLast ;output picture file ;---------------------------Read varUV wind data--------------------------------- f1 = addfile(dir+"/uwnd.mon.mean.nc","r") x = f1->uwnd(:,{levD:levU},{wlatS:wlatN},{wlonL:wlonR}) u = short2flt(x) xx = dim_avg_n(u(0::12,:,:,:),0) aveu = dim_avg_n(xx,1) aveu!0 = "level" aveu!1 = "lon" aveu&level = u&level aveu&lon = u&lon delete([/f1,x,xx,u/]) ;========================Read varW wind data========================== f1 = addfile(dir+"/omega.mon.mean.nc","r") x = f1->omega(:,{levD:levU},{wlatS:wlatN},{wlonL:wlonR}) w = short2flt(x) xx = dim_avg_n(w(0::12,:,:,:),0) avew = dim_avg_n(xx,1) avew!0 = "level" avew!1 = "lon" avew&level = w&level avew&lon = w&lon delete([/f1,x,xx,w/]) ;------------------Read air temperature and pressure data----------------------- ;....................this is for converting omega to w wind f1 = addfile(dir+"/air.mon.mean.nc","r") x = f1->air(:,{levD:levU},{wlatS:wlatN},{wlonL:wlonR}) airt = short2flt(x) ;temperature delete([/f1,x/]) ;============================================================================== wks = gsn_open_wks(typepic,picturefile) plot = new(1,graphic) res = True res@cnFillOn = False ; turn on color fill res@cnLinesOn = False ; True is default res@cnLineLabelsOn = False ; True is default res@cnInfoLabelOn = False res@lbLabelBarOn = False ; turn off individual lb's res@stMinArrowSpacingF = 0.008 ; arrow spacing. res@stArrowLengthF = 0.008 ; arrow length res@gsnCenterString = "" res@gsnLeftString = "Jan" res@gsnRightString = "u&v wind" scale = aveu/avew avew = avew*scale plot = gsn_csm_pres_hgt_streamline(wks,airt(0,:,{0},:),aveu,avew,res) end