      IMPLICIT REAL*8 (A-H, O-Z)

      INTEGER ENVFIL, PRTFIL, GRNFIL, BRCFIL, TRCFIL
      COMPLEX CI
      PARAMETER ( ENVFIL = 5, PRTFIL = 6, GRNFIL = 20,
     &   BRCFIL = 10, TRCFIL = 11, IRCFIL = 12,
     &   MAXN = 20001,  MXNK = 50001,  MAXMED = 50, MXREF = 5000,
     &   MAXNSD = 51, MAXNRD = 101,
     &   CI = ( 0.0, 1.0 ), PI = 3.1415926535898D0 )

      REAL SD, RD
      COMPLEX*16 B1, B2, B3, B4, CPT, CST, CPB, CSB
      COMMON /SHARE/ B1( MAXN ), B2( MAXN ), B3( MAXN ), B4( MAXN ),
     &   CPT, CST, CPB, CSB, RHOT, RHOB, RHO( MAXN ),
     &   CMIN, CLOW, CHIGH, OMEGA2,
     &   DEPTH( MAXMED ), H( MAXMED ), SIGMA( MAXMED ), RK( MXNK ),
     &   SD( MAXNSD ), RD( MAXNRD ),
     &   ATTEN, BUMDEN, ETA, XI, NSD, NRD,
     &   N( MAXMED ), LOC( MAXMED ),
     &   NFACT, NLACT, NMEDIA,
     &   NKPTS, NKCORE

      CHARACTER*8 MATER( MAXMED ), TOPOPT, BOTOPT
      COMMON /SHARE1/ MATER, TOPOPT, BOTOPT

      COMPLEX*16 FTAB, GTAB
      COMMON /REFLEC/ THETAB( MXREF ), RB( MXREF ), PHIB( MXREF),
     &                THETAT( MXREF ), RT( MXREF ), PHIT( MXREF),
     &                NBPTS, NTPTS
      COMMON /INTREF/ FTAB( MXREF ), GTAB( MXREF), XTAB( MXREF ),
     &                ITAB( MXREF ), NREF
