C (c) CROWN COPYRIGHT 1995, METEOROLOGICAL OFFICE, All Rights Reserved.            RAD_ALL.13631 
C                                                                                  RAD_ALL.13632 
C Use, duplication or disclosure of this code is subject to the                    RAD_ALL.13633 
C restrictions as set forth in the contract.                                       RAD_ALL.13634 
C                                                                                  RAD_ALL.13635 
C                Meteorological Office                                             RAD_ALL.13636 
C                London Road                                                       RAD_ALL.13637 
C                BRACKNELL                                                         RAD_ALL.13638 
C                Berkshire UK                                                      RAD_ALL.13639 
C                RG12 2SZ                                                          RAD_ALL.13640 
C                                                                                  RAD_ALL.13641 
C If no contract has been raised with this copy of the code, the use,              RAD_ALL.13642 
C duplication or disclosure of it is strictly prohibited.  Permission              RAD_ALL.13643 
C to do so must first be obtained in writing from the Head of Numerical            RAD_ALL.13644 
C Modelling at the above address.                                                  RAD_ALL.13645 
C ******************************COPYRIGHT******************************            RAD_ALL.13646 
C                                                                                  RAD_ALL.13647 
!+ Subroutine to find maximally overlapped energy transfer coefficients.           RAD_ALL.13648 
!                                                                                  RAD_ALL.13649 
! Method:                                                                          RAD_ALL.13650 
!       Straightforward.                                                           RAD_ALL.13651 
!                                                                                  RAD_ALL.13652 
! Current Owner of Code: J. M. Edwards                                             RAD_ALL.13653 
!                                                                                  RAD_ALL.13654 
! History:                                                                         RAD_ALL.13655 
!       Version         Date                    Comment                            RAD_ALL.13656 
!       4.0             27-07-95                Original Code                      RAD_ALL.13657 
!                                               (J. M. Edwards)                    RAD_ALL.13658 
!       4.1             17-05-96                Add code for new                   RAD_ALL.13659 
!                                               solvers.                           RAD_ALL.13660 
!                                                                                  RAD_ALL.13661 
! Description of Code:                                                             RAD_ALL.13662 
!   FORTRAN 77  with extensions listed in documentation.                           RAD_ALL.13663 
!                                                                                  RAD_ALL.13664 
!- ---------------------------------------------------------------------           RAD_ALL.13665 
      SUBROUTINE OVERLAP_MIX_RANDOM(N_PROFILE, N_LAYER, N_CLOUD_TOP                RAD_ALL.13666 
     &   , ISOLIR, I_SOLVER                                                        RAD_ALL.13667 
     &   , W_CLOUD, W_FREE                                                         RAD_ALL.13668 
     &   , CLOUD_OVERLAP                                                           RAD_ALL.13669 
     &   , NPD_PROFILE, NPD_LAYER                                                  RAD_ALL.13670 
     &   )                                                                         RAD_ALL.13671 
!                                                                                  RAD_ALL.13672 
!                                                                                  RAD_ALL.13673 
!                                                                                  RAD_ALL.13674 
      IMPLICIT NONE                                                                RAD_ALL.13675 
!                                                                                  RAD_ALL.13676 
!                                                                                  RAD_ALL.13677 
!     SIZES OF DUMMY ARRAYS.                                                       RAD_ALL.13678 
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.13679 
     &     NPD_PROFILE                                                             RAD_ALL.13680 
!             MAXIMUM NUMBER OF PROFILES                                           RAD_ALL.13681 
     &   , NPD_LAYER                                                               RAD_ALL.13682 
!             MAXIMUM NUMBER OF LAYERS                                             RAD_ALL.13683 
!                                                                                  RAD_ALL.13684 
!     INCLUDE COMDECKS.                                                            RAD_ALL.13685 
!     ------------------------------------------------------------------           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    
!     ------------------------------------------------------------------           SOLVER3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       SOLVER3A.3     
!                                                                                  SOLVER3A.4     
!     MODULE TO DEFINE REFERENCE NUMBERS FOR SOLVERS.                              SOLVER3A.5     
!                                                                                  SOLVER3A.6     
      INTEGER                                                                      SOLVER3A.7     
     &     IP_SOLVER_PENTADIAGONAL                                                 SOLVER3A.8     
