lai/022.lai_ensemble.ncl.x
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   c = addfile(diro+filo1,"c")
    15   d = addfile(diro+filo2,"c")
    16 
    17   nyear = year_end - year_start + 1
    18 
    19   files  = new((/nyear/),"string")
    20 
    21   do n = year_start,year_end
    22      i = n - year_start
    23      files(i)= diri + "LAI_" + n + "_monthly.nc"
    24   end do
    25 ; print (files)  
    26 
    27   file_list = addfiles(files,"r")
    28   ListSetType(file_list,"join")
    29   x = addfiles_GetVar(file_list, files, "LAI")
    30   print (files)
    31 
    32   x!0  = "case"
    33   x!1  = "time"
    34   x!2  = "lat"
    35   x!3  = "lon"
    36 
    37   y = dim_avg(x(time|:,lat|:,lon|:,case|:))
    38   print (files)
    39   c->LAI  = y
    40   print (files)
    41 
    42   z = dim_avg(y(lat|:,lon|:,time|:))
    43   d->LAI  = z     
    44 end
    45