biomass/25.contour.ncl
changeset 0 0c6405ab2ff4
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/biomass/25.contour.ncl	Mon Jan 26 22:08:20 2009 -0500
     1.3 @@ -0,0 +1,61 @@
     1.4 +;*************************************************
     1.5 +; ce_1.ncl
     1.6 +;************************************************
     1.7 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"  
     1.8 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"  
     1.9 +;************************************************
    1.10 +begin
    1.11 +;************************************************
    1.12 +; read data
    1.13 +;************************************************
    1.14 +  grid = "1x1"
    1.15 +; grid = "T31"
    1.16 +; grid = "T42"
    1.17 +; grid = "1.9"
    1.18 +
    1.19 +  diri  = "/fis/cgd/cseg/people/jeff/clamp_data/observed/biomass/"
    1.20 +  fili  = "amazon_mask_"+ grid + ".nc"
    1.21 +  f     = addfile (diri+fili,"r")
    1.22 +
    1.23 +  y = f->mask_amazon
    1.24 +
    1.25 +  printVarSummary(y)
    1.26 +
    1.27 +;************************************************
    1.28 +; create default plot
    1.29 +;************************************************
    1.30 +
    1.31 +  wks = gsn_open_wks("ps","mask_"+grid)         ; open a ps file
    1.32 +  gsn_define_colormap(wks,"gui_default")     ; choose colormap
    1.33 +
    1.34 +  res                     = True             ; Use plot options
    1.35 +  res@cnFillOn            = True             ; Turn on color fill
    1.36 +  res@gsnSpreadColors      = True            ; use full colormap
    1.37 +; res@cnFillMode          = "RasterFill"     ; Turn on raster color
    1.38 +; res@lbLabelAutoStride   = True
    1.39 +  res@cnLinesOn           = False            ; Turn off contourn lines
    1.40 +  res@mpFillOn            = False            ; Turn off map fill
    1.41 +  res@gsnAddCyclic        = False
    1.42 +  res@tiMainString        = "Amazon Mask: grid = "+ grid
    1.43 +
    1.44 +  res@mpMinLatF            = -21.1      ; range to zoom in on
    1.45 +  res@mpMaxLatF            =  13.8
    1.46 +  res@mpMinLonF            =  277.28
    1.47 +  res@mpMaxLonF            =  326.43
    1.48 +
    1.49 +  res@gsnSpreadColors     = True             ; use full colormap
    1.50 +  res@cnLevelSelectionMode = "ManualLevels"  ; Manual contour invtervals
    1.51 +; res@cnMinLevelValF       = 1.              ; Min level
    1.52 +; res@cnMaxLevelValF       = 11.             ; Max level
    1.53 +; res@cnLevelSpacingF      = 1.              ; interval
    1.54 +  res@cnMinLevelValF       = 0.              ; Min level
    1.55 +  res@cnMaxLevelValF       = 1.              ; Max level
    1.56 +  res@cnLevelSpacingF      = 0.1             ; interval
    1.57 +
    1.58 +; pres                     = True            ; panel plot mods desired
    1.59 +; pres@gsnMaximize         = True            ; fill the page
    1.60 +
    1.61 +  plot = gsn_csm_contour_map_ce(wks,y,res)   ; for observed
    1.62 +; gsn_panel(wks,plot,(/1,1/),pres)           ; create panel plot
    1.63 +; system("convert xy.ps xy.png")
    1.64 +end
    1.65 \ No newline at end of file