C (c) CROWN COPYRIGHT 1995, METEOROLOGICAL OFFICE, All Rights Reserved.            RAD_ALL.20769 
C                                                                                  RAD_ALL.20770 
C Use, duplication or disclosure of this code is subject to the                    RAD_ALL.20771 
C restrictions as set forth in the contract.                                       RAD_ALL.20772 
C                                                                                  RAD_ALL.20773 
C                Meteorological Office                                             RAD_ALL.20774 
C                London Road                                                       RAD_ALL.20775 
C                BRACKNELL                                                         RAD_ALL.20776 
C                Berkshire UK                                                      RAD_ALL.20777 
C                RG12 2SZ                                                          RAD_ALL.20778 
C                                                                                  RAD_ALL.20779 
C If no contract has been raised with this copy of the code, the use,              RAD_ALL.20780 
C duplication or disclosure of it is strictly prohibited.  Permission              RAD_ALL.20781 
C to do so must first be obtained in writing from the Head of Numerical            RAD_ALL.20782 
C Modelling at the above address.                                                  RAD_ALL.20783 
C ******************************COPYRIGHT******************************            RAD_ALL.20784 
C                                                                                  RAD_ALL.20785 
!+ Function to set number of source coefficients.                                  RAD_ALL.20786 
!                                                                                  RAD_ALL.20787 
! Method:                                                                          RAD_ALL.20788 
!       The two-stream approximation is examined and the number                    RAD_ALL.20789 
!       of coefficients is set accordingly.                                        RAD_ALL.20790 
!                                                                                  RAD_ALL.20791 
! Current Owner of Code: J. M. Edwards                                             RAD_ALL.20792 
!                                                                                  RAD_ALL.20793 
! History:                                                                         RAD_ALL.20794 
!       Version         Date                    Comment                            RAD_ALL.20795 
!       4.0             27-07-95                Original Code                      RAD_ALL.20796 
!                                               (J. M. Edwards)                    RAD_ALL.20797 
!                                               (J. M. Edwards)                    RAD_ALL.20798 
!                                                                                  RAD_ALL.20799 
! Description of Code:                                                             RAD_ALL.20800 
!   FORTRAN 77 with extensions listed in documentation.                            RAD_ALL.20801 
!                                                                                  RAD_ALL.20802 
!- ---------------------------------------------------------------------           RAD_ALL.20803 
      FUNCTION SET_N_SOURCE_COEFF(ISOLIR, L_IR_SOURCE_QUAD                         RAD_ALL.20804 
     &   )                                                                         RAD_ALL.20805 
!                                                                                  RAD_ALL.20806 
!                                                                                  RAD_ALL.20807 
!                                                                                  RAD_ALL.20808 
      IMPLICIT NONE                                                                RAD_ALL.20809 
!                                                                                  RAD_ALL.20810 
!                                                                                  RAD_ALL.20811 
!     INCLUDE COMDECKS                                                             RAD_ALL.20812 
!     ------------------------------------------------------------------           SPCRG3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       SPCRG3A.3     
!                                                                                  SPCRG3A.4     
!     MODULE TO SET FLAGS FOR DIFFERENT PORTIONS                                   SPCRG3A.5     
!     OF THE SPECTRUM.                                                             SPCRG3A.6     
!                                                                                  SPCRG3A.7     
      INTEGER                                                                      SPCRG3A.8     
     &     IP_SOLAR                                                                SPCRG3A.9     
!             SOLAR REGION                                                         SPCRG3A.10    
     &   , IP_INFRA_RED                                                            SPCRG3A.11    
!             INFRA-RED REGION                                                     SPCRG3A.12    
!                                                                                  SPCRG3A.13    
      PARAMETER(                                                                   SPCRG3A.14    
     &     IP_SOLAR=1                                                              SPCRG3A.15    
     &   , IP_INFRA_RED=2                                                          SPCRG3A.16    
     &   )                                                                         SPCRG3A.17    
!                                                                                  SPCRG3A.18    
!     ------------------------------------------------------------------           SPCRG3A.19    
!                                                                                  RAD_ALL.20814 
!     DUMMY ARGUMENTS.                                                             RAD_ALL.20815 
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.20816 
     &     ISOLIR                                                                  RAD_ALL.20817 
!             SPECTRAL REGION                                                      RAD_ALL.20818 
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.20819 
     &     L_IR_SOURCE_QUAD                                                        RAD_ALL.20820 
!             FLAG FOR QUADRATIC INFRA-RED SOURCE                                  RAD_ALL.20821 
!                                                                                  RAD_ALL.20822 
      INTEGER   !, INTENT(OUT)                                                     RAD_ALL.20823 
     &     SET_N_SOURCE_COEFF                                                      RAD_ALL.20824 
!             RETURNED NUMBER OF SOURCE COEFFICIENTS                               RAD_ALL.20825 
!                                                                                  RAD_ALL.20826 
!                                                                                  RAD_ALL.20827 
!                                                                                  RAD_ALL.20828 
      IF (ISOLIR.EQ.IP_SOLAR) THEN                                                 RAD_ALL.20829 
         SET_N_SOURCE_COEFF=2                                                      RAD_ALL.20830 
      ELSE                                                                         RAD_ALL.20831 
         IF (L_IR_SOURCE_QUAD) THEN                                                RAD_ALL.20832 
            SET_N_SOURCE_COEFF=2                                                   RAD_ALL.20833 
         ELSE                                                                      RAD_ALL.20834 
            SET_N_SOURCE_COEFF=1                                                   RAD_ALL.20835 
         ENDIF                                                                     RAD_ALL.20836 
      ENDIF                                                                        RAD_ALL.20837 
!                                                                                  RAD_ALL.20838 
!                                                                                  RAD_ALL.20839 
!                                                                                  RAD_ALL.20840 
      RETURN                                                                       RAD_ALL.20841 
      END 
