<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class="">as stated in the guide (<a href="http://www.ncl.ucar.edu/Document/Language/loops.shtml" class="">http://www.ncl.ucar.edu/Document/Language/loops.shtml</a>)&nbsp;<b style="margin: 0px; padding: 0px; font-family: verdana, sans-serif; font-size: 13.3333px; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: 16px; widows: 1; background-color: rgb(255, 255, 255);" class="">Note: there is a space between the "end" and the "do" in NCL:</b><span style="font-family: verdana, sans-serif; font-size: 13.3333px; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: 16px; widows: 1; background-color: rgb(255, 255, 255);" class="">&nbsp;</span><em style="margin: 0px; padding: 0px; font-family: verdana, sans-serif; font-size: 13.3333px; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: 16px; widows: 1; background-color: rgb(255, 255, 255);" class="">(end do)</em><span style="font-family: verdana, sans-serif; font-size: 13.3333px; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: 16px; widows: 1; background-color: rgb(255, 255, 255);" class="">!&nbsp;</span></div><div class=""><span style="font-family: verdana, sans-serif; font-size: 13.3333px; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; line-height: 16px; widows: 1; background-color: rgb(255, 255, 255);" class="">Check your script.&nbsp;</span></div><div class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">Guido Cioni</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://guidocioni.altervista.org" class="">http://guidocioni.altervista.org</a>&nbsp;</div>

</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On 06 May 2016, at 09:57, WIND &lt;<a href="mailto:954051157@qq.com" class="">954051157@qq.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Dear all,</div><div class="">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.</div><div class="">My script is listed below</div><div class=""><div class=""><b class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</b></div><div class=""><b class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"</b></div><div class=""><b class="">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</b></div><div class=""><b class="">fa=addfile("t.grib","r")</b></div><div class=""><span style="line-height: 1.5;" class=""><b class="">T=fa-&gt;TMP_GDSO_ISBL ;T(123,37,73,144)&nbsp;</b></span></div><div class=""><b class="">Tpj=new((/31,37,73,144/),float)</b></div><div class=""><b class="">do j=0,30&nbsp;</b></div><div class=""><b class="">&nbsp; &nbsp; do i=0,123&nbsp;</b></div><div class=""><b class="">&nbsp; &nbsp; &nbsp; &nbsp; Tpj(j,:,:,:)=(T(i,:,:,:)+T(i+1,:,:,:)+T(i+2,:,:,:)+T(i+3,:,:,:))/4</b></div><div class=""><b class="">&nbsp; &nbsp; i=i+4</b></div><div class=""><b class="">&nbsp; &nbsp;j=j+1</b></div><div class=""><b class="">&nbsp; &nbsp;enddo;</b></div><div class=""><b class="">enddo;</b></div></div><div class="">&nbsp;the error goes synatx error and error in statement. How should I do to get the daily average?</div><div class="">Any help would be appreciated!</div><div class="">Sincerely,</div><div class="">Yan</div>_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""></div></blockquote></div><br class=""></div></body></html>