[gradsusr] error in writing ascii data

Mahesh Shinde mashinde05 at gmail.com
Thu Aug 4 06:14:08 EDT 2011


Dear Grads users,

I am trying to write ascii data from ctl files. I need output data files
like pdata_1951, pdata_1952 and so on.
It works for first year. but not for the rest of the years . It gives
following error msg.

No hardcopy metafile open
All files closed; all defined objects released;
All GrADS attributes have been reinitialized
mv: cannot stat `pnew.dat': No such file or directory
mv: cannot stat `pnew.dat': No such file or directory


Here i am pasting my script.

--------------------------------------------------------------------------------------------
'reinit'
'clear'

year_st=1951
year_end=1953
yidx=year_st
while(yidx<=year_end)
'open /home/mahesh/data/ncep/ctl/precip_'yidx'.ctl'
yidx=yidx+1
endwhile

tt=1
yrid=1951
fst=1
fend=3
fnum=fst
while(fnum<=fend)
 while(tt<=30)
     'set t 'tt
     'define arn=aave(precip.'fnum',lon=0,lon=40,lat=25,lat=55)'
    'd arn'
    lrn=subwrd(result,4)
    w=write(pnew.dat,lrn)
   tt=tt+1
 endwhile
 fnum=fnum+1
 yrid=yrid+1
'!mv pnew.dat pdata_'yrid'.dat'
endwhile
--------------------------------------------------------------------------------------------------------

so please tell me where it goes wrong.

thanking you

regards
Mahesh


-- 
----------------------------------------------------------------------------------------------------------------------
(Permanent Affiliaiton)
Mr. Mahesh Shinde
Climate and Global Modeling Division,
Indian Institute of Tropical Meteorology,
NCL POST, Dr. Homi Bhabha Road,
Pashan, Pune-411008, INDIA
email: samurai at tropmet.res.in
cell: +91-9822050959
skype : mshinde2k9
----------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110804/feb961ef/attachment-0003.html 


More information about the gradsusr mailing list