[gradsusr] Appending to file

Eric Altshuler ela at cola.iges.org
Fri Jun 4 15:34:00 EDT 2010


Jonas,

The way your script is written, only the tmp2m values will be in the output file. You need an additional write statement immediately following 'd rh2m':

'd rh2m'
dummy=write('output.txt',result)
'd tmp2m'
dummy=write('output.txt',result)

Best regards,

Eric L. Altshuler
Assistant Research Scientist
Center for Ocean-Land-Atmosphere Studies
4041 Powder Mill Road, Suite 302
Calverton, MD 20705-3106
USA

E-mail: ela at cola.iges.org
Phone: (301) 902-1257
Fax: (301) 595-9793

----- Original Message -----
From: "Jonas Kaufmann" <me at j0nes.de>
To: "GrADS Users Forum" <gradsusr at gradsusr.org>
Sent: Friday, June 4, 2010 11:01:01 AM
Subject: [gradsusr] Appending to file

Hello,

I have a grads script that basically looks like this:

'set lat 54.10'
'set lon 10.28'
'set t 1 78'
'set gxout print'
'set prnopts %0.2f 78 1'
'd rh2m'
'd tmp2m'
dummy=write('output.txt',result)

The file output.txt gets created and contains a single line of 78
values. However, I would like to have two lines in there, one for the
variable rh2m and the other for tmp2m.

Do you know if this is possible and if so, what do I have to do?

Best regards,
Jonas Kaufmann
_______________________________________________ gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr



More information about the gradsusr mailing list