class/04.check_write.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 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"  
     7 ;************************************************
     8 begin
     9 
    10 ; read data
    11 
    12   diri  = "/fis/cgd/cseg/people/jeff/clamp_data/model/"
    13   fili =  "class_pft_T42.nc"
    14   fili =  "class_pft_1.9.nc"
    15   f = addfile(diri+fili,"r")
    16 
    17   x     = f->CLASS_PFT
    18   printVarSummary(x)
    19 
    20 ;************************************************
    21 ; create default plot
    22 ;************************************************
    23 
    24   wks = gsn_open_wks("ps","class")              ; open a ps file
    25   gsn_define_colormap(wks,"gui_default")     ; choose colormap
    26 
    27   res                     = True             ; Use plot options
    28   res@cnFillOn            = True             ; Turn on color fill
    29   res@gsnSpreadColors     = True             ; use full colormap
    30   res@cnLinesOn           = False            ; Turn off contourn lines
    31   res@mpFillOn            = False            ; Turn off map fill
    32   res@tiMainString        = "Class"
    33 
    34   res@gsnSpreadColors      = True            ; use full colormap
    35   res@cnLevelSelectionMode = "ManualLevels"  ; Manual contour invtervals
    36   res@cnMinLevelValF       = 0.              ; Min level
    37   res@cnMaxLevelValF       = 16.             ; Max level
    38   res@cnLevelSpacingF      = 1.              ; interval
    39 
    40   plot = gsn_csm_contour_map_ce(wks,x,res)   
    41 
    42 end