C (c) CROWN COPYRIGHT 1995, METEOROLOGICAL OFFICE, All Rights Reserved.            RAD_ALL.24731 
C                                                                                  RAD_ALL.24732 
C Use, duplication or disclosure of this code is subject to the                    RAD_ALL.24733 
C restrictions as set forth in the contract.                                       RAD_ALL.24734 
C                                                                                  RAD_ALL.24735 
C                Meteorological Office                                             RAD_ALL.24736 
C                London Road                                                       RAD_ALL.24737 
C                BRACKNELL                                                         RAD_ALL.24738 
C                Berkshire UK                                                      RAD_ALL.24739 
C                RG12 2SZ                                                          RAD_ALL.24740 
C                                                                                  RAD_ALL.24741 
C If no contract has been raised with this copy of the code, the use,              RAD_ALL.24742 
C duplication or disclosure of it is strictly prohibited.  Permission              RAD_ALL.24743 
C to do so must first be obtained in writing from the Head of Numerical            RAD_ALL.24744 
C Modelling at the above address.                                                  RAD_ALL.24745 
C ******************************COPYRIGHT******************************            RAD_ALL.24746 
C                                                                                  RAD_ALL.24747 
!+ Subroutine to calculate cloudy two-stream coefficients.                         RAD_ALL.24748 
!                                                                                  RAD_ALL.24749 
! Method:                                                                          RAD_ALL.24750 
!       The coeffients for each type of cloud are determined and                   RAD_ALL.24751 
!       averaged.                                                                  RAD_ALL.24752 
!                                                                                  RAD_ALL.24753 
! Current Owner of Code: J. M. Edwards                                             RAD_ALL.24754 
!                                                                                  RAD_ALL.24755 
! History:                                                                         RAD_ALL.24756 
!       Version         Date                    Comment                            RAD_ALL.24757 
!       4.0             27-07-95                Original Code                      RAD_ALL.24758 
!                                               (J. M. Edwards)                    RAD_ALL.24759 
!       4.1             04-03-96                Gathering and scattering           RAD_ALL.24760 
!                                               of types of clouds                 RAD_ALL.24761 
!                                               introduced for speed.              RAD_ALL.24762 
!                                               This change has no                 RAD_ALL.24763 
!                                               physical effect.                   RAD_ALL.24764 
!       4.2             Nov. 96   T3E migration: CALL WHENFGT replaced             RAD_ALL.24765 
!                                  by portable fortran code.                       RAD_ALL.24766 
!                                                S.J.Swarbrick                     RAD_ALL.24767 
!                                                                                  RAD_ALL.24768 
! Description of Code:                                                             RAD_ALL.24769 
!   FORTRAN 77  with extensions listed in documentation.                           RAD_ALL.24770 
!                                                                                  RAD_ALL.24771 
!- ---------------------------------------------------------------------           RAD_ALL.24772 
      SUBROUTINE TWO_COEFF_CLOUD(IERR                                              RAD_ALL.24773 
     &   , N_PROFILE, I_LAYER_FIRST, I_LAYER_LAST                                  RAD_ALL.24774 
     &   , I_2STREAM, L_IR_SOURCE_QUAD, N_SOURCE_COEFF                             RAD_ALL.24775 
     &   , N_CLOUD_TYPE, FRAC_CLOUD                                                RAD_ALL.24776 
     &   , ASYMMETRY_CLOUD, OMEGA_CLOUD, TAU_CLOUD                                 RAD_ALL.24777 
     &   , ISOLIR, SEC_0                                                           RAD_ALL.24778 
     &   , TRANS_CLOUD, REFLECT_CLOUD, TRANS_0_CLOUD                               RAD_ALL.24779 
     &   , SOURCE_COEFF_CLOUD                                                      RAD_ALL.24780 
     &   , NPD_PROFILE, NPD_LAYER                                                  RAD_ALL.24781 
     &   )                                                                         RAD_ALL.24782 
