9 implicit real*8 (a-h,o-z)
10 include
'afrt_rt2.cmn'
34 read(isng,rec=il)sngla
35 read(isng,rec=ilp)snglb
40 fiic(k,i,j)=0.50d0*(
fio(k,i,j)+fiib(k,i,j))
45 tmsl=dtmm(il)*qsqt*
const
48 if(ifc.eq.0)tmsl=0.0d0
49 call mdiffn(1,nx-1,il,dlyr)
53 fio(k,i,j)=fiib(k,i,j)*emdtm(il,i)+
54 1 ftmp(k,i,j)*(1.0d0-emdtm(il,i))+
55 2 snglb(k,i,j)-sngla(k,i,j)*emdtm(il,i)
59 write(iwrt,rec=ilp)
fio
61 read(iwrt,rec=ilm)fiib
62 read(isng,rec=ilm)sngla
63 read(isng,rec=ilp)snglb
67 fiic(k,i,j)=
fio(k,i,j)
73 tmsl=(dtmm(ilm)+dtmm(il))*qsqt*
const
74 trsl=(dtrr(ilm)+dtrr(il))*conr
75 dlyr=(dtot(ilm)+dtot(il))
76 if(ifc.eq.0)tmsl=0.0d0
77 call mdiffn(1,nx-1,il,dlyr)
81 fio(k,i,j)=fiib(k,i,j)*emdtm(ilm,i)*emdtm(il,i)+
82 1 ftmp(k,i,j)*(1.0d0-emdtm(ilm,i)*emdtm(il,i))+
83 2 snglb(k,i,j)-sngla(k,i,j)*emdtm(ilm,i)*emdtm(il,i)
87 write(iwrt,rec=ilp)
fio
94 write(iwrt,rec=nolyr+1)
fio
104 write(iwrt,rec=nolyr+1)
fio
108 call brdfg(
fio,brdfx,cosmu,dcmu,dcmusq,eo,ddphi,amuo,
pi,sumc,
109 1 sumcpi,sumdwn,calb,kkx,nx-1,nmum1,jpart)
110 write(iwrt,rec=nolyr+1)
fio
120 read(iwrt,rec=imp)fiib
122 read(isng,rec=imp)sngla
123 read(isng,rec=im)snglb
127 fiic(k,i,j)=0.50d0*(
fio(k,i,j)+fiib(k,i,j))
132 tmsl=dtmm(im)*qsqt*
const
135 if(ifc.eq.0)tmsl=0.0d0
136 call mdiffn(nx,nmum1,im,dlyr)
140 fio(k,i,j)=fiib(k,i,j)*emdtm(im,i)+
141 1 ftmp(k,i,j)*(1.0d0-emdtm(im,i))+
142 2 snglb(k,i,j)-sngla(k,i,j)*emdtm(im,i)
146 write(iwrt,rec=im)
fio
148 read(iwrt,rec=impp)fiib
149 read(isng,rec=impp)sngla
150 read(isng,rec=im)snglb
154 fiic(k,i,j)=
fio(k,i,j)
160 tmsl=(dtmm(imp)+dtmm(im))*qsqt*
const
161 trsl=(dtrr(imp)+dtrr(im))*conr
162 dlyr=(dtot(imp)+dtot(im))
163 if(ifc.eq.0)tmsl=0.0d0
164 call mdiffn(nx,nmum1,im,dlyr)
168 fio(k,i,j)=fiib(k,i,j)*emdtm(imp,i)*emdtm(im,i)+
169 1 ftmp(k,i,j)*(1.0d0-emdtm(imp,i)*emdtm(im,i))+
170 2 snglb(k,i,j)-sngla(k,i,j)*emdtm(imp,i)*emdtm(im,i
174 write(iwrt,rec=im)
fio