      SUBROUTINE DIAGSDW(FPHIS,FDPHI0S)
!
!     * FEB 05/2015 - K. VONSALZEN. NEW SUBROUTINE FOR GCM18.
!
      USE SDPARM
      USE COMPAR
!
      IMPLICIT REAL (A-H,O-Z), INTEGER (I-N)
!
      INTEGER, PARAMETER :: IMETH=2
!-------------------------------------------------------------------
!
!
      IF ( IMETH == 1 ) THEN
!
!       * WIDTH OF DIAGNOSTIC SECTIONS. THE SIZE RANGE COVERED
!       * BY THE DIAGNOSTIC SIZE DISTRIBUTION SPANS THE RANGE FROM
!       * THE SMALLEST TO THE LARGEST SIMULATED PARTICLE SIZE FOR
!       * INTERNALLY AND EXTERNALLY MIXED AEROSOL.
!
        FPHIS= YLARGE
        FPHIE=-YLARGE
        IF ( ISAINT > 0 ) THEN
          FPHIS=LOG(AINTF%RADB/R0)
          FPHIE=FPHIS+ISAINT*AINTF%DPSTAR
        ENDIF
        IF ( ISAEXT > 0 ) THEN
          DO KX=1,KEXT
            FPHIT=LOG(AEXTF%TP(KX)%RADB/R0)
            FPHIS=MIN(FPHIT,FPHIS)
            FPHIE=MAX(FPHIT+REAL( &
                   AEXTF%TP(KX)%ISEC)*AEXTF%TP(KX)%DPSTAR,FPHIE)
          ENDDO
        ENDIF
      ELSE
!
!       * FIXED, SPECIFIED RANGE.
!
        RADS=0.008E-06
        RADE=0.4E-06
        FPHIS=LOG(RADS/R0)
        FPHIE=LOG(RADE/R0)
      ENDIF
      FDPHI0S=(FPHIE-FPHIS)/REAL(ISDNUM)
!
      END SUBROUTINE DIAGSDW
