biomass/11.contour_ob.ncl
changeset 0 0c6405ab2ff4
equal deleted inserted replaced
-1:000000000000 0:3f9ec8fafe61
       
     1 ;*************************************************
       
     2 ; ce_1.ncl
       
     3 ;************************************************
       
     4 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"  
       
     5 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"  
       
     6 ;************************************************
       
     7 begin
       
     8 ;************************************************
       
     9 ; read in observed data
       
    10 ;************************************************
       
    11   diri  = "/fis/cgd/cseg/people/jeff/clamp_data/biomass/ob/"
       
    12 ; fili  = "amazon_biomass.nc"
       
    13 ; fili  = "amazon_biomass_T31.nc"
       
    14   fili  = "amazon_biomass_T42.nc"
       
    15   f     = addfile(diri+fili,"r")
       
    16 
       
    17 ; y     = f->BIOMASS(::50,::50)
       
    18   y     = f->BIOMASS
       
    19   printVarSummary(y)
       
    20 
       
    21   print (min(y)+"/"+max(y))
       
    22 
       
    23 ;************************************************
       
    24 ; create default plot
       
    25 ;************************************************
       
    26 
       
    27   wks = gsn_open_wks("ps","xy")         ; open a ps file
       
    28   gsn_define_colormap(wks,"gui_default")     ; choose colormap
       
    29 
       
    30   res                     = True             ; Use plot options
       
    31   res@cnFillOn            = True             ; Turn on color fill
       
    32   res@gsnSpreadColors      = True            ; use full colormap
       
    33 ; res@cnFillMode          = "RasterFill"     ; Turn on raster color
       
    34 ; res@lbLabelAutoStride   = True
       
    35   res@cnLinesOn           = False            ; Turn off contourn lines
       
    36   res@mpFillOn            = False            ; Turn off map fill
       
    37   res@gsnAddCyclic        = False
       
    38   res@tiMainString        = "LC15_amazon_biomass"
       
    39 
       
    40   res@mpMinLatF            = -21.1      ; range to zoom in on
       
    41   res@mpMaxLatF            =  13.8
       
    42   res@mpMinLonF            =  277.28
       
    43   res@mpMaxLonF            =  326.43
       
    44 
       
    45   res@gsnSpreadColors     = True             ; use full colormap
       
    46   res@cnLevelSelectionMode = "ManualLevels"  ; Manual contour invtervals
       
    47 ; res@cnMinLevelValF       = 1.              ; Min level
       
    48 ; res@cnMaxLevelValF       = 11.             ; Max level
       
    49 ; res@cnLevelSpacingF      = 1.              ; interval
       
    50   res@cnMinLevelValF       = 0.              ; Min level
       
    51   res@cnMaxLevelValF       = 450.             ; Max level
       
    52   res@cnLevelSpacingF      = 50.              ; interval
       
    53 ; pres                            = True     ; panel plot mods desired
       
    54 ; pres@gsnMaximize                = True     ; fill the page
       
    55 
       
    56   plot = gsn_csm_contour_map_ce(wks,y,res)   ; for observed
       
    57 ; gsn_panel(wks,plot,(/1,1/),pres)           ; create panel plot
       
    58 ; system("convert xy.ps xy.png")
       
    59 end