!             PENTADIAGONAL SCHEME                                                 SOLVER3A.9     
     &   , IP_SOLVER_TRIDIAG_FULL                                                  SOLVER3A.10    
!             TRIDIAGONAL SOLVER FOR FLUXES                                        SOLVER3A.11    
     &   , IP_SOLVER_TRIDIAG_PRECOND                                               SOLVER3A.12    
!             TRIDIAGONAL SOLVER FOR FLUXES                                        SOLVER3A.13    
!             WITH PRECONDITIONING OF MATRIX                                       SOLVER3A.14    
     &   , IP_SOLVER_TRIDIAG_NET                                                   SOLVER3A.15    
!             TRIDIAGONAL SOLVER FOR NET FLUX                                      SOLVER3A.16    
     &   , IP_SOLVER_SCHMETZ                                                       SOLVER3A.17    
!             SCHMETZ'S SCHEME                                                     SOLVER3A.18    
     &   , IP_SOLVER_MIX_11                                                        SOLVER3A.19    
!             MIXED COLUMN SCHEME USING FULL ENDEKADIAGONAL MATRIX                 SOLVER3A.20    
     &   , IP_SOLVER_MIX_FULL                                                      SOLVER3A.21    
!             MIXED COLUMN SCHEME FOR FULL FLUXES                                  SOLVER3A.22    
     &   , IP_SOLVER_MIX_NET                                                       SOLVER3A.23    
!             MIXED COLUMN SCHEME FOR NET FLUX                                     SOLVER3A.24    
     &   , IP_SOLVER_MIX_APP_SCAT                                                  SOLVER3A.25    
!             MIXED COLUMN SCHEME WITH APPROXIMATE SCATTERING                      SOLVER3A.26    
     &   , IP_SOLVER_MIX_NET_APP_SCAT                                              SOLVER3A.27    
!             MIXED COLUMN SCHEME FOR NET FLUXES                                   SOLVER3A.28    
!             WITH APPROXIMATE SCATTERING                                          SOLVER3A.29    
     &   , IP_SOLVER_MIX_DIRECT                                                    SOLVER3A.30    
!             DIRECT MIXED COLUMN SCHEME FOR FULL FLUXES                           SOLVER3A.31    
     &   , IP_SOLVER_MIX_DIRECT_NET                                                SOLVER3A.32    
!             DIRECT MIXED COLUMN SCHEME FOR NET FLUXES                            SOLVER3A.33    
     &   , IP_SOLVER_HOMOGEN_DIRECT                                                SOLVER3A.34    
!             DIRECT SOLVER FOR A HOMOGENEOUS COLUMN                               SOLVER3A.35    
     &   , IP_SOLVER_TRIPLE                                                        SOLVER3A.36    
!             DIRECT SOLVER FOR TRIPLE COLUMN                                      SOLVER3A.37    
     &   , IP_SOLVER_TRIPLE_APP_SCAT                                               SOLVER3A.38    
!             DIRECT SOLVER FOR TRIPLE COLUMN APPROXIMATING SCATTERING             SOLVER3A.39    
!                                                                                  SOLVER3A.40    
      PARAMETER(                                                                   SOLVER3A.41    
     &     IP_SOLVER_PENTADIAGONAL=1                                               SOLVER3A.42    
     &   , IP_SOLVER_TRIDIAG_FULL=2                                                SOLVER3A.43    
     &   , IP_SOLVER_TRIDIAG_PRECOND=3                                             SOLVER3A.44    
     &   , IP_SOLVER_TRIDIAG_NET=4                                                 SOLVER3A.45    
     &   , IP_SOLVER_SCHMETZ=5                                                     SOLVER3A.46    
     &   , IP_SOLVER_MIX_11=6                                                      SOLVER3A.47    
     &   , IP_SOLVER_MIX_FULL=7                                                    SOLVER3A.48    
     &   , IP_SOLVER_MIX_NET=8                                                     SOLVER3A.49    
     &   , IP_SOLVER_MIX_APP_SCAT=9                                                SOLVER3A.50    
     &   , IP_SOLVER_MIX_NET_APP_SCAT=10                                           SOLVER3A.51    
     &   , IP_SOLVER_MIX_DIRECT=11                                                 SOLVER3A.52    
     &   , IP_SOLVER_MIX_DIRECT_NET=12                                             SOLVER3A.53    
     &   , IP_SOLVER_HOMOGEN_DIRECT=13                                             SOLVER3A.54    
     &   , IP_SOLVER_TRIPLE=14                                                     SOLVER3A.55    
     &   , IP_SOLVER_TRIPLE_APP_SCAT=15                                            SOLVER3A.56    
     &   )                                                                         SOLVER3A.57    
