      INTEGER PRTFIL
      COMPLEX CI
      PARAMETER ( PRTFIL = 6, MXN = 1500003, MXNRD = 201, MXREF = 2001,
     &   MXBTY = 100, MXNR = 2001, CI = (0.0, 1.0), PI = 3.14159265 )

C     The following can be changed to reduce storage:
C
C     MXN     max # of steps along a ray
C     MXNRD            Receiver Depths
C     MXREF            REFlection coefficient points
C     MXBTY            BaThYmetry points
C     MXNR             receiver ranges

      REAL*8 RHOB, RHOT
      REAL*8 RV, ZV, RHOV, ZETAV, P1V, Q1V, P2V, Q2V, TAUV
      COMPLEX*16 CPT, CPB, RFA
      CHARACTER TOPOPT*4

      COMMON /BEAM/ CPT, CPB, RHOT, RHOB,
     &   RV(   MXN ), ZV(  MXN ), RHOV( MXN ), ZETAV( MXN ),
     &   P1V(  MXN ), Q1V( MXN ), P2V(  MXN ), Q2V(   MXN ),
     &   TAUV( MXN ), RFA( MXN ), CV(   MXN ),
     &   RD( MXNRD ), R( MXNR ),
     &   OMEGA, TOPOPT, DEPTHT, DEPTHB, NSTEPS, NRD, NR

C     *** bottom, top reflection coefficients

      REAL*8 THETABOT, RBOT, PHIBOT, THETATOP, RTOP, PHITOP
      COMMON /REFLEC/ THETABOT( MXREF ), RBOT( MXREF ), PHIBOT( MXREF),
     &                THETATOP( MXREF ), RTOP( MXREF ), PHITOP( MXREF),
     &                NBOTPTS, NTOPPTS

C     *** bottom topography (coordinates and tangent)

      REAL*8 RNG, DEP, TBR, TBZ
      COMMON /BATHY/ RNG( MXBTY ), DEP( MXBTY ),
     &               TBR( MXBTY ), TBZ( MXBTY ), NBTYPTS