!                                                                                  RAD_ALL.24783 
!                                                                                  RAD_ALL.24784 
!                                                                                  RAD_ALL.24785 
      IMPLICIT NONE                                                                RAD_ALL.24786 
!                                                                                  RAD_ALL.24787 
!                                                                                  RAD_ALL.24788 
!     SIZES OF DUMMY ARRAYS.                                                       RAD_ALL.24789 
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.24790 
     &     NPD_PROFILE                                                             RAD_ALL.24791 
!             MAXIMUM NUMBER OF PROFILES                                           RAD_ALL.24792 
     &   , NPD_LAYER                                                               RAD_ALL.24793 
!             MAXIMUM NUMBER OF LAYERS                                             RAD_ALL.24794 
!                                                                                  RAD_ALL.24795 
!     INCLUDE COMDECKS.                                                            RAD_ALL.24796 
!     ------------------------------------------------------------------           DIMFIX3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       DIMFIX3A.3     
!                                                                                  DIMFIX3A.4     
!     MODULE TO SET INTERNAL DIMENSIONS TIED TO ALGORITHMS,                        DIMFIX3A.5     
!     MOSTLY FOR CLOUDS.                                                           DIMFIX3A.6     
!                                                                                  DIMFIX3A.7     
      INTEGER                                                                      DIMFIX3A.8     
     &     NPD_CLOUD_COMPONENT                                                     DIMFIX3A.9     
!             NUMBER OF COMPONENTS OF CLOUDS                                       DIMFIX3A.10    
     &   , NPD_CLOUD_TYPE                                                          DIMFIX3A.11    
!             NUMBER OF PERMITTED TYPES OF CLOUDS.                                 DIMFIX3A.12    
     &   , NPD_CLOUD_REPRESENTATION                                                DIMFIX3A.13    
!             NUMBER OF PERMITTED REPRESENTATIONS OF CLOUDS.                       DIMFIX3A.14    
     &   , NPD_OVERLAP_COEFF                                                       DIMFIX3A.15    
!             NUMBER OF OVERLAP COEFFICIENTS FOR CLOUDS                            DIMFIX3A.16    
     &   , NPD_SOURCE_COEFF                                                        DIMFIX3A.17    
!             NUMBER OF COEFFICIENTS FOR TWO-STREAM SOURCES                        DIMFIX3A.18    
     &   , NPD_REGION                                                              DIMFIX3A.19    
!             NUMBER OF REGIONS IN A LAYER                                         DIMFIX3A.20    
!                                                                                  DIMFIX3A.21    
      PARAMETER(                                                                   DIMFIX3A.22    
     &     NPD_CLOUD_COMPONENT=4                                                   DIMFIX3A.23    
     &   , NPD_CLOUD_TYPE=4                                                        DIMFIX3A.24    
     &   , NPD_CLOUD_REPRESENTATION=4                                              DIMFIX3A.25    
     &   , NPD_OVERLAP_COEFF=18                                                    DIMFIX3A.26    
     &   , NPD_SOURCE_COEFF=2                                                      DIMFIX3A.27    
     &   , NPD_REGION=3                                                            DIMFIX3A.28    
     &   )                                                                         DIMFIX3A.29    
!                                                                                  DIMFIX3A.30    
!     ------------------------------------------------------------------           DIMFIX3A.31    
!     ------------------------------------------------------------------           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    
!     ------------------------------------------------------------------           ERROR3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       ERROR3A.3     
!                                                                                  ERROR3A.4     
!     MODULE TO SET ERROR FLAGS IN THE RADIATION CODE.                             ERROR3A.5     
!                                                                                  ERROR3A.6     
      INTEGER                                                                      ERROR3A.7     
     &     I_NORMAL                                                                ERROR3A.8     
!             ERROR FREE CONDITION                                                 ERROR3A.9     
     &   , I_ERR_FATAL                                                             ERROR3A.10    
