      SUBROUTINE HTRPEX(COEFF,ARRAY,IMX0,JMX0,SYM)
      implicit none
C     ****
C     ****     PERFORM HALF WAY INTERPOLATION ON ARRAY COEFF AND EXTEND
C     ****       OVER 16 GRID POINTS .  RESULT RETURNED IN ARRAY
C     ****
C     ****     INPUT:
C     ****       COEFF((IMX0+1)/2,(JMX0+1)/2)  CONTAINS ARRAY OF ONE OF
C     ****         PDE COEFFICIENTS.
C     ****       SYM =1.  IF COEFFICIENT SYMMETRIC W.R.T. EQUATOR
C     ****           = -1.  FOR ANTISYMMETRY
C     ****
C     ****     OUTPUT:
C     ****       ARRAY(-15:IMX0+16,JMX0)  INTERPOLATED AND
C     ****         EXTENDED COEFFICIENT RETURNED IN THIS ARRAY.
C     ****
! Args:
      integer,intent(in) :: imx0,jmx0
      real,intent(in) :: COEFF(IMX0,JMX0),sym
      real,intent(out) :: ARRAY(IMX0+32,1)
!
! Local:
      integer :: i,j,jj
C     ****
C     ****     COPY COEFF INTO POSITIONS IN ARRAY
C     ****
      DO 1 J = 1,JMX0
        JJ = JMX0-J+1
        DO 1 I = 1,IMX0
          ARRAY(I,J) = SYM*COEFF(I,JJ)
    1 CONTINUE
C     ****
C     ****     NOW EXTEND OVER 32 GRID SPACES TO ALLOW FOR A TOTAL OF
C     ****       FIVE GRID LEVELS
C     ****
      DO 7 I = 1,16
        DO 7 J = 1,JMX0
          ARRAY(1-I,J) = ARRAY(IMX0-I,J)
          ARRAY(IMX0+I,J) = ARRAY(1+I,J)
    7 CONTINUE
      RETURN
      END
C
