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