load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" begin ; ; Generate some dummy data. ; u_em_f = generate_2d_array(10, 10, -19.69, 15.82, 0, (/129,129/)) u_em_g = generate_2d_array(10, 10, -27.95, 15.85, 1, (/129,129/)) u_es_f = generate_2d_array(10, 10, -21.00, 18.17, 2, (/129,129/)) u_es_g = generate_2d_array(10, 10, -19.00, 21.89, 3, (/129,129/)) wks = gsn_open_wks("ps","panel") ; Open PS workstation gsn_define_colormap(wks,"testcmap") ; Change colormap. plot = new(4,graphic) ; Create arrays to hold plots. ; ; Set up resources. ; res = True res@gsnDraw = False res@gsnFrame = False res@gsnSpreadColors = True res@cnFillOn = True res@cnLinesOn = False res@cnInfoLabelOn = False res@lbLabelBarOn = False ; add labelbar later res@cnMinLevelValF = -20 res@cnMaxLevelValF = 20 res@cnLevelSpacingF = 2.5 res@cnLabelBarEndStyle = "ExcludeOuterBoxes" plot(0) = gsn_csm_contour(wks,u_em_f,res) plot(1) = gsn_csm_contour(wks,u_em_g,res) plot(2) = gsn_csm_contour(wks,u_es_f,res) plot(3) = gsn_csm_contour(wks,u_es_g,res) pres = True pres@gsnPanelLabelBar = True pres@pmLabelBarWidthF = 0.8 gsn_panel(wks,plot,(/2,2/),pres) end