[ncl-talk] daily average

Guido Cioni guidocioni at gmail.com
Fri May 6 01:59:36 MDT 2016


Hi,
as stated in the guide (http://www.ncl.ucar.edu/Document/Language/loops.shtml <http://www.ncl.ucar.edu/Document/Language/loops.shtml>) Note: there is a space between the "end" and the "do" in NCL: (end do)! 
Check your script. 

Guido Cioni
http://guidocioni.altervista.org <http://guidocioni.altervista.org/> 

> On 06 May 2016, at 09:57, WIND <954051157 at qq.com> wrote:
> 
> 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
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160506/3f40529b/attachment.html 


More information about the ncl-talk mailing list