<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Kaikombo,<div><br></div><div>I was able to run your script after a few modifications. After displaying avvort and mvort, you can define the output using sublin(result,2). Also, I did not use quotes for the write statements.</div><div><br></div><div>.</div><div>.</div><div>.</div><div><div>'set gxout print'</div><div>'set prnopts %10.3e 5 1'</div></div><div><div>'d avvort'</div><div>var1=sublin(result,2)</div><div>'d mvort'</div><div>var2=sublin(result,2)</div><div>retcode1=write(avvort.txt, var1, 0)</div><div>retcode2=close(avvort.txt)</div><div><br></div><div>retcode2=write(mvort.txt, var2 ,0)</div><div>retcode2=close(mvort.txt)</div><div><br></div><div>good luck,</div><div>Lee</div><div><br></div><div><div>On Mar 9, 2013, at 8:00 AM, kombo kai wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><table cellspacing="0" cellpadding="0" border="0" style="position: static; z-index: auto; "><tbody><tr><td valign="top" style="font: inherit;">Hi Grads users<br>I have calculated the area and time average of my variables, noe I want to write the out put results in output.txt my codes are as follows<br>'reinit'<br>'c'<br>'open d:/vorticity/data2_extraction.ctl'<br>'set lon 0 360'<br>'set lat -90 90'<br>'set t 1 47'<br>'set z 3'<br>'define vort=hcurl(uwnd1,vwnd2)'<br>'set lon 40'<br>'set lat -22.5'<br>'set z 3'<br>'set t 1 47'<br>*defining the area average vorticity<br>'define avvort=aave(vort,lon=40,lon=70,lat=-22.5,lat=-5)'<br>*dining time average vorticiy va<br>'define mvort=ave(vort,t=1,t=47)'<br>* printing and writing the the text files of the out puts<br>'set gxout print'<br>'set prnopts %10.3e 5 1'<br>*'set prnopts %g 1 1'<br>'d avvort'<br>'d mvort'<br>'retcode1=write('d;/avvort.txt', avvort, 0)'<br>'retcode2=write('d;/mvort.txt',
mvort,0)'<br>'retcode1=close(avort.txt)'<br>'retcode2=close(mvort.txt)'<br>but when I run the script I get error in line whcih defines the recode1.<br>I tried several options bur i havent get the output writen to the file I want <br>please any one can help this <br>regards<br>kaikombo<br><br></td></tr></tbody></table>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></blockquote></div><br></div></body></html>