Converting grads binary dat to txt file

Sestak, Dr. Michael michael.sestak at FNMOC.NAVY.MIL
Fri Mar 11 10:54:43 EST 2005


 The simplest way to get ascii output from grads is using the gxout print
setup.  You have to do this in a script or the output just scrolls off the
screen.

'set gxout print'
'set prnopts %10.3e 10 1'
'd myvariable'
values=sublin(result,2)
write('myfile.txt',values)

The first three lines are grads commands and must have the '  ' around them
in a script.  The last two lines are grads script commands and do not have
quotes around them.

See the online documentation, particularly
http://grads.iges.org/grads/gadoc/gradcomdsetprnopts.html
<http://grads.iges.org/grads/gadoc/gradcomdsetprnopts.html>  for information
on how this works

Depending on how your data files are organized, you may need a loop in your
script to go through all the years or variables.

Don't know why you can't get into the archive, the above info is from a
fairly recent thread.  In case you are trying to use some other password,
you do have to register and get a grads user list specific password.

Michael Sestak

 -----Original Message-----
From: Molly E. Hellmuth [mailto:molly.hellmuth at RISOE.DK]
Sent: Friday, March 11, 2005 6:46 AM
To: GRADSUSR at LIST.CINECA.IT
Subject: Converting grads binary dat to txt file


Hi

I have 50 years of daily .1 degree gridded climate time series for a small
river basin in south africa. I want to write the information to a text
file-- so i can open it into excel.

Can anyone help with this?

I'm sorry if this is an obvious question, but I have never used grads
before, and for some reason I cannot search the archive (it won't accept my
password). I assume I will have to run a script?

Thanks, Molly

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20050311/d0c3170f/attachment.html 


More information about the gradsusr mailing list