These functions use the following arguments for output:
grade - S3L internal array handle for an integer array. Upon successful completion, grade contains the indices of the order of the elements.
ier (Fortran only) - When called from a Fortran program, this function returns error status in ier.