!             FATAL ERROR: IMMEDIATE RETURN                                        ERROR3A.11    
     &   , I_ABORT_CALCULATION                                                     ERROR3A.12    
!             CALCULATION ABORTED                                                  ERROR3A.13    
     &   , I_MISSING_DATA                                                          ERROR3A.14    
!             MISSING DATA ERROR: CONDITIONAL                                      ERROR3A.15    
     &   , I_ERR_IO                                                                ERROR3A.16    
!             I/O ERROR                                                            ERROR3A.17    
     &   , I_ERR_RANGE                                                             ERROR3A.18    
!             INTERPOLATION RANGE ERROR                                            ERROR3A.19    
     &   , I_ERR_EXIST                                                             ERROR3A.20    
!             EXISTENCE ERROR                                                      ERROR3A.21    
!                                                                                  ERROR3A.22    
      PARAMETER(                                                                   ERROR3A.23    
     &     I_NORMAL=0                                                              ERROR3A.24    
     &   , I_ERR_FATAL=1                                                           ERROR3A.25    
     &   , I_ABORT_CALCULATION=2                                                   ERROR3A.26    
     &   , I_MISSING_DATA=3                                                        ERROR3A.27    
     &   , I_ERR_IO=4                                                              ERROR3A.28    
     &   , I_ERR_RANGE=5                                                           ERROR3A.29    
     &   , I_ERR_EXIST=6                                                           ERROR3A.30    
     &   )                                                                         ERROR3A.31    
!                                                                                  ERROR3A.32    
!     ------------------------------------------------------------------           ERROR3A.33    
!                                                                                  RAD_ALL.24800 
!                                                                                  RAD_ALL.24801 
!                                                                                  RAD_ALL.24802 
!     DUMMY ARGUMENTS.                                                             RAD_ALL.24803 
      INTEGER   !, INTENT(OUT)                                                     RAD_ALL.24804 
     &     IERR                                                                    RAD_ALL.24805 
!             ERROR FLAG                                                           RAD_ALL.24806 
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.24807 
     &     N_PROFILE                                                               RAD_ALL.24808 
!             NUMBER OF PROFILES                                                   RAD_ALL.24809 
     &   , I_LAYER_FIRST                                                           RAD_ALL.24810 
!             FIRST LAYER TO CONSIDER                                              RAD_ALL.24811 
     &   , I_LAYER_LAST                                                            RAD_ALL.24812 
!             LAST LAYER TO CONSIDER                                               RAD_ALL.24813 
     &   , ISOLIR                                                                  RAD_ALL.24814 
!             SPECTRAL REGION                                                      RAD_ALL.24815 
     &   , N_CLOUD_TYPE                                                            RAD_ALL.24816 
!             NUMBER OF TYPES OF CLOUDS                                            RAD_ALL.24817 
     &   , I_2STREAM                                                               RAD_ALL.24818 
!             TWO STREAM SCHEME                                                    RAD_ALL.24819 
     &   , N_SOURCE_COEFF                                                          RAD_ALL.24820 
!             NUMBER OF SOURCE COEFFICIENTS                                        RAD_ALL.24821 
!                                                                                  RAD_ALL.24822 
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.24823 
     &     L_IR_SOURCE_QUAD                                                        RAD_ALL.24824 
!             USE A QUADRATIC SOURCE IN THE INFRA-RED                              RAD_ALL.24825 
!                                                                                  RAD_ALL.24826 
!     OPTICAL PROPERTIES OF LAYER:                                                 RAD_ALL.24827 
      REAL      !, INTENT(IN)                                                      RAD_ALL.24828 
     &     FRAC_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)                      RAD_ALL.24829 
!             FRACTIONS OF DIFFERENT TYPES OF CLOUDS                               RAD_ALL.24830 
     &   , ASYMMETRY_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)                 RAD_ALL.24831 
