as a quick work around may be you could consider using 'sort' unix command.<br><br><div class="gmail_quote">On Fri, Jul 11, 2008 at 4:42 AM, abbas mofidi <<a href="mailto:abbasmofidi@yahoo.com">abbasmofidi@yahoo.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">
<p>Dear GrADS Users,<br>I need to get the output of GrADS in text format.<br>My problem is that the output AScii file is arranged in reverse order.<br>I would be very grateful if someone can help me.</p>
<p>Best regards,<br>A. mofidi</p>
<p><br>this is my script:<br>'reinit'<br>'sdfopen ncdata\Caspian-winter\AVHRR\<a href="http://sst4-path-eot.20011202.nc" target="_blank">sst4-path-eot.20011202.nc</a>'<br>'sdfopen ncdata\Caspian-winter\AVHRR\<a href="http://sst4-path-eot.20011201.nc" target="_blank">sst4-path-eot.20011201.nc</a>'<br>
'set dfile 1'<br> 'set lon 50.125 50.625'<br> 'set lat 38.125 39.125'<br> 'set t 1'<br> 'set z 1'<br> 'define S1 = sst'<br> 'set dfile 2'<br> 'set lon 50.125 50.625'<br>
'set lat 38.125 39.125'<br> 'set t 1'<br> 'set z 1'<br> 'define S2 = sst'<br> 'set gxout print'<br> 'set prnopts %g 3 1'<br> 'display S1-S2'<br>
rc=write(DSST2Dec01.txt,result)<br> rc=close(DSST2Dec01.txt)<br>return</p>
<p> </p>
<p>This is output .txt file: </p>
<p>Printing Grid -- 15 Values -- Undef = -999 <br> -0.13 -0.12 -0.12 <br> -0.14 -0.13 -0.13 <br> -0.14 -0.13 -0.13 <br> -0.139 -0.11 -0.09 <br> -0.12 -0.24 -0.139 </p>
<p><br>The latitude and Longitude of above output file is:</p>
<p><font style="background-color: rgb(255, 255, 0);">Lat/Lon 50.125 50.375 50.625</font> <br><font style="background-color: rgb(255, 255, 0);">38.125</font> -0.13 -0.12 -0.12<br><font style="background-color: rgb(255, 255, 0);">38.375</font> -0.14 -0.13 -0.13<br>
<font style="background-color: rgb(255, 255, 0);">38.625</font> -0.14 -0.13 -0.13<br><font style="background-color: rgb(255, 255, 0);">38.875</font> -0.139 -0.11 -0.09<br><font style="background-color: rgb(255, 255, 0);">39.125</font> -0.12 -0.24 -0.139</p>
<p><br>While, it should be like this:</p>
<p><font style="background-color: rgb(255, 255, 0);">Lat/Lon 50.125 50.375 50.625</font><br><font style="background-color: rgb(255, 255, 0);">39.125</font> -0.12 -0.24 -0.139<br><font style="background-color: rgb(255, 255, 0);">38.875</font> -0.139 -0.11 -0.09<br>
<font style="background-color: rgb(255, 255, 0);">38.625</font> -0.14 -0.13 -0.13<br><font style="background-color: rgb(255, 255, 0);">38.375</font> -0.14 -0.13 -0.13<br><font style="background-color: rgb(255, 255, 0);">38.125</font> -0.13 -0.12 -0.12</p>
<p> </p></td></tr></tbody></table><br>
</blockquote></div><br><br clear="all"><br>-- <br>============================================================<br>Ricardo Marcelo da Silva<br>LAMMA - Laboratório de Modelagem de Processos Marinhos e Atmosféricos<br>Depto de Meteorologia - Instituto de Geociências <br>
Centro de Ciências Matemáticas e da Natureza<br>Universidade Federal do Rio de Janeiro<br>e-mail: <a href="mailto:ricardom@acd.ufrj.br">ricardom@acd.ufrj.br</a> <br>phone: 55 21 2598-9470 r 24<br>============================================================