I could not get the problem in your script. Did you get any error message?<br><br>see the link <a href="http://sites.google.com/site/modellingearth/chapters/software-tools-list/sample-codes/grads-code">http://sites.google.com/site/modellingearth/chapters/software-tools-list/sample-codes/grads-code</a><br>
<br>There are two scripts related (may not be exactly same) to your requirement.<br><br>1. 
<a href="http://text_out_nonuniform_lat_grid.gs">text_out_nonuniform_lat_grid.gs</a><br>2. matrix_gridded_text_ <a href="http://out.gs">out.gs</a><br><br>refer these scripts and write your own script to solve your problem. If you get any specific error message, please give the details. <br>
<br> <br>-- <br>Gibies George,CSIR-RF,<br>Climate and Global Modelling Division,<br>Indian Institute of Tropical Meteorology,<br>Dr. Homi Bhabha Road,<br>NCL (P. O.), Pashan,<br>Pune 411008, India.<br><br><a href="http://sites.google.com/site/gibiesge/">http://sites.google.com/site/gibiesge/</a><br>
<br>