lai/04.lai_ensemble_T42.ncl
author Forrest Hoffman <forrest@climatemodeling.org>
Mon, 26 Jan 2009 22:08:20 -0500
changeset 0 0c6405ab2ff4
permissions -rw-r--r--
Initial commit of C-LAMP Diagnostics from Jeff Lee
     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.nc"
    13 ; filo2 = "LAI_"+year_start+"-"+year_end+"_mean.nc"
    14   filo1 = "LAI_"+year_start+"-"+year_end+"_ensemble_T42.nc"
    15   filo2 = "LAI_"+year_start+"-"+year_end+"_mean_T42.nc"
    16   c = addfile(diro+filo1,"c")
    17   d = addfile(diro+filo2,"c")
    18 
    19   nyear = year_end - year_start + 1
    20 
    21   files  = new((/nyear/),"string")
    22 
    23   do n = year_start,year_end
    24      i = n - year_start
    25 ;    files(i)= diri + "LAI_" + n + "_monthly.nc"
    26      files(i)= diri + "LAI_" + n + "_monthly_T42.nc"
    27   end do
    28   print (files)  
    29 
    30   file_list = addfiles(files,"r")
    31   ListSetType(file_list,"join")
    32   x = addfiles_GetVar(file_list, files, "LAI")
    33   printVarSummary (x)
    34 
    35   y = dim_avg_Wrap(x(time|:,lat|:,lon|:,case|:))
    36   printVarSummary (y)
    37  
    38   c->LAI  = y
    39 
    40   z = dim_avg_Wrap(y(lat|:,lon|:,time|:))
    41   printVarSummary (z)
    42   
    43   d->LAI  = z     
    44 end
    45