Converting grads binary dat to txt file

Diane Stokes Diane.Stokes at NOAA.GOV
Fri Mar 11 10:29:42 EST 2005


Hi, Molly.

See "set gxout print" at:

   http://grads.iges.org/grads/gadoc/gradcomdsetgxout.html

You can set the format using "set prnopts"
   http://grads.iges.org/grads/gadoc/gradcomdsetprnopts.html

Then, display your variable.

You can then use your mouse to copy and paste the output to your own
document.

Or, instead of using the mouse, write a short script that calls the
intrinsic function 'write' to output the data to a txt file.  You can
find 'write' described in the "Intrinsic Functions" section of:

   http://grads.iges.org/grads/gadoc/script.html

For example:

'set gxout print'
'd clm'
res=result
rc=write(temp.txt,res)
say 'return code from write is: 'rc
* depending on what you are doing,
* you may or may not want to close the file
rc=close(temp.txt)
say 'return code from close is: 'rc


   Diane



Molly E. Hellmuth wrote:

> 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

--
Diane Stokes
Environmental Modeling Center
National Weather Service/NOAA



More information about the gradsusr mailing list