Output AScii file!
Ricardo Marcelo
ricardom at ACD.UFRJ.BR
Sat Jul 12 13:18:10 EDT 2008
as a quick work around may be you could consider using 'sort' unix command.
On Fri, Jul 11, 2008 at 4:42 AM, abbas mofidi <abbasmofidi at yahoo.com> wrote:
> Dear GrADS Users,
> I need to get the output of GrADS in text format.
> My problem is that the output AScii file is arranged in reverse order.
> I would be very grateful if someone can help me.
>
> Best regards,
> A. mofidi
>
>
> this is my script:
> 'reinit'
> 'sdfopen ncdata\Caspian-winter\AVHRR\sst4-path-eot.20011202.nc'
> 'sdfopen ncdata\Caspian-winter\AVHRR\sst4-path-eot.20011201.nc'
> 'set dfile 1'
> 'set lon 50.125 50.625'
> 'set lat 38.125 39.125'
> 'set t 1'
> 'set z 1'
> 'define S1 = sst'
> 'set dfile 2'
> 'set lon 50.125 50.625'
> 'set lat 38.125 39.125'
> 'set t 1'
> 'set z 1'
> 'define S2 = sst'
> 'set gxout print'
> 'set prnopts %g 3 1'
> 'display S1-S2'
> rc=write(DSST2Dec01.txt,result)
> rc=close(DSST2Dec01.txt)
> return
>
>
>
> This is output .txt file:
>
> Printing Grid -- 15 Values -- Undef = -999
> -0.13 -0.12 -0.12
> -0.14 -0.13 -0.13
> -0.14 -0.13 -0.13
> -0.139 -0.11 -0.09
> -0.12 -0.24 -0.139
>
>
> The latitude and Longitude of above output file is:
>
> Lat/Lon 50.125 50.375 50.625
> 38.125 -0.13 -0.12 -0.12
> 38.375 -0.14 -0.13 -0.13
> 38.625 -0.14 -0.13 -0.13
> 38.875 -0.139 -0.11 -0.09
> 39.125 -0.12 -0.24 -0.139
>
>
> While, it should be like this:
>
> Lat/Lon 50.125 50.375 50.625
> 39.125 -0.12 -0.24 -0.139
> 38.875 -0.139 -0.11 -0.09
> 38.625 -0.14 -0.13 -0.13
> 38.375 -0.14 -0.13 -0.13
> 38.125 -0.13 -0.12 -0.12
>
>
>
>
--
============================================================
Ricardo Marcelo da Silva
LAMMA - Laboratório de Modelagem de Processos Marinhos e Atmosféricos
Depto de Meteorologia - Instituto de Geociências
Centro de Ciências Matemáticas e da Natureza
Universidade Federal do Rio de Janeiro
e-mail: ricardom at acd.ufrj.br
phone: 55 21 2598-9470 r 24
============================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080712/b43fc42f/attachment.html
More information about the gradsusr
mailing list