<HTML>
<HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="OPENWEBMAIL" name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
Dear T.,
<br />try this:<font size="2">
<br />
<br />'reinit'
<br />'open
E:\test.ctl'
<br />'set t 1'
<br />'set lat 10'
<br />'set lon
135'
<br />'define r1= sst'
<br />'set t 2'
<br />'set lat 20'
<br />'set lon 100'
<br />'define r2= sst'
<br />'define aver= (r1+r2)/2'</font>
<br />'d aver'
<br />newvar=subwrd(result,4)
<br />res=write('filename.txt',newvar,append)
<br />'quit'
<br />
<br />Hope this helps.
<br />Ricardo
<br />
<br />
<br /><font size="2"><b>On Mon, 11 Feb 2013 13:04:58 +0000, T. haghroosta wrote</b>
<br />>
<br />>
<br />>
<!-- style
begin
style end
-->
<br />> Dear All,
<br />>
<br />> I wrote this script and I
would like to see the amount of "aver" as an output in a .txt or .xls
file. Could you please help me?
<br />>
<br />> 'reinit'
<br />> 'open
E:\test.ctl'
<br />> 'set t 1'
<br />> 'set lat 10'
<br />> 'set lon
135'
<br />> 'define r1= sst'
<br />> 'set t 2'
<br />> 'set lat 20'
<br />>
'set lon 100'
<br />> 'define r2= sst'
<br />> 'define aver= (r1+r2)/2'
<br />>
<br />> Regards,
<br />>
<br />> T.
<br />>
<br />>
<br />> > Dear All, I have a script to calculate the average of different
groups of numbers. How can I show the outputs of the script running, contain
numbers, in an excel or a text file? Regards, T.                                           
<br />> >
-------------- next part --------------
<br />> > An HTML attachment was
scrubbed...
<br />> > URL:
http://gradsusr.org/pipermail/gradsusr/attachments/20130208/ca3e352a/attachment-0001.html
<br />> >
<br />> > ------------------------------
<br />> >
<br />>
> Message: 2
<br />> > Date: Fri, 8
!
Feb 2013 10:37:44 -0200
<br />> > From: RafaelCB
<rafael.ciram@gmail.com>
<br />> > Subject: Re: [gradsusr] how put the
output numbers in an excel or a
<br />> >         text file
<br />> > To: GrADS
Users Forum <gradsusr@gradsusr.org>
<br />> > Message-ID:
<br />> >
        <CAAgZ0pL8bQHs235nXYfTZzKJwEj1uPot9PrUbnz2evQGQowCAA@mail.gmail.com>
<br />>
> Content-Type: text/plain; charset="iso-8859-1"
<br />> >
<br />> >
An example follows:
<br />> >
<br />> > 'd gr2stn(rh.1,min.2)'
<br />>
> rh=sublin(result,_n2)
<br />> > 'd gr2stn(u10.1,min.2)'
<br />> >
u1=sublin(result,_n2)
<br />> > '!echo
'dia','hora','_sig','lo','la','rh','u1' | sed s@\ @@g >>
verific.dat'
<br />> >
<br />> > I have helped.
<br />> >
<br />>
> Regards.
<br />> > --
<br />> > *Rafael Censi Borges
<br />> >
Meteorologia - Epagri/Ciram
<br />> > +55 (48)3665-5130
<br />> >
http://ciram.epagri.sc.gov.br*
<br />> >
<br />> >
<br />> > 2013/2/8
T. haghroosta <haghroosta@hotmail.com>
<br />> >
<br />> > >
Dear All,
<br />> > >
<br />> >
&g!
t; I have a script to calculate the average of different groups of
num
bers.
<br />> > > How can I show the outputs of the script running,
contain numbers, in an
<br />> > > excel or a text file?
<br />> >
>
<br />> > > Regards,
<br />> > >
<br />> > > T.
<br />>
> >
<br />> > >
_______________________________________________
<br />> > > gradsusr
mailing list
<br />> > > gradsusr@gradsusr.org
<br />> > >
http://gradsusr.org/mailman/listinfo/gradsusr
<br />> > >
<br />> >
>
<br />> > -------------- next part --------------
<br />> > An HTML
attachment was scrubbed...
<br />> > URL:
http://gradsusr.org/pipermail/gradsusr/attachments/20130208/d9812b61/attachment-0001.html
<br />> >
<br />> > ------------------------------
<br />> >
<br />>
> _______________________________________________
<br />> > gradsusr
mailing list
<br />> > gradsusr@gradsusr.org
<br />> >
http://gradsusr.org/mailman/listinfo/gradsusr
<br />> >
<br />> >
<br />> > End of gradsusr Digest, Vol 36, Issue 38
<br />> >
****************************************
<br />>                                           
                                          
<br />
<br />
<br />Ricardo Hallak
<br />
<br />
Departamento de Ciências Atmosféricas (ACA)
<br />
Instituto de Astronomia, Geofísica e Ciências Atmosféricas (IAG)
<br />
Universidade de São Paulo (USP)
<br />
Rua do Matão, 1226 - Cidade Universitária - São Paulo SP 05508-900
<br />
Phone.: +55 (11) 3091-2850; 3091-4703
<br />
Fax: +55 (11) 3091-4714
<br />
<br />
</font>
</BODY>
</HTML>