!+ Function to set number of source coefficients.
!
! Method:
!	The two-stream approximation is examined and the number
!	of coefficients is set accordingly.
!
! 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_SOURCE_COEFF(ISOLIR, L_IR_SOURCE_QUAD
     &   )
!
!     
!
      IMPLICIT NONE
!
!
!     INCLUDE HEADER FILES.
      INCLUDE 'incl/spectral_region.pcf'
!
!     DUMMY ARGUMENTS.
      INTEGER   !, INTENT(IN)
     &     ISOLIR
!             SPECTRAL REGION
      LOGICAL   !, INTENT(IN)
     &     L_IR_SOURCE_QUAD
!             FLAG FOR QUADRATIC INFRA-RED SOURCE
!
      INTEGER   !, INTENT(OUT)
     &     SET_N_SOURCE_COEFF
!             RETURNED NUMBER OF SOURCE COEFFICIENTS
!
!
!
      IF (ISOLIR.EQ.IP_SOLAR) THEN
         SET_N_SOURCE_COEFF=2
      ELSE
         IF (L_IR_SOURCE_QUAD) THEN
            SET_N_SOURCE_COEFF=2
         ELSE
            SET_N_SOURCE_COEFF=1
         ENDIF
      ENDIF
!
!
!
      RETURN
      END
