lai/022.lai_ensemble.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 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"  
     2 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"  
     3 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"  
     4 
     5 begin 
     6 ;----------------------------------------------------------
     7   year_start = 2000
     8   year_end   = 2005
     9 ;----------------------------------------------------------
    10   diri  = "/fis/cgd/cseg/people/jeff/clamp_data/"
    11   diro  = "/fis/cgd/cseg/people/jeff/clamp_data/"
    12   filo1 = "LAI_"+year_start+"-"+year_end+"_ensemble_T42.nc"
    13   filo2 = "LAI_"+year_start+"-"+year_end+"_mean_T42.nc"
    14   c = addfile(diro+filo1,"c")
    15   d = addfile(diro+filo2,"c")
    16 
    17   nyear = year_end - year_start + 1
    18 
    19   do n = year_start,year_end
    20    
    21 ;    fili = "LAI_" + n + "_monthly.nc"
    22      fili = "LAI_" + n + "_monthly_T42.nc"
    23      print (fili)
    24   
    25      a = addfile(diri+fili,"r")
    26      x = a->LAI
    27     
    28      if (n .eq. year_start) then
    29         y = x
    30         printVarSummary (x) 
    31      else
    32         y = y + x
    33      end if
    34 
    35      delete (a)
    36      delete (x)
    37      delete (fili)
    38   end do
    39       
    40   y = y/nyear
    41   printVarSummary (y)
    42  
    43   c->LAI  = y
    44 
    45   z = dim_avg_Wrap(y(lat|:,lon|:,time|:))
    46   printVarSummary (z)
    47   
    48   d->LAI  = z     
    49 end
    50