convertion binary

Fredrick Mashingia fmashingia at YAHOO.COM
Thu Jul 10 22:51:57 EDT 2008


On Thu, Jul 10, 2008 at 8:49 AM, wilfredo burgoa <anwibuma at yahoo.com> wrote:

Dear Arlindo,
 Please, with the option Set gxout fwrite manages to extract data in binary (GrADS) and now would want to turn those data to a format for example to be visualized in a spreadsheet (Excel). 

Off hand the only thing I think of right now is to write a program to convert this binary file into ASCII. In this case, skip the fwrite altogether and use "set gxout print" to create ASCII directly from GrADS; look at the user guide for instructions.

If you are an experienced C programmer, another possibility is look for a C library that writes in Excel binary format and write a conversion utility. This can also be done in Python using PyGrADS and the python excel tools.  However, I've never done it myself (I do not use excel).

 Hello Wilfred,
Arlindo is right with both options.However,the first option is the simplest and the second option is not necessary for your case. You can write FORTRAN program to convert your binary file into ASCII then open the excel worksheet and load the ASCII file. Text imort wizard will appear,choose the file type that best describe your data,set the delimiters your data contains and finally set column data format. Otherwise if you use the "set gxout print" to create ASCII directly from GrADS then you can copy and paste the data into excell worksheet. In short,excel supports ASCII fomart.
I hope that helps
Mashingia
------------------------------------------------------
MASHINGIA, Fredrick A. J. 
B.Sc., M.Sc. Eng. (UDSM) 
Republic Of Tanzania. 
Phone:  +255 713 619 561  
E-mail: fmashingia at yahoo.com 
------------------------------------------------------



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


More information about the gradsusr mailing list