!                                                                                  SOLVER3A.58    
!     ------------------------------------------------------------------           SOLVER3A.59    
!     ------------------------------------------------------------------           CLCFPT3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       CLCFPT3A.3     
!                                                                                  CLCFPT3A.4     
!     MODULE TO SET POINTERS IN CLOUD_OVERLAP.                                     CLCFPT3A.5     
!                                                                                  CLCFPT3A.6     
!     NOTE THAT SEVERAL POINTERS ARE IDENTICAL SINCE ONLY CERTAIN                  CLCFPT3A.7     
!     GROUPS OF COEFFICIENTS ARE RELEVANT TO A PARTICULAR SCHEME.                  CLCFPT3A.8     
!                                                                                  CLCFPT3A.9     
      INTEGER                                                                      CLCFPT3A.10    
     &     IP_CLOVLP_GFF                                                           CLCFPT3A.11    
!             POINTER TO GAMMA-FREE-FREE                                           CLCFPT3A.12    
     &   , IP_CLOVLP_GFC                                                           CLCFPT3A.13    
!             POINTER TO GAMMA-FREE-CLOUD                                          CLCFPT3A.14    
     &   , IP_CLOVLP_GCF                                                           CLCFPT3A.15    
!             POINTER TO GAMMA-CLOUD-FREE                                          CLCFPT3A.16    
     &   , IP_CLOVLP_GCC                                                           CLCFPT3A.17    
!             POINTER TO GAMMA-CLOUD-CLOUD                                         CLCFPT3A.18    
     &   , IP_CLOVLP_BFF                                                           CLCFPT3A.19    
!             POINTER TO BETA-FREE-FREE                                            CLCFPT3A.20    
     &   , IP_CLOVLP_BFC                                                           CLCFPT3A.21    
!             POINTER TO BETA-FREE-CLOUD                                           CLCFPT3A.22    
     &   , IP_CLOVLP_BCF                                                           CLCFPT3A.23    
!             POINTER TO BETA-CLOUD-FREE                                           CLCFPT3A.24    
     &   , IP_CLOVLP_BCC                                                           CLCFPT3A.25    
!             POINTER TO BETA-CLOUD-CLOUD                                          CLCFPT3A.26    
     &   , IP_CLOVLP_GFM                                                           CLCFPT3A.27    
!             POINTER TO GAMMA_F-                                                  CLCFPT3A.28    
     &   , IP_CLOVLP_GFP                                                           CLCFPT3A.29    
!             POINTER TO GAMMA_F+                                                  CLCFPT3A.30    
     &   , IP_CLOVLP_BFM                                                           CLCFPT3A.31    
!             POINTER TO BETA_F-                                                   CLCFPT3A.32    
     &   , IP_CLOVLP_BFP                                                           CLCFPT3A.33    
!             POINTER TO BETA_F+                                                   CLCFPT3A.34    
     &   , IP_CLOVLP_GM                                                            CLCFPT3A.35    
!             POINTER TO GAMMA_-                                                   CLCFPT3A.36    
     &   , IP_CLOVLP_GP                                                            CLCFPT3A.37    
!             POINTER TO GAMMA_+                                                   CLCFPT3A.38    
     &   , IP_CLOVLP_BM                                                            CLCFPT3A.39    
!             POINTER TO BETA_-                                                    CLCFPT3A.40    
     &   , IP_CLOVLP_BP                                                            CLCFPT3A.41    
