C (c) CROWN COPYRIGHT 1995, METEOROLOGICAL OFFICE, All Rights Reserved.            RAD_ALL.9604  
C                                                                                  RAD_ALL.9605  
C Use, duplication or disclosure of this code is subject to the                    RAD_ALL.9606  
C restrictions as set forth in the contract.                                       RAD_ALL.9607  
C                                                                                  RAD_ALL.9608  
C                Meteorological Office                                             RAD_ALL.9609  
C                London Road                                                       RAD_ALL.9610  
C                BRACKNELL                                                         RAD_ALL.9611  
C                Berkshire UK                                                      RAD_ALL.9612  
C                RG12 2SZ                                                          RAD_ALL.9613  
C                                                                                  RAD_ALL.9614  
C If no contract has been raised with this copy of the code, the use,              RAD_ALL.9615  
C duplication or disclosure of it is strictly prohibited.  Permission              RAD_ALL.9616  
C to do so must first be obtained in writing from the Head of Numerical            RAD_ALL.9617  
C Modelling at the above address.                                                  RAD_ALL.9618  
C ******************************COPYRIGHT******************************            RAD_ALL.9619  
C                                                                                  RAD_ALL.9620  
!+ Subroutine to solve for the monochromatic fluxes.                               RAD_ALL.9621  
!                                                                                  RAD_ALL.9622  
! Method:                                                                          RAD_ALL.9623  
!       The final single scattering properties are calculated                      RAD_ALL.9624  
!       and rescaled. An appropriate subroutine is called to                       RAD_ALL.9625  
!       calculate the fluxes depending on the treatment of                         RAD_ALL.9626  
!       cloudiness.                                                                RAD_ALL.9627  
!                                                                                  RAD_ALL.9628  
! Current Owner of Code: J. M. Edwards                                             RAD_ALL.9629  
!                                                                                  RAD_ALL.9630  
! History:                                                                         RAD_ALL.9631  
!       Version         Date                    Comment                            RAD_ALL.9632  
!       4.0             27-07-95                Original Code                      RAD_ALL.9633  
!                                               (J. M. Edwards)                    RAD_ALL.9634  
!       4.2             08-08-96                Code for vertically                RAD_ALL.9635  
!                                               coherent cloud added.              RAD_ALL.9636  
!                                               (J. M. Edwards)                    RAD_ALL.9637  
!                                                                                  RAD_ALL.9638  
! Description of Code:                                                             RAD_ALL.9639  
!   FORTRAN 77  with extensions listed in documentation.                           RAD_ALL.9640  
!                                                                                  RAD_ALL.9641  
!- ---------------------------------------------------------------------           RAD_ALL.9642  
      SUBROUTINE MONOCHROMATIC_FLUX(IERR                                           RAD_ALL.9643  
!                       Atmospheric Propetries                                     RAD_ALL.9644  
     &   , N_PROFILE, N_LAYER, D_MASS                                              RAD_ALL.9645  
!                       Angular Integration                                        RAD_ALL.9646  
     &   , I_ANGULAR_INTEGRATION, I_2STREAM, L_2_STREAM_CORRECT                    RAD_ALL.9647  
     &   , L_RESCALE, N_ORDER_GAUSS                                                RAD_ALL.9648  
!                       Treatment of Scattering                                    RAD_ALL.9649  
     &   , I_SCATTER_METHOD_BAND                                                   RAD_ALL.9650  
!                       Options for Solver                                         RAD_ALL.9651  
     &   , I_SOLVER, L_NET, I_EXTRAPOLATE_MIX_NET, N_AUGMENT                       RAD_ALL.9652  
!                       Gaseous Propeties                                          RAD_ALL.9653  
     &   , K_GAS_ABS                                                               RAD_ALL.9654  
!                       Options for Equivalent Extinction                          RAD_ALL.9655  
     &   , L_SCALE_SOLAR, ADJUST_SOLAR_KE                                          RAD_ALL.9656  
!                       Spectral Region                                            RAD_ALL.9657  
     &   , ISOLIR                                                                  RAD_ALL.9658  
!                       Infra-red Properties                                       RAD_ALL.9659  
     &   , DIFF_PLANCK                                                             RAD_ALL.9660  
     &   , L_IR_SOURCE_QUAD, DIFF_PLANCK_2                                         RAD_ALL.9661  
!                       Conditions at TOA                                          RAD_ALL.9662  
     &   , SEC_0, FLUX_INC_DIRECT, FLUX_INC_DOWN                                   RAD_ALL.9663  
!                       Surface Propeties                                          RAD_ALL.9664  
     &   , ALBEDO_SURFACE_DIFF, ALBEDO_SURFACE_DIR, SOURCE_GROUND                  RAD_ALL.9665  
     &   , GROUND_EMISSION                                                         RAD_ALL.9666  
!                       Clear-sky Optical Propeties                                RAD_ALL.9667  
     &   , K_GREY_TOT_FREE, K_EXT_SCAT_FREE, ASYMMETRY_FREE                        RAD_ALL.9668  
     &   , FORWARD_SCATTER_FREE                                                    RAD_ALL.9669  
!                       Cloudy Properties                                          RAD_ALL.9670  
     &   , L_CLOUD, I_CLOUD                                                        RAD_ALL.9671  
!                       Cloud Geometry                                             RAD_ALL.9672  
     &   , N_CLOUD_TOP                                                             RAD_ALL.9673  
     &   , N_CLOUD_TYPE, FRAC_CLOUD                                                RAD_ALL.9674  
     &   , I_REGION_CLOUD, FRAC_REGION                                             RAD_ALL.9675  
     &   , W_FREE, N_FREE_PROFILE, I_FREE_PROFILE                                  RAD_ALL.9676  
     &   , W_CLOUD, N_CLOUD_PROFILE, I_CLOUD_PROFILE                               RAD_ALL.9677  
     &   , CLOUD_OVERLAP                                                           RAD_ALL.9678  
     &   , N_COLUMN, L_COLUMN, AREA_COLUMN                                         RAD_ALL.9679  
!                       Cloudy Optical Propeties                                   RAD_ALL.9680  
     &   , K_GREY_TOT_CLOUD, K_EXT_SCAT_CLOUD                                      RAD_ALL.9681  
     &   , ASYMMETRY_CLOUD, FORWARD_SCATTER_CLOUD                                  RAD_ALL.9682  
!                       Fluxes Calculated                                          RAD_ALL.9683  
     &   , FLUX_DIRECT, FLUX_TOTAL                                                 RAD_ALL.9684  
!                       Flags for Clear-sky Calculation                            RAD_ALL.9685  
     &   , L_CLEAR, I_SOLVER_CLEAR                                                 RAD_ALL.9686  
!                       Clear-sky Fluxes Calculated                                RAD_ALL.9687  
     &   , FLUX_DIRECT_CLEAR, FLUX_TOTAL_CLEAR                                     RAD_ALL.9688  
!                       Planckian Source                                           RAD_ALL.9689  
     &   , PLANCK_SOURCE                                                           RAD_ALL.9690  
!                       Dimensions of Arrays                                       RAD_ALL.9691  
     &   , NPD_PROFILE, NPD_LAYER, NPD_COLUMN                                      RAD_ALL.9692  
     &   )                                                                         RAD_ALL.9693  
