[ncl-talk] daily average
WIND
954051157 at qq.com
Fri May 6 01:57:24 MDT 2016
Dear all,
I'm dealing with the JRA four times per day grib data. And I want to average the four times data to get a daily data.
My script is listed below
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
fa=addfile("t.grib","r")
T=fa->TMP_GDSO_ISBL ;T(123,37,73,144)
Tpj=new((/31,37,73,144/),float)
do j=0,30
do i=0,123
Tpj(j,:,:,:)=(T(i,:,:,:)+T(i+1,:,:,:)+T(i+2,:,:,:)+T(i+3,:,:,:))/4
i=i+4
j=j+1
enddo;
enddo;
the error goes synatx error and error in statement. How should I do to get the daily average?
Any help would be appreciated!
Sincerely,
Yan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160506/c520f55e/attachment.html
More information about the ncl-talk
mailing list