<table cellspacing="0" cellpadding="0" border="0"><tr><td valign="top"><p dir="ltr">Hi,<br>
You should define the variable in your script.<br>
'define z=ave(sst,t=2,t=4)'<br>
and same for other variables.<br>
And there are some errors in while loop. You can see the grads users document for the while loop.<br>
Regards<br>
Sravan<br>
<a href="https://uk.overview.mail.yahoo.com/mobile/?.src=Android">Sent from Yahoo Mail on Android</a></p>
</td></tr></table>            <div id="_origMsg_">
                <div>
                    <br />
                    <div>
                        <div style="font-size:0.9em">
                            <hr size="1">
                            <b>
                                <span style="font-weight:bold">From:</span>
                            </b>
                            Dr. Avinash Kumar &lt;kumaravinash13@gmail.com&gt;;                            <br>
                            <b>
                                <span style="font-weight:bold">To:</span>
                            </b>
                             &lt;gradsusr@gradsusr.org&gt;;                                                                                                     <br>
                            <b>
                                <span style="font-weight:bold">Subject:</span>
                            </b>
                            [gradsusr] Problems in Multi-year Seasonal Timeseries                            <br>
                            <b>
                                <span style="font-weight:bold">Sent:</span>
                            </b>
                            Tue, Jan 21, 2014 12:22:25 PM                            <br>
                        </div>
                            <br>
                            <table cellspacing="0" cellpadding="0" border="0">
                                <tbody>
                                    <tr>
                                        <td valign="top"><div dir="ltr"><div>Dear Respected Users of GrADS<br></div>I was trying to get 30 years seasonal mean (i.e. Summer JFM, Autumn AMJ, Winter JAS, Spring OND) from monthly mean data of SST1982 Jan to 2012 Dec. Hence I have proceed to script in given steps but I feel loop is not considering while processing the data. I think I am able to get only one year seasonal data.  I would be highly appreciated if anyone correct this script.<br>
 <br><div>&#39;sdfopen C:&#92;OpenGrADS&#92;<a rel="nofollow" target="_blank" href="http://sst.mnmean.nc">sst.mnmean.nc</a>&#39;<br>&#39;q file&#39;<br>&#39;c&#39;<br>&#39;set mpdset hires&#39;<br>&#39;set lat -89.5 -50&#39;<br>&#39;set lon -180 179.5&#39;<br>
&#39;set mproj sps&#39;<br>&#39;set gxout shaded&#39;<br>&#39;z=ave(sst,t=2,t=4)&#39;<br>&#39;x=12&#39;<br>&#39;y=14&#39;<br>&#39;set t 2&#39;<br>if(t&lt;374)<br> &#39;zave=ave(sst,t+x,t+y)&#39;<br> &#39;x=x+12&#39;<br> &#39;y=y+12&#39;<br>
 &#39;z=z+zave&#39;<br>else<br>endif<br>&#39;z1=z/30&#39;<br>&#39;set display color white&#39;<br>&#39;set frame off&#39;<br>&#39;set grid on 1 1 5&#39;<br>&#39;set annot 1 10&#39;<br>&#39;d z1&#39; <br>&#39;draw title Summer_Sea_Surface_Temp-1982-2012&#39;<br>
&#39;cbar&#39;<br>&#39;printim c:&#92;opengrads&#92;output&#92;Summer_Sea_Surface_Temp-1982-2012.jpg x1024 y768&#39;<br><br clear="all"><div><div dir="ltr"><div><span style="font-family:georgia, serif;"><font size="1"><span style="color:rgb(76,17,48);"><span style="color:rgb(102,0,0);"><b>Kind Regards<br>
<br>Dr. Avinash Kumar</b></span><br></span><i>Polar Remote Sensing Division <br></i><span style="color:rgb(11,83,148);"><span style="color:rgb(7,55,99);"><b>National Centre for Antarctic &amp; Ocean Research</b></span><br></span>Ministry of Earth Sciences, Government of India<br>
Headland Sada, Vasco-da-Gama, Goa 403 804, India<br><u>                                                                                                                                                           </u><span style="color:rgb(53,28,117);"></span></font></span></div>
<div><font><b><span style="color:rgb(53,28,117);"><i> </i></span></b></font></div></div></div>
</div></div></td>
                                    </tr>
                                </tbody>
                            </table>
                    </div>
                </div>
            </div>