!                                                                                  RAD_ALL.9694  
!                                                                                  RAD_ALL.9695  
      IMPLICIT NONE                                                                RAD_ALL.9696  
!                                                                                  RAD_ALL.9697  
!                                                                                  RAD_ALL.9698  
!     SIZES OF DUMMY ARRAYS.                                                       RAD_ALL.9699  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.9700  
     &     NPD_PROFILE                                                             RAD_ALL.9701  
!             MAXIMUM NUMBER OF PROFILES                                           RAD_ALL.9702  
     &   , NPD_LAYER                                                               RAD_ALL.9703  
!             MAXIMUM NUMBER OF LAYERS                                             RAD_ALL.9704  
     &   , NPD_COLUMN                                                              RAD_ALL.9705  
!             NUMBER OF COLUMNS PER POINT                                          RAD_ALL.9706  
!                                                                                  RAD_ALL.9707  
!     INCLUDE COMDECKS.                                                            RAD_ALL.9708  
!     ------------------------------------------------------------------           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    
!     ------------------------------------------------------------------           CLSCHM3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       CLSCHM3A.3     
!                                                                                  CLSCHM3A.4     
!     MODULE TO DEFINE REFERENCE NUMBERS FOR CLOUD SCHEMES.                        CLSCHM3A.5     
!                                                                                  CLSCHM3A.6     
      INTEGER                                                                      CLSCHM3A.7     
     &     IP_CLOUD_SCHMETZ                                                        CLSCHM3A.8     
!             SCHMETZ'S SCHEME                                                     CLSCHM3A.9     
     &   , IP_CLOUD_MIX_MAX                                                        CLSCHM3A.10    
!             MAXIMUM/RANDOM OVERLAP IN A MIXED COLUMN                             CLSCHM3A.11    
     &   , IP_CLOUD_MIX_RANDOM                                                     CLSCHM3A.12    
!             RANDOM OVERLAP IN A MIXED COLUMN                                     CLSCHM3A.13    
     &   , IP_CLOUD_COLUMN_MAX                                                     CLSCHM3A.14    
!             MAXIMUM OVERLAP IN A COLUMN MODEL                                    CLSCHM3A.15    
     &   , IP_CLOUD_CLEAR                                                          CLSCHM3A.16    
!             CLEAR COLUMN                                                         CLSCHM3A.17    
     &   , IP_CLOUD_TRIPLE                                                         CLSCHM3A.18    
!             MIXED COLUMN WITH SPLIT BETWEEN                                      CLSCHM3A.19    
!             CONVECTIVE AND LAYER CLOUD.                                          CLSCHM3A.20    
!                                                                                  CLSCHM3A.21    
      PARAMETER(                                                                   CLSCHM3A.22    
     &     IP_CLOUD_SCHMETZ=1                                                      CLSCHM3A.23    
     &   , IP_CLOUD_MIX_MAX=2                                                      CLSCHM3A.24    
     &   , IP_CLOUD_MIX_RANDOM=4                                                   CLSCHM3A.25    
     &   , IP_CLOUD_COLUMN_MAX=3                                                   CLSCHM3A.26    
     &   , IP_CLOUD_CLEAR=5                                                        CLSCHM3A.27    
     &   , IP_CLOUD_TRIPLE=6                                                       CLSCHM3A.28    
     &   )                                                                         CLSCHM3A.29    
!                                                                                  CLSCHM3A.30    
!     ------------------------------------------------------------------           CLSCHM3A.31    
!     ------------------------------------------------------------------           ANGINT3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       ANGINT3A.3     
!                                                                                  ANGINT3A.4     
!     MODULE TO SET THE TYPES OF ANGULAR INTEGRATION.                              ANGINT3A.5     
!                                                                                  ANGINT3A.6     
      INTEGER                                                                      ANGINT3A.7     
     &     IP_TWO_STREAM                                                           ANGINT3A.8     
!             TWO STREAM SCHEME                                                    ANGINT3A.9     
     &   , IP_IR_GAUSS                                                             ANGINT3A.10    
!             GAUSSIAN INTEGRATION IN THE IR                                       ANGINT3A.11    
!                                                                                  ANGINT3A.12    
      PARAMETER(                                                                   ANGINT3A.13    
     &     IP_TWO_STREAM=1                                                         ANGINT3A.14    
     &   , IP_IR_GAUSS=2                                                           ANGINT3A.15    
     &   )                                                                         ANGINT3A.16    
!                                                                                  ANGINT3A.17    
!     ------------------------------------------------------------------           ANGINT3A.18    
!     ------------------------------------------------------------------           ERROR3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       ERROR3A.3     
!                                                                                  ERROR3A.4     
!     MODULE TO SET ERROR FLAGS IN THE RADIATION CODE.                             ERROR3A.5     
!                                                                                  ERROR3A.6     
      INTEGER                                                                      ERROR3A.7     
     &     I_NORMAL                                                                ERROR3A.8     
!             ERROR FREE CONDITION                                                 ERROR3A.9     
     &   , I_ERR_FATAL                                                             ERROR3A.10    
!             FATAL ERROR: IMMEDIATE RETURN                                        ERROR3A.11    
     &   , I_ABORT_CALCULATION                                                     ERROR3A.12    
!             CALCULATION ABORTED                                                  ERROR3A.13    
     &   , I_MISSING_DATA                                                          ERROR3A.14    
!             MISSING DATA ERROR: CONDITIONAL                                      ERROR3A.15    
     &   , I_ERR_IO                                                                ERROR3A.16    
