1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/lai/022.lai_ensemble.ncl Mon Jan 26 22:08:20 2009 -0500
1.3 @@ -0,0 +1,50 @@
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_T42.nc"
1.16 + filo2 = "LAI_"+year_start+"-"+year_end+"_mean_T42.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 + do n = year_start,year_end
1.23 +
1.24 +; fili = "LAI_" + n + "_monthly.nc"
1.25 + fili = "LAI_" + n + "_monthly_T42.nc"
1.26 + print (fili)
1.27 +
1.28 + a = addfile(diri+fili,"r")
1.29 + x = a->LAI
1.30 +
1.31 + if (n .eq. year_start) then
1.32 + y = x
1.33 + printVarSummary (x)
1.34 + else
1.35 + y = y + x
1.36 + end if
1.37 +
1.38 + delete (a)
1.39 + delete (x)
1.40 + delete (fili)
1.41 + end do
1.42 +
1.43 + y = y/nyear
1.44 + printVarSummary (y)
1.45 +
1.46 + c->LAI = y
1.47 +
1.48 + z = dim_avg_Wrap(y(lat|:,lon|:,time|:))
1.49 + printVarSummary (z)
1.50 +
1.51 + d->LAI = z
1.52 +end
1.53 +