!             POINTER TO BETA_+                                                    CLCFPT3A.42    
!                                                                                  CLCFPT3A.43    
!     POINTERS FOR TRIPLE OVERLAPS:                                                CLCFPT3A.44    
      INTEGER                                                                      CLCFPT3A.45    
     &     IP_CLOVLP_V11                                                           CLCFPT3A.46    
     &   , IP_CLOVLP_V12                                                           CLCFPT3A.47    
     &   , IP_CLOVLP_V13                                                           CLCFPT3A.48    
     &   , IP_CLOVLP_V21                                                           CLCFPT3A.49    
     &   , IP_CLOVLP_V22                                                           CLCFPT3A.50    
     &   , IP_CLOVLP_V23                                                           CLCFPT3A.51    
     &   , IP_CLOVLP_V31                                                           CLCFPT3A.52    
     &   , IP_CLOVLP_V32                                                           CLCFPT3A.53    
     &   , IP_CLOVLP_V33                                                           CLCFPT3A.54    
     &   , IP_CLOVLP_U11                                                           CLCFPT3A.55    
     &   , IP_CLOVLP_U12                                                           CLCFPT3A.56    
     &   , IP_CLOVLP_U13                                                           CLCFPT3A.57    
     &   , IP_CLOVLP_U21                                                           CLCFPT3A.58    
     &   , IP_CLOVLP_U22                                                           CLCFPT3A.59    
     &   , IP_CLOVLP_U23                                                           CLCFPT3A.60    
     &   , IP_CLOVLP_U31                                                           CLCFPT3A.61    
     &   , IP_CLOVLP_U32                                                           CLCFPT3A.62    
     &   , IP_CLOVLP_U33                                                           CLCFPT3A.63    
!                                                                                  CLCFPT3A.64    
      PARAMETER(                                                                   CLCFPT3A.65    
     &     IP_CLOVLP_GFF=1                                                         CLCFPT3A.66    
     &   , IP_CLOVLP_GFC=2                                                         CLCFPT3A.67    
     &   , IP_CLOVLP_GCF=3                                                         CLCFPT3A.68    
     &   , IP_CLOVLP_GCC=4                                                         CLCFPT3A.69    
     &   , IP_CLOVLP_BFF=5                                                         CLCFPT3A.70    
     &   , IP_CLOVLP_BFC=6                                                         CLCFPT3A.71    
     &   , IP_CLOVLP_BCF=7                                                         CLCFPT3A.72    
     &   , IP_CLOVLP_BCC=8                                                         CLCFPT3A.73    
     &   , IP_CLOVLP_GFM=5                                                         CLCFPT3A.74    
     &   , IP_CLOVLP_GFP=6                                                         CLCFPT3A.75    
     &   , IP_CLOVLP_BFM=7                                                         CLCFPT3A.76    
     &   , IP_CLOVLP_BFP=8                                                         CLCFPT3A.77    
     &   , IP_CLOVLP_GM=5                                                          CLCFPT3A.78    
     &   , IP_CLOVLP_GP=6                                                          CLCFPT3A.79    
     &   , IP_CLOVLP_BM=7                                                          CLCFPT3A.80    
     &   , IP_CLOVLP_BP=8                                                          CLCFPT3A.81    
     &   )                                                                         CLCFPT3A.82    
!                                                                                  CLCFPT3A.83    
      PARAMETER(                                                                   CLCFPT3A.84    
     &     IP_CLOVLP_V11=1                                                         CLCFPT3A.85    
     &   , IP_CLOVLP_V12=2                                                         CLCFPT3A.86    
     &   , IP_CLOVLP_V13=3                                                         CLCFPT3A.87    
     &   , IP_CLOVLP_V21=4                                                         CLCFPT3A.88    
     &   , IP_CLOVLP_V22=5                                                         CLCFPT3A.89    
     &   , IP_CLOVLP_V23=6                                                         CLCFPT3A.90    
     &   , IP_CLOVLP_V31=7                                                         CLCFPT3A.91    
     &   , IP_CLOVLP_V32=8                                                         CLCFPT3A.92    
     &   , IP_CLOVLP_V33=9                                                         CLCFPT3A.93    
     &   , IP_CLOVLP_U11=10                                                        CLCFPT3A.94    
     &   , IP_CLOVLP_U12=11                                                        CLCFPT3A.95    
     &   , IP_CLOVLP_U13=12                                                        CLCFPT3A.96    
     &   , IP_CLOVLP_U21=13                                                        CLCFPT3A.97    
     &   , IP_CLOVLP_U22=14                                                        CLCFPT3A.98    
     &   , IP_CLOVLP_U23=15                                                        CLCFPT3A.99    
     &   , IP_CLOVLP_U31=16                                                        CLCFPT3A.100   
     &   , IP_CLOVLP_U32=17                                                        CLCFPT3A.101   
     &   , IP_CLOVLP_U33=18                                                        CLCFPT3A.102   
     &   )                                                                         CLCFPT3A.103   