!             I/O ERROR                                                            ERROR3A.17    
     &   , I_ERR_RANGE                                                             ERROR3A.18    
!             INTERPOLATION RANGE ERROR                                            ERROR3A.19    
     &   , I_ERR_EXIST                                                             ERROR3A.20    
!             EXISTENCE ERROR                                                      ERROR3A.21    
!                                                                                  ERROR3A.22    
      PARAMETER(                                                                   ERROR3A.23    
     &     I_NORMAL=0                                                              ERROR3A.24    
     &   , I_ERR_FATAL=1                                                           ERROR3A.25    
     &   , I_ABORT_CALCULATION=2                                                   ERROR3A.26    
     &   , I_MISSING_DATA=3                                                        ERROR3A.27    
     &   , I_ERR_IO=4                                                              ERROR3A.28    
     &   , I_ERR_RANGE=5                                                           ERROR3A.29    
     &   , I_ERR_EXIST=6                                                           ERROR3A.30    
     &   )                                                                         ERROR3A.31    
!                                                                                  ERROR3A.32    
!     ------------------------------------------------------------------           ERROR3A.33    
!                                                                                  RAD_ALL.9713  
!                                                                                  RAD_ALL.9714  
!                                                                                  RAD_ALL.9715  
!     DUMMY ARGUMENTS.                                                             RAD_ALL.9716  
      INTEGER   !, INTENT(OUT)                                                     RAD_ALL.9717  
     &     IERR                                                                    RAD_ALL.9718  
!             ERROR FLAG                                                           RAD_ALL.9719  
!                                                                                  RAD_ALL.9720  
!                       Atmospheric Properties                                     RAD_ALL.9721  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.9722  
     &     N_PROFILE                                                               RAD_ALL.9723  
!             NUMBER OF PROFILES                                                   RAD_ALL.9724  
     &   , N_LAYER                                                                 RAD_ALL.9725  
!             NUMBER OF LAYERS                                                     RAD_ALL.9726  
      REAL      !, INTENT(IN)                                                      RAD_ALL.9727  
     &     D_MASS(NPD_PROFILE, NPD_LAYER)                                          RAD_ALL.9728  
!             MASS THICKNESS OF EACH LAYER                                         RAD_ALL.9729  
!                                                                                  RAD_ALL.9730  
!                       Angular Integration                                        RAD_ALL.9731  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.9732  
     &     I_ANGULAR_INTEGRATION                                                   RAD_ALL.9733  
!             ANGULAR INTEGRATION SCHEME                                           RAD_ALL.9734  
     &   , I_2STREAM                                                               RAD_ALL.9735  
!             TWO-STREAM SCHEME                                                    RAD_ALL.9736  
     &   , N_ORDER_GAUSS                                                           RAD_ALL.9737  
!             ORDER OF GAUSSIAN INTEGRATION                                        RAD_ALL.9738  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.9739  
     &     L_2_STREAM_CORRECT                                                      RAD_ALL.9740  
!             CORRECTION TO TWO-STREAM SCHEME                                      RAD_ALL.9741  
     &   , L_RESCALE                                                               RAD_ALL.9742  
!             RESCALE OPTICAL PROPERTIES                                           RAD_ALL.9743  
!                                                                                  RAD_ALL.9744  
!                       Treatment of Scattering                                    RAD_ALL.9745  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.9746  
     &     I_SCATTER_METHOD_BAND                                                   RAD_ALL.9747  
!                                                                                  RAD_ALL.9748  
!                       Options for Solver                                         RAD_ALL.9749  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.9750  
     &     I_SOLVER                                                                RAD_ALL.9751  
!             SOLVER USED                                                          RAD_ALL.9752  
     &   , I_EXTRAPOLATE_MIX_NET                                                   RAD_ALL.9753  
!             METHOD FOR EXTRAPOLATING WITH A MIXED SOLVER                         RAD_ALL.9754  
     &   , N_AUGMENT                                                               RAD_ALL.9755  
!             LENGTH OF LONG FLUX VECTOR                                           RAD_ALL.9756  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.9757  
     &     L_NET                                                                   RAD_ALL.9758  
!             CALCULATE NET FLUXES                                                 RAD_ALL.9759  
!                                                                                  RAD_ALL.9760  
!                       Gaseous Properties                                         RAD_ALL.9761  
      REAL      !, INTENT(IN)                                                      RAD_ALL.9762  
     &     K_GAS_ABS(NPD_PROFILE, NPD_LAYER)                                       RAD_ALL.9763  
!             GASEOUS ABSORPTIVE EXTINCTIONS                                       RAD_ALL.9764  
!                                                                                  RAD_ALL.9765  
!                       Variables for Equivalent Extinction                        RAD_ALL.9766  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.9767  
     &     L_SCALE_SOLAR                                                           RAD_ALL.9768  
!             APPLY SCALING TO SOLAR FLUX                                          RAD_ALL.9769  
      REAL      !, INTENT(IN)                                                      RAD_ALL.9770  
     &     ADJUST_SOLAR_KE(NPD_PROFILE, NPD_LAYER)                                 RAD_ALL.9771  
!             ADJUSTMENT OF SOLAR BEAM WITH EQUIVALENT EXTINCTION                  RAD_ALL.9772  
!                                                                                  RAD_ALL.9773  
!                       Spectral Region                                            RAD_ALL.9774  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.9775  
     &     ISOLIR                                                                  RAD_ALL.9776  
!             VISIBLE OR IR                                                        RAD_ALL.9777  
!                                                                                  RAD_ALL.9778  
!                       Infra-red Properties                                       RAD_ALL.9779  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.9780  
     &     L_IR_SOURCE_QUAD                                                        RAD_ALL.9781  
!             FLAG FOR QUADRATIC IR-SOURCE                                         RAD_ALL.9782  
      REAL      !, INTENT(IN)                                                      RAD_ALL.9783  
     &     PLANCK_SOURCE(NPD_PROFILE, 0: NPD_LAYER)                                RAD_ALL.9784  
!             MONOCHROMATIC PLANCKIAN SOURCE                                       RAD_ALL.9785  
     &   , DIFF_PLANCK(NPD_PROFILE, NPD_LAYER)                                     RAD_ALL.9786  
!             THERMAL SOURCE FUNCTION                                              RAD_ALL.9787  
     &   , DIFF_PLANCK_2(NPD_PROFILE, NPD_LAYER)                                   RAD_ALL.9788  
