8 implicit real*8 (a-h,o-z)
21 call geom(fluxd(m1,nolyr+1),fluxd(m2,nolyr+1),fluxd(m3,nolyr+1),
23 call geom(fluxu(m1,1),fluxu(m2,1),fluxu(m3,1),
27 totflxgs=temp1(nolyr+1)+temp2(1)+amuo*factr
30 if(kzz.eq.1)gz=temp1(nolyr+1)
31 if(kzz.eq.2 .and. itrans.eq.0)sb=temp1(nolyr+1)
40 if(kzz.eq.1 .and. iglint.eq.1)
then
44 abcz=dexp(-tautot/dabs(cosmu(i)))
45 ftmp(k,i,j)=ftmp(k,i,j)-fglint(k,i,j)*abcz
46 ftmpa(k,i,j)=ftmpa(k,i,j)-fglint(k,i,j)*abcz
47 ftmpb(k,i,j)=ftmpb(k,i,j)-fglint(k,i,j)*abcz
57 if(ftmp(k,i,j).le.1.0d-15)
then
58 fioup(k,m,j)=ftmp(k,i,j)
60 call geom(ftmpb(k,i,j),ftmpa(k,i,j),ftmp(k,i,j),
61 1 ratiog,fioup(k,m,j))
77 if(ftmp(k,i,j).le.1.0d-15)
then
78 fioup_btm(k,m,j)=ftmp(k,i,j)
80 call geom(ftmpb(k,i,j),ftmpa(k,i,j),ftmp(k,i,j),
81 1 ratiog,fioup_btm(k,m,j))
92 if(ftmp(k,i,j).le.1.0d-15)
then
93 fiodn(k,i,j)=ftmp(k,i,j)
95 call geom(ftmpb(k,i,j),ftmpa(k,i,j),ftmp(k,i,j),
96 1 ratiog,fiodn(k,i,j))
109 fdown(ksza)=temp1(nolyr+1)*
pi
110 fup(ksza)=temp2(1)*
pi
113 xzeroz(1,ksza,i,j)=fioup(1,i,j)+fioup(2,i,j)
114 xzeroz(2,ksza,i,j)=fioup(1,i,j)-fioup(2,i,j)
115 xzeroz(3,ksza,i,j)=fioup(3,i,j)
116 xzeroz(4,ksza,i,j)=fioup(4,i,j)
117 xzerod(1,ksza,i,j)=fiodn(1,i,j)+fiodn(2,i,j)
118 xzerod(2,ksza,i,j)=fiodn(1,i,j)-fiodn(2,i,j)
119 xzerod(3,ksza,i,j)=fiodn(3,i,j)
120 xzerod(4,ksza,i,j)=fiodn(4,i,j)
123 if(iref.eq.1 .or. iref.eq.2 .or.iref.eq.3)
then
130 xzero_up(ksza,i,j)=fioup(1,i,j)+fioup(2,i,j)
131 xzero_btm(ksza,i,j)=fioup_btm(1,i,j)+fioup_btm(2,i,j)
134 if(kzz.eq.2 .and. itrans.eq.1)
then
138 xzero_up(ksza,i,j)=fioup(1,i,j)+fioup(2,i,j)
139 xzero_btm(ksza,i,j)=fioup_btm(1,i,j)+fioup_btm(2,i,j)
142 else if(kzz.eq.2 .and. itrans.eq.0)
then
144 ef=amuo*efactb(nolyr+1)
148 tdn(1,i,j)=(fiodn(1,i,j)+fiodn(2,i,j))
149 tdn(2,i,j)=(fiodn(1,i,j)-fiodn(2,i,j))
150 tdn(3,i,j)=(fiodn(3,i,j))
151 tdn(4,i,j)=(fiodn(4,i,j))
152 tup(1,i,j)=(fioup(1,i,j)+fioup(2,i,j))
153 tup(2,i,j)=(fioup(1,i,j)-fioup(2,i,j))
154 tup(3,i,j)=(fioup(3,i,j))
155 tup(4,i,j)=(fioup(4,i,j))
163 tupz(s,ksza,i,j)=tup(s,i,j)*ftot
164 tdwnz(s,ksza,i,j)=tdn(s,i,j)*ftot
171 ef=amuo*efactb(nolyr+1)
177 tupz(s,ksza,i,j)=tup(s,i,j)*ftot
178 tdwnz(s,ksza,i,j)=tdn(s,i,j)*ftot