!                                                                                  CLCFPT3A.104   
!     ------------------------------------------------------------------           CLCFPT3A.105   
!                                                                                  RAD_ALL.13690 
!     DUMMY ARGUMENTS.                                                             RAD_ALL.13691 
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.13692 
     &     N_PROFILE                                                               RAD_ALL.13693 
!             NUMBER OF PROFILES                                                   RAD_ALL.13694 
     &   , N_LAYER                                                                 RAD_ALL.13695 
!             NUMBER OF LAYERS                                                     RAD_ALL.13696 
     &   , N_CLOUD_TOP                                                             RAD_ALL.13697 
!             TOPMOST CLOUDY LAYER                                                 RAD_ALL.13698 
     &   , ISOLIR                                                                  RAD_ALL.13699 
!             SPECTRAL REGION                                                      RAD_ALL.13700 
     &   , I_SOLVER                                                                RAD_ALL.13701 
!             SOLVER TO BE USED                                                    RAD_ALL.13702 
      REAL      !, INTENT(IN)                                                      RAD_ALL.13703 
     &     W_CLOUD(NPD_PROFILE, NPD_LAYER)                                         RAD_ALL.13704 
!             CLOUD AMOUNTS                                                        RAD_ALL.13705 
!                                                                                  RAD_ALL.13706 
      REAL      !, INTENT(OUT)                                                     RAD_ALL.13707 
     &     W_FREE(NPD_PROFILE, NPD_LAYER)                                          RAD_ALL.13708 
!             CLOUD-FREE AMOUNTS                                                   RAD_ALL.13709 
     &   , CLOUD_OVERLAP(NPD_PROFILE, 0: NPD_LAYER, NPD_OVERLAP_COEFF)             RAD_ALL.13710 
!             COEFFICIENTS FOR TRANSFER OF ENERGY AT INTERFACE                     RAD_ALL.13711 
!                                                                                  RAD_ALL.13712 
!                                                                                  RAD_ALL.13713 
!     LOCAL ARGUMENTS.                                                             RAD_ALL.13714 
      INTEGER                                                                      RAD_ALL.13715 
     &     I                                                                       RAD_ALL.13716 
     &   , L                                                                       RAD_ALL.13717 
!                                                                                  RAD_ALL.13718 
!                                                                                  RAD_ALL.13719 
!     SET THE FREE FRACTIONS IN EACH LAYER.                                        RAD_ALL.13720 
      DO I=1, N_CLOUD_TOP-1                                                        RAD_ALL.13721 
         DO L=1, N_PROFILE                                                         RAD_ALL.13722 
            W_FREE(L, I)=1.0E+00                                                   RAD_ALL.13723 
         ENDDO                                                                     RAD_ALL.13724 
      ENDDO                                                                        RAD_ALL.13725 
      DO I=N_CLOUD_TOP, N_LAYER                                                    RAD_ALL.13726 
         DO L=1, N_PROFILE                                                         RAD_ALL.13727 
            W_FREE(L, I)=1.0E+00-W_CLOUD(L, I)                                     RAD_ALL.13728 
         ENDDO                                                                     RAD_ALL.13729 
      ENDDO                                                                        RAD_ALL.13730 
