C *****************************COPYRIGHT******************************             RAD_ALL.19846 
C (c) CROWN COPYRIGHT 1996, METEOROLOGICAL OFFICE, All Rights Reserved.            RAD_ALL.19847 
C                                                                                  RAD_ALL.19848 
C Use, duplication or disclosure of this code is subject to the                    RAD_ALL.19849 
C restrictions as set forth in the contract.                                       RAD_ALL.19850 
C                                                                                  RAD_ALL.19851 
C                Meteorological Office                                             RAD_ALL.19852 
C                London Road                                                       RAD_ALL.19853 
C                BRACKNELL                                                         RAD_ALL.19854 
C                Berkshire UK                                                      RAD_ALL.19855 
C                RG12 2SZ                                                          RAD_ALL.19856 
C                                                                                  RAD_ALL.19857 
C If no contract has been raised with this copy of the code, the use,              RAD_ALL.19858 
C duplication or disclosure of it is strictly prohibited.  Permission              RAD_ALL.19859 
C to do so must first be obtained in writing from the Head of Numerical            RAD_ALL.19860 
C Modelling at the above address.                                                  RAD_ALL.19861 
C ******************************COPYRIGHT******************************            RAD_ALL.19862 
C                                                                                  RAD_ALL.19863 
!+ Subroutine to solve for mixed fluxes scattering without a matrix.               RAD_ALL.19864 
!                                                                                  RAD_ALL.19865 
! Method:                                                                          RAD_ALL.19866 
!       Gaussian elimination in an upward direction is employed to                 RAD_ALL.19867 
!       determine effective albedos for lower levels of the atmosphere.            RAD_ALL.19868 
!       This allows a downward pass of back-substitution to be carried             RAD_ALL.19869 
!       out to determine the upward and downward fluxes.                           RAD_ALL.19870 
!                                                                                  RAD_ALL.19871 
! Current Owner of Code: J. M. Edwards                                             RAD_ALL.19872 
!                                                                                  RAD_ALL.19873 
! History:                                                                         RAD_ALL.19874 
!       Version         Date                    Comment                            RAD_ALL.19875 
!       4.2             10-04-96                Original Code                      RAD_ALL.19876 
!                                               (J. M. Edwards)                    RAD_ALL.19877 
!                                                                                  RAD_ALL.19878 
! Description of Code:                                                             RAD_ALL.19879 
!   FORTRAN 77  with extensions listed in documentation.                           RAD_ALL.19880 
!                                                                                  RAD_ALL.19881 
!- ---------------------------------------------------------------------           RAD_ALL.19882 
      SUBROUTINE SOLVER_TRIPLE(N_PROFILE, N_LAYER, N_CLOUD_TOP                     RAD_ALL.19883 
     &   , T, R, S_DOWN, S_UP                                                      RAD_ALL.19884 
     &   , T_STRAT, R_STRAT, S_DOWN_STRAT, S_UP_STRAT                              RAD_ALL.19885 
     &   , T_CONV, R_CONV, S_DOWN_CONV, S_UP_CONV                                  RAD_ALL.19886 
     &   , V11, V12, V13, V21, V22, V23, V31, V32, V33                             RAD_ALL.19887 
     &   , U11, U12, U13, U21, U22, U23, U31, U32, U33                             RAD_ALL.19888 
     &   , L_NET                                                                   RAD_ALL.19889 
     &   , FLUX_INC_DOWN                                                           RAD_ALL.19890 
     &   , SOURCE_GROUND_FREE, SOURCE_GROUND_STRAT                                 RAD_ALL.19891 
     &   , SOURCE_GROUND_CONV, ALBEDO_SURFACE_DIFF                                 RAD_ALL.19892 
     &   , FLUX_TOTAL                                                              RAD_ALL.19893 
     &   , NPD_PROFILE, NPD_LAYER                                                  RAD_ALL.19894 
     &   )                                                                         RAD_ALL.19895 
!                                                                                  RAD_ALL.19896 
!                                                                                  RAD_ALL.19897 
      IMPLICIT NONE                                                                RAD_ALL.19898 
!                                                                                  RAD_ALL.19899 
!                                                                                  RAD_ALL.19900 
!     SIZES OF DUMMY ARRAYS.                                                       RAD_ALL.19901 
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.19902 
     &     NPD_PROFILE                                                             RAD_ALL.19903 
!             MAXIMUM NUMBER OF PROFILES                                           RAD_ALL.19904 
     &   , NPD_LAYER                                                               RAD_ALL.19905 
!             MAXIMUM NUMBER OF LAYERS                                             RAD_ALL.19906 
!                                                                                  RAD_ALL.19907 
!                                                                                  RAD_ALL.19908 
!     DUMMY ARGUMENTS.                                                             RAD_ALL.19909 
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.19910 
     &     N_PROFILE                                                               RAD_ALL.19911 
!             NUMBER OF PROFILES                                                   RAD_ALL.19912 
     &   , N_LAYER                                                                 RAD_ALL.19913 
!             NUMBER OF LAYERS                                                     RAD_ALL.19914 
     &   , N_CLOUD_TOP                                                             RAD_ALL.19915 
!             TOPMOST CLOUDY LAYER                                                 RAD_ALL.19916 
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.19917 
     &     L_NET                                                                   RAD_ALL.19918 
!             FLAG FOR CALCULATION OF NET FLUXES                                   RAD_ALL.19919 
      REAL      !, INTENT(IN)                                                      RAD_ALL.19920 
     &     T(NPD_PROFILE, NPD_LAYER)                                               RAD_ALL.19921 
!             CLEAR-SKY TRANSMISSION                                               RAD_ALL.19922 
     &   , R(NPD_PROFILE, NPD_LAYER)                                               RAD_ALL.19923 
!             CLEAR-SKY REFLECTION                                                 RAD_ALL.19924 
     &   , S_DOWN(NPD_PROFILE, NPD_LAYER)                                          RAD_ALL.19925 
!             CLEAR-SKY DOWNWARD SOURCE FUNCTION                                   RAD_ALL.19926 
     &   , S_UP(NPD_PROFILE, NPD_LAYER)                                            RAD_ALL.19927 
!             CLEAR-SKY UPWARD SOURCE FUNCTION                                     RAD_ALL.19928 
     &   , T_STRAT(NPD_PROFILE, NPD_LAYER)                                         RAD_ALL.19929 
