!+ Subroutine to calculate scattering properties using ADT.
!
! Method:
!	The standard formulae for the extinction and scattering
!	cross-sections, integrated across a modified-gamma
!	distribution, given by ADT are implemented.
!
! Current Owner of Code: J. M. Edwards
!
! History:
!	Version		Date			Comment
!	1.0		12-04-95		First Version under RCS
!						(J. M. Edwards)
!
! Description of Code:
!   FORTRAN 77  with extensions listed in documentation.
!
!- ---------------------------------------------------------------------
      SUBROUTINE ADT_INTEGRAL(ALPHA_MG, SIZE, N_RELATIVE
     &   , Q_EXT, Q_SCATTER)
!
!
      IMPLICIT NONE
!
!
!     INCLUDE HEADER FILES.
      INCLUDE 'incl/bna_factor.ccf'
!
!     DUMMY ARGUMENTS.
      REAL*8	!, INTENT(IN)
     &     ALPHA_MG
!             PARAMETER OF MODIFIED GAMMA DISTRIBUTION
     &   , SIZE
!             SIZE PARAMETER
      COMPLEX*16	!, INTENT(IN)
     &     N_RELATIVE
!             RELATIVE REFRACTIVE INDEX
      REAL*8	!, INTENT(OUT)
     &     Q_EXT
!             EXTINCTION EFFICIENCY
     &   , Q_SCATTER
!             SCATTERING EFFICIENCY
!
!     LOCAL VARIABLES.
      REAL*8
     &     U
!             DUMMY VARIABLES FOR ADT
     &   , V
!              "
     &   , R
!              "
      COMPLEX*16
     &     Z
!              "
!
!
      V=SIZE*DIMAG(N_RELATIVE)
      R=4.0D+00*V
      U=SIZE*(DBLE(N_RELATIVE)-1.0D+00)
      Z=2.0D+00*DCMPLX(V, U)
!
!     EVALUATION OF Q_EXT IS SPLIT INTO TWO PARTS 
!     TO AVOID ILL-CONDITIONING.
      IF (ABS(Z).GT.1.E-04) THEN
         Q_EXT=4.0D+00*DBLE(0.5D+00+(1.0D+00
     &      /(ALPHA_MG*(ALPHA_MG+1.0D+00)))
     &      *(Z*ALPHA_MG+(1.0D+00+Z)
     &      *(1.0D+00-EXP(ALPHA_MG*LOG(Z+1.0D+00))))
     &      /(Z*Z*EXP((1.0D+00+ALPHA_MG)*LOG(Z+1.0D+00))))
      ELSE
         Q_EXT=4.0D+00*DBLE((ALPHA_MG+2.0D+00)*Z
     &      *(1.0D+00/3.0D+00-(ALPHA_MG+3.0D+00)
     &      *Z*0.125D+00*(1.0D+00-4.0D+00*Z*(ALPHA_MG+4.0D+00)
     &      /15.0D+00)))
      ENDIF
!
!     RESCALE R WITH THE BNA FACTOR.
      R=FACTOR_BNA*R
      IF (ABS(R).GT.1.E-04) THEN
         Q_SCATTER=Q_EXT-2.0D+00*(0.5D+00+(1.0D+00
     &      /(ALPHA_MG*(ALPHA_MG+1.0D+00)))
     &      *(R*ALPHA_MG+(1.0D+00+R)
     &      *(1.0D+00-EXP(ALPHA_MG*LOG(R+1.0D+00))))
     &      /(R*R*EXP((2.0D+00+ALPHA_MG)*LOG(R+1.0D+00))))
      ELSE
         Q_SCATTER=Q_EXT-2.0D+00*(ALPHA_MG+2.0D+00)*R
     &      *(1.0D+00/3.0D+00-(ALPHA_MG+3.0D+00)*R
     &      *0.125D+00*(1.0D+00-4.0D+00*R*(ALPHA_MG+4.0D+00)/15.0D+00))
      ENDIF
!
!
      RETURN
      END
