lai/31.contour_model.ncl
changeset 0 0c6405ab2ff4
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/lai/31.contour_model.ncl	Mon Jan 26 22:08:20 2009 -0500
     1.3 @@ -0,0 +1,47 @@
     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 model data
    1.13 +;************************************************
    1.14 +  diri  = "/fis/cgd/cseg/people/jeff/clamp_data/"
    1.15 +  fili  = "i01.03cn_1545-1569_ANN_climo.nc"
    1.16 +; fili  = "i01.04casa_1605-1629_ANN_climo.nc"
    1.17 +
    1.18 +  g     = addfile(diri+fili,"r")
    1.19 +  x     = g->TLAI
    1.20 +  print (max(x))
    1.21 +  print (min(x))
    1.22 +
    1.23 +;************************************************
    1.24 +; create default plot
    1.25 +;************************************************
    1.26 +
    1.27 +  wks = gsn_open_wks("ps","xy")         ; open a ps file
    1.28 +; gsn_define_colormap(wks,"wgne15")          ; choose colormap
    1.29 +  gsn_define_colormap(wks,"gui_default")     ; choose colormap
    1.30 +
    1.31 +  res                     = True             ; Use plot options
    1.32 +  res@cnFillOn            = True             ; Turn on color fill
    1.33 +  res@gsnSpreadColors      = True            ; use full colormap
    1.34 +; res@cnFillMode          = "RasterFill"     ; Turn on raster color
    1.35 +; res@lbLabelAutoStride   = True
    1.36 +  res@cnLinesOn           = False            ; Turn off contourn lines
    1.37 +  res@mpFillOn            = False            ; Turn off map fill
    1.38 +; res@tiMainString        = "Observed MODIS MOD 15A2"
    1.39 +  res@tiMainString        = "Model i01.03cn"
    1.40 +; res@tiMainString        = "Model i01.04casa"
    1.41 +
    1.42 +  res@gsnSpreadColors     = True             ; use full colormap
    1.43 +  res@cnLevelSelectionMode = "ManualLevels"    ; Manual contour invtervals
    1.44 +  res@cnMinLevelValF       = 0.                ; Min level
    1.45 +  res@cnMaxLevelValF       = 10.             ; Max level
    1.46 +  res@cnLevelSpacingF      = 1.              ; interval
    1.47 +
    1.48 +  plot = gsn_csm_contour_map_ce(wks,x(0,:,:),res)         ; for model
    1.49 +  system("convert xy.ps xy.png")
    1.50 +end
    1.51 \ No newline at end of file