!             STRATFIFORM TRANSMISSION                                             RAD_ALL.19930 
     &   , R_STRAT(NPD_PROFILE, NPD_LAYER)                                         RAD_ALL.19931 
!             STRATFIFORM REFLECTION                                               RAD_ALL.19932 
     &   , S_DOWN_STRAT(NPD_PROFILE, NPD_LAYER)                                    RAD_ALL.19933 
!             DOWNWARD STRATFIFORM SOURCE FUNCTION                                 RAD_ALL.19934 
     &   , S_UP_STRAT(NPD_PROFILE, NPD_LAYER)                                      RAD_ALL.19935 
!             UPWARD STRATFIFORM SOURCE FUNCTION                                   RAD_ALL.19936 
     &   , T_CONV(NPD_PROFILE, NPD_LAYER)                                          RAD_ALL.19937 
!             CONVECTIVE TRANSMISSION                                              RAD_ALL.19938 
     &   , R_CONV(NPD_PROFILE, NPD_LAYER)                                          RAD_ALL.19939 
!             CONVECTIVE REFLECTION                                                RAD_ALL.19940 
     &   , S_DOWN_CONV(NPD_PROFILE, NPD_LAYER)                                     RAD_ALL.19941 
!             DOWNWARD CONVECTIVE SOURCE FUNCTION                                  RAD_ALL.19942 
     &   , S_UP_CONV(NPD_PROFILE, NPD_LAYER)                                       RAD_ALL.19943 
