[gradsusr] how to put the output numbers in an excel or a text file

T. haghroosta haghroosta at hotmail.com
Wed Feb 13 00:15:17 EST 2013


Dear Ricardo, Thanks a lot. Yes, it works. Best regards, T.

> ------------------------------
> 
> Message: 2
> Date: Tue, 12 Feb 2013 17:50:08 -0300
> From: "Ricardo Hallak" <hallak at model.iag.usp.br>
> Subject: Re: [gradsusr] how to put the output numbers in an excel or a
> 	text	file
> To: GrADS Users Forum <gradsusr at gradsusr.org>
> Message-ID: <20130212203638.M95719 at model.iag.usp.br>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> T.,
> 
> I think I've identified the problem in your script.
> 
> Please, try this:
> 
> vars=r1','r2','r3','r4','f1','f2','f3','f4','f5
> res=write('filename.txt', vars ,append)
> 
> That is, each comma has to be put between quotes, because they are understood as strings by the script interpreter.
> The new script variable vars means (for the script) something like that:
> 34.5,52.3,68.9,.........
> 
> Alternatively:
> 
> res=wwrite('filename.txt',r1','r2','r3','r4','f1','f2','f3','f4','f5,append)
> 
> Hope this helps,
> Ricardo
> 
> On Mon, 11 Feb 2013 18:32:52 +0000, T. haghroosta wrote
> > Dear Ricardo,
> > ?
> > It works, but I have 10 oputputs and I tried your suggestion in this way:
> > ?
> > res=write('filename.txt', r1, r2, r3, r4, r5, f1, f2, f3 ,f4 ,f5 ,append)
> > ?
> > Which I used for all outputs the "subwrd(result,4)". The outputs are shown in the window, but the txt file just shows the r1 and f1!? What is the problem?
> > ?
> > Regards,
> > ?
> > T.
> > ?
> > 
> > > ------------------------------
> > > 
> > > Message: 8
> > > Date: Mon, 11 Feb 2013 12:50:35 -0300
> > > From: "Ricardo Hallak" <hallak at model.iag.usp.br>
> > > Subject: Re: [gradsusr] how to put the output numbers in an excel or a
> > > text file
> > > To: GrADS Users Forum <gradsusr at gradsusr.org>
> > > Message-ID: <20130211154118.M8968 at model.iag.usp.br>
> > > Content-Type: text/plain; charset="iso-8859-1"
> > > 
> > > Dear T.,
> > > try this:
> > > 
> > > 'reinit'
> > >!; 'open E:\test.ctl'
> > > 'set t 1'
> > > 'set lat 10'
> > > 'set lon 135'
> > > 'define r1= sst'
> > > 'set t 2'
> > > 'set lat 20'
> > > 'set lon 100'
> > > 'define r2= sst'
> > > 'define aver= (r1+r2)/2'
> > > 'd aver'
> > > newvar=subwrd(result,4)
> > > res=write('filename.txt',newvar,append)
> > > 'quit'
> > > 
> > > Hope this helps.
> > > Ricardo
> > > 
> > > On Mon, 11 Feb 2013 13:04:58 +0000, T. haghroosta wrote
> > > > ?
> > > > 
> > > > 
> > > > Dear?All,
> > > > ?
> > > > 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?
> > > > ?
> > > > 'reinit'
> > > > 'open E:\test.ctl'
> > > > 'set t 1'
> > > > 'set lat 10'
> > > > 'set lon 135'
> > > > 'define r1= sst'
> > > > 'set t 2'
> > > > 'set lat 20'
> > > > 'set lon 100'
> > > > 'define r2= sst'
> > > > 'define av!er= (r1+r2)/2'
> > > > 
> > > > ?Regards,
> > > > ?
> > > > T.
> > > > ?
> > > > 
> > > > > 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. 
> > > > > -------------- next part --------------
> > > > > An HTML attachment was scrubbed...
> > > > > URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130208/ca3e352a/attachment-0001.html 
> > > > > 
> > > > > ------------------------------
> > > > > 
> > > > > Message: 2
> > > > > Date: Fri, 8 !Feb 2013 10:37:44 -0200
> > > > > From: RafaelCB <rafael.ciram at gmail.com>
> > > > > Subject: Re: [gradsusr] how put the output numbers in an excel or a
> > > > > text file
> > > > > To: GrADS Users Forum <gradsusr at gradsusr.org>
> > > > > Message-ID:
> > > > > <CAAgZ0pL8bQHs235nXYfTZzKJwEj1uPot9PrUbnz2!evQGQowCAA at mail.gmail.com>
> > > > > Content-Type: text/plain; charset="iso-8859-1"
> > > > > 
> > > > > An example follows:
> > > > > 
> > > > > 'd gr2stn(rh.1,min.2)'
> > > > > rh=sublin(result,_n2)
> > > > > 'd gr2stn(u10.1,min.2)'
> > > > > u1=sublin(result,_n2)
> > > > > '!echo 'dia','hora','_sig','lo','la','rh','u1' | sed s@\ @@g >> verific.dat'
> > > > > 
> > > > > I have helped.
> > > > > 
> > > > > Regards.
> > > > > -- 
> > > > > *Rafael Censi Borges
> > > > > Meteorologia - Epagri/Ciram
> > > > > +55 (48)3665-5130
> > > > > http://ciram.epagri.sc.gov.br*
> > > > > 
> > > > > 
> > > > > 2013/2/8 T. haghroosta <haghroosta at hotmail.com>
> > > > > 
> > > > > > Dear All,
> > > > > >
> > > > > &g!t; I have a script to calculate the average of differ!ent groups of numbers.
> > > > > > How can I show the outputs of the script running, contain numbers, in an
> > > > > > excel or a text file?
> > > > > >
> > > > > > Regards,
> > > > > >
> > > > > > T.
> > > > > >
> > > > > > _______________________________________________
> > > > > > gradsusr mailing list
> > > > > > gradsusr at gradsusr.org
> > > > > > http://gradsusr.org/mailman/listinfo/gradsusr
> > > > > >
> > > > > >
> > > > > -------------- next part --------------
> > > > > An HTML attachment was scrubbed...
> > > > > URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130208/d9812b61/attachment-0001.html 
> > > > > 
> > > > > ------------------------------
> > > > > 
> > > > > _______________________________________________
> > > > > gradsusr mailing list
> > > > > gradsusr at gradsusr.org
> > > > > http://gradsusr.!org/mailman/listinfo/gradsusr
> > > > > 
> > > > > 
> > > > > End of gradsusr Digest, Vol 36, Issue 38
> > > > > ****************************************
> > > >
> > > 
> > > Ricardo Hallak
> > > 
> > > Departamento de Ci?ncias Atmosf?ricas (ACA) 
> > > Instituto de Astronomia, Geof?sica e Ci?ncias Atmosf?ricas (IAG) 
> > > Universidade de S?o Paulo (USP) 
> > > Rua do Mat?o, 1226 - Cidade Universit?ria - S?o Paulo SP 05508-900 
> > > Phone.: +55 (11) 3091-2850; 3091-4703 
> > > Fax: +55 (11) 3091-4714
> > > 
> > > 
> > > -------------- next part --------------
> > > An HTML attachment was scrubbed...
> > > URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130211/dee40dd3/attachment.html 
> > > 
> > > ------------------------------
> > > 
> > > _______________________________________________
> > > gradsusr mailing list
> > > gradsusr at gradsusr.org
> > > http://gradsusr.org/mailman/listinf!o/gradsusr
> > > 
> > > 
> > > End of gradsusr Digest, Vol 36, Issue 41
> > > ****************************************
> 
> Ricardo Hallak
> 
> Departamento de Ci?ncias Atmosf?ricas (ACA) 
> Instituto de Astronomia, Geof?sica e Ci?ncias Atmosf?ricas (IAG) 
> Universidade de S?o Paulo (USP) 
> Rua do Mat?o, 1226 - Cidade Universit?ria - S?o Paulo SP 05508-900 
> Phone.: +55 (11) 3091-2850; 3091-4703 
> Fax: +55 (11) 3091-4714
> 
>  
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130212/6915b317/attachment-0001.html 
> 
> ------------------------------
> 
> Message: 3
> Date: Tue, 12 Feb 2013 20:05:17 -0600
> From: Jeff Duda <jeffduda319 at gmail.com>
> Subject: Re: [gradsusr] Increasing the font size and bolding a text
> To: Arlindo Meque <mequitomz at yahoo.com.br>,	GrADS Users Forum
> 	<gradsusr at gradsusr.org>
> Message-ID:
> 	<CAAig09AfyCJedvc4p-R50jaiqpcQACjiQPx9ZgXXaxAQncGVJg at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> set strsiz changes font size.  set string sets string thickness, which is
> what you need to "bold" text.  There is no regular "bold text" function.
> 
> Jeff Duda
> 
> On Tue, Feb 12, 2013 at 10:41 AM, Arlindo Meque <mequitomz at yahoo.com.br>wrote:
> 
> >
> > Dear all,
> >
> >  Just a trivial question:
> >
> >
> >  How can I increase the font size in a plot and bold a text (e.g, title
> > or  label for a figure)?
> >
> >
> > Arlindo
> >
> >
> >
> > _______________________________________________
> > gradsusr mailing list
> > gradsusr at gradsusr.org
> > http://gradsusr.org/mailman/listinfo/gradsusr
> >
> >
> 
> 
> -- 
> Jeff Duda
> Graduate research assistant
> University of Oklahoma School of Meteorology
> Center for Analysis and Prediction of Storms
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130212/34bf670c/attachment-0001.html 
> 
> ------------------------------
> 
> Message: 4
> Date: Wed, 13 Feb 2013 04:50:19 +0000
> From: "T. haghroosta" <haghroosta at hotmail.com>
> Subject: Re: [gradsusr] how to put the output numbers in an excel or a
> 	text	file
> To: <gradsusr at gradsusr.org>
> Message-ID: <DUB121-W15DA71FA6DB1A01AC63CDADD080 at phx.gbl>
> Content-Type: text/plain; charset="windows-1256"
> 
> 
> Dear Ricardo, I have attached my script to the email. All parameters are appeared in terminal window. When I added the res=write('filename.txt',newvar,append)
> 'quit'
>  to the end of the script, I should replace r2,r3,r4,r5,f2,f3,f4,f5 with "newvar" but it dosen't work correctly. I mean after running the script in 'filename.text' I just see r1 and after running again I see one another r1 is placed beside the previous one! What should I do? Can I write those number in an excel file? Regards, T.
> 
> 
> > To: GrADS Users Forum <gradsusr at gradsusr.org>
> > Message-ID: <20130212154325.M14837 at model.iag.usp.br>
> > Content-Type: text/plain; charset="iso-8859-1"
> > 
> > Dear T.,
> > 
> > test each variable value after capturing it with "subwrd(result,4)".
> > 
> > If the values appear on the terminal, they have to appear in the filename.txt too.
> > 
> > Anyway, if you still have problems with this, please, send me a copy of your script. Sometimes it is only a small detail.
> > 
> > Regards,
> > Ricardo
> > 
> > On Mon, 11 Feb 2013 18:32:52 +0000, T. haghroosta wrote
> > > Dear Ricardo,
> > > ?
> > > It works, but I have 10 oputputs and I tried your suggestion in this way:
> > > ?
> > > res=write('filename.txt', r1, r2, r3, r4, r5, f1, f2, f3 ,f4 ,f5 ,append)
> > > ?
> > > Which I used for all outputs the "subwrd(result,4)". The outputs are shown in the window, but the txt file just shows the r1 and f1!? What is the problem?
> > > ?
> > > Regards,
> > > ?
> > > T. 		 	   		  
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130213/e7cb1ada/attachment.html 
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: E1.gs
> Type: application/octet-stream
> Size: 923 bytes
> Desc: not available
> Url : http://gradsusr.org/pipermail/gradsusr/attachments/20130213/e7cb1ada/attachment.obj 
> 
> ------------------------------
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
> 
> 
> End of gradsusr Digest, Vol 36, Issue 45
> ****************************************
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130213/31969af9/attachment-0003.html 


More information about the gradsusr mailing list