!                                                                                  RAD_ALL.13731 
!     EVALUATE THE EXTENT OF OVERLAP BETWEEN LAYERS OF CLOUD                       RAD_ALL.13732 
!     AT THE INTERFACE BETWEEN THE ITH AND (I+1)ST LAYER ON THE                    RAD_ALL.13733 
!     ASSUMPTION OF RANDOM OVERLAP BETWEEN ADJACENT LAYERS.                        RAD_ALL.13734 
!     THE TOP AND BOTTOM BOUNDARIES ARE EXCEPTIONAL.                               RAD_ALL.13735 
!                                                                                  RAD_ALL.13736 
!     IN THE SOLAR REGION COEFFICIENTS FOR DOWNWARD COUPLING OF THE                RAD_ALL.13737 
!     FLUXES ARE REQUIRED. THESE COEFFICIENTS ARE ALSO NEEDED FOR                  RAD_ALL.13738 
!     INFRA-RED CALCULATIONS WITH APPROXIMATE SCATTERING.                          RAD_ALL.13739 
!                                                                                  RAD_ALL.13740 
      IF ( ( (I_SOLVER.EQ.IP_SOLVER_MIX_DIRECT).OR.                                RAD_ALL.13741 
     &       (I_SOLVER.EQ.IP_SOLVER_MIX_DIRECT_NET) ).OR.                          RAD_ALL.13742 
     &     (ISOLIR.EQ.IP_SOLAR).OR.                                                RAD_ALL.13743 
     &     ( (ISOLIR.EQ.IP_INFRA_RED).AND.                                         RAD_ALL.13744 
     &     ( (I_SOLVER.EQ.IP_SOLVER_MIX_APP_SCAT).OR.                              RAD_ALL.13745 
     &       (I_SOLVER.EQ.IP_SOLVER_MIX_NET_APP_SCAT) ) ) ) THEN                   RAD_ALL.13746 
!                                                                                  RAD_ALL.13747 
         DO I=N_CLOUD_TOP-1, N_LAYER-1                                             RAD_ALL.13748 
            DO L=1, N_PROFILE                                                      RAD_ALL.13749 
               CLOUD_OVERLAP(L, I, IP_CLOVLP_GFF)=W_FREE(L, I+1)                   RAD_ALL.13750 
               CLOUD_OVERLAP(L, I, IP_CLOVLP_GFC)=W_CLOUD(L, I+1)                  RAD_ALL.13751 
               CLOUD_OVERLAP(L, I, IP_CLOVLP_GCF)=W_FREE(L, I+1)                   RAD_ALL.13752 
               CLOUD_OVERLAP(L, I, IP_CLOVLP_GCC)=W_CLOUD(L, I+1)                  RAD_ALL.13753 
            ENDDO                                                                  RAD_ALL.13754 
         ENDDO                                                                     RAD_ALL.13755 
!                                                                                  RAD_ALL.13756 
         DO L=1, N_PROFILE                                                         RAD_ALL.13757 
!           BOTTOM BOUNDARY:                                                       RAD_ALL.13758 
            CLOUD_OVERLAP(L, N_LAYER, IP_CLOVLP_GFF)=1.0E+00                       RAD_ALL.13759 
            CLOUD_OVERLAP(L, N_LAYER, IP_CLOVLP_GFC)=0.0E+00                       RAD_ALL.13760 
            CLOUD_OVERLAP(L, N_LAYER, IP_CLOVLP_GCF)=1.0E+00                       RAD_ALL.13761 
            CLOUD_OVERLAP(L, N_LAYER, IP_CLOVLP_GCC)=0.0E+00                       RAD_ALL.13762 
         ENDDO                                                                     RAD_ALL.13763 
!                                                                                  RAD_ALL.13764 
      ENDIF                                                                        RAD_ALL.13765 
!                                                                                  RAD_ALL.13766 
!     WITH APPROXIMATE SCATTERING IN THE LONGWAVE THE CORRESPONDING                RAD_ALL.13767 
!     UPWARD COEFFICIENTS ARE NEEDED.                                              RAD_ALL.13768 
!                                                                                  RAD_ALL.13769 
      IF ( ( (I_SOLVER.EQ.IP_SOLVER_MIX_DIRECT).OR.                                RAD_ALL.13770 
     &       (I_SOLVER.EQ.IP_SOLVER_MIX_DIRECT_NET) ).OR.                          RAD_ALL.13771 
     &     ( (ISOLIR.EQ.IP_INFRA_RED).AND.                                         RAD_ALL.13772 
     &     ( (I_SOLVER.EQ.IP_SOLVER_MIX_APP_SCAT).OR.                              RAD_ALL.13773 
     &       (I_SOLVER.EQ.IP_SOLVER_MIX_NET_APP_SCAT) ) ) ) THEN                   RAD_ALL.13774 
!                                                                                  RAD_ALL.13775 
         DO L=1, N_PROFILE                                                         RAD_ALL.13776 
