!+ Subroutine to assemble lists of points with the same surfaces.
!
! Method:
!	The surfaces at the bottom of each profile are examined
!	and lists of points with the same type of surface are made.
!
! Current Owner of Code: J. M. Edwards
!
! History:
!	Version		Date			Comment
!	1.0		12-04-95		First Version under RCS
!						(J. M. Edwards)
!
! Description of Code:
!   FORTRAN 77  with extensions listed in documentation.
!
!- ---------------------------------------------------------------------
      SUBROUTINE COLLECT_SURFACE(N_PROFILE
     &   , I_SURFACE
     &   , N_POINT_TYPE, INDEX_SURFACE
     &   )
!
!
      IMPLICIT NONE
!
!
!     INCLUDE HEADER FILES.
      INCLUDE 'incl/dimensions_field.ucf'
      INCLUDE 'incl/dimensions_spec.ucf'
!
!     DUMMY ARGUMENTS.
      INTEGER	!, INTENT(IN)
     &     N_PROFILE
!             NUMBER OF PROFILES
     &   , I_SURFACE(NPD_PROFILE)
!             SURFACE SPECIFICATIONS
      INTEGER	!, INTENT(OUT)
     &     N_POINT_TYPE(NPD_SURFACE)
!             NUMBER OF POINTS OF EEACH TYPE
     &   , INDEX_SURFACE(NPD_PROFILE, NPD_SURFACE)
!             LIST OF POINTS OF EACH TYPE
!
!     LOCAL VARIABLES.
      INTEGER
     &     L
!             LOOP VARIABLE
     &   , K
!             LOOP VARIABLE
!
!
!     PASS THROUGH ALL THE COLUMNS COLLECTING LISTS OF POINTS WHICH
!     HAVE THE SAME SURFACE TYPE.
      DO K=1, NPD_SURFACE
         N_POINT_TYPE(K)=0
      ENDDO
      DO L=1, N_PROFILE
         N_POINT_TYPE(I_SURFACE(L))=N_POINT_TYPE(I_SURFACE(L))+1
         INDEX_SURFACE(N_POINT_TYPE(I_SURFACE(L)), I_SURFACE(L))=L
      ENDDO
!
!
!
      RETURN
      END
