git push -u origin main
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
SUBROUTINE OPDATA
|
||||
C =================
|
||||
C
|
||||
C Procedure reads photo-ionization cross sections fit coefficients
|
||||
C based on Opacity-Project (OP) data from file RBF.DAT
|
||||
C Data, as stored, requires linear interpolation.
|
||||
C
|
||||
C Meaning of global variables:
|
||||
C NTOTOP = total number of levels in Opacity Project data
|
||||
C IDLVOP() = level identifyer of current level
|
||||
C NOP() = number of fit points for current level
|
||||
C XOP(,) = x = alog10(nu/nu0) of fit point
|
||||
C SOP(,) = sigma = alog10(sigma/10^-18) of fit point
|
||||
C
|
||||
INCLUDE 'PARAMS.FOR'
|
||||
PARAMETER (MMAXOP = 200,! maximum number of levels in OP data
|
||||
+ MOP = 15 )! maximum number of fit points per level
|
||||
CHARACTER*10 IDLVOP(MMAXOP) ! level identifyer Opacity-Project data
|
||||
COMMON /TOPB/ SOP(MOP,MMAXOP) ,! sigma = alog10(sigma/10^-18) of fit point
|
||||
+ XOP(MOP,MMAXOP) ,! x = alog10(nu/nu0) of fit point
|
||||
+ NOP(MMAXOP) ,! number of fit points for current level
|
||||
+ NTOTOP ,! total number of levels in OP data
|
||||
+ IDLVOP ,! level identifyer Opacity-Project data
|
||||
+ LOPREA ! .T. OP data read in; .F. OP data not yer read in
|
||||
CHARACTER*4 IONID
|
||||
C
|
||||
OPEN (UNIT=40,FILE='RBF.DAT',STATUS='OLD')
|
||||
C Skip header
|
||||
DO IREAD = 1, 21
|
||||
READ (40,*)
|
||||
END DO
|
||||
IOP = 0
|
||||
C = initialize sequential level index op Opacity Project data
|
||||
C Read number of elements in file
|
||||
READ (40,*) NEOP
|
||||
DO IEOP = 1, NEOP
|
||||
C Skip element name header
|
||||
DO IREAD = 1, 3
|
||||
READ (40,*)
|
||||
END DO
|
||||
C Read number of ionization stages of current element in file
|
||||
READ (40,*) NIOP
|
||||
DO IIOP = 1, NIOP
|
||||
C Read ion identifyer, atomic & electron number, # of levels
|
||||
C for current ion
|
||||
READ (40,*) IONID, IATOM_OP, IELEC_OP, NLEVEL_OP
|
||||
DO ILOP = 1, NLEVEL_OP
|
||||
C Increase sequential level index of Opacity Project data
|
||||
IOP = IOP+1
|
||||
C Read level identifyer and number of sigma fit points
|
||||
READ (40,*) IDLVOP(IOP), NOP(IOP)
|
||||
C Read normalized log10 frequency and log10 cross section values
|
||||
DO IS = 1, NOP(IOP)
|
||||
READ (40,*) INDEX, XOP(IS,IOP), SOP(IS,IOP)
|
||||
END DO
|
||||
END DO
|
||||
END DO
|
||||
END DO
|
||||
NTOTOP = IOP
|
||||
C = total number of levels in Opacity Project data
|
||||
LOPREA = .TRUE.
|
||||
C = set flag as data has been read in
|
||||
C
|
||||
RETURN
|
||||
END
|
||||
Reference in New Issue
Block a user