      SUBROUTINE ZL1NRM (N,Z,ZNORM)
      INTEGER N
      DOUBLE PRECISION ZNORM
      DOUBLE COMPLEX Z(N)
C
C     *** PURPOSE:
C
C     ZL1NRM COMPUTES AN L1-TYPE NORM OF A COMPLEX N-VECTOR Z AND
C     SCALES THE VECTOR Z BY THIS NORM.  SPECIFICALLY, THE NORM OF Z
C     IS DETERMINED AS THE SUMMATION OF  DABS(RE(Z(I)))+DABS(IM(Z(I)))
C     FOR I FROM 1 TO N WHERE RE(Z(I)) AND IM(Z(I)) ARE THE REAL AND
C     IMAGINARY PARTS, RESPECTIVELY, OF THE I-TH COMPONENT OF Z.
C
C     ON ENTRY:
C
C        N     INTEGER
C              THE LENGTH OF THE VECTOR Z.
C
C        Z     DOUBLE COMPLEX(N)
C              THE VECTOR WHICH IS TO BE SCALED BY ITS NORM.
C
C     ON RETURN:
C
C        ZNORM DOUBLE PRECISION
C              THE NORM OF THE VECTOR Z.
C
C        Z     THE VECTOR Z SCALED BY ZNORM.
C
C     THIS VERSION DATED JULY 1981.
C     ALAN J. LAUB, UNIVERSITY OF SOUTHERN CALIFORNIA.
C
C     INTERNAL VARIABLES:
C
      INTEGER I
      DOUBLE COMPLEX T,ZDUM
C
C     FORTRAN FUNCTIONS CALLED:
C
      DOUBLE PRECISION DABS
      DOUBLE COMPLEX DCMPLX
C
C     INTERNAL FUNCTIONS:
C
      DOUBLE PRECISION DIMAG,DREAL
      DREAL(ZDUM) = ZDUM
      DIMAG(ZDUM) = (0.0D0,-1.0D0)*ZDUM
C
      ZNORM = 0.0D0
      DO 10 I = 1,N
         ZNORM = ZNORM+DABS(DREAL(Z(I)))+DABS(DIMAG(Z(I)))
   10 CONTINUE
      IF (ZNORM .EQ. 0.0D0) RETURN
      T = DCMPLX((1.0D0/ZNORM),0.0D0)
      DO 20 I = 1,N
         Z(I) = T*Z(I)
   20 CONTINUE
      RETURN
      END