!             ASYMMETRY FACTOR                                                     RAD_ALL.24832 
     &   , OMEGA_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)                     RAD_ALL.24833 
!             ALBEDO OF SINGLE SCATTERING                                          RAD_ALL.24834 
     &   , TAU_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)                       RAD_ALL.24835 
!             OPTICAL DEPTH                                                        RAD_ALL.24836 
!                                                                                  RAD_ALL.24837 
!     SOLAR BEAM                                                                   RAD_ALL.24838 
      REAL      !, INTENT(IN)                                                      RAD_ALL.24839 
     &     SEC_0(NPD_PROFILE)                                                      RAD_ALL.24840 
!             SECANT OF ZENITH ANGLE                                               RAD_ALL.24841 
!                                                                                  RAD_ALL.24842 
!                                                                                  RAD_ALL.24843 
!     COEFFICIENTS IN THE TWO-STREAM EQUATIONS:                                    RAD_ALL.24844 
      REAL      !, INTENT(OUT)                                                     RAD_ALL.24845 
     &     TRANS_CLOUD(NPD_PROFILE, NPD_LAYER)                                     RAD_ALL.24846 
!             MEAN DIFFUSE TRANSMISSION COEFFICIENT                                RAD_ALL.24847 
     &   , REFLECT_CLOUD(NPD_PROFILE, NPD_LAYER)                                   RAD_ALL.24848 
!             MEAN DIFFUSE REFLECTION COEFFICIENT                                  RAD_ALL.24849 
     &   , TRANS_0_CLOUD(NPD_PROFILE, NPD_LAYER)                                   RAD_ALL.24850 
!             MEAN DIRECT TRANSMISSION COEFFICIENT                                 RAD_ALL.24851 
     &   , SOURCE_COEFF_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_SOURCE_COEFF)            RAD_ALL.24852 
!             MEAN SOURCE COEFFICIENTS IN TWO-STREAM EQUATIONS                     RAD_ALL.24853 
!                                                                                  RAD_ALL.24854 
!     LOCAL VARIABLES.                                                             RAD_ALL.24855 
      INTEGER                                                                      RAD_ALL.24856 
     &     I                                                                       RAD_ALL.24857 
!             LOOP VARIABLE                                                        RAD_ALL.24858 
     &   , J                                                                       RAD_ALL.24859 
!             LOOP VARIABLE                                                        RAD_ALL.24860 
     &   , K                                                                       RAD_ALL.24861 
!             LOOP VARIABLE                                                        RAD_ALL.24862 
     &   , L                                                                       RAD_ALL.24863 
!             LOOP VARIABLE                                                        RAD_ALL.24864 
!                                                                                  RAD_ALL.24865 
!     COEFFICIENTS IN THE TWO-STREAM EQUATIONS:                                    RAD_ALL.24866 
      REAL      !, INTENT(OUT)                                                     RAD_ALL.24867 
     &     TRANS_TEMP(NPD_PROFILE, NPD_LAYER)                                      RAD_ALL.24868 
!             TEMPORARY DIFFUSE TRANSMISSION COEFFICIENT                           RAD_ALL.24869 
     &   , REFLECT_TEMP(NPD_PROFILE, NPD_LAYER)                                    RAD_ALL.24870 
!             TEMPORARY DIFFUSE REFLECTION COEFFICIENT                             RAD_ALL.24871 
     &   , TRANS_0_TEMP(NPD_PROFILE, NPD_LAYER)                                    RAD_ALL.24872 
!             TEMPORARY DIRECT TRANSMISSION COEFFICIENT                            RAD_ALL.24873 
     &   , SOURCE_COEFF_TEMP(NPD_PROFILE, NPD_LAYER, NPD_SOURCE_COEFF)             RAD_ALL.24874 
