

C
      SUBROUTINE CLZPRF
     I   ( XDATA, ICL, IST, IAC, FDT,
     M     ZPROF,
     D     NX, NZ, NXB, NZB, NROT, NZPROF )
C

      IMPLICIT REAL*8 ( A-H, O-Z )

C
      DIMENSION  XDATA ( -2:NXB, -2:NZB, NROT ),
     \           ZPROF ( -2:NZB, NZPROF )
C

C
      IF ( IAC .EQ. 1 ) THEN
C
      DO 11 IZ = 0, NZ
      DO 11 IX = 1, NX
         ZPROF(IZ,IST) = ZPROF(IZ,IST) + XDATA(IX,IZ,ICL) / NX * FDT
   11 CONTINUE
C
      ELSE IF ( IAC .EQ. 0 ) THEN
C
      DO 12 IZ = 0, NZ
         ZPROF(IZ,IST) = 0.0D0
      DO 12 IX = 1, NX
         ZPROF(IZ,IST) = ZPROF(IZ,IST) + XDATA(IX,IZ,ICL) / NX
   12 CONTINUE
C
      ELSE
         WRITE(6,*) ' IAC is invalid in CLZPRF '
      END IF
C
C=====================================================================
C
      RETURN
      E N D
