;-------------------------------------------------------- begin a = addfile("/work/ewilliam/ncep_2016/combine/mainprf.nc","r") t = a->air w = a->omega u = a->uwnd(0,:,:,{96}) g = a->hgt v = a->vwnd ;------------- g1 = 1013*(1-6.5/288000*g)^5.255 g1@units = "hPa" copy_VarCoords(g,g1) ;printVarSummary(g1) ;print(g1) v = 0. ;------------ ;umin = (u) ;umax = (u) ;----------------------------------------- wks = gsn_open_wks ("png", "mainplot" ) ; send graphics to PNG file res = True ; plot mods desired res@cnFillOpacityF = 0.4 res@tiMainString = "NCEP/NCAR Reanalysis Data June-September 2016 @ 96E" ; title res@gsnDraw = False ; do not draw the plot res@gsnFrame = False ; do not advance the frame res@cnLevelSelectionMode = "ManualLevels" ; manually select levels res@cnLevelSpacingF = 10.0 ; contour spacing res@cnMinLevelValF = 300. ; min level res@cnMaxLevelValF = 390. ; max level res@cnLineLabelsOn = False ; turn on line labels res@cnFillOn = True ; turn on color fill res@cnFillPalette = "MPL_rainbow" ; choose colormap res@tiYAxisString = "Pressure Levels (hPa)" res@gsnLeftString = "Mean Potential Air Temperature" res@gsnRightString = t@units res@vcRefMagnitudeF = 5.0 ; define vector ref mag res@vcRefLengthF = 0.08 ; define length of vec ref res@vcGlyphStyle = "CurlyVector" ; turn on curly vectors res@vcMinDistanceF = 0.04 ; thin out vectors res@vcMapDirection = True res@vcLineArrowColor = "Blue" ; change vector color res@vcLineArrowThicknessF = 2.0 ; change vector thickness res@vcRefAnnoArrowLineColor = "black" ; change ref vector color res@vcRefAnnoArrowUseVecColor = False ; don't use vec color for ref plot1 = gsn_csm_pres_hgt_vector(wks, t(0,:,:,{96}),v(0,:,:,{96}),w(0,:,:,{96}), res ) ;------------------------------------------------ sres = True ; plot mods desired sres@cnLineLabelsOn = True ; turn on line labels sres@cnLineColor = "Red" ; color of contour sres@cnInfoLabelOn = False ; turn off info label sres@gsnDraw = False ; do not draw the plot sres@gsnFrame = False ; do not advance the frame sres@gsnLeftString = " " sres@gsnRightString = " " plot2 = gsn_csm_pres_hgt(wks, u, sres ) ;----------------------- mres = True mres@gsnLeftString = " " mres@gsnRightString = " " mres@gsnDraw = False ; do not draw the plot mres@gsnFrame = False ; do not advance the frame mres@xyLineThicknesses = (/3.0/) ; make line thicker mres@xyLineColors = (/"green"/) ; change line color plot3 = gsn_csm_xy(wks,g1&lat,g1(0,:,{96}),mres) ; create plot ;----------------------------- overlay(plot1,plot2) overlay(plot1,plot3) draw(plot1) frame(wks) end