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

39 lines
1011 B
Fortran

subroutine ougrid(abso)
C =======================
C
C output of grid opacities
C
INCLUDE 'PARAMS.FOR'
INCLUDE 'MODELP.FOR'
INCLUDE 'SYNTHP.FOR'
common/prfrgr/ipfreq,indext,indexn
common/gridf0/wlgrid(mfgrid),nfgrid
common/initab/absop(msftab),wltab(msftab),
* nfrtab(mttab,mrtab),inttab
parameter (un=1.,ten15=1.e-15,c18=2.997925e18)
DIMENSION ABSO(MFREQ)
c
d1=un/dens(1)
if (nfreq.le.3) return
c
if(iprin.lt.4) then
do ij=3,nfreq-1
abl=log(abso(ij)*d1)
ipfreq=ipfreq+1
absop(ipfreq)=abl
wltab(ipfreq)=2.997925e18/freq(ij)
end do
else
do ij=3,nfreq-1
abl=log(abso(ij)*d1)
ipfreq=ipfreq+1
write(27,637) ipfreq,c18/freq(ij),abl
absop(ipfreq)=abl
wltab(ipfreq)=2.997925e18/freq(ij)
end do
end if
637 format(i10,f14.5,0pf12.5)
c
return
end