Dear Grads users,<br><br>I am trying to write ascii data from ctl files. I need output data files like pdata_1951, pdata_1952 and so on.<br>It works for first year. but not for the rest of the years . It gives following error msg.<br>
<br>No hardcopy metafile open<br>All files closed; all defined objects released;<br>All GrADS attributes have been reinitialized<br>mv: cannot stat `pnew.dat': No such file or directory<br>mv: cannot stat `pnew.dat': No such file or directory<br>
<br><br>Here i am pasting my script. <br><br>--------------------------------------------------------------------------------------------<br>'reinit'<br>'clear'<br><br>year_st=1951<br>year_end=1953<br>yidx=year_st<br>
while(yidx<=year_end)<br>'open /home/mahesh/data/ncep/ctl/precip_'yidx'.ctl'<br>yidx=yidx+1 <br>endwhile <br><br>tt=1 <br>yrid=1951<br>fst=1<br>fend=3<br>fnum=fst<br>while(fnum<=fend)<br> while(tt<=30) <br>
'set t 'tt <br> 'define arn=aave(precip.'fnum',lon=0,lon=40,lat=25,lat=55)' <br> 'd arn' <br> lrn=subwrd(result,4) <br> w=write(pnew.dat,lrn) <br>
tt=tt+1 <br> endwhile<br> fnum=fnum+1<br> yrid=yrid+1<br>'!mv pnew.dat pdata_'yrid'.dat' <br>endwhile<br clear="all">--------------------------------------------------------------------------------------------------------<br>
<br>so please tell me where it goes wrong.<br><br>thanking you<br><br>regards<br>Mahesh<br><br><br>-- <br><div>----------------------------------------------------------------------------------------------------------------------</div>
<div style="color: rgb(102, 102, 102);">(Permanent Affiliaiton)</div><span style="color: rgb(102, 102, 102);">Mr. Mahesh Shinde</span><div><font color="#666666"></font><span style="color: rgb(102, 102, 102);">Climate and Global Modeling Division,</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);">Indian Institute of Tropical Meteorology,</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">NCL POST, Dr. Homi Bhabha Road,</span><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);">Pashan, Pune-411008, INDIA </span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">email: </span><a style="color: rgb(102, 102, 102);" href="mailto:samurai@tropmet.res.in" target="_blank">samurai@tropmet.res.in</a><br style="color: rgb(102, 102, 102);">
<span style="color: rgb(102, 102, 102);">cell: +91-9822050959</span><br style="color: rgb(102, 102, 102);"><span style="color: rgb(102, 102, 102);">skype : mshinde2k9</span><br>----------------------------------------------------------------------------------------------------------------------<br>
</div><br>