!+ Function to set number of cloudy parameters.
!
! 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)
!						(J. M. Edwards)
!
! Description of Code:
!   FORTRAN 77 with extensions listed in documentation. 
!
!- ---------------------------------------------------------------------
      FUNCTION SET_N_CLOUD_PARAMETER(I_SCHEME, I_COMPONENT
     &   )
!
!     
!
      IMPLICIT NONE
!
!
!     INCLUDE HEADER FILES.
      INCLUDE 'incl/cloud_component.pcf'
      INCLUDE 'incl/cloud_parametrization.pcf'
      INCLUDE 'incl/ice_cloud_parametrization.pcf'
!
!     DUMMY ARGUMENTS.
      INTEGER   !, INTENT(IN)
     &     I_SCHEME
!             PARAMETRIZATION SCHEME
     &   , I_COMPONENT
!             COMPONENT IN CLOUD
!
      INTEGER   !, INTENT(OUT)
     &     SET_N_CLOUD_PARAMETER
!             RETURNED NUMBER OF COEFFICIENTS IN PARAMETRIZATION
!
!
!
      IF ( (I_COMPONENT.EQ.IP_CLCMP_ST_WATER).OR.
     &     (I_COMPONENT.EQ.IP_CLCMP_CNV_WATER) ) THEN
!
         IF (I_SCHEME.EQ.IP_SLINGO_SCHRECKER) THEN
           SET_N_CLOUD_PARAMETER =6
         ELSE IF (I_SCHEME.EQ.IP_ACKERMAN_STEPHENS) THEN
            SET_N_CLOUD_PARAMETER=9
         ENDIF
!
      ELSE IF ( (I_COMPONENT.EQ.IP_CLCMP_ST_ICE).OR.
     &          (I_COMPONENT.EQ.IP_CLCMP_CNV_ICE) ) THEN
!
         IF (I_SCHEME.EQ.IP_SLINGO_SCHRECKER_ICE) THEN
            SET_N_CLOUD_PARAMETER=6
         ELSE IF (I_SCHEME.EQ.IP_CIRRUS_ADT) THEN
            SET_N_CLOUD_PARAMETER=2
         ELSE IF (I_SCHEME.EQ.IP_SUN_SHINE_VN2_VIS) THEN
            SET_N_CLOUD_PARAMETER=6
         ELSE IF (I_SCHEME.EQ.IP_SUN_SHINE_VN2_IR) THEN
            SET_N_CLOUD_PARAMETER=0
         ENDIF
!
      ENDIF
!
!
!
      RETURN
      END
