      SUBROUTINE AHGATHER (n,m, VARRAY, HPARRAY, OARRAY, ISIZE )                    
C...................................................................            
C                                                                  .            
C    Program Name: AHGATHER                 DATE: FEBRUARY 13, 1990.            
C    Programmer  : M. SEABLOM                                      .            
C    Computer    : Cray YMP 4/832                                               
C                                                                  .            
C  SUBROUTINE AHGATHER CREATES AN ARRAY OF SELECTED ELEMENTS OF    .            
C  INPUT ARGUMENT "VARRAY".                                        .            
C                                                                  .            
C...................................................................            
                                                                                
      real,dimension(n)::  VARRAY
      real,dimension(m):: OARRAY, HPARRAY                                  
!hpf$ distribute VARRAY(block)
!hpf$ distribute  OARRAY(block)
!hpf$ distribute  HPARRAY(block)
      INTEGER ISIZE                                                             
                                                                                
C     INTEGER IARRAY(*), ISIZE                                                  
C     DO 1 I = 1,ISIZE                                                          
C                                                                               
C       IARRAY(I) = IHINT( HPARRAY(I) )                                         
C                                                                               
C1    CONTINUE                                                                  
                                                                                
      DO 2 I = 1,ISIZE                                                          
                                                                                
        OARRAY( I )  = VARRAY( INT(HPARRAY(I)) )                             
                                                                                
 2    CONTINUE                                                                  
                                                                                
      RETURN                                                                    
      END                                                                       
