On Wed, Sep 7, 2011 at 3:14 PM, Anderlan Siqueira <span dir="ltr">&lt;<a href="mailto:anderlansiqueira@gmail.com">anderlansiqueira@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello dear users,<br>
<br>
I want to sort the data for each grid point GrADS in ascending order.<br>
I have a file 50 times and I want the values for each point lies<br>
from smallest to largest. For example, for point 1: 3 4 5 7 8 9 would<br>
look like, 3 4 5 7 8 9. In this case also would have a resulting file<br>
with 50 time and each grid point with values in ascending order.<br>
This is the first time have the lowest time and 50 the highest values.<br>
<br>
Who can help me thank you.<br>
<br>
I read some things about Bubble sort.<br>
<br></blockquote><div><br></div><div>This is something that would be very easy to do in pygrads, for example:</div><div><br></div><div>ga.open(&quot;model&quot;)</div><div>ga(&quot;set t 1 5&quot;)</div><div>ts = sort(ga.exp(&#39;ts&#39;),axis=0)</div>
<div><br></div><div>At this point you can write ts to a file or send it back to grads with the ga.imp() method. This requires that the data array fits in memory. You will need to learn some python, something that would open lots of possibilities for data analysis beyond what can be done with grads.  More info on pygrads here:</div>
<div><br></div><div>     <a href="http://opengrads.org/wiki/index.php?title=Python_Interface_to_GrADS">http://opengrads.org/wiki/index.php?title=Python_Interface_to_GrADS</a></div><div><br></div><div>BTW, PyGrADS works well with the Enthought Python Distribution (EPD), see:</div>
<div><br></div><div>     <a href="http://www.enthought.com/products/epd.php">http://www.enthought.com/products/epd.php</a></div><div><br></div><div>  Arlindo</div><div><br></div></div>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br>