!             2ND DIFF. OF THERMAL SOURCE FUNCTION                                 RAD_ALL.9789  
!                                                                                  RAD_ALL.9790  
!                       Conditions at TOA                                          RAD_ALL.9791  
      REAL      !, INTENT(IN)                                                      RAD_ALL.9792  
     &     SEC_0(NPD_PROFILE)                                                      RAD_ALL.9793  
!             SECANT OF SOLAR ZENITH ANGLE                                         RAD_ALL.9794  
     &   , FLUX_INC_DIRECT(NPD_PROFILE)                                            RAD_ALL.9795  
!             INCIDENT DIRECT FLUX                                                 RAD_ALL.9796  
     &   , FLUX_INC_DOWN(NPD_PROFILE)                                              RAD_ALL.9797  
!             INCIDENT DOWNWARD FLUX                                               RAD_ALL.9798  
!                                                                                  RAD_ALL.9799  
!                       Surface Propeties                                          RAD_ALL.9800  
      REAL      !, INTENT(IN)                                                      RAD_ALL.9801  
     &     ALBEDO_SURFACE_DIFF(NPD_PROFILE)                                        RAD_ALL.9802  
!             DIFFUSE SURFACE ALBEDO                                               RAD_ALL.9803  
     &   , ALBEDO_SURFACE_DIR(NPD_PROFILE)                                         RAD_ALL.9804  
!             DIRECT SURFACE ALBEDO                                                RAD_ALL.9805  
     &   , SOURCE_GROUND(NPD_PROFILE)                                              RAD_ALL.9806  
!             GROUND SOURCE FUNCTION                                               RAD_ALL.9807  
      REAL      !, INTENT(IN)                                                      RAD_ALL.9808  
     &     GROUND_EMISSION(NPD_PROFILE)                                            RAD_ALL.9809  
!             TOTAL FLUX EMITTED FROM GROUND                                       RAD_ALL.9810  
!                                                                                  RAD_ALL.9811  
!                       Optical Properties                                         RAD_ALL.9812  
      REAL      !, INTENT(IN)                                                      RAD_ALL.9813  
     &     K_GREY_TOT_FREE(NPD_PROFILE, NPD_LAYER)                                 RAD_ALL.9814  
!             FREE ABSORPTIVE EXTINCTION                                           RAD_ALL.9815  
     &   , K_EXT_SCAT_FREE(NPD_PROFILE, NPD_LAYER)                                 RAD_ALL.9816  
!             FREE SCATTERING EXTINCTION                                           RAD_ALL.9817  
     &   , ASYMMETRY_FREE(NPD_PROFILE, NPD_LAYER)                                  RAD_ALL.9818  
!             CLEAR-SKY ASYMMETRY                                                  RAD_ALL.9819  
     &   , FORWARD_SCATTER_FREE(NPD_PROFILE, NPD_LAYER)                            RAD_ALL.9820  
!             FREE FORWARD SCATTERING                                              RAD_ALL.9821  
!                                                                                  RAD_ALL.9822  
!                       Cloudy Properties                                          RAD_ALL.9823  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.9824  
     &     L_CLOUD                                                                 RAD_ALL.9825  
!             CLOUDS REQUIRED                                                      RAD_ALL.9826  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.9827  
     &     I_CLOUD                                                                 RAD_ALL.9828  
!             CLOUD SCHEME USED                                                    RAD_ALL.9829  
!                                                                                  RAD_ALL.9830  
!                       Cloud Geometry                                             RAD_ALL.9831  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.9832  
     &     N_CLOUD_TOP                                                             RAD_ALL.9833  
!             TOPMOST CLOUDY LAYER                                                 RAD_ALL.9834  
     &   , N_CLOUD_TYPE                                                            RAD_ALL.9835  
!             NUMBER OF TYPES OF CLOUDS                                            RAD_ALL.9836  
     &   , N_FREE_PROFILE(NPD_LAYER)                                               RAD_ALL.9837  
!             NUMBER OF FREE PROFILES                                              RAD_ALL.9838  
     &   , I_FREE_PROFILE(NPD_PROFILE, NPD_LAYER)                                  RAD_ALL.9839  
!             INDICES OF FREE PROFILES                                             RAD_ALL.9840  
     &   , N_CLOUD_PROFILE(NPD_LAYER)                                              RAD_ALL.9841  
!             NUMBER OF CLOUDY PROFILES                                            RAD_ALL.9842  
     &   , I_CLOUD_PROFILE(NPD_PROFILE, NPD_LAYER)                                 RAD_ALL.9843  
!             INDICES OF CLOUDY PROFILES                                           RAD_ALL.9844  
     &   , N_COLUMN(NPD_PROFILE)                                                   RAD_ALL.9845  
!             NUMBER OF COLUMNS REQUIRED                                           RAD_ALL.9846  
     &   , I_REGION_CLOUD(NPD_CLOUD_TYPE)                                          RAD_ALL.9847  
!             REGIONS IN WHICH TYPES OF CLOUDS FALL                                RAD_ALL.9848  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.9849  
     &     L_COLUMN(NPD_PROFILE, NPD_LAYER, NPD_COLUMN)                            RAD_ALL.9850  
!             FLAGS FOR CONTENTS OF COLUMNS                                        RAD_ALL.9851  
      REAL      !, INTENT(IN)                                                      RAD_ALL.9852  
     &     W_CLOUD(NPD_PROFILE, NPD_LAYER)                                         RAD_ALL.9853  
!             CLOUDY FRACTION                                                      RAD_ALL.9854  
     &   , FRAC_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)                      RAD_ALL.9855  
!             FRACTIONS OF DIFFERENT TYPES OF CLOUD                                RAD_ALL.9856  
     &   , W_FREE(NPD_PROFILE, NPD_LAYER)                                          RAD_ALL.9857  
!             CLEAR-SKY FRACTION                                                   RAD_ALL.9858  
     &   , CLOUD_OVERLAP(NPD_PROFILE, 0: NPD_LAYER, NPD_OVERLAP_COEFF)             RAD_ALL.9859  
!             COEFFICIENTS FOR ENERGY TRANSFER AT INTERFACES                       RAD_ALL.9860  
     &   , AREA_COLUMN(NPD_PROFILE, NPD_COLUMN)                                    RAD_ALL.9861  
!             AREAS OF COLUMNS                                                     RAD_ALL.9862  
     &   , FRAC_REGION(NPD_PROFILE, NPD_LAYER, NPD_REGION)                         RAD_ALL.9863  
