78 SUBROUTINE cytran(ree,reo,roo,roe,nr_r,bmod_r,den_r,te_r,area_rm,dvol_r, &
93 INTEGER,
INTENT(IN) :: &
96 REAL(KIND=R8),
INTENT(IN) :: &
102 REAL(KIND=R8),
INTENT(IN) :: &
103 bmod_r(:), & !<|B|> [T]
112 INTEGER,
INTENT(IN),
OPTIONAL :: &
120 REAL(KIND=R8),
INTENT(OUT) :: &
129 areae,areao,blackb,delw,dwght,fwght,emass,omass,extray,ordray, &
130 qee,qeo,qoe,qoo,srce,srco,taucrt,taue,tauo,testi,tse,tso,wfreq, &
134 alphae(1:nr_r),alphao(1:nr_r),delta(1:nr_r),temp(1:nr_r)
142 IF(present(k_cyt_res))
THEN
144 IF(k_cyt_res > 1) k_res=k_cyt_res
149 wmin=5.0e11_r8*minval(bmod_r(1:nr_r))
150 wmax=2.4e12_r8*maxval(bmod_r(1:nr_r))
151 delw=0.08_r8*(wmax-wmin)/k_res
161 temp(1:nr_r)=te_r(1:nr_r)*dvol_r(1:nr_r)
165 delta(i)=2*dvol_r(i)/(area_rm(i)+area_rm(i+1))
169 delta(nr_r)=dvol_r(nr_r)/area_rm(nr_r)
173 IF(extray < 0.03_r8*testi)
EXIT
175 wfreq=wmin+delw*
REAL(j-1,r8)
182 blackb=4.48e-20_r8*wfreq*wfreq
185 CALL cytran_opacity(nr_r,te_r,bmod_r,wfreq,alphae,alphao)
186 alphae(1:nr_r)=alphae(1:nr_r)*6.03e-17_r8*den_r(1:nr_r)/bmod_r(1:nr_r)
187 alphao(1:nr_r)=alphao(1:nr_r)*6.03e-17_r8*den_r(1:nr_r)/bmod_r(1:nr_r)
196 taue=taue+alphae(i)*delta(i)
197 IF(taue < taucrt) nze=i-1
198 tauo=tauo+alphao(i)*delta(i)
199 IF(tauo < taucrt) nzo=i-1
208 emass=sum(den_r(1:nr_r)*dvol_r(1:nr_r))
223 omass=sum(den_r(1:nr_r)*dvol_r(1:nr_r))
236 xe=4*sum(dvol_r(nze+1:nr_r)*alphae(nze+1:nr_r))
237 srce=srce+4*sum(temp(nze+1:nr_r)*alphae(nze+1:nr_r))
248 xo=4*sum(dvol_r(nzo+1:nr_r)*alphao(nzo+1:nr_r))
249 srco=srco+4*sum(temp(nzo+1:nr_r)*alphao(nzo+1:nr_r))
257 qee=areao+area_rm(nr_r+1)*(1.0_r8-roo)+xo
258 qoo=areae+area_rm(nr_r+1)*(1.0_r8-ree)+xe
259 qeo=reo*area_rm(nr_r+1)
260 qoe=roe*area_rm(nr_r+1)
261 extray=(qee*srce+qeo*srco)*blackb/(qee*qoo-qeo*qoe)
262 ordray=(qoe*srce+qoo*srco)*blackb/(qee*qoo-qeo*qoe)
263 testi=max(testi,extray)
270 tse=itm_pi*areae*(blackb*te_r(nze)-extray)*(den_r(i)/emass)*wght
274 tse=4*itm_pi*alphae(i)*(blackb*te_r(i)-extray)*wght
278 psync_r(i)=psync_r(i)-tse
283 tso=itm_pi*areao*(blackb*te_r(nzo)-ordray)*(den_r(i)/omass)*wght
287 tso=4*itm_pi*alphao(i)*(blackb*te_r(i)-ordray)*wght
291 psync_r(i)=psync_r(i)-tso
299 SUBROUTINE cytran_opacity(nr_r,te_r,bmod_r,wfreq,alphae,alphao)
312 INTEGER,
INTENT(IN) :: &
315 REAL(KIND=R8),
INTENT(IN) :: &
318 REAL(KIND=R8),
INTENT(IN) :: &
323 REAL(KIND=R8),
INTENT(OUT) :: &
338 wloc=wfreq/(1.7588e+11*bmod_r(i))
339 tden=1.0_r8/(4.0+te_r(i)+25.0/te_r(i))
340 arg=max(0.0_r8,0.045_r8+(wloc-2.0_r8)*tden)
341 alphae(i)=10.0**(1.45-7.8*sqrt(arg))/(wloc**2)
342 arg=max(0.0_r8,0.180_r8+(wloc-1.0_r8)*tden)
343 alphao(i)=10.0_r8**(2.45_r8-8.58_r8*sqrt(arg))/(wloc**2)
347 END SUBROUTINE cytran_opacity
subroutine cytran(ree, reo, roo, roe, nr_r, bmod_r, den_r, te_r, area_rm, dvol_r, psync_r, K_CYT_RES)