<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">Hi, Julio, </div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">My problem is not with the loop in time. I am using a "While" sintax to execute the average along the series:</div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)"><div class="gmail_default">while (count < "number of t-values +1")</div><div class="gmail_default"> 'set t 'count</div><div class="gmail_default"> 'define average=aave(sst,x=127.8,x=128.6,y=27.6,y=28.6)'</div><div class="gmail_default"> 'd average' </div><div class="gmail_default"> average=subwrd(result,4)</div><div class="gmail_default"> rc = write ("c:\path\file.txt",average)</div><div class="gmail_default"> count=count+1</div><div class="gmail_default">endwhile</div><div><br></div><div>This is working fine. What I need now, is a way to calculate the standard deviation of SST in the area of interest, also for each value of t, like something independent of time, for me to insert inside the loop. </div><div><br></div><div>Everything Ive seen before is a standard deviation of the whole series (like below), and not for each time-value.</div><div><br></div><div><span style="font-size:13.3333339691162px">'define sdsst=sqrt(ave(pow(ave(sst,t=</span><span style="font-size:13.3333339691162px">1,t=12)-sst,2),t=1,t=12))' -> calculates std of the series between t=1 and t=2. What I'd like to do is, for each t, an std of the area.</span><br></div><div><br></div><div>Any suggestions?</div><div><br></div><div>Thanks!</div></div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 19 November 2014 13:38, Julio Martinez <span dir="ltr"><<a href="mailto:julioms24@hotmail.com" target="_blank">julioms24@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr"><font face="Calibri,sans-serif" style="font-size:10pt" color="#2672EC"><b>Hi David,</b></font><div><font face="Calibri,sans-serif" style="font-size:10pt" color="#2672EC"><b><br></b></font></div><div><font face="Calibri,sans-serif" style="font-size:10pt" color="#2672EC"><b>I think you could try with tloop command...<br></b></font><br><br><span><font color="#888888">Julio N. Martínez Sánchez<br>M.C. en Oceanografía Física<br>Consultor en Sitio</font></span><div><font color="#888888">Subgerencia de Pronóstico a Mediano y Largo Plazo</font></div><div><font color="#888888">Gerencia de Meteorología y Climatología</font></div><div><font color="#888888">Servicio Meteorológico Nacional</font></div><div><font color="#888888">Ext. 3156</font></div><br><br><div><hr>From: <a href="mailto:davidnielsen@id.uff.br" target="_blank">davidnielsen@id.uff.br</a><br>Date: Wed, 19 Nov 2014 13:12:34 -0200<br>To: <a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>Subject: [gradsusr] Standard deviation of an area<div><div class="h5"><br><br><div dir="ltr"><div style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">Dear all grads users, </div><div style="font-family:tahoma,sans-serif;color:rgb(0,0,0)"><br></div><div style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">I would like to calculate the standard deviation of an area in Grads.</div><div style="font-family:tahoma,sans-serif;color:rgb(0,0,0)"><br></div><div style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">I have a NetCDF wekly time series of SST (attached), and I am able to calculate the average of a certain area (defining LAT and LON) value using the "aave" formula, for each value of time, and generate a new series - ok. In addition to this seires, I would like to generate a series of standard deviations of this average, also for each time in the series. In other words, I need to to know, for a given area and time, what is the standard deviation of my variable?</div><div style="font-family:tahoma,sans-serif;color:rgb(0,0,0)"><br></div><div style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">Please find attached an example of a NetCDF file I want to treat this way: </div><div style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">1. Calculate average of SST in a certain area (lat, lon) using aave, for each time value</div><div style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">2. Calculate standard deviation of SST in a certain area (lat, lon), for each time value</div><div style="font-family:tahoma,sans-serif;color:rgb(0,0,0)"><br></div><div style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">Would anybody have any kind suggestions on how to address this #2 task?</div><div style="font-family:tahoma,sans-serif;color:rgb(0,0,0)"><br></div><div style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">Many thanks in advance,</div><div style="font-family:tahoma,sans-serif;color:rgb(0,0,0)"><br></div><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><font face="tahoma, sans-serif" color="#20124d">David Marcolino Nielsen</font><div><font face="tahoma, sans-serif" color="#20124d">Engenharia de Recursos Hídricos e do Meio Ambiente</font></div><div><font face="tahoma, sans-serif" color="#20124d">Universidade Federal Fluminense</font></div><div><font face="tahoma, sans-serif" color="#20124d"><a href="mailto:davidnielsen@id.uff.br" target="_blank">davidnielsen@id.uff.br</a></font></div></div></div></div>
<br></div></div>_______________________________________________
gradsusr mailing list
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a></div></div>                                            </div></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><div class="gmail_signature"><div dir="ltr"><font face="tahoma, sans-serif" color="#20124d">David Marcolino Nielsen</font><div><font face="tahoma, sans-serif" color="#20124d">Engenharia de Recursos Hídricos e do Meio Ambiente</font></div><div><font face="tahoma, sans-serif" color="#20124d">Universidade Federal Fluminense</font></div><div><font face="tahoma, sans-serif" color="#20124d"><a href="mailto:davidnielsen@id.uff.br" target="_blank">davidnielsen@id.uff.br</a></font></div></div></div>
</div>