!           TOP CLOUDY BOUNDARY:                                                   RAD_ALL.13777 
            CLOUD_OVERLAP(L, N_CLOUD_TOP-1, IP_CLOVLP_BFF)=1.0E+00                 RAD_ALL.13778 
            CLOUD_OVERLAP(L, N_CLOUD_TOP-1, IP_CLOVLP_BFC)=1.0E+00                 RAD_ALL.13779 
            CLOUD_OVERLAP(L, N_CLOUD_TOP-1, IP_CLOVLP_BCF)=0.0E+00                 RAD_ALL.13780 
            CLOUD_OVERLAP(L, N_CLOUD_TOP-1, IP_CLOVLP_BCC)=0.0E+00                 RAD_ALL.13781 
         ENDDO                                                                     RAD_ALL.13782 
!                                                                                  RAD_ALL.13783 
         DO I=N_CLOUD_TOP, N_LAYER                                                 RAD_ALL.13784 
            DO L=1, N_PROFILE                                                      RAD_ALL.13785 
               CLOUD_OVERLAP(L, I, IP_CLOVLP_BFF)=W_FREE(L, I)                     RAD_ALL.13786 
               CLOUD_OVERLAP(L, I, IP_CLOVLP_BFC)=W_FREE(L, I)                     RAD_ALL.13787 
               CLOUD_OVERLAP(L, I, IP_CLOVLP_BCF)=W_CLOUD(L, I)                    RAD_ALL.13788 
               CLOUD_OVERLAP(L, I, IP_CLOVLP_BCC)=W_CLOUD(L, I)                    RAD_ALL.13789 
            ENDDO                                                                  RAD_ALL.13790 
         ENDDO                                                                     RAD_ALL.13791 
      ENDIF                                                                        RAD_ALL.13792 
!                                                                                  RAD_ALL.13793 
!                                                                                  RAD_ALL.13794 
      IF (I_SOLVER.EQ.IP_SOLVER_MIX_FULL) THEN                                     RAD_ALL.13795 
!                                                                                  RAD_ALL.13796 
         DO L=1, N_PROFILE                                                         RAD_ALL.13797 
!                                                                                  RAD_ALL.13798 
!           TOP BOUNDARY:                                                          RAD_ALL.13799 
            CLOUD_OVERLAP(L, N_CLOUD_TOP-1, IP_CLOVLP_GFM)=0.0E+00                 RAD_ALL.13800 
            CLOUD_OVERLAP(L, N_CLOUD_TOP-1, IP_CLOVLP_GFP)=2.0E+00                 RAD_ALL.13801 
     &         *W_FREE(L, N_CLOUD_TOP)                                             RAD_ALL.13802 
            CLOUD_OVERLAP(L, N_CLOUD_TOP-1, IP_CLOVLP_BFM)=0.0E+00                 RAD_ALL.13803 
            CLOUD_OVERLAP(L, N_CLOUD_TOP-1, IP_CLOVLP_BFP)=2.0E+00                 RAD_ALL.13804 
!                                                                                  RAD_ALL.13805 
!           BOTTOM BOUNDARY:                                                       RAD_ALL.13806 
            CLOUD_OVERLAP(L, N_LAYER, IP_CLOVLP_GFM)=0.0E+00                       RAD_ALL.13807 
            CLOUD_OVERLAP(L, N_LAYER, IP_CLOVLP_GFP)=2.0E+00                       RAD_ALL.13808 
            CLOUD_OVERLAP(L, N_LAYER, IP_CLOVLP_BFM)=0.0E+00                       RAD_ALL.13809 
            CLOUD_OVERLAP(L, N_LAYER, IP_CLOVLP_BFP)=2.0E+00                       RAD_ALL.13810 
     &         *W_FREE(L, N_LAYER)                                                 RAD_ALL.13811 
!                                                                                  RAD_ALL.13812 
         ENDDO                                                                     RAD_ALL.13813 
