forrest@0: ;************************************************* forrest@0: ; ce_1.ncl forrest@0: ;************************************************ forrest@0: load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" forrest@0: load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" forrest@0: ;************************************************ forrest@0: begin forrest@0: ;************************************************ forrest@0: ; read data forrest@0: ;************************************************ forrest@0: grid = "1x1" forrest@0: ; grid = "T31" forrest@0: ; grid = "T42" forrest@0: ; grid = "1.9" forrest@0: forrest@0: diri = "/fis/cgd/cseg/people/jeff/clamp_data/observed/biomass/" forrest@0: fili = "amazon_mask_"+ grid + ".nc" forrest@0: f = addfile (diri+fili,"r") forrest@0: forrest@0: y = f->mask_amazon forrest@0: forrest@0: printVarSummary(y) forrest@0: forrest@0: wks = gsn_open_wks ("ps","test") ; open workstation forrest@0: gsn_define_colormap(wks,"gui_default") ; choose colormap forrest@0: forrest@0: ;----------------------------------------- forrest@0: ; plot area sum forrest@0: forrest@0: gRes = True forrest@0: gRes@txFontHeightF = 0.02 forrest@0: ; gRes@txAngleF = 90 forrest@0: forrest@0: Sum_area = 7.41 forrest@0: forrest@0: area_sum_text = "(mask area = "+sprintf("%.2f", Sum_area)+"(x1.e12 m2))" forrest@0: forrest@0: gsn_text_ndc(wks,area_sum_text,0.50,0.80,gRes) forrest@0: ;----------------------------------------- forrest@0: forrest@0: ;************************************************ forrest@0: ; create default plot forrest@0: ;************************************************ forrest@0: forrest@0: res = True ; Use plot options forrest@0: res@cnFillOn = True ; Turn on color fill forrest@0: res@gsnSpreadColors = True ; use full colormap forrest@0: ; res@cnFillMode = "RasterFill" ; Turn on raster color forrest@0: ; res@lbLabelAutoStride = True forrest@0: res@cnLinesOn = False ; Turn off contourn lines forrest@0: res@mpFillOn = False ; Turn off map fill forrest@0: res@gsnAddCyclic = False forrest@0: res@tiMainString = "Amazon Mask: grid = "+ grid forrest@0: forrest@0: res@mpMinLatF = -21.1 ; range to zoom in on forrest@0: res@mpMaxLatF = 13.8 forrest@0: res@mpMinLonF = 277.28 forrest@0: res@mpMaxLonF = 326.43 forrest@0: forrest@0: res@gsnSpreadColors = True ; use full colormap forrest@0: res@cnLevelSelectionMode = "ManualLevels" ; Manual contour invtervals forrest@0: ; res@cnMinLevelValF = 1. ; Min level forrest@0: ; res@cnMaxLevelValF = 11. ; Max level forrest@0: ; res@cnLevelSpacingF = 1. ; interval forrest@0: res@cnMinLevelValF = 0. ; Min level forrest@0: res@cnMaxLevelValF = 1. ; Max level forrest@0: res@cnLevelSpacingF = 0.1 ; interval forrest@0: forrest@0: ; pres = True ; panel plot mods desired forrest@0: ; pres@gsnMaximize = True ; fill the page forrest@0: forrest@0: plot = gsn_csm_contour_map_ce(wks,y,res) ; for observed forrest@0: ; gsn_panel(wks,plot,(/1,1/),pres) ; create panel plot forrest@0: ; system("convert xy.ps xy.png") forrest@0: end