;***************************************************** ; cru_6.ncl ;***************************************************** load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ;***************************************************** begin f = addfile("Tave_18562003.nc","r") year = f->year tnh = f->TAveNhAn tsh = f->TAveShAn tgl = f->TAveGlAn ;*************************************** ; create plot ;*************************************** wks = gsn_open_wks("ps","cru") ; open ps file plot= new (3,graphic) ; create graphical array res = True ; plot mods desired res@gsnDraw = False ; don't draw yet res@gsnFrame = False ; don't advance frame yet res@vpHeightF = 0.43 ; Changes the aspect ratio res@vpWidthF = 0.90 ; of plots res@trYMinF = -0.75 ; min value on y-axis res@trYMaxF = 0.75 ; max value on y-axis res@gsnYRefLine = 0. ; reference line res@gsnAboveYRefLineColor = "red" ; above ref line fill red res@gsnBelowYRefLineColor = "blue" ; below ref line fill blue res@gsnXYBarChart = True ; create bar chart res@xyLineColors = (/"red","blue"/) ; line around bar color ; create plots res@gsnLeftString = tnh@long_name plot(0) = gsn_csm_xy (wks,year,tnh,res) res@gsnLeftString = tsh@long_name plot(1) = gsn_csm_xy (wks,year,tsh,res) res@gsnLeftString = tgl@long_name plot(2) = gsn_csm_xy (wks,year,tgl,res) ;******************************************** ; create panel plot ;******************************************** resP = True ; panel mods desired ; resP@gsnPanelBottom = 0.05 gsn_panel(wks,plot,(/3,1/),resP) end