problem with station data

Ben-Jei Tsuang btsuang at YAHOO.COM
Tue Mar 27 19:22:55 EDT 2007


Dear Rafael:

I have a c++ code, which convert binary file from GrADS output to ascii
file. Please check the following for the usage and the download site.

Ben

-----------------------------------------------------------------------------------------------

2.           b2a: convert data from binary (REAL*4) (float) to ascii.
((http://140.120.30.2/~bjtsuang/grads/b2a)

-----------------------------------

b2a ver. 0.02

convert data from binary (REAL*4) (float) to ascii.

copyright by Chia Ying Tu - Revised from a2b.cpp by B. J. Tsuang, Jul., 2002

Usage: b2a infile <n>

Note : 1) n: number of data per row (default= 10).

     2) default output to 'standard output'

-------------------------------------------------------------



----- Original Message -----
From: "Frank Aebly" <faebly1 at BIGRED.UNL.EDU>
To: <GRADSUSR at LIST.CINECA.IT>
Sent: Wednesday, March 28, 2007 4:03 AM
Subject: Re: problem with station data


> 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