!             TEMPORARY SOURCE COEFFICIENTS IN TWO-STREAM EQUATIONS                RAD_ALL.24875 
!                                                                                  RAD_ALL.24876 
!     VARIABLES FOR GATHERING:                                                     RAD_ALL.24877 
      INTEGER                                                                      RAD_ALL.24878 
     &     N_LIST                                                                  RAD_ALL.24879 
!             NUMBER OF POINTS IN LIST                                             RAD_ALL.24880 
     &   , L_LIST(NPD_PROFILE)                                                     RAD_ALL.24881 
!             LIST OF COLLECTED POINTS                                             RAD_ALL.24882 
     &   , LL                                                                      RAD_ALL.24883 
!             LOOP VARIABLE                                                        RAD_ALL.24884 
      REAL                                                                         RAD_ALL.24885 
     &     TARGET                                                                  RAD_ALL.24886 
!             TARGET FOR SEARCHING                                                 RAD_ALL.24887 
      REAL                                                                         RAD_ALL.24888 
     &     TAU_GATHERED(NPD_PROFILE, NPD_LAYER)                                    RAD_ALL.24889 
!             GATHERED OPTICAL DEPTH                                               RAD_ALL.24890 
     &   , OMEGA_GATHERED(NPD_PROFILE, NPD_LAYER)                                  RAD_ALL.24891 
!             GATHERED ALEBDO OF SINGLE SCATTERING                                 RAD_ALL.24892 
     &   , ASYMMETRY_GATHERED(NPD_PROFILE, NPD_LAYER)                              RAD_ALL.24893 
!             GATHERED ASYMMETRY                                                   RAD_ALL.24894 
     &   , SEC_0_GATHERED(NPD_PROFILE)                                             RAD_ALL.24895 
!             GATHERED ASYMMETRY                                                   RAD_ALL.24896 
!                                                                                  RAD_ALL.24897 
!     SUBROUTINES CALLED:                                                          RAD_ALL.24898 
      EXTERNAL                                                                     RAD_ALL.24899 
     &     TWO_COEFF                                                               RAD_ALL.24900 
!                                                                                  RAD_ALL.24901 
!     CRAY DIRECTIVES FOR THE WHOLE ROUTINE:                                       RAD_ALL.24902 
!     POINTS ARE NOT REPEATED IN THE INDEXING ARRAY, SO IT IS SAFE                 RAD_ALL.24903 
!     TO VECTORIZE OVER INDIRECTLY ADDRESSED ARRAYS.                               RAD_ALL.24904 
Cfpp$ NODEPCHK R                                                                   RAD_ALL.24905 
!                                                                                  RAD_ALL.24906 
!                                                                                  RAD_ALL.24907 
!                                                                                  RAD_ALL.24908 
!     INITIALIZE THE FULL ARRAYS.                                                  RAD_ALL.24909 
!                                                                                  RAD_ALL.24910 
      DO I=I_LAYER_FIRST, I_LAYER_LAST                                             RAD_ALL.24911 
         DO L=1, N_PROFILE                                                         RAD_ALL.24912 
            TRANS_CLOUD(L, I)=0.0E+00                                              RAD_ALL.24913 
            REFLECT_CLOUD(L, I)=0.0E+00                                            RAD_ALL.24914 
         ENDDO                                                                     RAD_ALL.24915 
      ENDDO                                                                        RAD_ALL.24916 
      DO J=1, N_SOURCE_COEFF                                                       RAD_ALL.24917 
         DO I=I_LAYER_FIRST, I_LAYER_LAST                                          RAD_ALL.24918 
            DO L=1, N_PROFILE                                                      RAD_ALL.24919 
               SOURCE_COEFF_CLOUD(L, I, J)=0.0E+00                                 RAD_ALL.24920 
            ENDDO                                                                  RAD_ALL.24921 
         ENDDO                                                                     RAD_ALL.24922 
      ENDDO                                                                        RAD_ALL.24923 
