C
C     INCLUDE 'wfsrf.inc'
C     Declaration of the common blocks used through WFSRF program:
C
C Date: 2000, July 18
C Coded by Petr Bulant
C
C     ------------------------------------------------------------------
      INCLUDE 'ram.inc'
C     ram.inc.
C
      INCLUDE 'mttwf.inc'
C     mttwf.inc.
C
      INTEGER IRAM(MRAM)
      EQUIVALENCE (IRAM,RAM)
      INTEGER NRAMP,MRAMP,NT,NR,NQ
      INTEGER ORAYE,ORAYA,IRAYMI,IRAYMA
      REAL    WFTIME(1)
      INTEGER NWFT,OWFT(1)
      INTEGER NPOI,NPLGN
      LOGICAL L3D
      INTEGER IVALUE(MOUT)
      REAL POWER(MOUT)
      CHARACTER*20 VRTX,PLGN,PLGNS,TEXTP
      CHARACTER*5 TEXTC(MOUT)
      COMMON/WFSRFC/NRAMP,MRAMP,NT,NR,NQ,ORAYE,ORAYA,IRAYMI,IRAYMA,
     *            L3D,
     *            WFTIME,NWFT,OWFT,
     *            NPOI,NPLGN,
     *            VRTX,PLGN,PLGNS,POWER,IVALUE,TEXTP,TEXTC
      SAVE  /WFSRFC/
C     ------------------------------------------------------------------
C     MRAM ...Dimension of the arrays IRAM, RAM.
C     NRAMP...Number of records for points on rays in array [I]RAM
C             (address of the last record of the last point).
C     MRAMP...Maximum number of records for points on rays.
C     NPOI ...Number of records for points at wavefronts
C             (address of the last record of the last point).
C     NPLGN...Number of records for polygons at wavefronts
C             (address of the last record of the last polygon).
C             Polygons are recorded from the end of the array [I]RAM
C             to its beginning, i.e. towards the points at wavefronts.
C             Each moment must hold that NPOI is less than NPLGN.
C     IRAM(1 : 3*NT), where NT is a number of triangles ...
C             Indices of the rays forming the homogeneous triangles
C             in the ray-parameter domain, sorted according to
C             the indices of the rays forming the triangles, i.e. the
C             triangle formed by rays with the lowest indices is located
C             in IRAM(IRAM(3*NT+1):IRAM(3*NT+1)+2), the triangle formed
C             by rays with the highest indices is located in
C             IRAM(IRAM(4*NT):IRAM(4*NT)+2)
C     IRAM(3*NT+1 : 3*NT+NR), where NR is a number of rays ...
C             "Deleting array" containing the information about when
C             can be the rays erased from memory. Each record of the
C             array corresponds to one ray. The record
C             describes the last triangle where the ray is used;
C             it displays the highest index of the rays of the
C             last triangle.
C             Zero for the rays, which will not be used.
C     IRAM(3*NT+NR+1 : 3*NT+2*NR+1) ... "Addressing array" for points
C             on rays containing the addresses of the ends of individual
C             records for rays in the array [I]RAM.
C             If the ray have not yet been read into memory, zero.
C             If the ray was already read but is no longer stored in
C             the memory, the address of previous ray stored in memory.
C             To enable reading of the ray IRAYMI, address of the ray
C             IRAYMI-1 is set to 3*NT+2*NR+1 and stored as the first ray
C     [I]RAM(3*NT+2*NR+2 : 3*NT+2*NR+2+NWFT*NR) "Wavefront addressing
C             array" for points on rays at individual wavefronts.
C             If the point have not yet been computed, zero.
C             If the point can not be computed, -1.
C     [I]RAM(3*NT+2*NR+2+NWFT*NR : 3*NT+2*NR+2+NWFT*NR+JR, ...)
C             JR parameters of a ray, where
C             JR=address of the ray - address of the previous ray;
C             or JR=number of points on the ray * NQ.
C     [I]RAM(MRAMP+1 : MRAMP+NQPOI, ... , NPOI-NQPOI : NPOI) parameters
C             of the points (vertices of polygons) located at
C             wavefronts.
C     [I]RAM(MRAM : MRAM-(IRAM(MRAM-1)+2), ... , ... : NPLGN) polygons
C             at wavefronts. The polygons are recorded from the end of
C             array [I]RAM. For each polygon its travel time, number
C             of its points, and the addresses of its points are
C             recorded.
C             Parameters of the first polygon:
C               RAM(MRAM)...travel time
C               IRAM(MRAM-1)=NPTPL...Number of points of the polygon.
C               IRAM(MRAM-2)=IRAM(MRAM-1-NPTPL)...Addresses of the
C                            vertices (points at wavefronts) of the
C                            polygon.
C     NT ...  Number of triangles.
C     NR ...  Number of rays, which may be used in some triangle.
C     NWFT... Number of wavefronts. NWFT=1 in the present version.
C     NQ ...  Number of quantities recorded for each point on a ray,
C             number of character strings stored in CHOUT, number of
C             quantities to be interpolated at each point on the
C             wavefront.
C             The quantities represent:
C             1. X1-coordinate.
C             2. X2-coordinate.
C             3. X3-coordinate.
C             4. Index of the surface at which the endpoint of the
C                computed element of the ray is situated, zero for
C                endpoint situated inside complex block.
C             5. Sequential index of a point.
C             6. Travel time.
C             7. First component of the slowness vector.
C             8. Second component of the slowness vector.
C             9. Third component of the slowness vector.
C             10. - NQ  Other quantities to be interpolated. The kinds
C                of quantities are given by character strings CHOUT.
C     ORAYE . When substracting this number from the index of a ray,
C             we get the position of the ray in "deleting array".
C     ORAYA . When substracting this number from the index of a ray,
C             we get the position of the ray in "addressing array".
C             Address of the ray with index IRAY: IRAM(IRAY-ORAYA)
C             Parameters of the ray with index IRAY:
C                    from   RAM(IRAM(IRAY-ORAYA-1)+1)
C                    to     RAM(IRAM(IRAY-ORAY).
C     OWFT(1) . When substracting this number from the index of a ray,
C             we get the position of the point corresponding to the ray
C             and to the first wavefront in the "wavefront addressing
C             array".
C             Address of the point at ray with index IRAY and
C             at the first wavefront: IRAM(IRAY-OWFT(1))
C             Parameters of the point:
C                    from   IRAM(IRAY-OWFT(1))-NQPOI
C                    to     IRAM(IRAY-OWFT(1)).
C     IRAYMI,IRAYMA ... Minimum and maximum of indices of rays.
C     L3D ... L3D=.TRUE. indicates a 3-D computation.
C
C=======================================================================
C