<div class="gmail_quote">
<div>Dear Grads' Users,</div>
<div> </div>
<div>I am trying to extimate linear trend in an interannual series of one-monthly data from a multy-year monthly data file.</div>
<div>I can estimate properly the linear trend using the script below, if the data file has the one-monthly data series previously separately. The problem is when using the full monthly multy-year data file.</div>
<div> </div>
<div>How can I just select one given month from the data , for instance June, and estimate the linear trend for the June-series alone, having a multy-year data file with all the months of the year?<br clear="all"></div>
<div>I have tried using the function monmask (with argument 6), but I cannot solve it properly.</div>
<div> </div>
<div>Any suggestion I will much appreciate.</div>
<div> </div>
<div>Eduardo.<br></div>
<div> </div>
<div>reinit'<br>'sdfopen d:\anterior\era\<a href="http://mes.nc/" target="_blank">mes.nc</a>'</div>
<div>'set clopts -1 -1 0.16'<br>'set mproj sps'</div>
<div>k=70</div>
<div><br>'set grads off'<br>'set lev 'k''<br>'set mproj sps'<br>'set lat -90 0'<br>'set lon -180 180'</div>
<div><br>'set lat -60'<br>'set lon -180'<br>'set t 1 132'</div>
<div>* contruyo variable lineal 1, 2, ..., 276 to para calcular m y c de y = mx + c<br>'xvar = 100*t*0 + 1'<br>'xvar = const(xvar,1,-u)'<br>'xvar = 133 - sum(xvar,t+0,t=132)'</div>
<div> </div>
<div>'set lat -90 0'<br>'set lon -180 180'<br>'set t 1'</div>
<div><br>'define coeff = tregr(xvar,100*t,t=1, t=132)'<br>'define tave = ave(100*t, t=1, t=132)'<br>'define xvarave = ave(xvar, t=1, t=132)'<br>'define trend = coeff*(xvar - xvarave) + tave'</div>
</div>