problem with station data

Frank Aebly faebly1 at BIGRED.UNL.EDU
Tue Mar 27 16:03:40 EDT 2007


Rafael,
You can output text from a script using the 'write' command.  Check
the grads documentation for a description.  You must first set gxout
to 'print.'  Here is a script I use to output data to an ascii file:

'set gxout print'
'set prnopts %1.3f 1 1'
'set lat 10 90'
'set lon 0 360'
'd eof'
rc = write ('jfmeof.txt',result)
rc = close ('jfmeof.txt')

this script outputs the variable 'eof' to the file 'jfmeof.txt.'  the
prnopts statement formats the output as 1.3f (in C language).  In the
text file you will also get some of the character output from grads,
like 'Printing grid value' or whatever, that you can remove using
pattern matching utility like grep.

-Frank





On Mar 27, 2007, at 1:28 PM, Rafael Mundaray wrote:

> Hi Ben, Do you have a script that to convert output file of GrADS
> (binary) in Format .txt or ASCII???
> Thank you,
> Regards...
> __
> Ing. Rafael E. Mundaray M.



More information about the gradsusr mailing list