!                                                                                  RAD_ALL.24924 
      IF (ISOLIR.EQ.IP_SOLAR) THEN                                                 RAD_ALL.24925 
         DO I=I_LAYER_FIRST, I_LAYER_LAST                                          RAD_ALL.24926 
            DO L=1, N_PROFILE                                                      RAD_ALL.24927 
               TRANS_0_CLOUD(L, I)=0.0E+00                                         RAD_ALL.24928 
            ENDDO                                                                  RAD_ALL.24929 
         ENDDO                                                                     RAD_ALL.24930 
      ENDIF                                                                        RAD_ALL.24931 
!                                                                                  RAD_ALL.24932 
!                                                                                  RAD_ALL.24933 
!     CALCULATE THE TRANSMISSION AND REFLECTION COEFFICIENTS FOR                   RAD_ALL.24934 
!     EACH TYPE OF CLOUD AND INCREMENT THE TOTALS, WEIGHTING WITH                  RAD_ALL.24935 
!     THE CLOUD FRACTION.                                                          RAD_ALL.24936 
!                                                                                  RAD_ALL.24937 
      DO K=1, N_CLOUD_TYPE                                                         RAD_ALL.24938 
!                                                                                  RAD_ALL.24939 
!        GATHER POINTS WHERE THERE IS CLOUD OF THE PRESENT TYPE.                   RAD_ALL.24940 
         TARGET=0.0E+00                                                            RAD_ALL.24941 
!                                                                                  RAD_ALL.24942 
         DO I=I_LAYER_FIRST, I_LAYER_LAST                                          RAD_ALL.24943 
!                                                                                  RAD_ALL.24944 
!           DETERMINE WHETHER THIS TYPE OF CLOUD EXISTS IN THIS ROW.               RAD_ALL.24945 
!                                                                                  RAD_ALL.24946 
            N_LIST =0                                                              RAD_ALL.24947 
            DO L   =1,N_PROFILE                                                    RAD_ALL.24948 
              IF (FRAC_CLOUD(L,I,K).GT.TARGET) THEN                                RAD_ALL.24949 
                N_LIST   =N_LIST+1                                                 RAD_ALL.24950 
                L_LIST(N_LIST)=L                                                   RAD_ALL.24951 
              END IF                                                               RAD_ALL.24952 
            END DO                                                                 RAD_ALL.24953 
!                                                                                  RAD_ALL.24954 
            IF (N_LIST.GT.0) THEN                                                  RAD_ALL.24955 
!                                                                                  RAD_ALL.24956 
!              GATHER THE OPTICAL PROPERTIES. THOUGH WE CONSIDER ONLY              RAD_ALL.24957 
!              ONE LAYER AT A TIME THE LOWER ROUTINES WILL OPERATE ON              RAD_ALL.24958 
!              ARRAYS WITH VERTICAL STRUCTURE, SO THE GATHERED ARRAYS              RAD_ALL.24959 
!              ARE TWO-DIMENSIONAL.                                                RAD_ALL.24960 
!                                                                                  RAD_ALL.24961 
               DO L=1, N_LIST                                                      RAD_ALL.24962 
                  TAU_GATHERED(L, I)                                               RAD_ALL.24963 
     &              =TAU_CLOUD(L_LIST(L), I, K)                                    RAD_ALL.24964 
                  OMEGA_GATHERED(L, I)                                             RAD_ALL.24965 
     &              =OMEGA_CLOUD(L_LIST(L), I, K)                                  RAD_ALL.24966 
                  ASYMMETRY_GATHERED(L, I)                                         RAD_ALL.24967 
     &              =ASYMMETRY_CLOUD(L_LIST(L), I, K)                              RAD_ALL.24968 
               ENDDO                                                               RAD_ALL.24969 
               IF (ISOLIR.EQ.IP_SOLAR) THEN                                        RAD_ALL.24970 
                  DO L=1, N_LIST                                                   RAD_ALL.24971 
                     SEC_0_GATHERED(L)=SEC_0(L_LIST(L))                            RAD_ALL.24972 
                  ENDDO                                                            RAD_ALL.24973 
               ENDIF                                                               RAD_ALL.24974 
