Re: wrapit and system

From: Michael Notaro <mnotaro_at_nyahnyahspammersnyahnyah>
Date: Wed Apr 14 2010 - 12:35:40 MDT

I printed both lines:

(0) /data/notaro/lpj_wicci_b1/OUTPUT/
(0) /data/notaro/lpj_wicci_b1/cccma_cgcm3_1/realiz1/OUTPUT/

and tried to cd into both.
Both do exist.

compute-0-1 >cd /data/notaro/lpj_wicci_b1/OUTPUT/
compute-0-1 >cd /data/notaro/lpj_wicci_b1/cccma_cgcm3_1/realiz1/OUTPUT/

On Apr 14, 2010, at 1:25 PM, Guangshan Chen wrote:

> I tried almost same thing as yours: mv *.out to somewhere.
>
> begin
> case = "output"
> system("mv ./"+case+"/*.out ./")
>
> end
>
> It works for me.
>
> Could you put these two lines in your code:
>
> pinrt(" /data/notaro/lpj_wicci_"+case+"/OUTPUT/")
> print("/data/notaro/lpj_wicci_"+case+"/"+models(imod)+"/realiz"+
> (iset+1)+"/OUTPUT/")
>
> and then make sure you have both directories.
>
> Guangshan
>
> On Apr 14, 2010, at 1:11 PM, Michael Notaro wrote:
>
>> Thanks for your email. Guangshan also suggested that.
>> I tried a simple example using mv in the system command
>> and it worked. So the full path is not needed.
>> So there must be something else going on.
>>
>>
>>
>> On Apr 14, 2010, at 1:01 PM, Means, James wrote:
>>
>>> Michael,
>>>
>>> This is probably a dumb suggestion, but I always get bitten in
>>> scripts because I don't give the full path to the command. Is
>>> there any chance that mv is not being recognized as a command
>>> because the path is not set correctly? You might try which mv to
>>> get the path to mv and then entering /bin/mv (or whatever it is)
>>> instead of just mv.
>>>
>>> Good luck,
>>>
>>> Jim
>>>
>>> ________________________________________
>>> From: ncl-talk-bounces@ucar.edu [ncl-talk-bounces@ucar.edu] On
>>> Behalf Of Michael Notaro [mnotaro@wisc.edu]
>>> Sent: Wednesday, April 14, 2010 10:53 AM
>>> To: ncl-talk NCL
>>> Subject: wrapit and system
>>>
>>> In my NCL script, I use wrapit inside a do loop.
>>> The fortran code writes to a bunch of *.out files.
>>> Once it's done, I use the system command to
>>> move the *.out files somewhere else.
>>>
>>> But the files never get moved and no error is produced.
>>> What am I missing here?
>>>
>>>
>>> do ipt=0,Npts-1
>>> OFFLINELPJ::lpj(Nyrs,Nmns,Tyrs,lat(ipt),lon(ipt),soilcode
>>> (ipt),inco2(:),ndtooned(tmp_mn(ipt,:,:)),ndtooned(pre_mn
>>> (ipt,:,:)),ndtooned(cld_mn(ipt,:,:)),ndtooned(wet_mn(ipt,:,:)))
>>> end do
>>>
>>> system("mv /data/notaro/lpj_wicci_"+case+"/OUTPUT/*.out /data/
>>> notaro/
>>> lpj_wicci_"+case+"/"+models(imod)+"/realiz"+(iset+1)+"/OUTPUT/")
>>>
>>>
>>>
>>> Michael
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Apr 14 12:31:05 2010

This archive was generated by hypermail 2.1.8 : Fri Apr 16 2010 - 16:21:29 MDT