9 + ( ncol , nlm, mbs , mbir
10 +, ib , wc, asym , tau
46 logical (kind=log_kind),
intent(in)::
49 integer (kind=int_kind),
intent(in)::
56 real (kind=dbl_kind),
intent(in),
dimension(ncol,mbir)::
59 real (kind=dbl_kind),
intent(in),
dimension(ncol,nlm)::
64 real (kind=dbl_kind),
intent(in),
dimension(ncol,nlm+1)::
69 real (kind=dbl_kind),
intent(out),
dimension(ncol,nlm+1)::
75 integer(kind=int_kind)
80 real (kind=dbl_kind),
dimension(nlm)::
87 & aa , bb , beta0 , cc
88 &, diffac , denom , fact , eggtau
90 &, kappa , oms , prop ,r, rinf
94 real (kind=dbl_kind),
dimension(nlm)::
97 real (kind=dbl_kind),
dimension(nlm+1)::
102 logical (kind=log_kind)::
105 real (kind=dbl_kind)::
110 data tausthresh / 0.001 /
111 data wcthresh / 0.975 /
126 if (wc(i,l).gt.wcthresh) fail = .true.
127 tauscat = tauscat + wc(i,l)*tau(i,l)
129 if (fail.and.tauscat.ge.tausthresh) goto 2000
134 exptau(l) =
exp(-2*tau(i,l))
135 if(tau(i,l) .lt. .8e-2)
then
136 sigu(l) = (bf(i,l)+bf(i,l+1))*tau(i,l)
139 prop = (1.-exptau(l))/tau(i,l)
141 bb = -2.*exptau(l)+prop
143 sigu(l) = (aa*bf(i,l)+bb*bf(i,l+1))*cc
144 sigd(l) = (bb*bf(i,l)+aa*bf(i,l+1))*cc
146 fd(i,l+1) = sigd(l) + exptau(l) * fd(i,l)
149 fu(i,nlm+1) = bf(i,nlm+1)*es(i,ibms)
153 fu(i,l) = sigu(l) + exptau(l) * fu(i,l+1)
168 fact = asym(i,l)*asym(i,l)
169 oms = ((1.-fact)*wc(i,l))/(1.-fact*wc(i,l))
170 taus = (1.-fact*wc(i,l))*tau(i,l)
172 beta0 = (4.+asym(i,l))/(8.*(1.+asym(i,l)))
173 t = diffac*(1.-oms*(1.-beta0))
175 kappa = sqrt(t**2-r**2)
179 denom = (1.-rinf**2*eggtau**2)
180 tr(l) = (1.-rinf**2)*eggtau/denom
181 rr(l) = rinf*(1.-eggtau**2)/denom
183 if(taus .lt. .8e-2)
then
184 sigu(l) = 0.5*diffac*(bf(i,l)+bf(i,l+1))*taus
187 aa = (t+r)*(1.-rr(l))-(1.+rr(l)-tr(l))/taus
188 bb = -(t+r)*tr(l)+(1.+rr(l)-tr(l))/taus
189 cc = diffac*(1.-oms)/kappa**2
190 sigu(l) = cc*(aa*bf(i,l)+bb*bf(i,l+1))
191 sigd(l) = cc*(bb*bf(i,l)+aa*bf(i,l+1))
198 prop = 1. / (1. - re(l)*rr(l))
199 re(l+1) = rr(l) + tr(l)**2*re(l)*prop
200 vd(l+1) = sigd(l) + (tr(l)*vd(l)
201 + + tr(l)*re(l)*sigu(l))*prop
202 vu(l) = (rr(l)*vd(l) + sigu(l))*prop
208 fu(i,nlm+1) = es(i,ibms)*bf(i,nlm+1)
211 fd(i,l) = re(l)*fu(i,l) + vd(l)
212 fu(i,l-1) = tr(l-1)*fu(i,l)*td(l-1) + vu(l-1)