     MODULE gms
     SAVE
     integer, parameter :: mxtrprf=20   ! max number of transition per profile
     integer, parameter :: mxprfdf=3    ! max number of profile data files
     integer, parameter :: srcnum=200   ! must be the same size as num
     integer, parameter :: nlines=500   ! # of spectral lines between hnu1 hnu2  
     integer, parameter :: nplevel=1000 ! # of levels used in calc
     integer, parameter :: specgrid=4001
     integer, parameter :: nprf = 20    ! # of profiles per element
     character(len=2)   :: element
     character(len=14)  :: file_in
     character(len=70)  :: workdir
     character(len=100) :: cauxdr
     character(len=66)  :: elmt
     integer me 
     integer iunit
     integer src_ntotal 
     integer iReadFlag
     integer itd
     integer itime
     integer ilte
     integer kill_sum
     integer isrc_iter
     integer iconvrg,iconsum
     integer iradat
     integer maxiter
     integer gsize
     real(8) time
     real(8) deltat
     real(8) src_Te_eV
     real(8) src_rNa
     real(8) src_zbar    ! NEEDED FOR LINESHAPES
     real(8) src_rNe
     real(8) src_amass
     real(8), dimension(srcnum) :: src_fp
     real(8), dimension(nplevel) :: srdsum
     real(8) hnu1, hnu2, fwhm
     real(8) radat(nlines,9)
     real(8), dimension(specgrid) :: spec
     real(8), dimension(specgrid) :: specwavlen
     real(8), dimension(specgrid) :: j_emissivity
     real(8), dimension(specgrid) :: k_opacity
! --------------------------------------------------
! User Defined Data Type for Profile Information
! --------------------------------------------------
     type prof
        real(8) :: x  ! Energy (eV)
        real(8) :: y  ! Prof. Intens
     end type prof
! --------------------------------------------------
     type profdat
        real(8) :: dne   ! Den. of prf
        integer :: npts  ! Num. of ptns in prf
        type(prof),dimension(specgrid) :: prf
     end type
! --------------------------------------------------
     type trans ! One trans contains the data of 1 prof-dat-file
        integer :: ntrans ! # of trans. asso. w/ prof-file
        integer :: nprof  ! # of profiles in trans
        integer, dimension(mxtrprf) :: itrans
        type(profdat), dimension(nprf) :: prfdat
     end type
! ---------------------------------------------------
     type(trans), dimension(3) :: trns
     type(trans) :: lineshape
! ---------------------------------------------------
! User Defined Data Type for Profile Data File Names
! ---------------------------------------------------
     type profnames
        integer :: nfnames
        character(len=30), dimension(mxprfdf) ::  fname 
     end type
! ---------------------------------------------------
     type(profnames) :: prfnames
     type(profdat) :: profile
     END MODULE gms

