SpectraRust/tlusty/extracted/rayini.f
2026-03-19 14:05:33 +08:00

43 lines
1.2 KiB
Fortran

SUBROUTINE RAYINI
C =================
C
C Initialization and reading of the opacity table for thermal processe
C and Rayleigh scattering
c raytab: scattering opacities in cm^2/gm at 5.0872638d14 Hz (sodium D)
c (NOTE: Quantities in rayleigh.tab are in log_e)
C
c tempvec: array of temperatures
c rhomat: array of densities (gm/cm^3)
c nu: array of frequencies
c table: absorptive opacities in cm^2/gm
c (NOTE: Quantities in absorption.tab are in log_e)
C
INCLUDE 'IMPLIC.FOR'
INCLUDE 'BASICS.FOR'
INCLUDE 'MODELQ.FOR'
INCLUDE 'ATOMIC.FOR'
c
c read Rayleigh scattering opacity table (if needed)
c
numfreq2 = numfreq
if(ifrayl.lt.0) then
open(52,file='./data/rayleigh.tab',status='old')
read(52,*) numfreq2,numtemp,numrho
read(52,*)
read(52,*) (tempvec(i),i=1,numtemp)
read(52,*)
read(52,*) ((rhomat(i,j),j=1,numrho),i=1,numtemp)
read(52,*)
do j = 1, numrho
read(52,*) (raytab(i,j),i=1,numtemp)
end do
close(52)
call rayset
else if(ifrayl.gt.0) then
call rayleigh(0,0,0,scr)
end if
c
RETURN
END