!             FRACTIONS OF TOTAL CLOUD OCCUPIED BY EACH REGION                     RAD_ALL.9864  
!                                                                                  RAD_ALL.9865  
!                       Cloudy Optical Properties                                  RAD_ALL.9866  
      REAL      !, INTENT(IN)                                                      RAD_ALL.9867  
     &     K_GREY_TOT_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)                RAD_ALL.9868  
!             CLOUDY ABSORPTIVE EXTINCTION                                         RAD_ALL.9869  
     &   , K_EXT_SCAT_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)                RAD_ALL.9870  
!             CLOUDY SCATTERING EXTINCTION                                         RAD_ALL.9871  
     &   , ASYMMETRY_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)                 RAD_ALL.9872  
!             CLOUDY ASYMMETRY                                                     RAD_ALL.9873  
     &   , FORWARD_SCATTER_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)           RAD_ALL.9874  
!             CLOUDY FORWARD SCATTERING                                            RAD_ALL.9875  
!                                                                                  RAD_ALL.9876  
!                       Fluxes Calculated                                          RAD_ALL.9877  
      REAL      !, INTENT(OUT)                                                     RAD_ALL.9878  
     &     FLUX_DIRECT(NPD_PROFILE, 0: NPD_LAYER)                                  RAD_ALL.9879  
!             DIRECT FLUX                                                          RAD_ALL.9880  
     &   , FLUX_TOTAL(NPD_PROFILE, 2*NPD_LAYER+2)                                  RAD_ALL.9881  
!             TOTAL FLUX                                                           RAD_ALL.9882  
!                                                                                  RAD_ALL.9883  
!                       Flags for Clear-sky Calculations                           RAD_ALL.9884  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.9885  
     &     L_CLEAR                                                                 RAD_ALL.9886  
!             CALCULATE CLEAR-SKY PROPERTIES                                       RAD_ALL.9887  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.9888  
     &     I_SOLVER_CLEAR                                                          RAD_ALL.9889  
!             CLEAR SOLVER USED                                                    RAD_ALL.9890  
!                                                                                  RAD_ALL.9891  
!                       Clear-sky Fluxes Calculated                                RAD_ALL.9892  
      REAL      !, INTENT(OUT)                                                     RAD_ALL.9893  
     &     FLUX_DIRECT_CLEAR(NPD_PROFILE, 0: NPD_LAYER)                            RAD_ALL.9894  
!             CLEAR-SKY DIRECT FLUX                                                RAD_ALL.9895  
     &   , FLUX_TOTAL_CLEAR(NPD_PROFILE, 2*NPD_LAYER+2)                            RAD_ALL.9896  
!             CLEAR-SKY TOTAL FLUX                                                 RAD_ALL.9897  
!                                                                                  RAD_ALL.9898  
!                                                                                  RAD_ALL.9899  
!                                                                                  RAD_ALL.9900  
!     LOCAL VARIABLES.                                                             RAD_ALL.9901  
      INTEGER                                                                      RAD_ALL.9902  
     &     K                                                                       RAD_ALL.9903  
!             LOOP VARIABLE                                                        RAD_ALL.9904  
      REAL                                                                         RAD_ALL.9905  
     &     TAU_FREE(NPD_PROFILE, NPD_LAYER)                                        RAD_ALL.9906  
!             FREE OPTICAL DEPTH                                                   RAD_ALL.9907  
     &   , OMEGA_FREE(NPD_PROFILE, NPD_LAYER)                                      RAD_ALL.9908  
!             FREE ALBEDO OF S. S.                                                 RAD_ALL.9909  
     &   , TAU_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)                       RAD_ALL.9910  
!             CLOUDY OPTICAL DEPTH                                                 RAD_ALL.9911  
     &   , OMEGA_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)                     RAD_ALL.9912  
!             CLOUDY SINGLE SCATTERING ALBEDO                                      RAD_ALL.9913  
!                                                                                  RAD_ALL.9914  
!     SUBROUTINES CALLED:                                                          RAD_ALL.9915  
      EXTERNAL                                                                     RAD_ALL.9916  
     &     SINGLE_SCATTERING_ALL, RESCALE_TAU_OMEGA                                RAD_ALL.9917  
     &   , TWO_STREAM                                                              RAD_ALL.9918  
     &   , MIX_COLUMN, CLOUD_COLUMN                                                RAD_ALL.9919  
     &   , GAUSS_ANGLE                                                             RAD_ALL.9920  
!                                                                                  RAD_ALL.9921  
!                                                                                  RAD_ALL.9922  
!                                                                                  RAD_ALL.9923  
!     CALCULATE SINGLE SCATTERING PROPERTIES FOR ALL ATMOSPHERIC                   RAD_ALL.9924  
!     CONSTITUENTS.                                                                RAD_ALL.9925  
!                                                                                  RAD_ALL.9926  
      CALL SINGLE_SCATTERING_ALL(I_SCATTER_METHOD_BAND                             RAD_ALL.9927  
!                       Atmospheric Properties                                     RAD_ALL.9928  
     &   , N_PROFILE, N_LAYER, D_MASS                                              RAD_ALL.9929  
!                       Cloudy Properties                                          RAD_ALL.9930  
     &   , L_CLOUD, N_CLOUD_TOP, N_CLOUD_TYPE                                      RAD_ALL.9931  
!                       Optical Properties                                         RAD_ALL.9932  
     &   , K_GREY_TOT_FREE, K_EXT_SCAT_FREE                                        RAD_ALL.9933  
     &   , K_GREY_TOT_CLOUD, K_EXT_SCAT_CLOUD                                      RAD_ALL.9934  
     &   , K_GAS_ABS                                                               RAD_ALL.9935  
!                       Single Scattering Properties                               RAD_ALL.9936  
     &   , TAU_FREE, OMEGA_FREE                                                    RAD_ALL.9937  
     &   , TAU_CLOUD, OMEGA_CLOUD                                                  RAD_ALL.9938  
!                       Dimensions of Arrays                                       RAD_ALL.9939  
     &   , NPD_PROFILE, NPD_LAYER                                                  RAD_ALL.9940  
     &   )                                                                         RAD_ALL.9941  
!                                                                                  RAD_ALL.9942  
!                                                                                  RAD_ALL.9943  
!                                                                                  RAD_ALL.9944  
      IF (I_ANGULAR_INTEGRATION.EQ.IP_TWO_STREAM) THEN                             RAD_ALL.9945  
