lai/31.contour_ob_mean.ncl
changeset 0 0c6405ab2ff4
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/lai/31.contour_ob_mean.ncl	Mon Jan 26 22:08:20 2009 -0500
     1.3 @@ -0,0 +1,65 @@
     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 observed data
    1.13 +;************************************************
    1.14 +  diri  = "/fis/cgd/cseg/people/jeff/clamp_data/"
    1.15 +  fili  = "LAI_2000-2005_mean_T42.nc"
    1.16 +  f     = addfile(diri+fili,"r")
    1.17 +
    1.18 +  y     = f->LAI
    1.19 +  printVarSummary(y)
    1.20 +
    1.21 +  print (min(y)+"/"+max(y))
    1.22 +
    1.23 +;************************************************
    1.24 +; read in model data
    1.25 +;************************************************
    1.26 +  fili2 = "i01.03cn_1545-1569_ANN_climo.nc"
    1.27 +  g     = addfile(diri+fili2,"r")
    1.28 +  x     = g->LAISUN
    1.29 +
    1.30 +  delta = 0.0000001
    1.31 +  x0    = x(0,:,:)
    1.32 +  y = where(ismissing(y).and.(ismissing(x0).or.(x0.lt.delta)),0.,y)
    1.33 +; y = where((y.gt.1000.),1.e+36,y)
    1.34 +  printVarSummary(y)
    1.35 +  print (min(y)+"/"+max(y))
    1.36 +;************************************************
    1.37 +; create default plot
    1.38 +;************************************************
    1.39 +  
    1.40 +; setvalues NhlGetWorkspaceObjectId()
    1.41 +;   "wsMaximumSize" : 199999999
    1.42 +; end setvalues
    1.43 +
    1.44 +  wks = gsn_open_wks("ps","xy")         ; open a ps file
    1.45 +; gsn_define_colormap(wks,"wgne15")          ; choose colormap
    1.46 +  gsn_define_colormap(wks,"gui_default")     ; choose colormap
    1.47 +
    1.48 +  res                     = True             ; Use plot options
    1.49 +  res@cnFillOn            = True             ; Turn on color fill
    1.50 +  res@gsnSpreadColors      = True            ; use full colormap
    1.51 +; res@cnFillMode          = "RasterFill"     ; Turn on raster color
    1.52 +; res@lbLabelAutoStride   = True
    1.53 +  res@cnLinesOn           = False            ; Turn off contourn lines
    1.54 +  res@mpFillOn            = False            ; Turn off map fill
    1.55 +  res@tiMainString        = "MODIS MOD 15A2 2000-2005"
    1.56 +
    1.57 +  res@gsnSpreadColors     = True             ; use full colormap
    1.58 +  res@cnLevelSelectionMode = "ManualLevels"  ; Manual contour invtervals
    1.59 +  res@cnMinLevelValF       = 0.              ; Min level
    1.60 +  res@cnMaxLevelValF       = 10.             ; Max level
    1.61 +  res@cnLevelSpacingF      = 1.              ; interval
    1.62 +  pres                            = True     ; panel plot mods desired
    1.63 +  pres@gsnMaximize                = True     ; fill the page
    1.64 +
    1.65 +  plot = gsn_csm_contour_map_ce(wks,y,res)   ; for observed
    1.66 +  gsn_panel(wks,plot,(/1,1/),pres)           ; create panel plot
    1.67 +  system("convert xy.ps xy.png")
    1.68 +end
    1.69 \ No newline at end of file