      SUBROUTINE MINMAX(A,IDIM,JDIM,AMIN,AMAX)
C
C$$$  SUBPROGRAM DOCUMENTATION BLOCK
C                .      .    .     
C SUBPROGRAM:    MINMAX      RETURNS (MIN,MAX) IN ARRAY
C   PRGRMMR: TREADON         ORG: W/NP2      DATE: 93-01-08
C     
C ABSTRACT:
C     THIS ROUTINE FINDS THE MINIMUM AND MAXIMUM VALUES 
C     IN THE PASSED ARRAY "A" WHICH CONTAINS NPTS ELEMENTS.
C   .     
C     
C PROGRAM HISTORY LOG:
C   ??-??-??  DAVID PLUMMER - SUBROUTINE MINMAX IN ETAPACKC.
C   93-01-08  RUSS TREADON - ADDED COMMENTS.
C     
C USAGE:    CALL MINMAX(A,IDIM,JDIM,AMIN,AMAX)
C   INPUT ARGUMENT LIST:
C     A        - INPUT ARRAY TO SCAN.
C     IDIM,JDIM- DIMENSIONS OF ARRAY "A".
C
C   OUTPUT ARGUMENT LIST: 
C     AMIN     - MINIMUM VALUE IN ARRAY "A".
C     AMAX     - MAXIMUM VALUE IN ARRAY "A".
C     
C   OUTPUT FILES:
C     NONE
C     
C   SUBPROGRAMS CALLED:
C     UTILITIES:
C       NONE
C     LIBRARY:
C       NONE
C     
C   ATTRIBUTES:
C     LANGUAGE: FORTRAN
C     MACHINE : CRAY C-90
C$$$  
C     
C     
C     DECLARE VARIABLES.
      REAL AMIN, AMAX
      REAL A(IDIM,JDIM)
C     
C*******************************************************************
C     START MINMAX HERE.
C     
C     INITIALIZE VARIABLES.
      AMIN =  1.E30
      AMAX = -1.E30
C     
C     FIND MIN AND MAX VALUES IN ARRAY.
C
      DO J=1,JDIM
      DO I=1,IDIM
        AMIN = AMIN1(AMIN,A(I,J))
        AMAX = AMAX1(AMAX,A(I,J))
      ENDDO
      ENDDO
C     
C     END OF ROUTINE.
      RETURN      
      END        