!                                                                                  RAD_ALL.9946  
!        RESCALE TAU AND OMEGA. THE ASYMMETRY HAS ALREADY BEEN RESCALED.           RAD_ALL.9947  
!                                                                                  RAD_ALL.9948  
         IF (L_RESCALE) THEN                                                       RAD_ALL.9949  
!                                                                                  RAD_ALL.9950  
            CALL RESCALE_TAU_OMEGA(N_PROFILE, 1, N_LAYER                           RAD_ALL.9951  
     &         , TAU_FREE, OMEGA_FREE, FORWARD_SCATTER_FREE                        RAD_ALL.9952  
     &         , NPD_PROFILE, NPD_LAYER                                            RAD_ALL.9953  
     &         )                                                                   RAD_ALL.9954  
!                                                                                  RAD_ALL.9955  
            IF (L_CLOUD) THEN                                                      RAD_ALL.9956  
!                                                                                  RAD_ALL.9957  
               DO K=1, N_CLOUD_TYPE                                                RAD_ALL.9958  
                  CALL RESCALE_TAU_OMEGA(N_PROFILE, N_CLOUD_TOP                    RAD_ALL.9959  
     &               , N_LAYER                                                     RAD_ALL.9960  
     &               , TAU_CLOUD(1, 1, K), OMEGA_CLOUD(1, 1, K)                    RAD_ALL.9961  
     &               , FORWARD_SCATTER_CLOUD(1, 1, K)                              RAD_ALL.9962  
     &               , NPD_PROFILE, NPD_LAYER                                      RAD_ALL.9963  
     &               )                                                             RAD_ALL.9964  
               ENDDO                                                               RAD_ALL.9965  
!                                                                                  RAD_ALL.9966  
            ENDIF                                                                  RAD_ALL.9967  
!                                                                                  RAD_ALL.9968  
         ENDIF                                                                     RAD_ALL.9969  
!                                                                                  RAD_ALL.9970  
!                                                                                  RAD_ALL.9971  
!        SOLVE THE EQUATIONS USING THE SCHEME INDICATED BY THE VALUES              RAD_ALL.9972  
!        OF I_CLOUD AND I_SOLVER.                                                  RAD_ALL.9973  
         IF (I_CLOUD.EQ.IP_CLOUD_CLEAR) THEN                                       RAD_ALL.9974  
!                                                                                  RAD_ALL.9975  
!           A TWO-STREAM SCHEME WITH NO CLOUDS.                                    RAD_ALL.9976  
            CALL TWO_STREAM(IERR                                                   RAD_ALL.9977  
!                       Atmospheric Properties                                     RAD_ALL.9978  
     &         , N_PROFILE, N_LAYER                                                RAD_ALL.9979  
!                       Two-stream Scheme                                          RAD_ALL.9980  
     &         , I_2STREAM                                                         RAD_ALL.9981  
!                       Corrections to Two-stream Equations                        RAD_ALL.9982  
     &         , L_2_STREAM_CORRECT, PLANCK_SOURCE, GROUND_EMISSION                RAD_ALL.9983  
!                       Options for Solver                                         RAD_ALL.9984  
     &         , L_NET, I_SOLVER                                                   RAD_ALL.9985  
!                       Options for Equivalent Extinction                          RAD_ALL.9986  
     &         , L_SCALE_SOLAR, ADJUST_SOLAR_KE                                    RAD_ALL.9987  
!                       Spectral Region                                            RAD_ALL.9988  
     &         , ISOLIR                                                            RAD_ALL.9989  
!                       Infra-red Properties                                       RAD_ALL.9990  
     &         , DIFF_PLANCK                                                       RAD_ALL.9991  
     &         , L_IR_SOURCE_QUAD, DIFF_PLANCK_2                                   RAD_ALL.9992  
!                       Conditions at TOA                                          RAD_ALL.9993  
     &         , FLUX_INC_DOWN, FLUX_INC_DIRECT, SEC_0                             RAD_ALL.9994  
!                       Surface Conditions                                         RAD_ALL.9995  
     &         , ALBEDO_SURFACE_DIFF, ALBEDO_SURFACE_DIR, SOURCE_GROUND            RAD_ALL.9996  
!                       Single Scattering Propeties                                RAD_ALL.9997  
     &         , TAU_FREE, OMEGA_FREE, ASYMMETRY_FREE                              RAD_ALL.9998  
!                       Fluxes Calculated                                          RAD_ALL.9999  
     &         , FLUX_DIRECT, FLUX_TOTAL                                           RAD_ALL.10000 
!                       Flag for Clear-sky Fluxes                                  RAD_ALL.10001 
     &         , L_CLEAR                                                           RAD_ALL.10002 
!                       Clear-sky Fluxes Calculated                                RAD_ALL.10003 
     &         , FLUX_DIRECT_CLEAR, FLUX_TOTAL_CLEAR                               RAD_ALL.10004 
!                       Sizes of Arrays                                            RAD_ALL.10005 
     &         , NPD_PROFILE, NPD_LAYER                                            RAD_ALL.10006 
     &         )                                                                   RAD_ALL.10007 
               IF (IERR.NE.I_NORMAL) RETURN                                        RAD_ALL.10008 
!                                                                                  RAD_ALL.10009 
         ELSEIF ( (I_CLOUD.EQ.IP_CLOUD_MIX_MAX)                                    RAD_ALL.10010 
     &          .OR. (I_CLOUD.EQ.IP_CLOUD_MIX_RANDOM) ) THEN                       RAD_ALL.10011 
