reinit

'open com_alqueva_1.ctl'

'set lat 38.21'
'set lon -7.5'
'set t 1'
'set lev 2'
dis_t = 2

*** CALCULO DA VARIAÇÃO DE LONGITUDE DO MODELO ***
dx = 1000

a = 6357000
pi = 3.14159265
phi = (38.21*pi)/180
cosp =math_cos(phi)
dlambdarad = dx/(a*cosp)
dlambda = (dlambdarad*180)/pi
**************************************************
long = -7.501806

i = 1

while (dis_t < 72)
'set t ' dis_t

dlon1 = long + dlambda
'set lon  'dlon1
'ua = u'
dlon2 = long - dlambda
'set lon 'dlon2
'ub = u'

'du = (ub - ua)/2000'

'set lon ' long 
'adv = u*du'

dis_t1 = dis_t - 1
'set t ' dis_t1
'ut1 = u'
dis_t2 = dis_t + 1
'set t ' dis_t2
'ut2 = u'

'dut = (ut2 - ut1)/1200'
'set t ' dis_t

'acm = dut + adv'

ac.i = acm

dis_t = dis_t + 1

i = i + 1

endwhile




