    MODULE mac_commons
   
    IMPLICIT REAL*8 (a-h,o-z)
    SAVE
      PARAMETER(num=200,mum=99,lnum=99)
      parameter(nnum=15,kmum=99)
      parameter (numcs=5000,numstages=8)
      parameter (nptsece=15)
      parameter (nptseci=21)
      parameter (nptsrr=21)

      INTEGER      istdout
      dimension fp(num),fpp(num)
      CHARACTER*1  orbital
      CHARACTER*45 config
      integer icptype(num),iecitype(mum)
      integer ioracle(num,mum,3)
      real(8) amass
! ----------------------------------------------------
      COMMON /atomstruc/ config     (num),                              &
     &                   frac       (num),                              &
     &                   energy     (num),                              &
     &                   glob_eng   (num),                              &
     &                   gf         (num,num),                          &
     &                   iconfig    (num),                              &
     &                   index      (num),                              &
     &                   ig         (num),                              &
     &                   igrounds   (0:mum+1),                          &
     &                   modeltot,                                      &
     &                   mult       (num),                              &
     &                   Nvalshell  (num),                              &
     &                   orbital    (num),                              &
     &                   rioneng    (0:lnum)

! ----------------------------------------------------
      common /continum_low/ eng_diff(num),                              &
     &                      kill_lev(num),                              &
     &                      r_stat_wt(num),                             &
     &                      Eng_lower,                                  &
     &                      TF_zbar
! ---------------------------------------------------
      common /diag/ idiag(100)
! --------------------------------------------
      common /main_var/ rNa,                                            &
     &                  Te,                                             &
     &                  zbar,                                           &
     &                  f(num),                                         &
     &                  rNe,                                            &
     &                  Te_eV,                                          &
     &                  iter,                                           &
     &                  iTe,                                            &
     &                  iconv

! --------------------------------------------------------------
      common /rate_flags/ ieceecd,ieciecr,ipi,irr,idr,isrd,impi,        &
     &                    iPress_Ion
! --------------------------------------------------------------
       common /atomstruc2/itype(100)
! --------------------------------------------------------------------
      character*14 cfname(0:999),dfname(0:999),pfname(0:999)
      common /output/    cfname,dfname,pfname
! --------------------------------------------------------------------
      character*3 clocation
      character*17 fname_cat
      character*17 fname_ece
      character*17 fname_gf
      character*17 fname_eci
      character*17 fname_pi
! ----------------------------------------------------
      common /place/clocation
! ----------------------------------------------------
      common /mac_initial1/ fname_cat(mum),                             &
     &                     fname_gf(kmum),                              &
     &                     fname_ece(kmum),                             &
     &                     fname_eci(kmum),                             &
     &                     fname_pi(kmum)
! ----------------------------------------------------
      common /mac_initial5/ nstages,                                    &
     &                     niter,                                       &
     &                     delta,                                       &
     &                     eps
! ----------------------------------------------------
      common /mac_initial2/ zeff(num)
! ----------------------------------------------------
      common /mac_initial3/ Ephoton, rIntensity
! ----------------------------------------------------
      common /mac_initial4/ nterms,ngf,nece,neci,npi
! ----------------------------------------------------
      common /mac_initial6/ ntermindex(mum)
! ----------------------------------------------------
      common /rates/rsrd(num,num),                                      &
     &              rmpi(num,num),                                      &
     &              rdr(num,num),                                       &
     &              rpi(num,num),                                       &
     &              rrr(num,num),                                       &
     &              receecd(num,num),                                   &
     &              reciecr(num,num),                                   &
     &              b_einst(num,num)

! ----------------------------------------------------
      common /gausslag/ x(nnum),w(nnum),alf
! --------------------------------------------------------------------
      common /rate_coef/ coef_eced (num,num),                           &
     &                   coef_rr   (num,num),                           &
     &                   coef_ecir (num,num)
! --------------------------------------------------------------------
      common /ece_data/ ece_cs (nptsece,numcs,numstages),                  &
     &                  ece_eng(nptsece,numcs,numstages),                  &
     &                  ece_p_ratio (numcs,numstages),                  &
     &                  ece_p_yp1   (numcs,numstages),                  &
     &                  ece_p_ypn   (numcs,numstages),                  &
     &                  i_ece_iglob1  (numcs,numstages),                &
     &                  i_ece_iglob2  (numcs,numstages),                &
     &                  jmax (numstages)
! ---------------------------------------------------------------------
      common /eci_data/ eci_cs (nptseci,numcs,numstages),                  &
     &                  eci_eng(nptseci,numcs,numstages),                  &
     &                  i_eci_iglob1  (numcs,numstages),                &
     &                  i_eci_iglob2  (numcs,numstages),                &
     &                  jmax_eci (numstages)
! ---------------------------------------------------------------------
      common /rr_data/  rr_cs   (nptsrr,numcs,numstages),                 &
     &                  rr_eng  (nptsrr,numcs,numstages),                 &
     &                  i_rr_iglob1  (numcs,numstages),                 &
     &                       i_rr_iglob2  (numcs,numstages),            &
     &                  jmax_rr      (numstages)
! ---------------------------------------------------------------------

END MODULE mac_commons
