biomass/25.contour.ncl
author Forrest Hoffman <forrest@climatemodeling.org>
Thu, 26 Mar 2009 14:02:21 -0400
changeset 1 4be95183fbcd
permissions -rw-r--r--
Modifications to scoring and graphics production for the final version of code for the C-LAMP paper in GCB.
     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 data
    10 ;************************************************
    11   grid = "1x1"
    12 ; grid = "T31"
    13 ; grid = "T42"
    14 ; grid = "1.9"
    15 
    16   diri  = "/fis/cgd/cseg/people/jeff/clamp_data/observed/biomass/"
    17   fili  = "amazon_mask_"+ grid + ".nc"
    18   f     = addfile (diri+fili,"r")
    19 
    20   y = f->mask_amazon
    21 
    22   printVarSummary(y)
    23 
    24 ;************************************************
    25 ; create default plot
    26 ;************************************************
    27 
    28   wks = gsn_open_wks("ps","mask_"+grid)         ; open a ps file
    29   gsn_define_colormap(wks,"gui_default")     ; choose colormap
    30 
    31   res                     = True             ; Use plot options
    32   res@cnFillOn            = True             ; Turn on color fill
    33   res@gsnSpreadColors      = True            ; use full colormap
    34 ; res@cnFillMode          = "RasterFill"     ; Turn on raster color
    35 ; res@lbLabelAutoStride   = True
    36   res@cnLinesOn           = False            ; Turn off contourn lines
    37   res@mpFillOn            = False            ; Turn off map fill
    38   res@gsnAddCyclic        = False
    39   res@tiMainString        = "Amazon Mask: grid = "+ grid
    40 
    41   res@mpMinLatF            = -21.1      ; range to zoom in on
    42   res@mpMaxLatF            =  13.8
    43   res@mpMinLonF            =  277.28
    44   res@mpMaxLonF            =  326.43
    45 
    46   res@gsnSpreadColors     = True             ; use full colormap
    47   res@cnLevelSelectionMode = "ManualLevels"  ; Manual contour invtervals
    48 ; res@cnMinLevelValF       = 1.              ; Min level
    49 ; res@cnMaxLevelValF       = 11.             ; Max level
    50 ; res@cnLevelSpacingF      = 1.              ; interval
    51   res@cnMinLevelValF       = 0.              ; Min level
    52   res@cnMaxLevelValF       = 1.              ; Max level
    53   res@cnLevelSpacingF      = 0.1             ; interval
    54 
    55 ; pres                     = True            ; panel plot mods desired
    56 ; pres@gsnMaximize         = True            ; fill the page
    57 
    58   plot = gsn_csm_contour_map_ce(wks,y,res)   ; for observed
    59 ; gsn_panel(wks,plot,(/1,1/),pres)           ; create panel plot
    60 ; system("convert xy.ps xy.png")
    61 end