begin ;---Generate 6 dummy data sets nx = 100 ny = 100 data1 = generate_2d_array( 9, 10, -19.,16., 0, (/ny,nx/)) data2 = generate_2d_array(10, 10, -20.,17., 3, (/ny,nx/)) data3 = generate_2d_array(11, 12, -18.,19., 1, (/ny,nx/)) data4 = generate_2d_array(10, 13, -19.,19., 2, (/ny,nx/)) data5 = generate_2d_array(10, 11, -20.,20., 0, (/ny,nx/)) data6 = generate_2d_array(12, 12, -18.,20., 3, (/ny,nx/)) ;---Generate 3 more dummy data sets, use different min/max. data7 = generate_2d_array(10, 11, 51.,92., 3, (/ny,nx/)) data8 = generate_2d_array(10, 10, 50.,100., 0, (/ny,nx/)) data9 = generate_2d_array(12, 12, 55., 95., 2, (/ny,nx/)) ;---Start the graphics. wks = gsn_open_wks("x11","panel") ; send graphics to PNG file ;---Set resources common to all four plots res = True res@gsnDraw = False res@gsnFrame = False res@cnLineLabelsOn = False ; Turn off contour line labels res@cnFillOn = True ; Turn on contour fill res@cnInfoLabelOn = False ; Turn off info label res@lbLabelBarOn = False ; Turn off labelbar ;---Set levels and colors to use for first 6 plots. res@cnFillPalette = "BlueRed" res@cnLevelSelectionMode = "ManualLevels" res@cnMinLevelValF = -18. res@cnMaxLevelValF = 18. res@cnLevelSpacingF = 2. plot1 = gsn_csm_contour(wks,data1,res) plot2 = gsn_csm_contour(wks,data2,res) plot3 = gsn_csm_contour(wks,data3,res) plot4 = gsn_csm_contour(wks,data4,res) plot5 = gsn_csm_contour(wks,data5,res) plot6 = gsn_csm_contour(wks,data6,res) ;---Set levels and colors to use for last 3 plots res@cnFillPalette = "amwg" res@cnMinLevelValF = 55. res@cnMaxLevelValF = 95. res@cnLevelSpacingF = 5. plot7 = gsn_csm_contour(wks,data7,res) plot8 = gsn_csm_contour(wks,data8,res) plot9 = gsn_csm_contour(wks,data9,res) ;---Set some panel resources common to both sets of plots pres = True pres@gsnPanelLabelBar = True pres@gsnMaximize = True pres@pmLabelBarHeightF = 0.08 pres@lbLabelFontHeightF = 0.01 pres@gsnFrame = False ; Needed for paneling two sets of plots on same frame. ; pres@gsnPanelBoxes = True ; debugging tool ;---Define space for leftmost column of plots, and their labelbar width pres@gsnPanelLeft = 0. pres@gsnPanelRight = 2./3 pres@pmLabelBarWidthF = 0.6 gsn_panel(wks,(/plot1,plot2,plot3,plot4,plot5,plot6/),(/3,2/),pres) ;---Define space for righmost column of plots, and their labelbar width delta = 0.028 pres@gsnPanelLeft = pres@gsnPanelRight - delta ; Left plots don't stretch all the way to ; 2/3, so move right plots a little to left. pres@gsnPanelRight = 1.0 - delta pres@pmLabelBarWidthF = pres@pmLabelBarWidthF * 0.5 ; half the width of other labelbar gsn_panel(wks,(/plot7,plot8,plot9/),(/3,1/),pres) frame(wks) ; Now advance the frame end