!                                                                                  RAD_ALL.13814 
         DO I=N_CLOUD_TOP, N_LAYER-1                                               RAD_ALL.13815 
            DO L=1, N_PROFILE                                                      RAD_ALL.13816 
               CLOUD_OVERLAP(L, I, IP_CLOVLP_GFM)=0.0E+00                          RAD_ALL.13817 
               CLOUD_OVERLAP(L, I, IP_CLOVLP_GFP)=2.0E+00*W_FREE(L, I+1)           RAD_ALL.13818 
               CLOUD_OVERLAP(L, I, IP_CLOVLP_BFM)=0.0E+00                          RAD_ALL.13819 
               CLOUD_OVERLAP(L, I, IP_CLOVLP_BFP)=2.0E+00*W_FREE(L, I)             RAD_ALL.13820 
            ENDDO                                                                  RAD_ALL.13821 
         ENDDO                                                                     RAD_ALL.13822 
!                                                                                  RAD_ALL.13823 
!                                                                                  RAD_ALL.13824 
      ELSE IF ( (I_SOLVER.EQ.IP_SOLVER_MIX_NET).OR.                                RAD_ALL.13825 
     &          (I_SOLVER.EQ.IP_SOLVER_MIX_11) ) THEN                              RAD_ALL.13826 
!                                                                                  RAD_ALL.13827 
         DO L=1, N_PROFILE                                                         RAD_ALL.13828 
!                                                                                  RAD_ALL.13829 
!           TOP BOUNDARY:                                                          RAD_ALL.13830 
            CLOUD_OVERLAP(L, N_CLOUD_TOP-1, IP_CLOVLP_GM)=0.0E+00                  RAD_ALL.13831 
            CLOUD_OVERLAP(L, N_CLOUD_TOP-1, IP_CLOVLP_GP)                          RAD_ALL.13832 
     &         =2.0E+00-4.0E+00*W_CLOUD(L, N_CLOUD_TOP)                            RAD_ALL.13833 
            CLOUD_OVERLAP(L, N_CLOUD_TOP-1, IP_CLOVLP_BM)=0.0E+00                  RAD_ALL.13834 
            CLOUD_OVERLAP(L, N_CLOUD_TOP-1, IP_CLOVLP_BP)=2.0E+00                  RAD_ALL.13835 
!                                                                                  RAD_ALL.13836 
!           BOTTOM BOUNDARY:                                                       RAD_ALL.13837 
            CLOUD_OVERLAP(L, N_LAYER, IP_CLOVLP_GM)=0.0E+00                        RAD_ALL.13838 
            CLOUD_OVERLAP(L, N_LAYER, IP_CLOVLP_GP)=2.0E+00                        RAD_ALL.13839 
            CLOUD_OVERLAP(L, N_LAYER, IP_CLOVLP_BM)=0.0E+00                        RAD_ALL.13840 
            CLOUD_OVERLAP(L, N_LAYER, IP_CLOVLP_BP)                                RAD_ALL.13841 
     &         =2.0E+00-4.0E+00*W_CLOUD(L, N_LAYER)                                RAD_ALL.13842 
!                                                                                  RAD_ALL.13843 
         ENDDO                                                                     RAD_ALL.13844 
!                                                                                  RAD_ALL.13845 
         DO I=N_CLOUD_TOP, N_LAYER-1                                               RAD_ALL.13846 
            DO L=1, N_PROFILE                                                      RAD_ALL.13847 
               CLOUD_OVERLAP(L, I, IP_CLOVLP_GM)=0.0E+00                           RAD_ALL.13848 
               CLOUD_OVERLAP(L, I, IP_CLOVLP_GP)                                   RAD_ALL.13849 
     &            =2.0E+00-4.0E+00*W_CLOUD(L, I+1)                                 RAD_ALL.13850 
               CLOUD_OVERLAP(L, I, IP_CLOVLP_BM)=0.0E+00                           RAD_ALL.13851 
               CLOUD_OVERLAP(L, I, IP_CLOVLP_BP)                                   RAD_ALL.13852 
     &            =2.0E+00-4.0E+00*W_CLOUD(L, I)                                   RAD_ALL.13853 
            ENDDO                                                                  RAD_ALL.13854 
         ENDDO                                                                     RAD_ALL.13855 
!                                                                                  RAD_ALL.13856 
!                                                                                  RAD_ALL.13857 
      ENDIF                                                                        RAD_ALL.13858 
!                                                                                  RAD_ALL.13859 
!                                                                                  RAD_ALL.13860 
!                                                                                  RAD_ALL.13861 
      RETURN                                                                       RAD_ALL.13862 
      END   
