[gradsusr] Is it possible to use an earlier assigned variable to define a new variable within the grads script?

lpasmanoranjan lpasmanoranjan at gmail.com
Fri Nov 4 06:41:19 EDT 2016


Dear GrADS users,
I would like to ask you a favour.

I would like to open 5 number of grads control files one by one after some
computation. They are first defined in my shell script as:

ctl1=temp.ctl
ctl2=t.ctl
ctl3=tave.ctl
ctl4=t2.ctl
ctl5=t2m.ctl
grads -blc "temp.gs $ctl1 $ctl2 $ctl3 $ctl4 $ctl5"

My grads script is:

function main(args)
ctl1=subwrd(args,1)
ctl2=subwrd(args,2)
ctl3=subwrd(args,3)
ctl4=subwrd(args,4)
ctl5=subwrd(args,5)

model1=1
model2=5
while(model1<=model2)
*'open ctl'model1*
do some computation here
close 1
model1=model1+1
endwhile

My problem is in the command *'open ctl'model1*

Is it possible to pass such command in grads script?


-- 
Kind Regards,
Mano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20161104/7ecf23fe/attachment.html 


More information about the gradsusr mailing list