lai/022.lai_ensemble.ncl.x
changeset 0 0c6405ab2ff4
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/lai/022.lai_ensemble.ncl.x	Mon Jan 26 22:08:20 2009 -0500
     1.3 @@ -0,0 +1,45 @@
     1.4 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"  
     1.5 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"  
     1.6 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"  
     1.7 +
     1.8 +begin 
     1.9 +;----------------------------------------------------------
    1.10 +  year_start = 2000
    1.11 +  year_end   = 2005
    1.12 +;----------------------------------------------------------
    1.13 +  diri  = "/fis/cgd/cseg/people/jeff/clamp_data/"
    1.14 +  diro  = "/fis/cgd/cseg/people/jeff/clamp_data/"
    1.15 +  filo1 = "LAI_"+year_start+"-"+year_end+"_ensemble.nc"
    1.16 +  filo2 = "LAI_"+year_start+"-"+year_end+"_mean.nc"
    1.17 +  c = addfile(diro+filo1,"c")
    1.18 +  d = addfile(diro+filo2,"c")
    1.19 +
    1.20 +  nyear = year_end - year_start + 1
    1.21 +
    1.22 +  files  = new((/nyear/),"string")
    1.23 +
    1.24 +  do n = year_start,year_end
    1.25 +     i = n - year_start
    1.26 +     files(i)= diri + "LAI_" + n + "_monthly.nc"
    1.27 +  end do
    1.28 +; print (files)  
    1.29 +
    1.30 +  file_list = addfiles(files,"r")
    1.31 +  ListSetType(file_list,"join")
    1.32 +  x = addfiles_GetVar(file_list, files, "LAI")
    1.33 +  print (files)
    1.34 +
    1.35 +  x!0  = "case"
    1.36 +  x!1  = "time"
    1.37 +  x!2  = "lat"
    1.38 +  x!3  = "lon"
    1.39 +
    1.40 +  y = dim_avg(x(time|:,lat|:,lon|:,case|:))
    1.41 +  print (files)
    1.42 +  c->LAI  = y
    1.43 +  print (files)
    1.44 +
    1.45 +  z = dim_avg(y(lat|:,lon|:,time|:))
    1.46 +  d->LAI  = z     
    1.47 +end
    1.48 +