      COMPLEX*16 FUNCTION BDF(Z,H,ALPHA,BETA,FNORM)
C
C     THIS FUNCTION COMPUTES THE VALUE OF THE BASIC DEPTH FUNCTION
C     AT DEPTH Z.
C
      IMPLICIT REAL*8 (A-H,O-Z)
      COMPLEX*16 ALPHA,BETA,FNORM,FAC,RAT
      COMPLEX*16 CSDS,CDSRT
C
      COMMON /BLKEVN/ HB,CW,CB,FKW,FKB,ROHW,ROHB,ATEN
C
C
      FAC=FKB**2/(ALPHA*CDSRT(FNORM))
      RAT=CDSIN(ALPHA*H)
C
C
      IF(Z .LE. H)   THEN
      BDF=FAC*CDSIN(ALPHA*Z)
      ELSE
      BDF=FAC*RAT*CSDS(Z,H,BETA)
      END IF
C
      RETURN
      END
