<div style="white-space:pre-wrap">Dear Davide,<br>Thank you very much. Yes, now it worked.</div><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">On Mon, 7 Nov 2016 at 17:04 Davide Sacchetti <<a href="mailto:davide.sacchetti@arpal.gov.it" class="gmail_msg" target="_blank">davide.sacchetti@arpal.gov.it</a>> wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">using "run" or not is equivalent, the difference is that using "run"<br class="gmail_msg">
grads takes into account upper or lower case in the script name<br class="gmail_msg">
(without "run" lower case only is considered)<br class="gmail_msg">
<br class="gmail_msg">
Modify the script as follow and it should work:<br class="gmail_msg">
<br class="gmail_msg">
function main(args)<br class="gmail_msg">
ctl.1=subwrd(args,1)<br class="gmail_msg">
ctl.2=subwrd(args,2)<br class="gmail_msg">
ctl.3=subwrd(args,3)<br class="gmail_msg">
ctl.4=subwrd(args,4)<br class="gmail_msg">
ctl.5=subwrd(args,5)<br class="gmail_msg">
<br class="gmail_msg">
model1=1<br class="gmail_msg">
model2=5<br class="gmail_msg">
while(model1<=model2)<br class="gmail_msg">
'open 'ctl.model1<br class="gmail_msg">
do some computation here<br class="gmail_msg">
close 1<br class="gmail_msg">
model1=model1+1<br class="gmail_msg">
endwhile<br class="gmail_msg">
<br class="gmail_msg">
Bye bye<br class="gmail_msg">
Davide<br class="gmail_msg">
<br class="gmail_msg">
Il giorno sab, 05/11/2016 alle 09.16 +0900, lpasmanoranjan ha scritto:<br class="gmail_msg">
> Dear Jeff,<br class="gmail_msg">
> Thank you for your suggestion. But it is not working.<br class="gmail_msg">
><br class="gmail_msg">
> I am getting the following error message:<br class="gmail_msg">
><br class="gmail_msg">
> Can't open the descriptor file<br class="gmail_msg">
><br class="gmail_msg">
> On 5 November 2016 at 00:33, Jeff Duda <<a href="mailto:jeffduda319@gmail.com" class="gmail_msg" target="_blank">jeffduda319@gmail.com</a>> wrote:<br class="gmail_msg">
> > Don't forget the keyword 'run' in your invocation of grads. <br class="gmail_msg">
> ><br class="gmail_msg">
> > Jeff Duda<br class="gmail_msg">
> ><br class="gmail_msg">
> > On Fri, Nov 4, 2016 at 5:41 AM, lpasmanoranjan <lpasmanoranjan@gmai<br class="gmail_msg">
> > <a href="http://l.com" rel="noreferrer" class="gmail_msg" target="_blank">l.com</a>> wrote:<br class="gmail_msg">
> > > Dear GrADS users,<br class="gmail_msg">
> > > I would like to ask you a favour.<br class="gmail_msg">
> > ><br class="gmail_msg">
> > > I would like to open 5 number of grads control files one by one<br class="gmail_msg">
> > > after some computation. They are first defined in my shell script<br class="gmail_msg">
> > > as:<br class="gmail_msg">
> > ><br class="gmail_msg">
> > > ctl1=temp.ctl<br class="gmail_msg">
> > > ctl2=t.ctl<br class="gmail_msg">
> > > ctl3=tave.ctl<br class="gmail_msg">
> > > ctl4=t2.ctl<br class="gmail_msg">
> > > ctl5=t2m.ctl<br class="gmail_msg">
> > > grads -blc "<a href="http://temp.gs" rel="noreferrer" class="gmail_msg" target="_blank">temp.gs</a> $ctl1 $ctl2 $ctl3 $ctl4 $ctl5"<br class="gmail_msg">
> > ><br class="gmail_msg">
> > > My grads script is:<br class="gmail_msg">
> > ><br class="gmail_msg">
> > > function main(args)<br class="gmail_msg">
> > > ctl1=subwrd(args,1)<br class="gmail_msg">
> > > ctl2=subwrd(args,2)<br class="gmail_msg">
> > > ctl3=subwrd(args,3)<br class="gmail_msg">
> > > ctl4=subwrd(args,4)<br class="gmail_msg">
> > > ctl5=subwrd(args,5)<br class="gmail_msg">
> > ><br class="gmail_msg">
> > > model1=1<br class="gmail_msg">
> > > model2=5<br class="gmail_msg">
> > > while(model1<=model2)<br class="gmail_msg">
> > > 'open ctl'model1<br class="gmail_msg">
> > > do some computation here<br class="gmail_msg">
> > > close 1<br class="gmail_msg">
> > > model1=model1+1<br class="gmail_msg">
> > > endwhile<br class="gmail_msg">
> > ><br class="gmail_msg">
> > > My problem is in the command 'open ctl'model1<br class="gmail_msg">
> > ><br class="gmail_msg">
> > > Is it possible to pass such command in grads script?<br class="gmail_msg">
> > ><br class="gmail_msg">
> > ><br class="gmail_msg">
> > > -- <br class="gmail_msg">
> > > Kind Regards,<br class="gmail_msg">
> > > Mano<br class="gmail_msg">
> > ><br class="gmail_msg">
> > ><br class="gmail_msg">
> > > _______________________________________________<br class="gmail_msg">
> > > gradsusr mailing list<br class="gmail_msg">
> > > <a href="mailto:gradsusr@gradsusr.org" class="gmail_msg" target="_blank">gradsusr@gradsusr.org</a><br class="gmail_msg">
> > > <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" class="gmail_msg" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br class="gmail_msg">
> > ><br class="gmail_msg">
> ><br class="gmail_msg">
> ><br class="gmail_msg">
> ><br class="gmail_msg">
> > -- <br class="gmail_msg">
> > Jeff Duda<br class="gmail_msg">
> > Post-doctoral research associate<br class="gmail_msg">
> > University of Oklahoma School of Meteorology<br class="gmail_msg">
> ><br class="gmail_msg">
> > _______________________________________________<br class="gmail_msg">
> > gradsusr mailing list<br class="gmail_msg">
> > <a href="mailto:gradsusr@gradsusr.org" class="gmail_msg" target="_blank">gradsusr@gradsusr.org</a><br class="gmail_msg">
> > <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" class="gmail_msg" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br class="gmail_msg">
> ><br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
> _______________________________________________<br class="gmail_msg">
> gradsusr mailing list<br class="gmail_msg">
> <a href="mailto:gradsusr@gradsusr.org" class="gmail_msg" target="_blank">gradsusr@gradsusr.org</a><br class="gmail_msg">
> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" class="gmail_msg" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
gradsusr mailing list<br class="gmail_msg">
<a href="mailto:gradsusr@gradsusr.org" class="gmail_msg" target="_blank">gradsusr@gradsusr.org</a><br class="gmail_msg">
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" class="gmail_msg" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br class="gmail_msg">
</blockquote></div>