!             UPWARD CONVECTIVE SOURCE FUNCTION                                    RAD_ALL.19944 
      REAL      !, INTENT(IN)                                                      RAD_ALL.19945 
     &     V11(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19946 
!             ENERGY TRANSFER COEFFICIENT FOR DOWNWARD RADIATION                   RAD_ALL.19947 
     &   , V12(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19948 
!             ENERGY TRANSFER COEFFICIENT FOR DOWNWARD RADIATION                   RAD_ALL.19949 
     &   , V13(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19950 
!             ENERGY TRANSFER COEFFICIENT FOR DOWNWARD RADIATION                   RAD_ALL.19951 
     &   , V21(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19952 
!             ENERGY TRANSFER COEFFICIENT FOR DOWNWARD RADIATION                   RAD_ALL.19953 
     &   , V22(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19954 
!             ENERGY TRANSFER COEFFICIENT FOR DOWNWARD RADIATION                   RAD_ALL.19955 
     &   , V23(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19956 
!             ENERGY TRANSFER COEFFICIENT FOR DOWNWARD RADIATION                   RAD_ALL.19957 
     &   , V31(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19958 
!             ENERGY TRANSFER COEFFICIENT FOR DOWNWARD RADIATION                   RAD_ALL.19959 
     &   , V32(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19960 
!             ENERGY TRANSFER COEFFICIENT FOR DOWNWARD RADIATION                   RAD_ALL.19961 
     &   , V33(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19962 
!             ENERGY TRANSFER COEFFICIENT FOR DOWNWARD RADIATION                   RAD_ALL.19963 
      REAL                                                                         RAD_ALL.19964 
     &     U11(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19965 
!             ENERGY TRANSFER COEFFICIENT FOR UPWARD RADIATION                     RAD_ALL.19966 
     &   , U12(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19967 
!             ENERGY TRANSFER COEFFICIENT FOR UPWARD RADIATION                     RAD_ALL.19968 
     &   , U13(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19969 
!             ENERGY TRANSFER COEFFICIENT FOR UPWARD RADIATION                     RAD_ALL.19970 
     &   , U21(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19971 
!             ENERGY TRANSFER COEFFICIENT FOR UPWARD RADIATION                     RAD_ALL.19972 
     &   , U22(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19973 
!             ENERGY TRANSFER COEFFICIENT FOR UPWARD RADIATION                     RAD_ALL.19974 
     &   , U23(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19975 
!             ENERGY TRANSFER COEFFICIENT FOR UPWARD RADIATION                     RAD_ALL.19976 
     &   , U31(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19977 
!             ENERGY TRANSFER COEFFICIENT FOR UPWARD RADIATION                     RAD_ALL.19978 
     &   , U32(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19979 
!             ENERGY TRANSFER COEFFICIENT FOR UPWARD RADIATION                     RAD_ALL.19980 
     &   , U33(NPD_PROFILE, 0: NPD_LAYER)                                          RAD_ALL.19981 
!             ENERGY TRANSFER COEFFICIENT FOR UPWARD RADIATION                     RAD_ALL.19982 
      REAL      !, INTENT(IN)                                                      RAD_ALL.19983 
     &     FLUX_INC_DOWN(NPD_PROFILE)                                              RAD_ALL.19984 
!             INCIDENT FLUX                                                        RAD_ALL.19985 
     &   , SOURCE_GROUND_FREE(NPD_PROFILE)                                         RAD_ALL.19986 
!             SOURCE FROM GROUND (CLEAR SKY)                                       RAD_ALL.19987 
     &   , SOURCE_GROUND_STRAT(NPD_PROFILE)                                        RAD_ALL.19988 
!             SOURCE FROM GROUND (CLOUDY REGION)                                   RAD_ALL.19989 
     &   , SOURCE_GROUND_CONV(NPD_PROFILE)                                         RAD_ALL.19990 
!             SOURCE FROM GROUND (CLOUDY REGION)                                   RAD_ALL.19991 
     &   , ALBEDO_SURFACE_DIFF(NPD_PROFILE)                                        RAD_ALL.19992 
!             DIFFUSE ALBEDO                                                       RAD_ALL.19993 
      REAL      !, INTENT(OUT)                                                     RAD_ALL.19994 
     &     FLUX_TOTAL(NPD_PROFILE, 2*NPD_LAYER+2)                                  RAD_ALL.19995 
!             TOTAL FLUX                                                           RAD_ALL.19996 
!                                                                                  RAD_ALL.19997 
!     LOCAL VARIABLES.                                                             RAD_ALL.19998 
      INTEGER                                                                      RAD_ALL.19999 
     &     I                                                                       RAD_ALL.20000 
!             LOOP VARIABLE                                                        RAD_ALL.20001 
     &   , L                                                                       RAD_ALL.20002 
!             LOOP VARIABLE                                                        RAD_ALL.20003 
!                                                                                  RAD_ALL.20004 
!     EFFECTIVE COUPLING ALBEDOS AND SOURCE FUNCTIONS:                             RAD_ALL.20005 
      REAL                                                                         RAD_ALL.20006 
     &     ALPHA11(NPD_PROFILE, NPD_LAYER+1)                                       RAD_ALL.20007 
     &   , ALPHA12(NPD_PROFILE, NPD_LAYER+1)                                       RAD_ALL.20008 
     &   , ALPHA13(NPD_PROFILE, NPD_LAYER+1)                                       RAD_ALL.20009 
     &   , ALPHA21(NPD_PROFILE, NPD_LAYER+1)                                       RAD_ALL.20010 
     &   , ALPHA22(NPD_PROFILE, NPD_LAYER+1)                                       RAD_ALL.20011 
     &   , ALPHA23(NPD_PROFILE, NPD_LAYER+1)                                       RAD_ALL.20012 
     &   , ALPHA31(NPD_PROFILE, NPD_LAYER+1)                                       RAD_ALL.20013 
     &   , ALPHA32(NPD_PROFILE, NPD_LAYER+1)                                       RAD_ALL.20014 
     &   , ALPHA33(NPD_PROFILE, NPD_LAYER+1)                                       RAD_ALL.20015 
     &   , G1(NPD_PROFILE, NPD_LAYER+1)                                            RAD_ALL.20016 
     &   , G2(NPD_PROFILE, NPD_LAYER+1)                                            RAD_ALL.20017 
     &   , G3(NPD_PROFILE, NPD_LAYER+1)                                            RAD_ALL.20018 
!     TERMS FOR DOWNWARD PROPAGATION:                                              RAD_ALL.20019 
      REAL                                                                         RAD_ALL.20020 
     &     GAMMA11(NPD_PROFILE, NPD_LAYER)                                         RAD_ALL.20021 
     &   , GAMMA12(NPD_PROFILE, NPD_LAYER)                                         RAD_ALL.20022 
     &   , GAMMA13(NPD_PROFILE, NPD_LAYER)                                         RAD_ALL.20023 
     &   , GAMMA21(NPD_PROFILE, NPD_LAYER)                                         RAD_ALL.20024 
     &   , GAMMA22(NPD_PROFILE, NPD_LAYER)                                         RAD_ALL.20025 
     &   , GAMMA23(NPD_PROFILE, NPD_LAYER)                                         RAD_ALL.20026 
     &   , GAMMA31(NPD_PROFILE, NPD_LAYER)                                         RAD_ALL.20027 
     &   , GAMMA32(NPD_PROFILE, NPD_LAYER)                                         RAD_ALL.20028 
     &   , GAMMA33(NPD_PROFILE, NPD_LAYER)                                         RAD_ALL.20029 
     &   , BETA11_INV(NPD_PROFILE, NPD_LAYER)                                      RAD_ALL.20030 
     &   , BETA21(NPD_PROFILE, NPD_LAYER)                                          RAD_ALL.20031 
     &   , BETA22_INV(NPD_PROFILE, NPD_LAYER)                                      RAD_ALL.20032 
     &   , BETA31(NPD_PROFILE, NPD_LAYER)                                          RAD_ALL.20033 
     &   , BETA32(NPD_PROFILE, NPD_LAYER)                                          RAD_ALL.20034 
     &   , BETA33_INV(NPD_PROFILE, NPD_LAYER)                                      RAD_ALL.20035 
     &   , H1(NPD_PROFILE, NPD_LAYER)                                              RAD_ALL.20036 
     &   , H2(NPD_PROFILE, NPD_LAYER)                                              RAD_ALL.20037 
     &   , H3(NPD_PROFILE, NPD_LAYER)                                              RAD_ALL.20038 
!                                                                                  RAD_ALL.20039 
!     AUXILAIRY NUMERICAL VARIABLES REQUIRED ONLY IN THE CURRENT LAYER:            RAD_ALL.20040 
      REAL                                                                         RAD_ALL.20041 
     &     THETA11                                                                 RAD_ALL.20042 
     &   , THETA12                                                                 RAD_ALL.20043 
     &   , THETA13                                                                 RAD_ALL.20044 
     &   , THETA21                                                                 RAD_ALL.20045 
     &   , THETA22                                                                 RAD_ALL.20046 
     &   , THETA23                                                                 RAD_ALL.20047 
     &   , THETA31                                                                 RAD_ALL.20048 
     &   , THETA32                                                                 RAD_ALL.20049 
     &   , THETA33                                                                 RAD_ALL.20050 
     &   , LAMBDA3                                                                 RAD_ALL.20051 
     &   , LAMBDA2                                                                 RAD_ALL.20052 
     &   , LAMBDA1                                                                 RAD_ALL.20053 
     &   , LAMBDA                                                                  RAD_ALL.20054 
!                                                                                  RAD_ALL.20055 
!     TEMPORARY FLUXES                                                             RAD_ALL.20056 
      REAL                                                                         RAD_ALL.20057 
     &     FLUX_DOWN_1(NPD_PROFILE, 0: NPD_LAYER)                                  RAD_ALL.20058 
!             DOWNWARD FLUXES OUTSIDE CLOUDS JUST BELOW I'TH LEVEL                 RAD_ALL.20059 
     &   , FLUX_DOWN_2(NPD_PROFILE, 0: NPD_LAYER)                                  RAD_ALL.20060 
!             DOWNWARD FLUXES INSIDE CLOUDS JUST BELOW I'TH LEVEL                  RAD_ALL.20061 
     &   , FLUX_DOWN_3(NPD_PROFILE, 0: NPD_LAYER)                                  RAD_ALL.20062 
!             DOWNWARD FLUXES INSIDE CLOUDS JUST BELOW I'TH LEVEL                  RAD_ALL.20063 
     &   , FLUX_UP_1(NPD_PROFILE, 0: NPD_LAYER)                                    RAD_ALL.20064 
!             UPWARD FLUXES OUTSIDE CLOUDS JUST ABOVE I'TH LEVEL                   RAD_ALL.20065 
     &   , FLUX_UP_2(NPD_PROFILE, 0: NPD_LAYER)                                    RAD_ALL.20066 
!             UPWARD FLUXES INSIDE CLOUDS JUST ABOVE I'TH LEVEL                    RAD_ALL.20067 
     &   , FLUX_UP_3(NPD_PROFILE, 0: NPD_LAYER)                                    RAD_ALL.20068 
!             UPWARD FLUXES INSIDE CLOUDS JUST ABOVE I'TH LEVEL                    RAD_ALL.20069 
!                                                                                  RAD_ALL.20070 
!                                                                                  RAD_ALL.20071 
!                                                                                  RAD_ALL.20072 
!     THIS ROUTINE IS SPECIFIC TO CASES OF THREE REGIONS AND IT IS                 RAD_ALL.20073 
!     ASSUMED THAT 1 REPRESENTS CLEAR SKIES, 2 REPRESENTS STARTIFORM               RAD_ALL.20074 
!     CLOUDS AND 3 REPRESENTS CONVECTIVE CLOUD.                                    RAD_ALL.20075 
!                                                                                  RAD_ALL.20076 
!     INITIALIZE AT THE BOTTOM OF THE COLUMN FOR UPWARD ELIMINATION.               RAD_ALL.20077 
      DO L=1, N_PROFILE                                                            RAD_ALL.20078 
         ALPHA11(L, N_LAYER+1)=ALBEDO_SURFACE_DIFF(L)                              RAD_ALL.20079 
         ALPHA12(L, N_LAYER+1)=0.0E+00                                             RAD_ALL.20080 
         ALPHA13(L, N_LAYER+1)=0.0E+00                                             RAD_ALL.20081 
         ALPHA21(L, N_LAYER+1)=0.0E+00                                             RAD_ALL.20082 
         ALPHA22(L, N_LAYER+1)=ALBEDO_SURFACE_DIFF(L)                              RAD_ALL.20083 
         ALPHA23(L, N_LAYER+1)=0.0E+00                                             RAD_ALL.20084 
         ALPHA31(L, N_LAYER+1)=0.0E+00                                             RAD_ALL.20085 
         ALPHA32(L, N_LAYER+1)=0.0E+00                                             RAD_ALL.20086 
         ALPHA33(L, N_LAYER+1)=ALBEDO_SURFACE_DIFF(L)                              RAD_ALL.20087 
         G1(L, N_LAYER+1)=SOURCE_GROUND_FREE(L)                                    RAD_ALL.20088 
         G2(L, N_LAYER+1)=SOURCE_GROUND_STRAT(L)                                   RAD_ALL.20089 
         G3(L, N_LAYER+1)=SOURCE_GROUND_CONV(L)                                    RAD_ALL.20090 
      ENDDO                                                                        RAD_ALL.20091 
!                                                                                  RAD_ALL.20092 
!     UPWARD ELIMINATION THROUGH THE CLOUDY LAYERS.                                RAD_ALL.20093 
      DO I=N_LAYER, N_CLOUD_TOP, -1                                                RAD_ALL.20094 
         DO L=1, N_PROFILE                                                         RAD_ALL.20095 
!                                                                                  RAD_ALL.20096 
            THETA11=ALPHA11(L, I+1)*V11(L, I)+ALPHA12(L, I+1)*V21(L, I)            RAD_ALL.20097 
     &         +ALPHA13(L, I+1)*V31(L, I)                                          RAD_ALL.20098 
            THETA12=ALPHA11(L, I+1)*V12(L, I)+ALPHA12(L, I+1)*V22(L, I)            RAD_ALL.20099 
     &         +ALPHA13(L, I+1)*V32(L, I)                                          RAD_ALL.20100 
            THETA13=ALPHA11(L, I+1)*V13(L, I)+ALPHA12(L, I+1)*V23(L, I)            RAD_ALL.20101 
     &         +ALPHA13(L, I+1)*V33(L, I)                                          RAD_ALL.20102 
            THETA21=ALPHA21(L, I+1)*V11(L, I)+ALPHA22(L, I+1)*V21(L, I)            RAD_ALL.20103 
     &         +ALPHA23(L, I+1)*V31(L, I)                                          RAD_ALL.20104 
            THETA22=ALPHA21(L, I+1)*V12(L, I)+ALPHA22(L, I+1)*V22(L, I)            RAD_ALL.20105 
     &         +ALPHA23(L, I+1)*V32(L, I)                                          RAD_ALL.20106 
            THETA23=ALPHA21(L, I+1)*V13(L, I)+ALPHA22(L, I+1)*V23(L, I)            RAD_ALL.20107 
     &         +ALPHA23(L, I+1)*V33(L, I)                                          RAD_ALL.20108 
            THETA31=ALPHA31(L, I+1)*V11(L, I)+ALPHA32(L, I+1)*V21(L, I)            RAD_ALL.20109 
     &         +ALPHA33(L, I+1)*V31(L, I)                                          RAD_ALL.20110 
            THETA32=ALPHA31(L, I+1)*V12(L, I)+ALPHA32(L, I+1)*V22(L, I)            RAD_ALL.20111 
     &         +ALPHA33(L, I+1)*V32(L, I)                                          RAD_ALL.20112 
            THETA33=ALPHA31(L, I+1)*V13(L, I)+ALPHA32(L, I+1)*V23(L, I)            RAD_ALL.20113 
     &         +ALPHA33(L, I+1)*V33(L, I)                                          RAD_ALL.20114 
                                                                                   RAD_ALL.20115 
            BETA31(L, I)=-THETA31*R(L, I)                                          RAD_ALL.20116 
            BETA32(L, I)=-THETA32*R_STRAT(L, I)                                    RAD_ALL.20117 
            BETA33_INV(L, I)=1.0E+00/(1.0E+00-THETA33*R_CONV(L, I))                RAD_ALL.20118 
            GAMMA31(L, I)=THETA31*T(L, I)                                          RAD_ALL.20119 
            GAMMA32(L, I)=THETA32*T_STRAT(L, I)                                    RAD_ALL.20120 
            GAMMA33(L, I)=THETA33*T_CONV(L, I)                                     RAD_ALL.20121 
            H3(L, I)=G3(L, I+1)+THETA31*S_DOWN(L, I)                               RAD_ALL.20122 
     &         +THETA32*S_DOWN_STRAT(L, I)                                         RAD_ALL.20123 
     &         +THETA33*S_DOWN_CONV(L, I)                                          RAD_ALL.20124 
!                                                                                  RAD_ALL.20125 
            LAMBDA3=THETA23*R_CONV(L, I)*BETA33_INV(L, I)                          RAD_ALL.20126 
            BETA22_INV(L, I)=1.0E+00                                               RAD_ALL.20127 
     &         /(1.0E+00-THETA22*R_STRAT(L, I)+LAMBDA3*BETA32(L, I))               RAD_ALL.20128 
            BETA21(L, I)=-THETA21*R(L, I)+LAMBDA3*BETA31(L, I)                     RAD_ALL.20129 
            GAMMA21(L, I)=THETA21*T(L, I)+LAMBDA3*GAMMA31(L, I)                    RAD_ALL.20130 
            GAMMA22(L, I)=THETA22*T_STRAT(L, I)+LAMBDA3*GAMMA32(L, I)              RAD_ALL.20131 
            GAMMA23(L, I)=THETA23*T_CONV(L, I)+LAMBDA3*GAMMA33(L, I)               RAD_ALL.20132 
            H2(L, I)=G2(L, I+1)+THETA21*S_DOWN(L, I)                               RAD_ALL.20133 
     &         +THETA22*S_DOWN_STRAT(L, I)+THETA23*S_DOWN_CONV(L, I)               RAD_ALL.20134 
     &         +LAMBDA3*H3(L, I)                                                   RAD_ALL.20135 
!                                                                                  RAD_ALL.20136 
            LAMBDA3=THETA13*R_CONV(L, I)*BETA33_INV(L, I)                          RAD_ALL.20137 
            LAMBDA2=(THETA12*R_STRAT(L, I)-LAMBDA3*BETA32(L, I))                   RAD_ALL.20138 
     &         *BETA22_INV(L, I)                                                   RAD_ALL.20139 
            BETA11_INV(L, I)=1.0E+00                                               RAD_ALL.20140 
     &         /(1.0E+00-THETA11*R(L, I)+LAMBDA3*BETA31(L, I)                      RAD_ALL.20141 
     &         +LAMBDA2*BETA21(L, I))                                              RAD_ALL.20142 
            GAMMA11(L, I)=THETA11*T(L, I)+LAMBDA3*GAMMA31(L, I)                    RAD_ALL.20143 
     &         +LAMBDA2*GAMMA21(L, I)                                              RAD_ALL.20144 
            GAMMA12(L, I)=THETA12*T_STRAT(L, I)+LAMBDA3*GAMMA32(L, I)              RAD_ALL.20145 
     &         +LAMBDA2*GAMMA22(L, I)                                              RAD_ALL.20146 
            GAMMA13(L, I)=THETA13*T_CONV(L, I)+LAMBDA3*GAMMA33(L, I)               RAD_ALL.20147 
     &         +LAMBDA2*GAMMA23(L, I)                                              RAD_ALL.20148 
            H1(L, I)=G1(L, I+1)+THETA11*S_DOWN(L, I)                               RAD_ALL.20149 
     &         +THETA12*S_DOWN_STRAT(L, I)+THETA13*S_DOWN_CONV(L, I)               RAD_ALL.20150 
     &         +LAMBDA3*H3(L, I)+LAMBDA2*H2(L, I)                                  RAD_ALL.20151 
                                                                                   RAD_ALL.20152 
!                                                                                  RAD_ALL.20153 
            LAMBDA3=U33(L, I-1)*T_CONV(L, I)*BETA33_INV(L, I)                      RAD_ALL.20154 
            LAMBDA2=(U32(L, I-1)*T_STRAT(L, I)+LAMBDA3*BETA32(L, I))               RAD_ALL.20155 
     &         *BETA22_INV(L, I)                                                   RAD_ALL.20156 
            LAMBDA1=(U31(L, I-1)*T(L, I)+LAMBDA3*BETA31(L, I)                      RAD_ALL.20157 
     &         +LAMBDA2*BETA21(L, I))*BETA11_INV(L, I)                             RAD_ALL.20158 
            ALPHA31(L, I)=U31(L, I-1)*R(L, I)+LAMBDA3*GAMMA31(L, I)                RAD_ALL.20159 
     &         +LAMBDA2*GAMMA21(L, I)+LAMBDA1*GAMMA11(L, I)                        RAD_ALL.20160 
            ALPHA32(L, I)=U32(L, I-1)*R_STRAT(L, I)                                RAD_ALL.20161 
     &         +LAMBDA3*GAMMA32(L, I)+LAMBDA2*GAMMA22(L, I)                        RAD_ALL.20162 
     &         +LAMBDA1*GAMMA12(L, I)                                              RAD_ALL.20163 
            ALPHA33(L, I)=U33(L, I-1)*R_CONV(L, I)                                 RAD_ALL.20164 
     &         +LAMBDA3*GAMMA33(L, I)+LAMBDA2*GAMMA23(L, I)                        RAD_ALL.20165 
     &         +LAMBDA1*GAMMA13(L, I)                                              RAD_ALL.20166 
            G3(L, I)=U31(L, I-1)*S_UP(L, I)+U32(L, I-1)*S_UP_STRAT(L, I)           RAD_ALL.20167 
     &         +U33(L, I-1)*S_UP_CONV(L, I)                                        RAD_ALL.20168 
     &         +LAMBDA3*H3(L, I)+LAMBDA2*H2(L, I)+LAMBDA1*H1(L, I)                 RAD_ALL.20169 
!                                                                                  RAD_ALL.20170 
            LAMBDA3=U23(L, I-1)*T_CONV(L, I)*BETA33_INV(L, I)                      RAD_ALL.20171 
            LAMBDA2=(U22(L, I-1)*T_STRAT(L, I)+LAMBDA3*BETA32(L, I))               RAD_ALL.20172 
     &         *BETA22_INV(L, I)                                                   RAD_ALL.20173 
            LAMBDA1=(U21(L, I-1)*T(L, I)+LAMBDA3*BETA31(L, I)                      RAD_ALL.20174 
     &         +LAMBDA2*BETA21(L, I))*BETA11_INV(L, I)                             RAD_ALL.20175 
            ALPHA21(L, I)=U21(L, I-1)*R(L, I)+LAMBDA3*GAMMA31(L, I)                RAD_ALL.20176 
     &         +LAMBDA2*GAMMA21(L, I)+LAMBDA1*GAMMA11(L, I)                        RAD_ALL.20177 
            ALPHA22(L, I)=U22(L, I-1)*R_STRAT(L, I)                                RAD_ALL.20178 
     &         +LAMBDA3*GAMMA32(L, I)+LAMBDA2*GAMMA22(L, I)                        RAD_ALL.20179 
     &         +LAMBDA1*GAMMA12(L, I)                                              RAD_ALL.20180 
            ALPHA23(L, I)=U23(L, I-1)*R_CONV(L, I)                                 RAD_ALL.20181 
     &         +LAMBDA3*GAMMA33(L, I)+LAMBDA2*GAMMA23(L, I)                        RAD_ALL.20182 
     &         +LAMBDA1*GAMMA13(L, I)                                              RAD_ALL.20183 
            G2(L, I)=U21(L, I-1)*S_UP(L, I)+U22(L, I-1)*S_UP_STRAT(L, I)           RAD_ALL.20184 
     &         +U23(L, I-1)*S_UP_CONV(L, I)                                        RAD_ALL.20185 
     &         +LAMBDA3*H3(L, I)+LAMBDA2*H2(L, I)+LAMBDA1*H1(L, I)                 RAD_ALL.20186 
!                                                                                  RAD_ALL.20187 
            LAMBDA3=U13(L, I-1)*T_CONV(L, I)*BETA33_INV(L, I)                      RAD_ALL.20188 
            LAMBDA2=(U12(L, I-1)*T_STRAT(L, I)+LAMBDA3*BETA32(L, I))               RAD_ALL.20189 
     &         *BETA22_INV(L, I)                                                   RAD_ALL.20190 
            LAMBDA1=(U11(L, I-1)*T(L, I)+LAMBDA3*BETA31(L, I)                      RAD_ALL.20191 
     &         +LAMBDA2*BETA21(L, I))*BETA11_INV(L, I)                             RAD_ALL.20192 
            ALPHA11(L, I)=U11(L, I-1)*R(L, I)+LAMBDA3*GAMMA31(L, I)                RAD_ALL.20193 
     &         +LAMBDA2*GAMMA21(L, I)+LAMBDA1*GAMMA11(L, I)                        RAD_ALL.20194 
            ALPHA12(L, I)=U12(L, I-1)*R_STRAT(L, I)                                RAD_ALL.20195 
     &         +LAMBDA3*GAMMA32(L, I)+LAMBDA2*GAMMA22(L, I)                        RAD_ALL.20196 
     &         +LAMBDA1*GAMMA12(L, I)                                              RAD_ALL.20197 
            ALPHA13(L, I)=U13(L, I-1)*R_CONV(L, I)                                 RAD_ALL.20198 
     &         +LAMBDA3*GAMMA33(L, I)+LAMBDA2*GAMMA23(L, I)                        RAD_ALL.20199 
     &         +LAMBDA1*GAMMA13(L, I)                                              RAD_ALL.20200 
            G1(L, I)=U11(L, I-1)*S_UP(L, I)+U12(L, I-1)*S_UP_STRAT(L, I)           RAD_ALL.20201 
     &         +U13(L, I-1)*S_UP_CONV(L, I)                                        RAD_ALL.20202 
     &         +LAMBDA3*H3(L, I)+LAMBDA2*H2(L, I)+LAMBDA1*H1(L, I)                 RAD_ALL.20203 
!                                                                                  RAD_ALL.20204 
         ENDDO                                                                     RAD_ALL.20205 
      ENDDO                                                                        RAD_ALL.20206 
!                                                                                  RAD_ALL.20207 
!     THE LAYER ABOVE THE CLOUD: ONLY ONE SET OF ALPHAS IS NOW NEEDED.             RAD_ALL.20208 
!                                                                                  RAD_ALL.20209 
      I=N_CLOUD_TOP-1                                                              RAD_ALL.20210 
      DO L=1, N_PROFILE                                                            RAD_ALL.20211 
!                                                                                  RAD_ALL.20212 
         IF (N_CLOUD_TOP.LT.N_LAYER) THEN                                          RAD_ALL.20213 
!           IF THERE IS NO CLOUD IN THE COLUMN THE V'S WILL NOT BE                 RAD_ALL.20214 
!           ASSIGNED SO AN IF TEST IS REQUIRED.                                    RAD_ALL.20215 
            THETA11=ALPHA11(L, I+1)*V11(L, I)+ALPHA12(L, I+1)*V21(L, I)            RAD_ALL.20216 
     &         +ALPHA13(L, I+1)*V31(L, I)                                          RAD_ALL.20217 
         ELSE                                                                      RAD_ALL.20218 
            THETA11=ALPHA11(L, I+1)                                                RAD_ALL.20219 
         ENDIF                                                                     RAD_ALL.20220 
!                                                                                  RAD_ALL.20221 
         BETA11_INV(L, I)=1.0E+00/(1.0E+00-THETA11*R(L, I))                        RAD_ALL.20222 
         GAMMA11(L, I)=THETA11*T(L, I)                                             RAD_ALL.20223 
         H1(L, I)=G1(L, I+1)+THETA11*S_DOWN(L, I)                                  RAD_ALL.20224 
!                                                                                  RAD_ALL.20225 
         LAMBDA=T(L, I)*BETA11_INV(L, I)                                           RAD_ALL.20226 
         ALPHA11(L, I)=R(L, I)+LAMBDA*GAMMA11(L, I)                                RAD_ALL.20227 
         G1(L, I)=S_UP(L, I)+LAMBDA*H1(L, I)                                       RAD_ALL.20228 
!                                                                                  RAD_ALL.20229 
      ENDDO                                                                        RAD_ALL.20230 
!                                                                                  RAD_ALL.20231 
      DO I=N_CLOUD_TOP-2, 1, -1                                                    RAD_ALL.20232 
         DO L=1, N_PROFILE                                                         RAD_ALL.20233 
!                                                                                  RAD_ALL.20234 
            BETA11_INV(L, I)=1.0E+00/(1.0E+00-ALPHA11(L, I+1)*R(L, I))             RAD_ALL.20235 
            GAMMA11(L, I)=ALPHA11(L, I+1)*T(L, I)                                  RAD_ALL.20236 
            H1(L, I)=G1(L, I+1)+ALPHA11(L, I+1)*S_DOWN(L, I)                       RAD_ALL.20237 
!                                                                                  RAD_ALL.20238 
            LAMBDA1=T(L, I)*BETA11_INV(L, I)                                       RAD_ALL.20239 
            ALPHA11(L, I)=R(L, I)+LAMBDA1*GAMMA11(L, I)                            RAD_ALL.20240 
            G1(L, I)=S_UP(L, I)+LAMBDA1*H1(L, I)                                   RAD_ALL.20241 
!                                                                                  RAD_ALL.20242 
         ENDDO                                                                     RAD_ALL.20243 
      ENDDO                                                                        RAD_ALL.20244 
!                                                                                  RAD_ALL.20245 
!                                                                                  RAD_ALL.20246 
!     INITIALIZE FOR DOWNWARD BACK-SUBSTITUTION.                                   RAD_ALL.20247 
      DO L=1, N_PROFILE                                                            RAD_ALL.20248 
         FLUX_TOTAL(L, 2)=FLUX_INC_DOWN(L)                                         RAD_ALL.20249 
         FLUX_TOTAL(L, 1)=ALPHA11(L, 1)*FLUX_TOTAL(L, 2)+G1(L, 1)                  RAD_ALL.20250 
      ENDDO                                                                        RAD_ALL.20251 
!                                                                                  RAD_ALL.20252 
!     SWEEP DOWNWARD THROUGH THE CLEAR-SKY REGION, FINDING THE DOWNWARD            RAD_ALL.20253 
!     FLUX AT THE TOP OF THE LAYER AND THE UPWARD FLUX AT THE BOTTOM.              RAD_ALL.20254 
      DO I=1, N_CLOUD_TOP-1                                                        RAD_ALL.20255 
         DO L=1, N_PROFILE                                                         RAD_ALL.20256 
            FLUX_TOTAL(L, 2*I+1)=(GAMMA11(L, I)*FLUX_TOTAL(L, 2*I)                 RAD_ALL.20257 
     &         +H1(L, I))*BETA11_INV(L, I)                                         RAD_ALL.20258 
            FLUX_TOTAL(L, 2*I+2)=T(L, I)*FLUX_TOTAL(L, 2*I)                        RAD_ALL.20259 
     &         +R(L, I)*FLUX_TOTAL(L, 2*I+1)+S_DOWN(L, I)                          RAD_ALL.20260 
         ENDDO                                                                     RAD_ALL.20261 
      ENDDO                                                                        RAD_ALL.20262 
!                                                                                  RAD_ALL.20263 
!     PASS INTO THE TOP CLOUDY LAYER. USE FLUX_DOWN_[1,2,3] TO HOLD,               RAD_ALL.20264 
!     PROVISIONALLY, THE DOWNWARD FLUXES JUST BELOW THE TOP OF THE                 RAD_ALL.20265 
!     LAYER, THEN CALCULATE THE UPWARD FLUXES AT THE BOTTOM AND                    RAD_ALL.20266 
!     FINALLY THE DOWNWARD FLUXES AT THE BOTTOM OF THE LAYER.                      RAD_ALL.20267 
      I=N_CLOUD_TOP                                                                RAD_ALL.20268 
      DO L=1, N_PROFILE                                                            RAD_ALL.20269 
         FLUX_DOWN_1(L, I)=V11(L, I-1)*FLUX_TOTAL(L, 2*I)                          RAD_ALL.20270 
         FLUX_DOWN_2(L, I)=V21(L, I-1)*FLUX_TOTAL(L, 2*I)                          RAD_ALL.20271 
         FLUX_DOWN_3(L, I)=V31(L, I-1)*FLUX_TOTAL(L, 2*I)                          RAD_ALL.20272 
         FLUX_UP_1(L, I)=(GAMMA11(L, I)*FLUX_DOWN_1(L, I)                          RAD_ALL.20273 
     &      +GAMMA12(L, I)*FLUX_DOWN_2(L, I)                                       RAD_ALL.20274 
     &      +GAMMA13(L, I)*FLUX_DOWN_3(L, I)                                       RAD_ALL.20275 
     &      +H1(L, I))*BETA11_INV(L, I)                                            RAD_ALL.20276 
         FLUX_UP_2(L, I)=(GAMMA21(L, I)*FLUX_DOWN_1(L, I)                          RAD_ALL.20277 
     &      +GAMMA22(L, I)*FLUX_DOWN_2(L, I)                                       RAD_ALL.20278 
     &      +GAMMA23(L, I)*FLUX_DOWN_3(L, I)+H2(L, I)                              RAD_ALL.20279 
     &      -BETA21(L, I)*FLUX_UP_1(L, I))*BETA22_INV(L, I)                        RAD_ALL.20280 
         FLUX_UP_3(L, I)=(GAMMA31(L, I)*FLUX_DOWN_1(L, I)                          RAD_ALL.20281 
     &      +GAMMA32(L, I)*FLUX_DOWN_2(L, I)                                       RAD_ALL.20282 
     &      +GAMMA33(L, I)*FLUX_DOWN_3(L, I)+H3(L, I)                              RAD_ALL.20283 
     &      -BETA31(L, I)*FLUX_UP_1(L, I)-BETA32(L, I)*FLUX_UP_2(L, I))            RAD_ALL.20284 
     &      *BETA33_INV(L, I)                                                      RAD_ALL.20285 
         FLUX_DOWN_1(L, I)=T(L, I)*FLUX_DOWN_1(L, I)                               RAD_ALL.20286 
     &      +R(L, I)*FLUX_UP_1(L, I)+S_DOWN(L, I)                                  RAD_ALL.20287 
         FLUX_DOWN_2(L, I)=T_STRAT(L, I)*FLUX_DOWN_2(L, I)                         RAD_ALL.20288 
     &      +R_STRAT(L, I)*FLUX_UP_2(L, I)+S_DOWN_STRAT(L, I)                      RAD_ALL.20289 
         FLUX_DOWN_3(L, I)=T_CONV(L, I)*FLUX_DOWN_3(L, I)                          RAD_ALL.20290 
     &      +R_CONV(L, I)*FLUX_UP_3(L, I)+S_DOWN_CONV(L, I)                        RAD_ALL.20291 
      ENDDO                                                                        RAD_ALL.20292 
!                                                                                  RAD_ALL.20293 
!     THE MAIN LOOP OF BACK-SUBSTITUTION. THE PROVISIONAL USE OF THE               RAD_ALL.20294 
!     DOWNWARD FLUXES IS AS ABOVE.                                                 RAD_ALL.20295 
      DO I=N_CLOUD_TOP+1, N_LAYER                                                  RAD_ALL.20296 
         DO L=1, N_PROFILE                                                         RAD_ALL.20297 
            FLUX_DOWN_1(L, I)=V11(L, I-1)*FLUX_DOWN_1(L, I-1)                      RAD_ALL.20298 
     &         +V12(L, I-1)*FLUX_DOWN_2(L, I-1)                                    RAD_ALL.20299 
     &         +V13(L, I-1)*FLUX_DOWN_3(L, I-1)                                    RAD_ALL.20300 
            FLUX_DOWN_2(L, I)=V21(L, I-1)*FLUX_DOWN_1(L, I-1)                      RAD_ALL.20301 
     &         +V22(L, I-1)*FLUX_DOWN_2(L, I-1)                                    RAD_ALL.20302 
     &         +V23(L, I-1)*FLUX_DOWN_3(L, I-1)                                    RAD_ALL.20303 
            FLUX_DOWN_3(L, I)=V31(L, I-1)*FLUX_DOWN_1(L, I-1)                      RAD_ALL.20304 
     &         +V32(L, I-1)*FLUX_DOWN_2(L, I-1)                                    RAD_ALL.20305 
     &         +V33(L, I-1)*FLUX_DOWN_3(L, I-1)                                    RAD_ALL.20306 
            FLUX_UP_1(L, I)=(GAMMA11(L, I)*FLUX_DOWN_1(L, I)                       RAD_ALL.20307 
     &         +GAMMA12(L, I)*FLUX_DOWN_2(L, I)                                    RAD_ALL.20308 
     &         +GAMMA13(L, I)*FLUX_DOWN_3(L, I)                                    RAD_ALL.20309 
     &         +H1(L, I))*BETA11_INV(L, I)                                         RAD_ALL.20310 
            FLUX_UP_2(L, I)=(GAMMA21(L, I)*FLUX_DOWN_1(L, I)                       RAD_ALL.20311 
     &         +GAMMA22(L, I)*FLUX_DOWN_2(L, I)                                    RAD_ALL.20312 
     &         +GAMMA23(L, I)*FLUX_DOWN_3(L, I)+H2(L, I)                           RAD_ALL.20313 
     &         -BETA21(L, I)*FLUX_UP_1(L, I))*BETA22_INV(L, I)                     RAD_ALL.20314 
            FLUX_UP_3(L, I)=(GAMMA31(L, I)*FLUX_DOWN_1(L, I)                       RAD_ALL.20315 
     &         +GAMMA32(L, I)*FLUX_DOWN_2(L, I)                                    RAD_ALL.20316 
     &         +GAMMA33(L, I)*FLUX_DOWN_3(L, I)+H3(L, I)                           RAD_ALL.20317 
     &         -BETA31(L, I)*FLUX_UP_1(L, I)                                       RAD_ALL.20318 
     &         -BETA32(L, I)*FLUX_UP_2(L, I))                                      RAD_ALL.20319 
     &         *BETA33_INV(L, I)                                                   RAD_ALL.20320 
            FLUX_DOWN_1(L, I)=T(L, I)*FLUX_DOWN_1(L, I)                            RAD_ALL.20321 
     &         +R(L, I)*FLUX_UP_1(L, I)+S_DOWN(L, I)                               RAD_ALL.20322 
            FLUX_DOWN_2(L, I)=T_STRAT(L, I)*FLUX_DOWN_2(L, I)                      RAD_ALL.20323 
     &         +R_STRAT(L, I)*FLUX_UP_2(L, I)+S_DOWN_STRAT(L, I)                   RAD_ALL.20324 
            FLUX_DOWN_3(L, I)=T_CONV(L, I)*FLUX_DOWN_3(L, I)                       RAD_ALL.20325 
     &         +R_CONV(L, I)*FLUX_UP_3(L, I)+S_DOWN_CONV(L, I)                     RAD_ALL.20326 
         ENDDO                                                                     RAD_ALL.20327 
      ENDDO                                                                        RAD_ALL.20328 
!                                                                                  RAD_ALL.20329 
!                                                                                  RAD_ALL.20330 
!     CALCULATE THE OVERALL FLUX.                                                  RAD_ALL.20331 
      DO I=N_CLOUD_TOP, N_LAYER                                                    RAD_ALL.20332 
         DO L=1, N_PROFILE                                                         RAD_ALL.20333 
            FLUX_TOTAL(L, 2*I+1)=FLUX_UP_1(L, I)+FLUX_UP_2(L, I)                   RAD_ALL.20334 
     &         +FLUX_UP_3(L, I)                                                    RAD_ALL.20335 
            FLUX_TOTAL(L, 2*I+2)=FLUX_DOWN_1(L, I)+FLUX_DOWN_2(L, I)               RAD_ALL.20336 
     &         +FLUX_DOWN_3(L, I)                                                  RAD_ALL.20337 
         ENDDO                                                                     RAD_ALL.20338 
      ENDDO                                                                        RAD_ALL.20339 
!                                                                                  RAD_ALL.20340 
!     REDUCE TO NET FLUXES IF REQUIRED.                                            RAD_ALL.20341 
      IF (L_NET) THEN                                                              RAD_ALL.20342 
         DO I=0, N_LAYER                                                           RAD_ALL.20343 
            DO L=1, N_PROFILE                                                      RAD_ALL.20344 
               FLUX_TOTAL(L, I+1)                                                  RAD_ALL.20345 
     &            =FLUX_TOTAL(L, 2*I+2)-FLUX_TOTAL(L, 2*I+1)                       RAD_ALL.20346 
            ENDDO                                                                  RAD_ALL.20347 
         ENDDO                                                                     RAD_ALL.20348 
      ENDIF                                                                        RAD_ALL.20349 
!                                                                                  RAD_ALL.20350 
!                                                                                  RAD_ALL.20351 
!                                                                                  RAD_ALL.20352 
      RETURN                                                                       RAD_ALL.20353 
      END    