!                                                                                  RAD_ALL.24975 
!                                                                                  RAD_ALL.24976 
               CALL TWO_COEFF(IERR                                                 RAD_ALL.24977 
     &            , N_LIST, I, I                                                   RAD_ALL.24978 
     &            , I_2STREAM, L_IR_SOURCE_QUAD                                    RAD_ALL.24979 
     &            , ASYMMETRY_GATHERED, OMEGA_GATHERED                             RAD_ALL.24980 
     &            , TAU_GATHERED                                                   RAD_ALL.24981 
     &            , ISOLIR, SEC_0_GATHERED                                         RAD_ALL.24982 
     &            , TRANS_TEMP, REFLECT_TEMP, TRANS_0_TEMP                         RAD_ALL.24983 
     &            , SOURCE_COEFF_TEMP                                              RAD_ALL.24984 
     &            , NPD_PROFILE, NPD_LAYER                                         RAD_ALL.24985 
     &            )                                                                RAD_ALL.24986 
               IF (IERR.NE.I_NORMAL) RETURN                                        RAD_ALL.24987 
!                                                                                  RAD_ALL.24988 
               DO L=1, N_LIST                                                      RAD_ALL.24989 
                  LL=L_LIST(L)                                                     RAD_ALL.24990 
                  TRANS_CLOUD(LL, I)=TRANS_CLOUD(LL, I)                            RAD_ALL.24991 
     &               +FRAC_CLOUD(LL, I, K)*TRANS_TEMP(L, I)                        RAD_ALL.24992 
                  REFLECT_CLOUD(LL, I)=REFLECT_CLOUD(LL, I)                        RAD_ALL.24993 
     &               +FRAC_CLOUD(LL, I, K)*REFLECT_TEMP(L, I)                      RAD_ALL.24994 
               ENDDO                                                               RAD_ALL.24995 
               DO J=1, N_SOURCE_COEFF                                              RAD_ALL.24996 
                  DO L=1, N_LIST                                                   RAD_ALL.24997 
                     LL=L_LIST(L)                                                  RAD_ALL.24998 
                     SOURCE_COEFF_CLOUD(LL, I, J)                                  RAD_ALL.24999 
     &                  =SOURCE_COEFF_CLOUD(LL, I, J)                              RAD_ALL.25000 
     &                  +FRAC_CLOUD(LL, I, K)*SOURCE_COEFF_TEMP(L, I, J)           RAD_ALL.25001 
                  ENDDO                                                            RAD_ALL.25002 
               ENDDO                                                               RAD_ALL.25003 
               IF (ISOLIR.EQ.IP_SOLAR) THEN                                        RAD_ALL.25004 
                  DO L=1, N_LIST                                                   RAD_ALL.25005 
                     LL=L_LIST(L)                                                  RAD_ALL.25006 
                     TRANS_0_CLOUD(LL, I)=TRANS_0_CLOUD(LL, I)                     RAD_ALL.25007 
     &                  +FRAC_CLOUD(LL, I, K)*TRANS_0_TEMP(L, I)                   RAD_ALL.25008 
                  ENDDO                                                            RAD_ALL.25009 
               ENDIF                                                               RAD_ALL.25010 
            ENDIF                                                                  RAD_ALL.25011 
!                                                                                  RAD_ALL.25012 
         ENDDO                                                                     RAD_ALL.25013 
      ENDDO                                                                        RAD_ALL.25014 
!                                                                                  RAD_ALL.25015 
!                                                                                  RAD_ALL.25016 
!                                                                                  RAD_ALL.25017 
      RETURN                                                                       RAD_ALL.25018 
      END     
