NAME
     GRADE_DOWN

SYNOPSIS
     USE HPF_LIBRARY

     GRADE_DOWN(ARRAY, DIM)

DESCRIPTION
     GRADE_DOWN Produces a  permutation  of  the  indices  of  an
     array, sorted by descending array element values.

ARGUMENTS
     ARRAY
          must be of type integer, real, character.

     DIM  this is an optional argument.  If present, it  must  be
          scalar  and of type integer with a value in the range 1
          <= DIM <= n, where n is the rank of ARRAY.

RESULT TYPE
     The result if of type default  integer.  The  shape  of  the
     result depends on the DIM argument.

SEE ALSO
     GRADE_UP.