[gradsusr] writing binary to ascii

Pou-Chang John Chen wishingwork at yahoo.com.tw
Mon Apr 18 11:11:55 EDT 2011


Hi Zilore
I will try gxout print to list the value of grids, and then query the result and 
write out.
'set gxout print'
'd var'
w=write(output_file,result)
 c=close(output_file)

You can use query to separate the result as following:
'set gxout print'
'd var'
length=subwrd(result,4)
i=1;while(i<=9+length)
value=subwrd(result,i)
w=write(output_file,i)
i=i+1;endwhile
c=close(output_file)

Just for sure you close the output file.

Is this what you want?
John

________________________________
GrADS Tutorial on Facebook
http://www.wishingwork.com/grads/




________________________________
From: Zilore Mumba <zmumba at gmail.com>
To: gradsusr at gradsusr.org
Sent: Mon, April 18, 2011 10:31:28 PM
Subject: [gradsusr] writing binary to ascii

 
Hello Grads Users,
I thought I used command like sprint to write data in grads to ascii. Or is it 
NetCdf to ascii? Help needed please
Zilore
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110418/2ef8c320/attachment-0003.html 


More information about the gradsusr mailing list