;******************************************************* ; conOncon_5.ncl ;******************************************************* load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ;******************************************************* begin f = addfile("HGT500_MON_1958-1997.nc","r") x = f->HGT ;******************************************************* ; create plot ;******************************************************* wks = gsn_open_wks("ps","conOncon") ; open workstation plots = new(20,graphic) ; create graphical array res = True ; plot mods desired res@gsnMaximize = True ; make as large as possible res@gsnDraw = False ; do not draw until the end res@gsnFrame = False ; do not automatically advance 'frame' res@gsnPolar = "NH" ; choose which hemisphere res@cnLevelSelectionMode = "ExplicitLevels" ; explicit contour levels res@cnLevels = 5500 ; which level(s) to plot res@cnInfoLabelOn = False ; no info label res@cnLineLabelsOn = False ; no line labels ; 1st plot generates the map + 1st contour res@cnLineColor = 1 ; use numerical indices res@cnLineThicknessF = 3 ; thickness of contour lines res@tiMainString = "Spaghetti Plot" ; title plot_base = gsn_csm_contour_map_polar(wks,x(0,:,:),res) delete (res@gsnPolar) ; avoid annoying warning messages ;******************************************* ; loop over other fields but only do contour ; note the color index is changing. here we are selecting a new ; color from the default color map. ;****************************************** res@gsnLeftString = "" ; suppress automatic labels res@gsnRightString = "" res@cnLineThicknessF = 1 do i=0,19 ; loop over the number of plots res@cnLineColor = 2+i ; change line color plots(i) = gsn_csm_contour(wks,x(12*i+1,:,:),res) overlay(plot_base,plots(i)) end do draw(plot_base) frame(wks) end