class/04.check_write.ncl
changeset 0 0c6405ab2ff4
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/class/04.check_write.ncl	Mon Jan 26 22:08:20 2009 -0500
     1.3 @@ -0,0 +1,42 @@
     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 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"  
    1.10 +;************************************************
    1.11 +begin
    1.12 +
    1.13 +; read data
    1.14 +
    1.15 +  diri  = "/fis/cgd/cseg/people/jeff/clamp_data/model/"
    1.16 +  fili =  "class_pft_T42.nc"
    1.17 +  fili =  "class_pft_1.9.nc"
    1.18 +  f = addfile(diri+fili,"r")
    1.19 +
    1.20 +  x     = f->CLASS_PFT
    1.21 +  printVarSummary(x)
    1.22 +
    1.23 +;************************************************
    1.24 +; create default plot
    1.25 +;************************************************
    1.26 +
    1.27 +  wks = gsn_open_wks("ps","class")              ; open a ps file
    1.28 +  gsn_define_colormap(wks,"gui_default")     ; choose colormap
    1.29 +
    1.30 +  res                     = True             ; Use plot options
    1.31 +  res@cnFillOn            = True             ; Turn on color fill
    1.32 +  res@gsnSpreadColors     = True             ; use full colormap
    1.33 +  res@cnLinesOn           = False            ; Turn off contourn lines
    1.34 +  res@mpFillOn            = False            ; Turn off map fill
    1.35 +  res@tiMainString        = "Class"
    1.36 +
    1.37 +  res@gsnSpreadColors      = True            ; use full colormap
    1.38 +  res@cnLevelSelectionMode = "ManualLevels"  ; Manual contour invtervals
    1.39 +  res@cnMinLevelValF       = 0.              ; Min level
    1.40 +  res@cnMaxLevelValF       = 16.             ; Max level
    1.41 +  res@cnLevelSpacingF      = 1.              ; interval
    1.42 +
    1.43 +  plot = gsn_csm_contour_map_ce(wks,x,res)   
    1.44 +
    1.45 +end
    1.46 \ No newline at end of file