!                                                                                  RAD_ALL.10012 
!           CLOUDS ARE TREATED USING ZDUNKOWSKI'S MIXED-COLUMN SCHEME.             RAD_ALL.10013 
!           THE GEOMETRY HAS BEEN SET BEFORE.                                      RAD_ALL.10014 
!                                                                                  RAD_ALL.10015 
            CALL MIX_COLUMN(IERR                                                   RAD_ALL.10016 
!                       Atmospheric Properties                                     RAD_ALL.10017 
     &         , N_PROFILE, N_LAYER                                                RAD_ALL.10018 
!                       Two-stream Scheme                                          RAD_ALL.10019 
     &         , I_2STREAM                                                         RAD_ALL.10020 
!                       Corrections to Two-stream Equations                        RAD_ALL.10021 
     &         , L_2_STREAM_CORRECT, PLANCK_SOURCE, GROUND_EMISSION                RAD_ALL.10022 
!                       Options for Solver                                         RAD_ALL.10023 
     &         , I_SOLVER, I_EXTRAPOLATE_MIX_NET, L_NET                            RAD_ALL.10024 
!                       Options for Equivalent Extinction                          RAD_ALL.10025 
     &         , L_SCALE_SOLAR, ADJUST_SOLAR_KE                                    RAD_ALL.10026 
!                       Spectral Region                                            RAD_ALL.10027 
     &         , ISOLIR                                                            RAD_ALL.10028 
!                       Infra-red Properties                                       RAD_ALL.10029 
     &         , DIFF_PLANCK                                                       RAD_ALL.10030 
     &         , L_IR_SOURCE_QUAD, DIFF_PLANCK_2                                   RAD_ALL.10031 
!                       Conditions at TOA                                          RAD_ALL.10032 
     &         , FLUX_INC_DOWN, FLUX_INC_DIRECT, SEC_0                             RAD_ALL.10033 
!                       Conditions at Surface                                      RAD_ALL.10034 
     &         , ALBEDO_SURFACE_DIFF, ALBEDO_SURFACE_DIR, SOURCE_GROUND            RAD_ALL.10035 
!                       Clear-sky Single Scattering Properties                     RAD_ALL.10036 
     &         , TAU_FREE, OMEGA_FREE, ASYMMETRY_FREE                              RAD_ALL.10037 
!                       Cloud Geometry                                             RAD_ALL.10038 
     &         , N_CLOUD_TOP                                                       RAD_ALL.10039 
     &         , N_CLOUD_TYPE, FRAC_CLOUD                                          RAD_ALL.10040 
     &         , W_FREE, N_FREE_PROFILE, I_FREE_PROFILE                            RAD_ALL.10041 
     &         , W_CLOUD, N_CLOUD_PROFILE, I_CLOUD_PROFILE                         RAD_ALL.10042 
     &         , CLOUD_OVERLAP                                                     RAD_ALL.10043 
!                       Cloudy Optical Properties                                  RAD_ALL.10044 
     &         , TAU_CLOUD, OMEGA_CLOUD, ASYMMETRY_CLOUD                           RAD_ALL.10045 
!                       Fluxes Calculated                                          RAD_ALL.10046 
     &         , FLUX_DIRECT, FLUX_TOTAL                                           RAD_ALL.10047 
!                       Flags for Clear-sky Calculations                           RAD_ALL.10048 
     &         , L_CLEAR, I_SOLVER_CLEAR                                           RAD_ALL.10049 
!                       Clear-sky Fluxes Calculated                                RAD_ALL.10050 
     &         , FLUX_DIRECT_CLEAR, FLUX_TOTAL_CLEAR                               RAD_ALL.10051 
!                       Dimensions of Arrays                                       RAD_ALL.10052 
     &         , NPD_PROFILE, NPD_LAYER                                            RAD_ALL.10053 
     &         )                                                                   RAD_ALL.10054 
            IF (IERR.NE.I_NORMAL) RETURN                                           RAD_ALL.10055 
         ELSEIF (I_CLOUD.EQ.IP_CLOUD_TRIPLE) THEN                                  RAD_ALL.10056 
!                                                                                  RAD_ALL.10057 
!           CLOUDS ARE TREATED USING A DECOMPOSITION OF THE COLUMN                 RAD_ALL.10058 
!           INTO CLEAR-SKY, STRATIFORM AND CONVECTIVE REGIONS, ALL                 RAD_ALL.10059 
!           MAXIMALLY OVERLAPPED.                                                  RAD_ALL.10060 
!                                                                                  RAD_ALL.10061 
            CALL TRIPLE_COLUMN(IERR                                                RAD_ALL.10062 
!                       Atmospheric Properties                                     RAD_ALL.10063 
     &         , N_PROFILE, N_LAYER                                                RAD_ALL.10064 
!                       Two-stream Scheme                                          RAD_ALL.10065 
     &         , I_2STREAM                                                         RAD_ALL.10066 
!                       Corrections to Two-stream Equations                        RAD_ALL.10067 
     &         , L_2_STREAM_CORRECT, PLANCK_SOURCE, GROUND_EMISSION                RAD_ALL.10068 
!                       Options for Solver                                         RAD_ALL.10069 
     &         , I_SOLVER, I_EXTRAPOLATE_MIX_NET, L_NET                            RAD_ALL.10070 
!                       Options for Equivalent Extinction                          RAD_ALL.10071 
     &         , L_SCALE_SOLAR, ADJUST_SOLAR_KE                                    RAD_ALL.10072 
!                       Spectral Region                                            RAD_ALL.10073 
     &         , ISOLIR                                                            RAD_ALL.10074 
!                       Infra-red Properties                                       RAD_ALL.10075 
     &         , DIFF_PLANCK                                                       RAD_ALL.10076 
     &         , L_IR_SOURCE_QUAD, DIFF_PLANCK_2                                   RAD_ALL.10077 
!                       Conditions at TOA                                          RAD_ALL.10078 
     &         , FLUX_INC_DOWN, FLUX_INC_DIRECT, SEC_0                             RAD_ALL.10079 
!                       Conditions at Surface                                      RAD_ALL.10080 
     &         , ALBEDO_SURFACE_DIFF, ALBEDO_SURFACE_DIR, SOURCE_GROUND            RAD_ALL.10081 
!                       Clear-sky Single Scattering Properties                     RAD_ALL.10082 
     &         , TAU_FREE, OMEGA_FREE, ASYMMETRY_FREE                              RAD_ALL.10083 
!                       Cloud Geometry                                             RAD_ALL.10084 
     &         , N_CLOUD_TOP                                                       RAD_ALL.10085 
     &         , N_CLOUD_TYPE, FRAC_CLOUD                                          RAD_ALL.10086 
     &         , I_REGION_CLOUD, FRAC_REGION                                       RAD_ALL.10087 
     &         , W_FREE, N_FREE_PROFILE, I_FREE_PROFILE                            RAD_ALL.10088 
     &         , W_CLOUD, N_CLOUD_PROFILE, I_CLOUD_PROFILE                         RAD_ALL.10089 
     &         , CLOUD_OVERLAP                                                     RAD_ALL.10090 
!                       Cloudy Optical Properties                                  RAD_ALL.10091 
     &         , TAU_CLOUD, OMEGA_CLOUD, ASYMMETRY_CLOUD                           RAD_ALL.10092 
!                       Fluxes Calculated                                          RAD_ALL.10093 
     &         , FLUX_DIRECT, FLUX_TOTAL                                           RAD_ALL.10094 
!                       Flags for Clear-sky Calculations                           RAD_ALL.10095 
     &         , L_CLEAR, I_SOLVER_CLEAR                                           RAD_ALL.10096 
!                       Clear-sky Fluxes Calculated                                RAD_ALL.10097 
     &         , FLUX_DIRECT_CLEAR, FLUX_TOTAL_CLEAR                               RAD_ALL.10098 
!                       Dimensions of Arrays                                       RAD_ALL.10099 
     &         , NPD_PROFILE, NPD_LAYER                                            RAD_ALL.10100 
     &         )                                                                   RAD_ALL.10101 
            IF (IERR.NE.I_NORMAL) RETURN                                           RAD_ALL.10102 
