<div dir="ltr">You only use the dots (.) to denote arrays from different files.  Once you define new arrays in Grads (as you have done with rn), you do not need to use the dots to reference the array.  In fact, that is probably giving you an error since you only define rn once anyway (Grads does not assume you perform the operation on data with the same name from multiple files as far as I&#39;m aware).  Here is what I would suggest if you are looking for text output of the area mean RMSE.<div>
<br></div><div style>&#39;set t &#39;t1&#39; &#39;t2<br></div><div style>&#39;define fcstrain = rainc.1 + rainnc.1 - rainc.1(t-1) - rainnc.1(t-1)&#39;</div><div style>&#39;define obsrain = rainc.2 + rainnc.2 - rainc.2(t-1) - rainnc.2(t-1)&#39;</div>
<div style>&#39;define rainerror = fcstrain - obsrain&#39;</div><div style>&#39;define sqerror = pow(rainerror,2)&#39;</div><div style>&#39;define mse = amean(sqerror,l<span style="font-size:13px;font-family:arial,sans-serif">on=115,lon=135,</span><span style="font-size:13px;font-family:arial,sans-serif">lat=4,lat=25)&#39;</span></div>
<div style>&#39;define rmse = sqrt(mse)&#39;</div><div style><br></div><div style>Here I have assumed you have script variables t1 and t2 defined before this section of code and that you are computing the RMSE of a precip accumulation interval defined by the difference between two adjacent time slices (as is indicated in your code).  I am also assuming you will have appropriate means of writing out the values to a file.  What you have done above is probably okay, although the way I&#39;ve coded it, the array rmse will be a time series rather than a single value.  To me that sounds more efficient, although I&#39;m not sure the write command will correctly write each data point out in the file.  You can also look into the script <a href="http://fprintf.gs">fprintf.gs</a>, which you can find through a Google search.</div>
<div style><br></div><div style>Hope this helps.</div><div style><br></div><div style>Jeff Duda</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 14, 2013 at 9:32 PM, Lyndon Mark Olaguera <span dir="ltr">&lt;<a href="mailto:olagueralyndonmark429@gmail.com" target="_blank">olagueralyndonmark429@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello fellow grad user,<br></div> <br></div>i want to find the rmse for the accumulated rainfall,I pasted my sample script below but it is not working..grads is giving an error.<br>
<br></div>

<div>Any help will be appreciated.<br><br><br><br>&#39;open obsnudge/observation_nudging.ctl&#39;<br>&#39;open model/fnl_nonudging.ctl&#39;<br>Time_val=2<br>Time_prev=1<br>&#39;set t &#39;Time_val<br>&#39;define rn=(rainc+rainnc)-(rainc(t=&#39;Time_prev&#39;)-rainnc(t=&#39;Time_prev&#39;))&#39;<br>


&#39;d rn&#39;<br>&#39;define dif=rn.1-rn.2&#39;<br> &#39;define sq=dif*dif&#39;<br> &#39;define am=amean(sq,lon=115,lon=135,lat=4,lat=25)&#39;<br> &#39;define rmse=sqrt(am)&#39;<br> &#39;d rmse&#39;<br> a=subwrd(result,4)<br>


 output=a<br> res=write(rmsewind_v.csv,output,append)<br> &#39;undefine dif&#39;<br> &#39;undefine sq&#39;<br> &#39;undefine am&#39;<br><br>Time_val=Time_val+1<br>Time_prev=Time_prev+1<br>endwhile<br>quit<span class="HOEnZb"><font color="#888888"><br>
<br></font></span></div><span class="HOEnZb"><font color="#888888"><br>

<br></font></span></div><span class="HOEnZb"><font color="#888888">Lyndon<br></font></span></div>
<br>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Jeff Duda<br>Graduate research assistant<br>University of Oklahoma School of Meteorology<br>Center for Analysis and Prediction of Storms<br>
</div>