C***********************************************************
C***********************************************************
C
      SUBROUTINE  ADDIF0
     I   (   QADV0,
     I       CD1 ,
     O       DTQDI0,
     B       DENS0,
     G       DX, FDZ, FDZM,
     D       NZ, NZB         )
C
C***********************************************************
      IMPLICIT REAL*8 ( A-H, O-Z )
C***********************************************************
C
      DIMENSION
     \     QADV0 ( -2:NZB )

      DIMENSION
     \     CD1   ( -2:NZB ),
     \     DTQDI0( -2:NZB )
C
      DIMENSION
     \     DENS0( -2:NZB ),
     \     FDZ  ( -2:NZB ),
     \     FDZM ( -2:NZB )
C
C===========================================================
C
      DO 21 IZ = 0, NZ-1
         DTQDI0(IZ) =
     \    (  ( DENS0(IZ+1) + DENS0(IZ) ) / 2.0D0 / DX**2
     \         * CD1( IZ+1 )
     \         * ( QADV0(IZ+1) - QADV0(IZ) ) / FDZM(IZ+1)
     \     - ( DENS0(IZ-1) + DENS0(IZ) ) / 2.0D0 / DX**2
     \         * CD1( IZ ) 
     \         * ( QADV0(IZ) - QADV0(IZ-1) ) / FDZM(IZ)   )
     \    / FDZ(IZ) / DENS0(IZ)
   21 CONTINUE
C
      CALL BOUND ( DTQDI0, NZ, NZB )
C
C================================================================
C
      RETURN
      E N D
