I have monthly NCEP/NCAR reanalysis data and want to compute the
time-weighted annual average values at each grid point. What is the
most efficient way to do this within NCL?
Here is how I am doing things now:
; NCEP/NCAR DATA Specify the timeframe to plot
; YYYYMMDDHH
begyr = 1980010100 ;Monthly files 1990020100,
endyr = 1989120100 ;1990030100,1990040100,...
begin
;---------------------------------------------------------
; NCEP/NCAR DATA
ncep = addfile("$DATA/ncep_reanal/shtfl.mon.mean.nc", "r")
ncep_sh = ncep->shtfl; (time, lat, lon)
sh_tmp = ncep_sh(lat|:,lon|:,time|:)
timeyr = ut_calendar(ncep->time, 3)
frmdt = ind(timeyr.eq.begyr)
todt = ind(timeyr.eq.endyr)
sh_avg = dim_avg(sh_tmp(:,:,frmdt:todt)) ;avg at each grid point
copy_VarCoords_1(sh_tmp,sh_avg)
end
Thank you,
Scott
scapps_at_uci.edu
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Apr 03 2006 - 14:43:31 MDT
This archive was generated by hypermail 2.2.0 : Thu Apr 06 2006 - 08:50:19 MDT