NAME
     GRADE_UP

SYNOPSIS
     USE HPF_LIBRARY

     GRADE_UP(ARRAY, DIM)

DESCRIPTION
     GRADE_UP Produces a permutation of the indices of an  array,
     sorted by ascending array element values.

ARGUMENTS
     ARRAY
          must be of type integer, real, or 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_DOWN.