!                                                                                  RAD_ALL.10103 
         ELSEIF (I_CLOUD.EQ.IP_CLOUD_COLUMN_MAX) THEN                              RAD_ALL.10104 
!           CLOUDS ARE TREATED ON THE ASSUMPTION OF MAXIMUM OVERLAP                RAD_ALL.10105 
!           IN A COLUMN MODEL.                                                     RAD_ALL.10106 
            CALL CLOUD_COLUMN(IERR                                                 RAD_ALL.10107 
!                       Atmospheric Properties                                     RAD_ALL.10108 
     &         , N_PROFILE, N_LAYER                                                RAD_ALL.10109 
!                       Two-stream Scheme                                          RAD_ALL.10110 
     &         , I_2STREAM                                                         RAD_ALL.10111 
!                       Corrections to Two-stream Equations                        RAD_ALL.10112 
     &         , L_2_STREAM_CORRECT, PLANCK_SOURCE, GROUND_EMISSION                RAD_ALL.10113 
!                       Options for Solver                                         RAD_ALL.10114 
     &         , I_SOLVER, N_AUGMENT                                               RAD_ALL.10115 
!                       Options for Equivalent Extinction                          RAD_ALL.10116 
     &         , L_SCALE_SOLAR, ADJUST_SOLAR_KE                                    RAD_ALL.10117 
!                       Spectral Region                                            RAD_ALL.10118 
     &         , ISOLIR                                                            RAD_ALL.10119 
!                       Infra-red Properties                                       RAD_ALL.10120 
     &         , DIFF_PLANCK                                                       RAD_ALL.10121 
     &         , L_IR_SOURCE_QUAD, DIFF_PLANCK_2                                   RAD_ALL.10122 
!                       Conditions at TOA                                          RAD_ALL.10123 
     &         , FLUX_INC_DOWN, FLUX_INC_DIRECT, SEC_0                             RAD_ALL.10124 
!                       Conditions at Surface                                      RAD_ALL.10125 
     &         , ALBEDO_SURFACE_DIFF, ALBEDO_SURFACE_DIR, SOURCE_GROUND            RAD_ALL.10126 
!                       Clear-sky Single Scattering Properties                     RAD_ALL.10127 
     &         , TAU_FREE, OMEGA_FREE, ASYMMETRY_FREE                              RAD_ALL.10128 
!                       Cloud Geometry                                             RAD_ALL.10129 
     &         , N_CLOUD_TOP                                                       RAD_ALL.10130 
     &         , N_CLOUD_TYPE, FRAC_CLOUD                                          RAD_ALL.10131 
     &         , N_COLUMN, L_COLUMN, AREA_COLUMN                                   RAD_ALL.10132 
!                       Cloudy Optical Properties                                  RAD_ALL.10133 
     &         , TAU_CLOUD, OMEGA_CLOUD, ASYMMETRY_CLOUD                           RAD_ALL.10134 
!                       Fluxes Calculated                                          RAD_ALL.10135 
     &         , FLUX_DIRECT, FLUX_TOTAL                                           RAD_ALL.10136 
!                       Flags for Clear-sky Calculations                           RAD_ALL.10137 
     &         , L_CLEAR, I_SOLVER_CLEAR                                           RAD_ALL.10138 
!                       Clear-sky Fluxes Calculated                                RAD_ALL.10139 
     &         , FLUX_DIRECT_CLEAR, FLUX_TOTAL_CLEAR                               RAD_ALL.10140 
!                       Dimensions of Arrays                                       RAD_ALL.10141 
     &         , NPD_PROFILE, NPD_LAYER, NPD_COLUMN                                RAD_ALL.10142 
     &         )                                                                   RAD_ALL.10143 
            IF (IERR.NE.I_NORMAL) RETURN                                           RAD_ALL.10144 
!                                                                                  RAD_ALL.10145 
         ENDIF                                                                     RAD_ALL.10146 
!                                                                                  RAD_ALL.10147 
      ELSE IF (I_ANGULAR_INTEGRATION.EQ.IP_IR_GAUSS) THEN                          RAD_ALL.10148 
!                                                                                  RAD_ALL.10149 
!        FULL ANGULAR RESOLUTION USING GASUSSIAN INTEGRATION.                      RAD_ALL.10150 
         CALL GAUSS_ANGLE(N_PROFILE, N_LAYER, L_NET, N_AUGMENT                     RAD_ALL.10151 
     &      , N_ORDER_GAUSS                                                        RAD_ALL.10152 
     &      , TAU_FREE                                                             RAD_ALL.10153 
     &      , FLUX_INC_DOWN                                                        RAD_ALL.10154 
     &      , DIFF_PLANCK, SOURCE_GROUND, ALBEDO_SURFACE_DIFF                      RAD_ALL.10155 
     &      , FLUX_TOTAL                                                           RAD_ALL.10156 
     &      , L_IR_SOURCE_QUAD, DIFF_PLANCK_2                                      RAD_ALL.10157 
     &      , NPD_PROFILE, NPD_LAYER                                               RAD_ALL.10158 
     &      )                                                                      RAD_ALL.10159 
         IF (IERR.NE.I_NORMAL) RETURN                                              RAD_ALL.10160 
!                                                                                  RAD_ALL.10161 
      ENDIF                                                                        RAD_ALL.10162 
!                                                                                  RAD_ALL.10163 
!                                                                                  RAD_ALL.10164 
      RETURN                                                                       RAD_ALL.10165 
      END     
