biomass/11.contour_ob.ncl
changeset 0 0c6405ab2ff4
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/biomass/11.contour_ob.ncl	Mon Jan 26 22:08:20 2009 -0500
     1.3 @@ -0,0 +1,59 @@
     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 in observed data
    1.13 +;************************************************
    1.14 +  diri  = "/fis/cgd/cseg/people/jeff/clamp_data/biomass/ob/"
    1.15 +; fili  = "amazon_biomass.nc"
    1.16 +; fili  = "amazon_biomass_T31.nc"
    1.17 +  fili  = "amazon_biomass_T42.nc"
    1.18 +  f     = addfile(diri+fili,"r")
    1.19 +
    1.20 +; y     = f->BIOMASS(::50,::50)
    1.21 +  y     = f->BIOMASS
    1.22 +  printVarSummary(y)
    1.23 +
    1.24 +  print (min(y)+"/"+max(y))
    1.25 +
    1.26 +;************************************************
    1.27 +; create default plot
    1.28 +;************************************************
    1.29 +
    1.30 +  wks = gsn_open_wks("ps","xy")         ; open a ps file
    1.31 +  gsn_define_colormap(wks,"gui_default")     ; choose colormap
    1.32 +
    1.33 +  res                     = True             ; Use plot options
    1.34 +  res@cnFillOn            = True             ; Turn on color fill
    1.35 +  res@gsnSpreadColors      = True            ; use full colormap
    1.36 +; res@cnFillMode          = "RasterFill"     ; Turn on raster color
    1.37 +; res@lbLabelAutoStride   = True
    1.38 +  res@cnLinesOn           = False            ; Turn off contourn lines
    1.39 +  res@mpFillOn            = False            ; Turn off map fill
    1.40 +  res@gsnAddCyclic        = False
    1.41 +  res@tiMainString        = "LC15_amazon_biomass"
    1.42 +
    1.43 +  res@mpMinLatF            = -21.1      ; range to zoom in on
    1.44 +  res@mpMaxLatF            =  13.8
    1.45 +  res@mpMinLonF            =  277.28
    1.46 +  res@mpMaxLonF            =  326.43
    1.47 +
    1.48 +  res@gsnSpreadColors     = True             ; use full colormap
    1.49 +  res@cnLevelSelectionMode = "ManualLevels"  ; Manual contour invtervals
    1.50 +; res@cnMinLevelValF       = 1.              ; Min level
    1.51 +; res@cnMaxLevelValF       = 11.             ; Max level
    1.52 +; res@cnLevelSpacingF      = 1.              ; interval
    1.53 +  res@cnMinLevelValF       = 0.              ; Min level
    1.54 +  res@cnMaxLevelValF       = 450.             ; Max level
    1.55 +  res@cnLevelSpacingF      = 50.              ; interval
    1.56 +; pres                            = True     ; panel plot mods desired
    1.57 +; pres@gsnMaximize                = True     ; fill the page
    1.58 +
    1.59 +  plot = gsn_csm_contour_map_ce(wks,y,res)   ; for observed
    1.60 +; gsn_panel(wks,plot,(/1,1/),pres)           ; create panel plot
    1.61 +; system("convert xy.ps xy.png")
    1.62 +end
    1.63 \ No newline at end of file