;************************************************* ; panel_5.ncl ;************************************************ load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ;************************************************ begin ;************************************************ ; read in netCDF file ;************************************************ a = addfile("uv300.nc","r") u = a->U(1,:,:) ; read July zonal winds v = a->V(1,:,:) ;************************************************ ; create plots ;************************************************ wks = gsn_open_wks("ps","panel") ; open a ps file gsn_define_colormap(wks,"gui_default") ; choose color map plot = new(3,graphic) ; create a plot array res = True res@gsnDraw = False ; don't draw res@gsnFrame = False ; don't advance frame res@cnInfoLabelOn = False ; turn off cn info label res@cnFillOn = True ; turn on color res@gsnSpreadColors = True ; spread out color table res@gsnSpreadColorStart = 2 res@gsnSpreadColorEnd = -3 res@lbLabelBarOn = False ; turn off individual cb's ; to have a common label bar, both plots should be set to the same interval ; b/c the label bar is drawn by default from the interval of the first plot. res@cnLevelSelectionMode = "ManualLevels" res@cnMinLevelValF = -10. res@cnMaxLevelValF = 45. res@cnLevelSpacingF = 5. plot(0) = gsn_csm_contour_map_ce(wks,u,res) plot(1) = gsn_csm_contour_map_ce(wks,v,res) plot(2) = gsn_csm_contour_map_ce(wks,u,res) ;************************************************ ; create panel ;************************************************ resP = True ; modify the panel plot resP@gsnFrame = False ; don't advance panel plot resP@gsnPanelLabelBar = True ; add common colorbar resP@txString = "A common title" ; add common title resP@gsnPanelBottom = 0.05 ; add space at bottom resP@gsnPanelFigureStrings= (/"a)","b)","c)"/) ; add strings to panel res@txFontHeightF = .24 gsn_panel(wks,plot,(/3,1/),resP) ; now draw as one plot txres = True txres@txFontHeightF = 0.015 gsn_text_ndc(wks,"Figure 1: A nifty panel plot",0.5,0.02,txres) frame(wks) end