!+ Subroutine to find single scattering propeties of all regions.
!
! Method:
!	Straightforward.
!
! 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 SINGLE_SCATTERING_ALL(I_SCATTER_METHOD_BAND
!			Atmospheric Propeties
     &   , N_PROFILE, N_LAYER, D_MASS
!			Cloudy Propeties
     &   , L_CLOUD, N_CLOUD_TOP, N_CLOUD_TYPE
!			Optical Propeties
     &   , K_GREY_TOT_FREE, K_EXT_SCAT_FREE
     &   , K_GREY_TOT_CLOUD, K_EXT_SCAT_CLOUD
     &   , K_GAS_ABS
!			Single Scattering Propeties
     &   , TAU_FREE, OMEGA_FREE
     &   , TAU_CLOUD, OMEGA_CLOUD
     &   )
!
!
      IMPLICIT NONE
!
!
!     INCLUSION OF HEADER FILES.
      INCLUDE 'incl/dimensions_field.ucf'
      INCLUDE 'incl/dimensions_fixed.pcf'
!
!
!     DUMMY VARIABLES.
      INTEGER	!, INTENT(IN)
     &     I_SCATTER_METHOD_BAND
!             TREATMENT OF SCATTERING IN THE BAND
!
!			Atmospheric Properties
      INTEGER	!, INTENT(IN)
     &     N_PROFILE
!             NUMBER OF PROFILES
     &   , N_LAYER
!             NUMBER OF LAYERS
      REAL*8	!, INTENT(IN)
     &     D_MASS(NPD_PROFILE, NPD_LAYER)
!             MASS THICKNESS OF EACH LAYER
!
!			Cldoudy Propeties
      LOGICAL	!, INTENT(IN)
     &     L_CLOUD
!             FLAG FOR CLOUDS
      INTEGER	!, INTENT(IN)
     &     N_CLOUD_TOP
!             TOPMOST CLOUDY LAYER
     &   , N_CLOUD_TYPE
!             NUMBER OF TYPES OF CLOUDS
!
!			Optical Properties
      REAL*8	!, INTENT(IN)
     &     K_GREY_TOT_FREE(NPD_PROFILE, NPD_LAYER)
!             FREE ABSORPTIVE EXTINCTION
     &   , K_EXT_SCAT_FREE(NPD_PROFILE, NPD_LAYER)
!             FREE SCATTERING EXTINCTION
     &   , K_GREY_TOT_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)
!             STRATIFORM ABSORPTIVE EXTINCTION
     &   , K_EXT_SCAT_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)
!             STRATIFORM SCATTERING EXTINCTION
     &   , K_GAS_ABS(NPD_PROFILE, NPD_LAYER)
!             GASEOUS EXTINCTION
!
!			Single Scattering Properties
      REAL*8	!, INTENT(OUT)
     &     TAU_FREE(NPD_PROFILE, NPD_LAYER)
!             FREE OPTICAL DEPTH
     &   , OMEGA_FREE(NPD_PROFILE, NPD_LAYER)
!             FREE SINGLE SCATTERING ALBEDO
     &   , TAU_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)
!             CLOUDY OPTICAL DEPTH
     &   , OMEGA_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)
!             CLOUDY SINGLE SCATTERING ALBEDO
!
!
!     LOCAL VARIABLES.
      INTEGER
     &     K
!             LOOP VARIABLE
!
!     SUBROUTINES CALLED:
      EXTERNAL
     &     SINGLE_SCATTERING
!
!
!
!     CLEAR-SKY PROPERTIES:
!
      CALL SINGLE_SCATTERING(I_SCATTER_METHOD_BAND
     &   , N_PROFILE, N_LAYER, 1
     &   , D_MASS
     &   , K_GREY_TOT_FREE, K_EXT_SCAT_FREE, K_GAS_ABS
     &   , TAU_FREE, OMEGA_FREE
     &   )
!
      IF (L_CLOUD) THEN
         DO K=1, N_CLOUD_TYPE
            CALL SINGLE_SCATTERING(I_SCATTER_METHOD_BAND
     &         , N_PROFILE, N_LAYER, N_CLOUD_TOP
     &         , D_MASS
     &         , K_GREY_TOT_CLOUD(1, 1, K)
     &         , K_EXT_SCAT_CLOUD(1, 1, K)
     &         , K_GAS_ABS
     &         , TAU_CLOUD(1, 1, K), OMEGA_CLOUD(1, 1, K)
     &         )
         ENDDO
      ENDIF
!
!
!
      RETURN
      END
