!+ Function to determine whether densities are required for clouds.
!
! Method:
!
! 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. 
!
!- ---------------------------------------------------------------------
      FUNCTION L_CLOUD_DENSITY(N_CONDENSED, I_PHASE_CMP, L_CLOUD_CMP
     &   , I_CONDENSED_PARAM
     &   )
!
!     
!
      IMPLICIT NONE
!
!
!     INCLUDE HEADER FILES.
      INCLUDE 'incl/dimensions_fixed.pcf'
      INCLUDE 'incl/cloud_parametrization.pcf'
      INCLUDE 'incl/ice_cloud_parametrization.pcf'
      INCLUDE 'incl/phase.pcf'
!
!     DUMMY ARGUMENTS.
      INTEGER   !, INTENT(IN)
     &     N_CONDENSED
!             NUMBER OF TYPES OF CONDENSATE
     &   , I_PHASE_CMP(NPD_CLOUD_COMPONENT)
!             PHASES OF COMPONENTS
     &   , I_CONDENSED_PARAM(NPD_CLOUD_COMPONENT)
!             PARAMETRIZATIONS OF COMPONENTS
      LOGICAL   !, INTENT(IN)
     &     L_CLOUD_CMP(NPD_CLOUD_COMPONENT)
!             FLAGS FOR ENABLED COMPONENTS
      LOGICAL   !, INTENT(OUT)
     &     L_CLOUD_DENSITY
!             RETURNED FLAG FOR CALCULATING DENSITY
!
!
!     LOCAL VARIABLES.
      INTEGER
     &     K
!             LOOP VARIABLE
!
!
      L_CLOUD_DENSITY=.FALSE.
!
!     DENSITIES MUST BE CALCULATED IF SUN & SHINE'S PARAMETRIZATIONS 
!     ARE USED. 
      DO K=1, N_CONDENSED
         L_CLOUD_DENSITY=L_CLOUD_DENSITY.OR.
     &      (L_CLOUD_CMP(K).AND.(I_PHASE_CMP(K).EQ.IP_PHASE_ICE).AND.
     &      ( (I_CONDENSED_PARAM(K).EQ.IP_SUN_SHINE_VN2_VIS).OR.
     &        (I_CONDENSED_PARAM(K).EQ.IP_SUN_SHINE_VN2_IR) ) )
     &      .OR.( (I_PHASE_CMP(K).EQ.IP_PHASE_WATER).AND.
     &            (I_CONDENSED_PARAM(K).EQ.IP_DROP_UNPARAMETRIZED))
     &      .OR.( (I_PHASE_CMP(K).EQ.IP_PHASE_ICE).AND.
     &            (I_CONDENSED_PARAM(K).EQ.IP_ICE_UNPARAMETRIZED))
      ENDDO
!
!
!
      RETURN
      END
