        SUBROUTINE ZCLSRT(N,ARR)
C
C Module Number:
C
C Module Name: ZCLSRT
C
C Keyphrase:
C ----------
C  sort data into ascending order
C
C Description:
C ------------
C sorts an array ARR of length N into ascending order, by straight insertion
C (From Press, William H. et al, NUMERICAL RECIPES, 1986)
C
C FORTRAN Name: ZCLSRT.for
C
C
C Keywords of Accessed Files :
C --------------------------
C none
C
C Modules Called:
C ---------------
C  none
C
C History:
C --------
C Version       Date      Author        Description
C   1.0       APRIL 89   D. Lindler    Copied from NUMERICAL RECIPES
C------------------------------------------------------------------------
C
C INPUT:
C
        INTEGER         N
C                                    ---> NUMBER OF DATA POINTS
C
C INPUT/OUTPUT
C
        REAL ARR(1)
C                                    ---> ARRAYS TO BE SORTED
C
C LOCAL VARIABLES
C
        REAL A
C                                    ---> TEMPORARY STORAGE OF ARRAY ELEMENTS
        INTEGER         I,J
C                                    ---> INDICES
C
C---------------------------------------------------------------------------
C
        IF(N.LT.2)RETURN
        DO 100 J=2,N
C                                    ---> PICK OUT EACH ELEMENT IN TURN
            A=ARR(J)
            DO 5 I=J-1,1,-1
C                                    ---> LOOK FOR PLACE TO INSERT IN
                IF(ARR(I).LE.A)GO TO 10
                ARR(I+1)=ARR(I)
5           CONTINUE
            I=0
10          ARR(I+1)=A
100     CONTINUE
        RETURN
        END
