;================================================; ; Popgrid_1.ncl ;================================================; ; ; These files are loaded by default in NCL V6.2.0 and newer ; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" ; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" ; ================================================; begin f = addfile("TEMP.nc","r") t = f->TEMP lat2d = f->TLAT lon2d = f->TLONG ;=================================================; ; Create plot ;=================================================; wks = gsn_open_wks("png","popgrid") ; send graphics to PNG file cmap = read_colormap_file("BlAqGrYeOrRe") ; read color data res = True ; plot mods desired res@gsnDraw = False ; don't draw yet res@gsnFrame = False ; don't advance frame yet res@cnFillOn = True ; turn on color fill res@cnFillPalette = cmap(8:94,:) ; set color map res@cnLinesOn = False ; turn off contour lines res@cnLineLabelsOn = False ; turn off contour line labels plot = gsn_csm_contour(wks,t(0,0,:,:),res) ;************************************ ; create overlays of both lat/lon contours ; and add to the map plot ;************************************ ores = True ; plots mods desired ores@gsnDraw = False ; don't draw yet ores@gsnFrame = False ; don't advance frame yet ores@cnInfoLabelOn = False ; turn off info label ores@cnLineLabelsOn= False ; turn off contour line labels ores@tiMainString = "The POP Grid" ; add title latplot = gsn_contour(wks,lat2d,ores) ; create lat contours overlay(plot,latplot) ; overlay onto map lonplot = gsn_contour(wks,lon2d,ores) ; create lon contours overlay(plot,lonplot) ; overlay on map ; now we draw the whole thing and advance the frame. draw(plot) frame(wks) end