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. data1 = generate_2d_array(10, 12, -20., 17., 0, (/129,129/)) data2 = generate_2d_array(13, 13, -25., 15., 1, (/129,129/)) data3 = generate_2d_array(10, 10, -22., 16., 2, (/129,129/)) data4 = generate_2d_array( 9, 10, -23., 15., 3, (/129,129/)) wks = gsn_open_wks("x11","panel_ex04") ; Open X11 window gsn_define_colormap(wks,"testcmap") ; Change colormap ;---Set up resources. res = True res@gsnMaximize = True ; Maximize plot in frame res@gsnDraw = False ; Turn off draw res@gsnFrame = False ; Turn off frame advance res@cnFillOn = True ; Turn on contour fill res@cnLinesOn = False ; Turn off contour lines ;---Set contour levels using min/max/spacing res@cnLevelSelectionMode = "ManualLevels" ; Default is "AutomaticLevels" res@cnMinLevelValF = -24 res@cnMaxLevelValF = 16 res@cnLevelSpacingF = 2.5 ;---Create arrays to hold four plots. plot = new(4,graphic) plot(0) = gsn_csm_contour(wks,data1,res) plot(1) = gsn_csm_contour(wks,data2,res) plot(2) = gsn_csm_contour(wks,data3,res) plot(3) = gsn_csm_contour(wks,data4,res) pres = False gsn_panel(wks,plot,(/2,2/),pres) end