C (c) CROWN COPYRIGHT 1995, METEOROLOGICAL OFFICE, All Rights Reserved.            RAD_ALL.5789  
C                                                                                  RAD_ALL.5790  
C Use, duplication or disclosure of this code is subject to the                    RAD_ALL.5791  
C restrictions as set forth in the contract.                                       RAD_ALL.5792  
C                                                                                  RAD_ALL.5793  
C                Meteorological Office                                             RAD_ALL.5794  
C                London Road                                                       RAD_ALL.5795  
C                BRACKNELL                                                         RAD_ALL.5796  
C                Berkshire UK                                                      RAD_ALL.5797  
C                RG12 2SZ                                                          RAD_ALL.5798  
C                                                                                  RAD_ALL.5799  
C If no contract has been raised with this copy of the code, the use,              RAD_ALL.5800  
C duplication or disclosure of it is strictly prohibited.  Permission              RAD_ALL.5801  
C to do so must first be obtained in writing from the Head of Numerical            RAD_ALL.5802  
C Modelling at the above address.                                                  RAD_ALL.5803  
C ******************************COPYRIGHT******************************            RAD_ALL.5804  
C                                                                                  RAD_ALL.5805  
!+ Subroutine to calculate radiative fluxes.                                       RAD_ALL.5806  
!                                                                                  RAD_ALL.5807  
! Method:                                                                          RAD_ALL.5808  
!       Properties independent of the spectral bands are set.                      RAD_ALL.5809  
!       A loop over bands is then entered. Grey optical properties                 RAD_ALL.5810  
!       are set and an appropriate subroutine is called to treat                   RAD_ALL.5811  
!       the gaseous overlaps. The final fluxes are assigned.                       RAD_ALL.5812  
!                                                                                  RAD_ALL.5813  
! Current Owner of Code: J. M. Edwards                                             RAD_ALL.5814  
!                                                                                  RAD_ALL.5815  
! History:                                                                         RAD_ALL.5816  
!       Version         Date                    Comment                            RAD_ALL.5817  
!       4.0             27-07-95                Original Code                      RAD_ALL.5818  
!                                               (J. M. Edwards)                    RAD_ALL.5819  
!       4.1             10-06-96                New solvers added.                 RAD_ALL.5820  
!                                               Revised formulation for            RAD_ALL.5821  
!                                               sea-ice. Renaming of               RAD_ALL.5822  
!                                               diagnostic and logical             RAD_ALL.5823  
!                                               switch for flux                    RAD_ALL.5824  
!                                               below 690 nm. Pointer              RAD_ALL.5825  
!                                               to water vapour added.             RAD_ALL.5826  
!                                               (J. M. Edwards)                    RAD_ALL.5827  
!       4.2             08-08-96                Generalization for                 RAD_ALL.5828  
!                                               vertically coherent                RAD_ALL.5829  
!                                               convective cloud.                  RAD_ALL.5830  
!       4.4             30-09-96                Effective Radius                   RAD_ALL.5831  
!                                               relabelled as charact-             RAD_ALL.5832  
!                                               eristic dimension for              RAD_ALL.5833  
!                                               generality to cover                RAD_ALL.5834  
!                                               parametrizations of                RAD_ALL.5835  
!                                               non-spherical ice.                 RAD_ALL.5836  
!                                               (J. M. Edwards)                    RAD_ALL.5837  
!                                                                                  RAD_ALL.5838  
! Description of Code:                                                             RAD_ALL.5839  
!   FORTRAN 77  with extensions listed in documentation.                           RAD_ALL.5840  
!                                                                                  RAD_ALL.5841  
!- ---------------------------------------------------------------------           RAD_ALL.5842  
      SUBROUTINE FLUX_CALC(IERR                                                    RAD_ALL.5843  
!                       Logical Flags for Processes                                RAD_ALL.5844  
     &   , L_RAYLEIGH, L_AEROSOL, L_GAS, L_CONTINUUM                               RAD_ALL.5845  
     &   , L_CLOUD, L_DROP, L_ICE                                                  RAD_ALL.5846  
!                       Angular Integration                                        RAD_ALL.5847  
     &   , I_ANGULAR_INTEGRATION, I_2STREAM, L_2_STREAM_CORRECT                    RAD_ALL.5848  
     &   , L_RESCALE, N_ORDER_GAUSS                                                RAD_ALL.5849  
!                       Treatment of Scattering                                    RAD_ALL.5850  
     &   , I_SCATTER_METHOD, L_SWITCH_SCATTER                                      RAD_ALL.5851  
!                       Options for treating clouds                                RAD_ALL.5852  
     &   , L_GLOBAL_CLOUD_TOP, N_CLOUD_TOP_GLOBAL                                  RAD_ALL.5853  
!                       Options for Solver                                         RAD_ALL.5854  
     &   , I_SOLVER, I_EXTRAPOLATE_MIX_NET                                         RAD_ALL.5855  
!                       General Spectral Properties                                RAD_ALL.5856  
     &   , N_BAND, I_FIRST_BAND, I_LAST_BAND, WEIGHT_BAND                          RAD_ALL.5857  
!                       General Atmospheric Properties                             RAD_ALL.5858  
     &   , N_PROFILE, N_LAYER                                                      RAD_ALL.5859  
     &   , L_LAYER, L_CLOUD_LAYER                                                  RAD_ALL.5860  
     &   , P, T, T_GROUND, T_LEVEL, D_MASS                                         RAD_ALL.5861  
!                       Spectral Region                                            RAD_ALL.5862  
     &   , ISOLIR                                                                  RAD_ALL.5863  
!                       Solar Fields                                               RAD_ALL.5864  
     &   , SEC_0, SOLAR_TOA, SOLAR_FLUX_BAND, RAYLEIGH_COEFFICIENT                 RAD_ALL.5865  
!                       Infra-red Fields                                           RAD_ALL.5866  
     &   , N_DEG_FIT, THERMAL_COEFFICIENT, T_REF_PLANCK                            RAD_ALL.5867  
     &   , L_IR_SOURCE_QUAD                                                        RAD_ALL.5868  
!                       Gaseous Absorption                                         RAD_ALL.5869  
     &   , N_ABSORB, I_GAS_OVERLAP, I_GAS                                          RAD_ALL.5870  
     &   , GAS_MIX_RATIO, N_BAND_ABSORB, INDEX_ABSORB                              RAD_ALL.5871  
     &   , I_BAND_ESFT, W_ESFT, K_ESFT, I_SCALE_ESFT                               RAD_ALL.5872  
     &   , I_SCALE_FNC, SCALE_VECTOR                                               RAD_ALL.5873  
     &   , P_REFERENCE, T_REFERENCE                                                RAD_ALL.5874  
!                       Doppler Broadening                                         RAD_ALL.5875  
     &   , L_DOPPLER, DOPPLER_CORRECTION                                           RAD_ALL.5876  
!                       Surface Fields                                             RAD_ALL.5877  
     &   , L_SURFACE, I_SURFACE, I_SPEC_SURFACE, SURFACE_ALBEDO                    RAD_ALL.5878  
     &   , ALBEDO_FIELD_DIFF, ALBEDO_FIELD_DIR                                     RAD_ALL.5879  
     &   , N_DIR_ALBEDO_FIT, DIRECT_ALBEDO_PARM                                    RAD_ALL.5880  
     &   , EMISSIVITY_GROUND, EMISSIVITY_FIELD                                     RAD_ALL.5881  
!                       Continuum Absorption                                       RAD_ALL.5882  
     &   , N_BAND_CONTINUUM, INDEX_CONTINUUM, INDEX_WATER                          RAD_ALL.5883  
     &   , K_CONTINUUM, I_SCALE_FNC_CONT, SCALE_CONTINUUM                          RAD_ALL.5884  
     &   , P_REF_CONTINUUM, T_REF_CONTINUUM                                        RAD_ALL.5885  
!                       Properties of Aerosols                                     RAD_ALL.5886  
     &   , N_AEROSOL, AEROSOL_MIX_RATIO                                            RAD_ALL.5887  
     &   , AEROSOL_ABSORPTION, AEROSOL_SCATTERING, AEROSOL_ASYMMETRY               RAD_ALL.5888  
     &   , I_AEROSOL_PARAMETRIZATION, NHUMIDITY, HUMIDITIES                        RAD_ALL.5889  
!                       Properties of Clouds                                       RAD_ALL.5890  
     &   , N_CONDENSED, TYPE_CONDENSED                                             RAD_ALL.5891  
     &   , I_CLOUD, I_CLOUD_REPRESENTATION, W_CLOUD, FRAC_CLOUD                    RAD_ALL.5892  
     &   , CONDENSED_MIX_RATIO, CONDENSED_DIM_CHAR                                 RAD_ALL.5893  
     &   , I_CONDENSED_PARAM, CONDENSED_PARAM_LIST                                 RAD_ALL.5894  
!                       Fluxes Calculated                                          RAD_ALL.5895  
     &   , FLUX_DIRECT, FLUX_DOWN, FLUX_UP                                         RAD_ALL.5896  
!                       Options for Clear-sky Fluxes                               RAD_ALL.5897  
     &   , L_CLEAR, I_SOLVER_CLEAR                                                 RAD_ALL.5898  
!                       Clear-sky Fluxes Calculated                                RAD_ALL.5899  
     &   , FLUX_DIRECT_CLEAR, FLUX_DOWN_CLEAR, FLUX_UP_CLEAR                       RAD_ALL.5900  
!                       Arrays specific to the UM                                  RAD_ALL.5901  
!                       Arrays for Coupling                                        RAD_ALL.5902  
     &   , N_FRAC_ICE_POINT, I_FRAC_ICE_POINT, ICE_FRACTION                        RAD_ALL.5903  
     &   , ALBEDO_SEA_DIFF, ALBEDO_SEA_DIR                                         RAD_ALL.5904  
     &   , SEA_FLUX                                                                RAD_ALL.5905  
!                       Arrays for diagnostics specific to the UM                  RAD_ALL.5906  
     &   , L_FLUX_BELOW_690NM_SURF, WEIGHT_690NM                                   RAD_ALL.5907  
     &   , FLUX_BELOW_690NM_SURF                                                   RAD_ALL.5908  
     &   , L_SURFACE_DOWN_FLUX, SURFACE_DOWN_FLUX                                  RAD_ALL.5909  
     &   , L_SURF_DOWN_CLR, SURF_DOWN_CLR                                          RAD_ALL.5910  
     &   , L_SURF_UP_CLR, SURF_UP_CLR                                              RAD_ALL.5911  
!                       Dimensions of Arrays                                       RAD_ALL.5912  
     &   , NPD_PROFILE, NPD_LAYER, NPD_COLUMN                                      RAD_ALL.5913  
     &   , NPD_BAND                                                                RAD_ALL.5914  
     &   , NPD_SPECIES                                                             RAD_ALL.5915  
     &   , NPD_ESFT_TERM, NPD_SCALE_FNC, NPD_SCALE_VARIABLE                        RAD_ALL.5916  
     &   , NPD_CONTINUUM                                                           RAD_ALL.5917  
     &   , NPD_AEROSOL_SPECIES, NPD_HUMIDITIES                                     RAD_ALL.5918  
     &   , NPD_CLOUD_PARAMETER                                                     RAD_ALL.5919  
     &   , NPD_THERMAL_COEFF                                                       RAD_ALL.5920  
     &   , NPD_SURFACE, NPD_ALBEDO_PARM                                            RAD_ALL.5921  
     &   )                                                                         RAD_ALL.5922  
!                                                                                  RAD_ALL.5923  
!                                                                                  RAD_ALL.5924  
      IMPLICIT NONE                                                                RAD_ALL.5925  
!                                                                                  RAD_ALL.5926  
!                                                                                  RAD_ALL.5927  
!     DUMMY ARRAY SIZES                                                            RAD_ALL.5928  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.5929  
     &     NPD_PROFILE                                                             RAD_ALL.5930  
!             MAXIMUM NUMBER OF PROFILES                                           RAD_ALL.5931  
     &   , NPD_LAYER                                                               RAD_ALL.5932  
!             MAXIMUM NUMBER OF LAYERS                                             RAD_ALL.5933  
     &   , NPD_BAND                                                                RAD_ALL.5934  
!             NUMBER OF BANDS                                                      RAD_ALL.5935  
     &   , NPD_SPECIES                                                             RAD_ALL.5936  
!             NUMBER OF SPECIES                                                    RAD_ALL.5937  
     &   , NPD_CONTINUUM                                                           RAD_ALL.5938  
!             NUMBER OF CONTINUA                                                   RAD_ALL.5939  
     &   , NPD_AEROSOL_SPECIES                                                     RAD_ALL.5940  
!             NUMBER OF AEROSOL SPECIES                                            RAD_ALL.5941  
     &   , NPD_HUMIDITIES                                                          RAD_ALL.5942  
!             MAXIMUM NUMBER OF HUMIDITIES                                         RAD_ALL.5943  
     &   , NPD_ESFT_TERM                                                           RAD_ALL.5944  
!             MAXIMUM NUMBER OF ESFT TERMS                                         RAD_ALL.5945  
     &   , NPD_SCALE_FNC                                                           RAD_ALL.5946  
!             NUMBER OF SCALING FUNCTIONS                                          RAD_ALL.5947  
     &   , NPD_SCALE_VARIABLE                                                      RAD_ALL.5948  
!             NUMBER OF SCALING VARIABLES                                          RAD_ALL.5949  
     &   , NPD_CLOUD_PARAMETER                                                     RAD_ALL.5950  
!             MAXIMUM NUMBER OF CLOUD PARAMETERS                                   RAD_ALL.5951  
     &   , NPD_THERMAL_COEFF                                                       RAD_ALL.5952  
!             MAXIMUM NUMBER OF THERMAL COEFFICIENTS                               RAD_ALL.5953  
     &   , NPD_SURFACE                                                             RAD_ALL.5954  
!             NUMBER OF SURFACE TYPES                                              RAD_ALL.5955  
     &   , NPD_ALBEDO_PARM                                                         RAD_ALL.5956  
!             NUMBER OF PARAMETERS FOR DIRECT ALB.                                 RAD_ALL.5957  
     &   , NPD_COLUMN                                                              RAD_ALL.5958  
!             NUMBER OF COLUMNS PER POINT                                          RAD_ALL.5959  
!                                                                                  RAD_ALL.5960  
!     INCLUDE COMDECKS.                                                            RAD_ALL.5961  
!     ------------------------------------------------------------------           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    
!     ------------------------------------------------------------------           GASOVL3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       GASOVL3A.3     
!                                                                                  GASOVL3A.4     
!     MODULE TO SET TREATMENTS OF OVERLAPPING GASAEOUS ABSORPTION.                 GASOVL3A.5     
!                                                                                  GASOVL3A.6     
      INTEGER                                                                      GASOVL3A.7     
     &     IP_OVERLAP_SINGLE                                                       GASOVL3A.8     
!             ONE SPECIES ONLY                                                     GASOVL3A.9     
     &   , IP_OVERLAP_RANDOM                                                       GASOVL3A.10    
!             RANDOM OVERLAP                                                       GASOVL3A.11    
     &   , IP_OVERLAP_FESFT                                                        GASOVL3A.12    
!             FAST ESFT                                                            GASOVL3A.13    
     &   , IP_OVERLAP_CLR_FESFT                                                    GASOVL3A.14    
!             CLEAR-SKY FAST ESFT                                                  GASOVL3A.15    
     &   , IP_OVERLAP_K_EQV                                                        GASOVL3A.16    
!             EQUIVALENT EXTINCTION                                                GASOVL3A.17    
     &   , IP_OVERLAP_SINGLE_INT                                                   GASOVL3A.18    
!             INTERPOLATED TREATMENT FOR PRINCIPAL SPECIES                         GASOVL3A.19    
!                                                                                  GASOVL3A.20    
      PARAMETER(                                                                   GASOVL3A.21    
     &     IP_OVERLAP_SINGLE=1                                                     GASOVL3A.22    
     &   , IP_OVERLAP_RANDOM=2                                                     GASOVL3A.23    
     &   , IP_OVERLAP_FESFT=3                                                      GASOVL3A.24    
     &   , IP_OVERLAP_CLR_FESFT=4                                                  GASOVL3A.25    
     &   , IP_OVERLAP_K_EQV=5                                                      GASOVL3A.26    
     &   , IP_OVERLAP_SINGLE_INT=6                                                 GASOVL3A.27    
     &   )                                                                         GASOVL3A.28    
!                                                                                  GASOVL3A.29    
!     ------------------------------------------------------------------           GASOVL3A.30    
!     ------------------------------------------------------------------           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    
!     ------------------------------------------------------------------           CLREPP3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       CLREPP3A.3     
!                                                                                  CLREPP3A.4     
!     MODULE TO SET REPRESENTATIONS OF CLOUDS.                                     CLREPP3A.5     
!                                                                                  CLREPP3A.6     
!     REPRESENTATIONS                                                              CLREPP3A.7     
      INTEGER                                                                      CLREPP3A.8     
     &     IP_CLOUD_HOMOGEN                                                        CLREPP3A.9     
!             ALL COMPONENTS ARE MIXED HOMOGENEOUSLY                               CLREPP3A.10    
     &   , IP_CLOUD_ICE_WATER                                                      CLREPP3A.11    
!             ICE AND WATER CLOUDS ARE TREATED SEPARATELY                          CLREPP3A.12    
     &   , IP_CLOUD_CONV_STRAT                                                     CLREPP3A.13    
!             CLOUDS ARE DIVIDED INTO HOMOGENEOUSLY MIXED                          CLREPP3A.14    
!             STRATIFORM AND CONVECTIVE PARTS                                      CLREPP3A.15    
     &   , IP_CLOUD_CSIW                                                           CLREPP3A.16    
!             CLOUDS DIVIDED INTO ICE AND WATER PHASES AND                         CLREPP3A.17    
!             INTO STRATIFORM AND CONVECTIVE COMPONENTS.                           CLREPP3A.18    
!                                                                                  CLREPP3A.19    
      PARAMETER(                                                                   CLREPP3A.20    
     &     IP_CLOUD_HOMOGEN=1                                                      CLREPP3A.21    
     &   , IP_CLOUD_ICE_WATER=2                                                    CLREPP3A.22    
     &   , IP_CLOUD_CONV_STRAT=3                                                   CLREPP3A.23    
     &   , IP_CLOUD_CSIW=4                                                         CLREPP3A.24    
     &   )                                                                         CLREPP3A.25    
!                                                                                  CLREPP3A.26    
!     TYPES OF CLOUDS:                                                             CLREPP3A.27    
      INTEGER                                                                      CLREPP3A.28    
     &     NP_CLOUD_TYPE(NPD_CLOUD_REPRESENTATION)                                 CLREPP3A.29    
!             NUMBER OF TYPE OF CLOUDS IN REPRESENTATION                           CLREPP3A.30    
!                                                                                  CLREPP3A.31    
      INTEGER                                                                      CLREPP3A.32    
     &     IP_CLOUD_TYPE_MAP(NPD_CLOUD_COMPONENT                                   CLREPP3A.33    
     &       , NPD_CLOUD_REPRESENTATION)                                           CLREPP3A.34    
!            MAP OF COMPONENTS CONTRIBUTING TO TYPES OF CLOUDS                     CLREPP3A.35    
!                                                                                  CLREPP3A.36    
!     ------------------------------------------------------------------           CLREPP3A.37    
!     ------------------------------------------------------------------           CLDCMP3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       CLDCMP3A.3     
!                                                                                  CLDCMP3A.4     
!     MODULE TO SET COMPONENTS OF CLOUDS.                                          CLDCMP3A.5     
!                                                                                  CLDCMP3A.6     
      INTEGER                                                                      CLDCMP3A.7     
     &     IP_CLCMP_ST_WATER                                                       CLDCMP3A.8     
!             STRATIFORM WATER DROPLETS                                            CLDCMP3A.9     
     &   , IP_CLCMP_ST_ICE                                                         CLDCMP3A.10    
!             STRATIFORM ICE CRYSTALS                                              CLDCMP3A.11    
     &   , IP_CLCMP_CNV_WATER                                                      CLDCMP3A.12    
!             CONVECTIVE WATER DROPLETS                                            CLDCMP3A.13    
     &   , IP_CLCMP_CNV_ICE                                                        CLDCMP3A.14    
!             CONVECTIVE ICE CRYSTALS                                              CLDCMP3A.15    
!                                                                                  CLDCMP3A.16    
      PARAMETER(                                                                   CLDCMP3A.17    
     &     IP_CLCMP_ST_WATER=1                                                     CLDCMP3A.18    
     &   , IP_CLCMP_ST_ICE=2                                                       CLDCMP3A.19    
     &   , IP_CLCMP_CNV_WATER=3                                                    CLDCMP3A.20    
     &   , IP_CLCMP_CNV_ICE=4                                                      CLDCMP3A.21    
     &   )                                                                         CLDCMP3A.22    
!                                                                                  CLDCMP3A.23    
!     ------------------------------------------------------------------           CLDCMP3A.24    
!     ------------------------------------------------------------------           CLDTYP3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       CLDTYP3A.3     
!                                                                                  CLDTYP3A.4     
!     MODULE TO SET TYPES OF CLOUDS.                                               CLDTYP3A.5     
!                                                                                  CLDTYP3A.6     
      INTEGER                                                                      CLDTYP3A.7     
     &     IP_CLOUD_TYPE_HOMOGEN                                                   CLDTYP3A.8     
!             CLOUD COMPOSED OF MIXED WATER AND ICE                                CLDTYP3A.9     
     &   , IP_CLOUD_TYPE_WATER                                                     CLDTYP3A.10    
!             CLOUD COMPOSED ONLY OF WATER                                         CLDTYP3A.11    
     &   , IP_CLOUD_TYPE_ICE                                                       CLDTYP3A.12    
!             CLOUD COMPOSED ONLY OF ICE                                           CLDTYP3A.13    
     &   , IP_CLOUD_TYPE_STRAT                                                     CLDTYP3A.14    
!             MIXED-PHASE STRATIFORM CLOUD                                         CLDTYP3A.15    
     &   , IP_CLOUD_TYPE_CONV                                                      CLDTYP3A.16    
!             MIXED-PHASE CONVECTIVE CLOUD                                         CLDTYP3A.17    
     &   , IP_CLOUD_TYPE_SW                                                        CLDTYP3A.18    
!             STRATIFORM WATER CLOUD                                               CLDTYP3A.19    
     &   , IP_CLOUD_TYPE_SI                                                        CLDTYP3A.20    
!             STRATIFORM ICE CLOUD                                                 CLDTYP3A.21    
     &   , IP_CLOUD_TYPE_CW                                                        CLDTYP3A.22    
!             CONVECTIVE WATER CLOUD                                               CLDTYP3A.23    
     &   , IP_CLOUD_TYPE_CI                                                        CLDTYP3A.24    
!             CONVECTIVE ICE CLOUD                                                 CLDTYP3A.25    
!                                                                                  CLDTYP3A.26    
      PARAMETER(                                                                   CLDTYP3A.27    
     &     IP_CLOUD_TYPE_HOMOGEN=1                                                 CLDTYP3A.28    
     &   , IP_CLOUD_TYPE_WATER=1                                                   CLDTYP3A.29    
     &   , IP_CLOUD_TYPE_ICE=2                                                     CLDTYP3A.30    
     &   , IP_CLOUD_TYPE_STRAT=1                                                   CLDTYP3A.31    
     &   , IP_CLOUD_TYPE_CONV=2                                                    CLDTYP3A.32    
     &   , IP_CLOUD_TYPE_SW=1                                                      CLDTYP3A.33    
     &   , IP_CLOUD_TYPE_SI=2                                                      CLDTYP3A.34    
     &   , IP_CLOUD_TYPE_CW=3                                                      CLDTYP3A.35    
     &   , IP_CLOUD_TYPE_CI=4                                                      CLDTYP3A.36    
     &   )                                                                         CLDTYP3A.37    
!                                                                                  CLDTYP3A.38    
!     ------------------------------------------------------------------           CLDTYP3A.39    
!     ------------------------------------------------------------------           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    
!     ------------------------------------------------------------------           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    
!     ------------------------------------------------------------------           TWOSTR3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       TWOSTR3A.3     
!                                                                                  TWOSTR3A.4     
!     MODULE TO SET THE DEFINING NUMBERS FOR THE TWO-STREAM                        TWOSTR3A.5     
!     SCHEMES.                                                                     TWOSTR3A.6     
!                                                                                  TWOSTR3A.7     
      INTEGER                                                                      TWOSTR3A.8     
     &     IP_EDDINGTON                                                            TWOSTR3A.9     
!             EDDINGTON APPROXIMATION                                              TWOSTR3A.10    
     &   , IP_DISCRETE_ORD                                                         TWOSTR3A.11    
!             DISCRETE ORDINATE METHOD                                             TWOSTR3A.12    
     &   , IP_IFM                                                                  TWOSTR3A.13    
!             IMPROVED FLUX METHOD                                                 TWOSTR3A.14    
     &   , IP_PIFM85                                                               TWOSTR3A.15    
!             PRACTICAL IMPROVED FLUX METHOD                                       TWOSTR3A.16    
!             (VERSION OF ZDUNKOWSKI ET AL. 1985)                                  TWOSTR3A.17    
     &   , IP_ZDK_FLUX                                                             TWOSTR3A.18    
!             ZDUNKOWSKI'S FLUX METHOD                                             TWOSTR3A.19    
     &   , IP_KRSCHG_FLUX                                                          TWOSTR3A.20    
!             KERSCHGEN'S FLUX METHOD                                              TWOSTR3A.21    
     &   , IP_COAKLEY_CHYLEK_1                                                     TWOSTR3A.22    
!             COAKLEY & CHYLEK'S 1ST METHOD                                        TWOSTR3A.23    
     &   , IP_COAKLEY_CHYLEK_2                                                     TWOSTR3A.24    
!             COAKLEY & CHYLEK'S 2ND METHOD                                        TWOSTR3A.25    
     &   , IP_MEADOR_WEAVER                                                        TWOSTR3A.26    
!             MEADOR & WEAVER'S METHOD                                             TWOSTR3A.27    
     &   , IP_ELSASSER                                                             TWOSTR3A.28    
!             ELSASSER'S DIFFUSIVITY SCHEME                                        TWOSTR3A.29    
     &   , IP_2S_TEST                                                              TWOSTR3A.30    
!             USER'S DEFINED TEST APPROXIMATION.                                   TWOSTR3A.31    
     &   , IP_HEMI_MEAN                                                            TWOSTR3A.32    
!             HEMISPHERIC MEAN APPROXIMATION.                                      TWOSTR3A.33    
     &   , IP_PIFM80                                                               TWOSTR3A.34    
!             PRACTICAL IMPROVED FLUX METHOD                                       TWOSTR3A.35    
!             (VERSION OF ZDUNKOWSKI ET AL. 1980)                                  TWOSTR3A.36    
!                                                                                  TWOSTR3A.37    
      PARAMETER(                                                                   TWOSTR3A.38    
     &     IP_EDDINGTON=2                                                          TWOSTR3A.39    
     &   , IP_DISCRETE_ORD=4                                                       TWOSTR3A.40    
     &   , IP_IFM=5                                                                TWOSTR3A.41    
     &   , IP_PIFM85=6                                                             TWOSTR3A.42    
     &   , IP_ZDK_FLUX=7                                                           TWOSTR3A.43    
     &   , IP_KRSCHG_FLUX=8                                                        TWOSTR3A.44    
     &   , IP_COAKLEY_CHYLEK_1=9                                                   TWOSTR3A.45    
     &   , IP_COAKLEY_CHYLEK_2=10                                                  TWOSTR3A.46    
     &   , IP_MEADOR_WEAVER=11                                                     TWOSTR3A.47    
     &   , IP_ELSASSER=12                                                          TWOSTR3A.48    
     &   , IP_2S_TEST=14                                                           TWOSTR3A.49    
     &   , IP_HEMI_MEAN=15                                                         TWOSTR3A.50    
     &   , IP_PIFM80=16                                                            TWOSTR3A.51    
     &   )                                                                         TWOSTR3A.52    
!                                                                                  TWOSTR3A.53    
!     ------------------------------------------------------------------           TWOSTR3A.54    
!     ------------------------------------------------------------------           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    
!     ------------------------------------------------------------------           ESFTSC3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       ESFTSC3A.3     
!                                                                                  ESFTSC3A.4     
!     MODULE SETTING TYPES OF ESFT SCALING                                         ESFTSC3A.5     
!                                                                                  ESFTSC3A.6     
      INTEGER                                                                      ESFTSC3A.7     
     &     IP_SCALE_NULL                                                           ESFTSC3A.8     
!             NO SCALING AT ALL                                                    ESFTSC3A.9     
     &   , IP_SCALE_BAND                                                           ESFTSC3A.10    
!             SAME SCALING THROUGHOUT BAND                                         ESFTSC3A.11    
     &   , IP_SCALE_TERM                                                           ESFTSC3A.12    
!             DIFFERENT SCALING FOR EACH ESFT                                      ESFTSC3A.13    
!                                                                                  ESFTSC3A.14    
      PARAMETER(                                                                   ESFTSC3A.15    
     &     IP_SCALE_NULL=0                                                         ESFTSC3A.16    
     &   , IP_SCALE_BAND=1                                                         ESFTSC3A.17    
     &   , IP_SCALE_TERM=2                                                         ESFTSC3A.18    
     &   )                                                                         ESFTSC3A.19    
!                                                                                  ESFTSC3A.20    
!     ------------------------------------------------------------------           ESFTSC3A.21    
!     ------------------------------------------------------------------           AERPRM3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       AERPRM3A.3     
!                                                                                  AERPRM3A.4     
!     MODULE TO SET THE AEROSOL PARAMETRIZATIONS.                                  AERPRM3A.5     
!                                                                                  AERPRM3A.6     
      INTEGER                                                                      AERPRM3A.7     
     &     IP_AEROSOL_PARAM_DRY                                                    AERPRM3A.8     
!             PARAMETRIZATION FOR DRY AEROSOLS                                     AERPRM3A.9     
     &   , IP_AEROSOL_PARAM_MOIST                                                  AERPRM3A.10    
!             PARAMETRIZATION FOR MOIST AEROSOLS                                   AERPRM3A.11    
     &   , IP_AEROSOL_UNPARAMETRIZED                                               AERPRM3A.12    
!             OBSERVATIONAL AEROSOL DATA                                           AERPRM3A.13    
!                                                                                  AERPRM3A.14    
      PARAMETER(                                                                   AERPRM3A.15    
     &     IP_AEROSOL_PARAM_DRY=1                                                  AERPRM3A.16    
     &   , IP_AEROSOL_PARAM_MOIST=2                                                AERPRM3A.17    
     &   , IP_AEROSOL_UNPARAMETRIZED=3                                             AERPRM3A.18    
     &   )                                                                         AERPRM3A.19    
!                                                                                  AERPRM3A.20    
!     ------------------------------------------------------------------           AERPRM3A.21    
!     ------------------------------------------------------------------           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.5975  
!                                                                                  RAD_ALL.5976  
!                                                                                  RAD_ALL.5977  
!     DUMMY ARGUMENTS.                                                             RAD_ALL.5978  
      INTEGER   !, INTENT(OUT)                                                     RAD_ALL.5979  
     &     IERR                                                                    RAD_ALL.5980  
!             ERROR FLAG                                                           RAD_ALL.5981  
!                                                                                  RAD_ALL.5982  
!STR  GENERAL LOGICAL SWITCHES:                                                    RAD_ALL.5983  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.5984  
     &     L_LAYER                                                                 RAD_ALL.5985  
!             VALUES GIVEN IN LAYERS                                               RAD_ALL.5986  
     &   , L_CLOUD_LAYER                                                           RAD_ALL.5987  
!             CLOUD VALUES GIVEN IN LAYERS                                         RAD_ALL.5988  
     &   , L_CLEAR                                                                 RAD_ALL.5989  
!             CALCULATE CLEAR-SKY FLUXES                                           RAD_ALL.5990  
     &   , L_IR_SOURCE_QUAD                                                        RAD_ALL.5991  
!             USE A QUADRATIC SOURCE FUNCTION                                      RAD_ALL.5992  
     &   , L_RESCALE                                                               RAD_ALL.5993  
!             FLAG FOR DELTA-RESCALING                                             RAD_ALL.5994  
     &   , L_2_STREAM_CORRECT                                                      RAD_ALL.5995  
!             CORRECTION TO 2-STREAM SCHEME                                        RAD_ALL.5996  
!                                                                                  RAD_ALL.5997  
!STR  PARAMETERS CONTROLLING ALGORITHMS:                                           RAD_ALL.5998  
!     REPRESENTATION OF CLOUDS:                                                    RAD_ALL.5999  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.6000  
     &     I_CLOUD                                                                 RAD_ALL.6001  
!             CLOUD SCHEME USED                                                    RAD_ALL.6002  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.6003  
     &     L_GLOBAL_CLOUD_TOP                                                      RAD_ALL.6004  
!             FLAG TO USE A GLOBAL VALUE FOR THE TOPS OF CLOUDS                    RAD_ALL.6005  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.6006  
     &     N_CLOUD_TOP_GLOBAL                                                      RAD_ALL.6007  
!             GLOBAL TOPMOST CLOUDY LAYER                                          RAD_ALL.6008  
!                                                                                  RAD_ALL.6009  
!     NUMERICAL ALGORITHMS:                                                        RAD_ALL.6010  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.6011  
     &     ISOLIR                                                                  RAD_ALL.6012  
!             VISIBLE OR IR                                                        RAD_ALL.6013  
     &   , I_SOLVER                                                                RAD_ALL.6014  
!             SOLVER USED                                                          RAD_ALL.6015  
     &   , I_EXTRAPOLATE_MIX_NET                                                   RAD_ALL.6016  
!             METHOD FOR EXTRAPOLATING WITH A MIXED SOLVER                         RAD_ALL.6017  
     &   , I_SOLVER_CLEAR                                                          RAD_ALL.6018  
!             CLEAR SOLVER USED                                                    RAD_ALL.6019  
     &   , I_2STREAM                                                               RAD_ALL.6020  
!             TWO-STREAM SCHEME                                                    RAD_ALL.6021  
     &   , I_ANGULAR_INTEGRATION                                                   RAD_ALL.6022  
!             ANGULAR INTEGRATION SCHEME                                           RAD_ALL.6023  
     &   , N_ORDER_GAUSS                                                           RAD_ALL.6024  
!             ORDER OF GAUSSIAN INTEGRATION                                        RAD_ALL.6025  
!     RANGE OF SPECTRAL BANDS:                                                     RAD_ALL.6026  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.6027  
     &     I_FIRST_BAND                                                            RAD_ALL.6028  
!             FIRST BAND                                                           RAD_ALL.6029  
     &   , I_LAST_BAND                                                             RAD_ALL.6030  
!             LAST BAND                                                            RAD_ALL.6031  
!                                                                                  RAD_ALL.6032  
!     GENERAL PROPERTIES OF SPECTRUM:                                              RAD_ALL.6033  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.6034  
     &     N_BAND                                                                  RAD_ALL.6035  
!             NUMBER OF SPECTRAL BANDS                                             RAD_ALL.6036  
     &   , N_ABSORB                                                                RAD_ALL.6037  
!             NUMBER OF ABSORBERS                                                  RAD_ALL.6038  
     &   , N_AEROSOL                                                               RAD_ALL.6039  
!             NUMBER OF AEROSOL SPECIES                                            RAD_ALL.6040  
!                                                                                  RAD_ALL.6041  
!STR  SOLAR FIELDS:                                                                RAD_ALL.6042  
      REAL      !, INTENT(IN)                                                      RAD_ALL.6043  
     &     SOLAR_TOA(NPD_PROFILE)                                                  RAD_ALL.6044  
!             INCIDENT SOLAR RADIATION                                             RAD_ALL.6045  
     &   , SOLAR_FLUX_BAND(NPD_BAND)                                               RAD_ALL.6046  
!             NORMALIZED FLUX IN BAND                                              RAD_ALL.6047  
     &   , SEC_0(NPD_PROFILE)                                                      RAD_ALL.6048  
!             SECANT OF ZENITH ANGLE                                               RAD_ALL.6049  
!                                                                                  RAD_ALL.6050  
!STR  ATMOSPHERIC PROFILES:                                                        RAD_ALL.6051  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.6052  
     &     N_PROFILE                                                               RAD_ALL.6053  
!             NUMBER OF PROFILES                                                   RAD_ALL.6054  
     &   , N_LAYER                                                                 RAD_ALL.6055  
!             NUMBER OF LAYERS                                                     RAD_ALL.6056  
      REAL      !, INTENT(IN)                                                      RAD_ALL.6057  
     &     P(NPD_PROFILE, 0: NPD_LAYER)                                            RAD_ALL.6058  
!             PRESSURE                                                             RAD_ALL.6059  
     &   , T(NPD_PROFILE, 0: NPD_LAYER)                                            RAD_ALL.6060  
!             TEMPERATURE                                                          RAD_ALL.6061  
     &   , T_GROUND(NPD_PROFILE)                                                   RAD_ALL.6062  
!             TEMPERATURE OF GROUND                                                RAD_ALL.6063  
     &   , T_LEVEL(NPD_PROFILE, 0: NPD_LAYER)                                      RAD_ALL.6064  
!             TEMPERATURE ON LEVELS                                                RAD_ALL.6065  
     &   , D_MASS(NPD_PROFILE, NPD_LAYER)                                          RAD_ALL.6066  
!             MASS THICKNESS OF EACH LAYER                                         RAD_ALL.6067  
     &   , GAS_MIX_RATIO(NPD_PROFILE, 0: NPD_LAYER, NPD_SPECIES)                   RAD_ALL.6068  
!             GASEOUS MASS MIXING RATIOS                                           RAD_ALL.6069  
!                                                                                  RAD_ALL.6070  
!STR  SURFACE PROPERTIES:                                                          RAD_ALL.6071  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.6072  
     &     L_SURFACE(NPD_SURFACE)                                                  RAD_ALL.6073  
!             TYPES OF SURFACES FOR WHICH DATA ARE PRESENT                         RAD_ALL.6074  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.6075  
     &     I_SURFACE(NPD_PROFILE)                                                  RAD_ALL.6076  
!             TYPE OF SURFACE AT THE FOOT OF EACH PROFILE                          RAD_ALL.6077  
     &   , I_SPEC_SURFACE(NPD_SURFACE)                                             RAD_ALL.6078  
!             METHOD OF SPECIFYING ALBEDO                                          RAD_ALL.6079  
     &   , N_DIR_ALBEDO_FIT(NPD_SURFACE)                                           RAD_ALL.6080  
!             NUMBER OF PARAMETERS IN FIT TO DIRECT ALBEDO                         RAD_ALL.6081  
      REAL      !, INTENT(IN)                                                      RAD_ALL.6082  
     &     SURFACE_ALBEDO(NPD_BAND, NPD_SURFACE)                                   RAD_ALL.6083  
!             SURFACE ALBEDO                                                       RAD_ALL.6084  
     &   , ALBEDO_FIELD_DIFF(NPD_PROFILE, NPD_BAND)                                RAD_ALL.6085  
!             SPECIFIED DIFFUSE ALBEDOS                                            RAD_ALL.6086  
     &   , ALBEDO_FIELD_DIR(NPD_PROFILE, NPD_BAND)                                 RAD_ALL.6087  
!             SPECIFIED DIRECT ALBEDOS                                             RAD_ALL.6088  
     &   , DIRECT_ALBEDO_PARM(0: NPD_ALBEDO_PARM, NPD_BAND, NPD_SURFACE)           RAD_ALL.6089  
!             COEFFICIENTS FOR DIRECT ALBEDOS                                      RAD_ALL.6090  
     &   , EMISSIVITY_GROUND(NPD_BAND, NPD_SURFACE)                                RAD_ALL.6091  
!             SURFACE EMISSIVITIES                                                 RAD_ALL.6092  
     &   , EMISSIVITY_FIELD(NPD_PROFILE, NPD_BAND)                                 RAD_ALL.6093  
!             SPECIFIED EMISSIVITIES                                               RAD_ALL.6094  
!                                                                                  RAD_ALL.6095  
!STR  RAYLEIGH SCATTERING:                                                         RAD_ALL.6096  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.6097  
     &     L_RAYLEIGH                                                              RAD_ALL.6098  
!             INCLUDE RAYLEIGH SCATTERING IN THE CALCULATION.                      RAD_ALL.6099  
      REAL      !, INTENT(IN)                                                      RAD_ALL.6100  
     &     RAYLEIGH_COEFFICIENT(NPD_BAND)                                          RAD_ALL.6101  
!             RAYLEIGH COEFFICIENTS                                                RAD_ALL.6102  
!                                                                                  RAD_ALL.6103  
!STR  FIELDS FOR GASEOUS ABSORPTION:                                               RAD_ALL.6104  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.6105  
     &     L_GAS                                                                   RAD_ALL.6106  
!             INCLUDE GAS ABSORPTION IN THE CALCULATION                            RAD_ALL.6107  
!     GASEOUS OVERLAPS:                                                            RAD_ALL.6108  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.6109  
     &     I_GAS_OVERLAP(NPD_BAND)                                                 RAD_ALL.6110  
!             GAS OVERLAP ASSUMPTION                                               RAD_ALL.6111  
     &   , I_GAS                                                                   RAD_ALL.6112  
!             GAS TO BE CONSIDERED (ONE GAS ONLY)                                  RAD_ALL.6113  
!     ESFTS:                                                                       RAD_ALL.6114  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.6115  
     &     N_BAND_ABSORB(NPD_BAND)                                                 RAD_ALL.6116  
!             NUMBER OF ABSORBERS IN BAND                                          RAD_ALL.6117  
     &   , INDEX_ABSORB(NPD_SPECIES, NPD_BAND)                                     RAD_ALL.6118  
!             LIST OF ABSORBERS IN BANDS                                           RAD_ALL.6119  
     &   , I_BAND_ESFT(NPD_BAND, NPD_SPECIES)                                      RAD_ALL.6120  
!             NUMBER OF TERMS IN BAND                                              RAD_ALL.6121  
     &   , I_SCALE_ESFT(NPD_BAND, NPD_SPECIES)                                     RAD_ALL.6122  
!             TYPE OF ESFT SCALING                                                 RAD_ALL.6123  
     &   , I_SCALE_FNC(NPD_BAND, NPD_SPECIES)                                      RAD_ALL.6124  
!             TYPE OF SCALING FUNCTION                                             RAD_ALL.6125  
      REAL      !, INTENT(IN)                                                      RAD_ALL.6126  
     &     W_ESFT(NPD_ESFT_TERM, NPD_BAND, NPD_SPECIES)                            RAD_ALL.6127  
!             WEIGHTS FOR ESFT                                                     RAD_ALL.6128  
     &   , K_ESFT(NPD_ESFT_TERM, NPD_BAND, NPD_SPECIES)                            RAD_ALL.6129  
!             EXPONENTIAL ESFT TERMS                                               RAD_ALL.6130  
     &   , SCALE_VECTOR(NPD_SCALE_VARIABLE, NPD_ESFT_TERM, NPD_BAND                RAD_ALL.6131  
     &        , NPD_SPECIES)                                                       RAD_ALL.6132  
!             ABSORBER SCALING PARAMETERS                                          RAD_ALL.6133  
     &   , P_REFERENCE(NPD_SPECIES, NPD_BAND)                                      RAD_ALL.6134  
!             REFERENCE SCALING PRESSURE                                           RAD_ALL.6135  
     &   , T_REFERENCE(NPD_SPECIES, NPD_BAND)                                      RAD_ALL.6136  
!             REFERENCE SCALING TEMPERATURE                                        RAD_ALL.6137  
!                                                                                  RAD_ALL.6138  
!STR  SPECTRAL DATA FOR THE CONTINUUM:                                             RAD_ALL.6139  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.6140  
     &     L_CONTINUUM                                                             RAD_ALL.6141  
!             INCLUDE CONTINUUM ABSORPTION IN THE CALCULATION                      RAD_ALL.6142  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.6143  
     &     N_BAND_CONTINUUM(NPD_BAND)                                              RAD_ALL.6144  
!             NUMBER OF CONTINUA IN BANDS                                          RAD_ALL.6145  
     &   , INDEX_CONTINUUM(NPD_BAND, NPD_CONTINUUM)                                RAD_ALL.6146  
!             INDICES OF CONTINUA                                                  RAD_ALL.6147  
     &   , INDEX_WATER                                                             RAD_ALL.6148  
!             INDEX OF WATER                                                       RAD_ALL.6149  
     &   , I_SCALE_FNC_CONT(NPD_BAND, NPD_CONTINUUM)                               RAD_ALL.6150  
!             TYPE OF SCALING FUNCTION FOR CONTINUUM                               RAD_ALL.6151  
      REAL      !, INTENT(IN)                                                      RAD_ALL.6152  
     &     K_CONTINUUM(NPD_BAND, NPD_CONTINUUM)                                    RAD_ALL.6153  
!             CONTINUUM EXTINCTION COEFFICIENTS                                    RAD_ALL.6154  
     &   , SCALE_CONTINUUM(NPD_SCALE_VARIABLE, NPD_BAND, NPD_CONTINUUM)            RAD_ALL.6155  
!             CONTINUUM SCALING PARAMETERS                                         RAD_ALL.6156  
     &   , P_REF_CONTINUUM(NPD_CONTINUUM, NPD_BAND)                                RAD_ALL.6157  
!             CONTINUUM REFERENCE PRESSURE                                         RAD_ALL.6158  
     &   , T_REF_CONTINUUM(NPD_CONTINUUM, NPD_BAND)                                RAD_ALL.6159  
!             CONTINUUM REFERENCE TEMPERATURE                                      RAD_ALL.6160  
!                                                                                  RAD_ALL.6161  
!                                                                                  RAD_ALL.6162  
!STR  GENERAL CLOUD FIELDS:                                                        RAD_ALL.6163  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.6164  
     &     L_CLOUD                                                                 RAD_ALL.6165  
!             CLOUDS ARE REQUIRED IN THE CALCULATION                               RAD_ALL.6166  
      REAL      !, INTENT(IN)                                                      RAD_ALL.6167  
     &     W_CLOUD(NPD_PROFILE, NPD_LAYER)                                         RAD_ALL.6168  
!             AMOUNT OF CLOUD                                                      RAD_ALL.6169  
     &   , FRAC_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)                      RAD_ALL.6170  
!             FRACTIONS OF DIFFERENT TYPES OF CLOUD                                RAD_ALL.6171  
!                                                                                  RAD_ALL.6172  
!STR  FIELDS FOR MICROPHYSICAL QUANTITIES:                                         RAD_ALL.6173  
!                                                                                  RAD_ALL.6174  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.6175  
     &     L_DROP                                                                  RAD_ALL.6176  
!             INCLUDE DROPLETS IN THE CALCULATION                                  RAD_ALL.6177  
     &   , L_ICE                                                                   RAD_ALL.6178  
!             INCLUDE ICE IN THE CALCULATION                                       RAD_ALL.6179  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.6180  
     &     N_CONDENSED                                                             RAD_ALL.6181  
!             NUMBER OF CONDENSED COMPONENTS IN CLOUDS                             RAD_ALL.6182  
     &   , TYPE_CONDENSED(NPD_CLOUD_COMPONENT)                                     RAD_ALL.6183  
!             TYPES OF CONDENSED COMPONENTS                                        RAD_ALL.6184  
     &   , I_CONDENSED_PARAM(NPD_CLOUD_COMPONENT)                                  RAD_ALL.6185  
!             PARAMETRIZATION SCHEMES FOR COMPONENTS                               RAD_ALL.6186  
     &   , I_CLOUD_REPRESENTATION                                                  RAD_ALL.6187  
!             REPRESENTATION OF MIXING RULE CHOSEN                                 RAD_ALL.6188  
!                                                                                  RAD_ALL.6189  
      REAL      !, INTENT(IN)                                                      RAD_ALL.6190  
     &     CONDENSED_MIX_RATIO(NPD_PROFILE, 0: NPD_LAYER                           RAD_ALL.6191  
     &        , NPD_CLOUD_COMPONENT)                                               RAD_ALL.6192  
!             MIXING RATIOS OF CONDENSED COMPONENTS                                RAD_ALL.6193  
     &   , CONDENSED_DIM_CHAR(NPD_PROFILE, 0: NPD_LAYER                            RAD_ALL.6194  
     &        , NPD_CLOUD_COMPONENT)                                               RAD_ALL.6195  
!             EFFECTIVE RADII OF CONDENSED COMPONENTS                              RAD_ALL.6196  
     &   , CONDENSED_PARAM_LIST(NPD_CLOUD_PARAMETER                                RAD_ALL.6197  
     &        , NPD_CLOUD_COMPONENT, NPD_BAND)                                     RAD_ALL.6198  
!             COEFFICIENTS IN PARAMETRIZATIONS OF CONDENSED PHASES                 RAD_ALL.6199  
!                                                                                  RAD_ALL.6200  
!                                                                                  RAD_ALL.6201  
!                                                                                  RAD_ALL.6202  
!STR  FIELDS FOR AEROSOLS:                                                         RAD_ALL.6203  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.6204  
     &     L_AEROSOL                                                               RAD_ALL.6205  
!             INCLUDE AEROSOLS IN THE CALCULATION                                  RAD_ALL.6206  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.6207  
     &     I_AEROSOL_PARAMETRIZATION(NPD_AEROSOL_SPECIES)                          RAD_ALL.6208  
!             PARAMETRIZATION FLAGS FOR AEROSOL                                    RAD_ALL.6209  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.6210  
     &     NHUMIDITY(NPD_AEROSOL_SPECIES)                                          RAD_ALL.6211  
!             NUMBER OF HUMIDITIES                                                 RAD_ALL.6212  
      REAL      !, INTENT(IN)                                                      RAD_ALL.6213  
     &     AEROSOL_MIX_RATIO(NPD_PROFILE, 0: NPD_LAYER                             RAD_ALL.6214  
     &        , NPD_AEROSOL_SPECIES)                                               RAD_ALL.6215  
!             NUMBER DENSITY OF AEROSOLS                                           RAD_ALL.6216  
      REAL      !, INTENT(IN)                                                      RAD_ALL.6217  
     &     AEROSOL_ABSORPTION(NPD_HUMIDITIES, NPD_AEROSOL_SPECIES                  RAD_ALL.6218  
     &        , NPD_BAND)                                                          RAD_ALL.6219  
!             ABSORPTION BY AEROSOLS                                               RAD_ALL.6220  
     &   , AEROSOL_SCATTERING(NPD_HUMIDITIES, NPD_AEROSOL_SPECIES                  RAD_ALL.6221  
     &        , NPD_BAND)                                                          RAD_ALL.6222  
!             SCATTERING BY AEROSOLS                                               RAD_ALL.6223  
     &   , AEROSOL_ASYMMETRY(NPD_HUMIDITIES, NPD_AEROSOL_SPECIES                   RAD_ALL.6224  
     &        , NPD_BAND)                                                          RAD_ALL.6225  
!             ASYMMETRY BY AEROSOLS                                                RAD_ALL.6226  
     &   , HUMIDITIES(NPD_HUMIDITIES, NPD_AEROSOL_SPECIES)                         RAD_ALL.6227  
!             HUMIDITIES FOR SPECIES                                               RAD_ALL.6228  
!                                                                                  RAD_ALL.6229  
!                                                                                  RAD_ALL.6230  
!STR  FITTING OF THE PLANCKIAN FUNCTION:                                           RAD_ALL.6231  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.6232  
     &     N_DEG_FIT                                                               RAD_ALL.6233  
!             DEGREE OF THERMAL FITTING FNC.                                       RAD_ALL.6234  
      REAL      !, INTENT(IN)                                                      RAD_ALL.6235  
     &     THERMAL_COEFFICIENT(0: NPD_THERMAL_COEFF-1, NPD_BAND)                   RAD_ALL.6236  
!             COEFFICIENTS OF SOURCE TERMS                                         RAD_ALL.6237  
     &   , T_REF_PLANCK                                                            RAD_ALL.6238  
!             PLANCKIAN REFERENCE TEMPERATURE                                      RAD_ALL.6239  
!                                                                                  RAD_ALL.6240  
!STR  DOPPLER BROADENING                                                           RAD_ALL.6241  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.6242  
     &     L_DOPPLER(NPD_SPECIES)                                                  RAD_ALL.6243  
!             FLAGS TO ACTIVATE DOPPLER CORRECTIONS                                RAD_ALL.6244  
      REAL      !, INTENT(IN)                                                      RAD_ALL.6245  
     &     DOPPLER_CORRECTION(NPD_SPECIES)                                         RAD_ALL.6246  
!             DOPPLER BROADENING TERM                                              RAD_ALL.6247  
      REAL      !, INTENT(OUT)                                                     RAD_ALL.6248  
     &     WEIGHT_BAND(NPD_BAND)                                                   RAD_ALL.6249  
!             WEIGHTING FUNCTION FOR BANDS                                         RAD_ALL.6250  
!                                                                                  RAD_ALL.6251  
!STR  CONTROL OF SCATTERING:                                                       RAD_ALL.6252  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.6253  
     &     I_SCATTER_METHOD                                                        RAD_ALL.6254  
!             METHOD OF TREATING SCATTERING                                        RAD_ALL.6255  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.6256  
     &     L_SWITCH_SCATTER(NPD_BAND)                                              RAD_ALL.6257  
!             SWITCHES FOR SCATTERING IN BANDS                                     RAD_ALL.6258  
!                                                                                  RAD_ALL.6259  
!                                                                                  RAD_ALL.6260  
!STR  FLUXES CALCULATED:                                                           RAD_ALL.6261  
      REAL      !, INTENT(OUT)                                                     RAD_ALL.6262  
     &     FLUX_DIRECT(NPD_PROFILE, 0: NPD_LAYER)                                  RAD_ALL.6263  
!             DIRECT FLUX                                                          RAD_ALL.6264  
     &   , FLUX_DOWN(NPD_PROFILE, 0: NPD_LAYER)                                    RAD_ALL.6265  
!             DOWNWARD FLUX                                                        RAD_ALL.6266  
     &   , FLUX_UP(NPD_PROFILE, 0: NPD_LAYER)                                      RAD_ALL.6267  
!             UPWARD FLUX                                                          RAD_ALL.6268  
     &   , FLUX_DIRECT_CLEAR(NPD_PROFILE, 0: NPD_LAYER)                            RAD_ALL.6269  
!             CLEAR DIRECT FLUX                                                    RAD_ALL.6270  
     &   , FLUX_DOWN_CLEAR(NPD_PROFILE, 0: NPD_LAYER)                              RAD_ALL.6271  
!             CLEAR DOWNWARD FLUX                                                  RAD_ALL.6272  
     &   , FLUX_UP_CLEAR(NPD_PROFILE, 0: NPD_LAYER)                                RAD_ALL.6273  
!             CLEAR UPWARD FLUX                                                    RAD_ALL.6274  
!                                                                                  RAD_ALL.6275  
!STR  ARRAYS SPECIFIC TO THE UNIFIED MODEL                                         RAD_ALL.6276  
!                                                                                  RAD_ALL.6277  
!     SWITCHES FOR DIAGNOSTICS:                                                    RAD_ALL.6278  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.6279  
     &     L_FLUX_BELOW_690NM_SURF                                                 RAD_ALL.6280  
!             FLUX BELOW 690NM AT SURFACE TO BE CALCULATED                         RAD_ALL.6281  
     &   , L_SURFACE_DOWN_FLUX                                                     RAD_ALL.6282  
!             DOWNWARD SURFACE FLUX REQUIRED                                       RAD_ALL.6283  
     &   , L_SURF_DOWN_CLR                                                         RAD_ALL.6284  
!             CALCULATE DOWNWARD CLEAR FLUX                                        RAD_ALL.6285  
     &   , L_SURF_UP_CLR                                                           RAD_ALL.6286  
!             CALCULATE UPWARD CLEAR FLUX                                          RAD_ALL.6287  
!                                                                                  RAD_ALL.6288  
!     ARRAYS FOR USE WITH COUPLING:                                                RAD_ALL.6289  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.6290  
     &     N_FRAC_ICE_POINT                                                        RAD_ALL.6291  
!             NUMBER OF POINTS WITH FRACTIONAL ICE COVER                           RAD_ALL.6292  
     &   , I_FRAC_ICE_POINT(NPD_PROFILE)                                           RAD_ALL.6293  
!             INDICES OF POINTS WITH FRACTIONAL ICE COVER                          RAD_ALL.6294  
      REAL      !, INTENT(IN)                                                      RAD_ALL.6295  
     &     ICE_FRACTION(NPD_PROFILE)                                               RAD_ALL.6296  
!             ICE FRACTION                                                         RAD_ALL.6297  
      REAL      !, INTENT(IN)                                                      RAD_ALL.6298  
     &     ALBEDO_SEA_DIFF(NPD_PROFILE, NPD_BAND)                                  RAD_ALL.6299  
!             DIFFUSE ALBEDO FOR OPEN SEA                                          RAD_ALL.6300  
     &   , ALBEDO_SEA_DIR(NPD_PROFILE, NPD_BAND)                                   RAD_ALL.6301  
!             DIRECT ALBEDO FOR OPEN SEA                                           RAD_ALL.6302  
!                                                                                  RAD_ALL.6303  
!     ARRAYS FOR USE WITH DIAGNOSTICS:                                             RAD_ALL.6304  
      REAL      !, INTENT(IN)                                                      RAD_ALL.6305  
     &     WEIGHT_690NM(NPD_BAND)                                                  RAD_ALL.6306  
!             WEIGHTS FOR EACH BAND FOR REGION BELOW 690 NM                        RAD_ALL.6307  
!                                                                                  RAD_ALL.6308  
!     SURFACE FLUXES FOR COUPLING OR DIAGNOSTIC USE                                RAD_ALL.6309  
      REAL      !, INTENT(OUT)                                                     RAD_ALL.6310  
     &     SEA_FLUX(NPD_PROFILE)                                                   RAD_ALL.6311  
!             NET DOWNWARD FLUX INTO SEA                                           RAD_ALL.6312  
     &   , SURFACE_DOWN_FLUX(NPD_PROFILE)                                          RAD_ALL.6313  
!             DOWNWARD FLUX AT SURFACE                                             RAD_ALL.6314  
     &   , SURF_DOWN_CLR(NPD_PROFILE)                                              RAD_ALL.6315  
!             CLEAR-SKY DOWNWARD FLUX AT SURFACE                                   RAD_ALL.6316  
     &   , SURF_UP_CLR(NPD_PROFILE)                                                RAD_ALL.6317  
!             CLEAR-SKY UPWARD FLUX AT SURFACE                                     RAD_ALL.6318  
     &   , FLUX_BELOW_690NM_SURF(NPD_PROFILE)                                      RAD_ALL.6319  
!             SURFACE FLUX BELOW 690NM                                             RAD_ALL.6320  
!                                                                                  RAD_ALL.6321  
!                                                                                  RAD_ALL.6322  
!                                                                                  RAD_ALL.6323  
!     LOCAL ARGUMENTS.                                                             RAD_ALL.6324  
!     GENERAL POINTERS:                                                            RAD_ALL.6325  
      INTEGER                                                                      RAD_ALL.6326  
     &     I_TOP                                                                   RAD_ALL.6327  
!             TOP LEVEL OF PROFILES                                                RAD_ALL.6328  
     &   , I_BAND                                                                  RAD_ALL.6329  
!             SPECTRAL BAND                                                        RAD_ALL.6330  
     &   , N_AUGMENT                                                               RAD_ALL.6331  
!             LENGTH OF LONG FLUX VECTOR                                           RAD_ALL.6332  
     &   , N_GAS                                                                   RAD_ALL.6333  
!             NUMBER OF ACTIVE GASES                                               RAD_ALL.6334  
     &   , I_GAS_BAND                                                              RAD_ALL.6335  
!             SINGLE VARIABLE FOR GAS IN BAND                                      RAD_ALL.6336  
     &   , N_CONTINUUM                                                             RAD_ALL.6337  
!             NUMBER OF CONTINUA IN BAND                                           RAD_ALL.6338  
     &   , I_CONTINUUM                                                             RAD_ALL.6339  
!             CONTINUUM NUMBER                                                     RAD_ALL.6340  
     &   , I_CONTINUUM_POINTER(NPD_CONTINUUM)                                      RAD_ALL.6341  
!             POINTERS TO CONTINUA                                                 RAD_ALL.6342  
!                                                                                  RAD_ALL.6343  
!     SCATTERING IN INDIVIDUAL BANDS                                               RAD_ALL.6344  
      INTEGER                                                                      RAD_ALL.6345  
     &     I_SCATTER_METHOD_BAND                                                   RAD_ALL.6346  
!             METHOD OF TREATING SCATTERING IN GIVEN BAND                          RAD_ALL.6347  
!                                                                                  RAD_ALL.6348  
!     VARIABLES FOR SURFACE PROPERTIES:                                            RAD_ALL.6349  
      INTEGER                                                                      RAD_ALL.6350  
     &     N_POINT_TYPE(NPD_SURFACE)                                               RAD_ALL.6351  
!             NUMBER OF POINTS OF EACH TYPE                                        RAD_ALL.6352  
     &   , INDEX_SURFACE(NPD_PROFILE, NPD_SURFACE)                                 RAD_ALL.6353  
!             INDICES OF EACH SURFACE TYPE                                         RAD_ALL.6354  
!                                                                                  RAD_ALL.6355  
!     POINTERS TO THE CONTENTS OF LAYERS:                                          RAD_ALL.6356  
      INTEGER                                                                      RAD_ALL.6357  
     &     N_FREE_PROFILE(NPD_LAYER)                                               RAD_ALL.6358  
!             NUMBER OF FREE PROFILES                                              RAD_ALL.6359  
     &   , I_FREE_PROFILE(NPD_PROFILE, NPD_LAYER)                                  RAD_ALL.6360  
!             COLUMNS CONTAINING FREE PROFILES                                     RAD_ALL.6361  
     &   , N_CLOUD_TOP                                                             RAD_ALL.6362  
!             TOPMOST CLOUDY LAYER                                                 RAD_ALL.6363  
     &   , N_CLOUD_PROFILE(NPD_LAYER)                                              RAD_ALL.6364  
!             NUMBER OF CLOUDY PROFILES                                            RAD_ALL.6365  
     &   , I_CLOUD_PROFILE(NPD_PROFILE, NPD_LAYER)                                 RAD_ALL.6366  
!             PROFILES CONTAINING CLOUDS                                           RAD_ALL.6367  
!                                                                                  RAD_ALL.6368  
!     POINTERS TO TYPES OF CLOUDS:                                                 RAD_ALL.6369  
      LOGICAL                                                                      RAD_ALL.6370  
     &     L_CLOUD_CMP(NPD_CLOUD_COMPONENT)                                        RAD_ALL.6371  
!             LOGICAL SWITCHES TO INCLUDE COMPONENTS                               RAD_ALL.6372  
      INTEGER                                                                      RAD_ALL.6373  
     &     I_PHASE_CMP(NPD_CLOUD_COMPONENT)                                        RAD_ALL.6374  
!             PHASES OF COMPONENTS                                                 RAD_ALL.6375  
     &   , I_CLOUD_TYPE(NPD_CLOUD_COMPONENT)                                       RAD_ALL.6376  
!             TYPES OF CLOUD TO WHICH EACH COMPONENT CONTRIBUTES                   RAD_ALL.6377  
     &   , I_REGION_CLOUD(NPD_CLOUD_TYPE)                                          RAD_ALL.6378  
!             REGIONS IN WHICH PARTICULAR TYPE OF CLOUD FALL                       RAD_ALL.6379  
!                                                                                  RAD_ALL.6380  
!     FRACTIONAL COVERAGE OF DIFFERENT REGIONS:                                    RAD_ALL.6381  
      REAL                                                                         RAD_ALL.6382  
     &     FRAC_REGION(NPD_PROFILE, NPD_LAYER, NPD_REGION)                         RAD_ALL.6383  
!             FRACTION OF TOTAL CLOUD OCCUPIED BY SPECIFIC REGIONS                 RAD_ALL.6384  
!                                                                                  RAD_ALL.6385  
!     POINTER TO TABLE OF HUMIDITY:                                                RAD_ALL.6386  
      INTEGER                                                                      RAD_ALL.6387  
     &     I_HUMIDITY_POINTER(NPD_PROFILE, NPD_LAYER)                              RAD_ALL.6388  
!             POINTER TO LOOK-UP TABLE FOR AEROSOLS                                RAD_ALL.6389  
!                                                                                  RAD_ALL.6390  
!     CONTROLLING VARIABLES:                                                       RAD_ALL.6391  
      INTEGER                                                                      RAD_ALL.6392  
     &     I                                                                       RAD_ALL.6393  
!             LOOP INDEX                                                           RAD_ALL.6394  
     &   , J                                                                       RAD_ALL.6395  
!             LOOP INDEX                                                           RAD_ALL.6396  
     &   , K                                                                       RAD_ALL.6397  
!             LOOP INDEX                                                           RAD_ALL.6398  
     &   , L                                                                       RAD_ALL.6399  
!             LOOP INDEX                                                           RAD_ALL.6400  
!                                                                                  RAD_ALL.6401  
!     LOGICAL SWITCHES:                                                            RAD_ALL.6402  
      LOGICAL                                                                      RAD_ALL.6403  
     &     L_GAS_BAND                                                              RAD_ALL.6404  
!             FLAG TO INCLUDE GASEOUS ABSORPTION IN A PARTICULAR BAND              RAD_ALL.6405  
     &   , L_MOIST_AEROSOL                                                         RAD_ALL.6406  
!             FLAG FOR MOIST AEROSOL                                               RAD_ALL.6407  
     &   , L_AEROSOL_DENSITY                                                       RAD_ALL.6408  
!             FLAG FOR CALCULATION OF ATMOSPHERIC DENSITY FOR AEROSOLS             RAD_ALL.6409  
     &   , L_NET                                                                   RAD_ALL.6410  
!             FLAG FOR NET FLUXES                                                  RAD_ALL.6411  
!                                                                                  RAD_ALL.6412  
!     SURFACE PROPERTIES:                                                          RAD_ALL.6413  
      REAL                                                                         RAD_ALL.6414  
     &     ALBEDO_SURFACE_DIFF(NPD_PROFILE)                                        RAD_ALL.6415  
!             DIFFUSE SURFACE ALBEDO                                               RAD_ALL.6416  
     &   , ALBEDO_SURFACE_DIR(NPD_PROFILE)                                         RAD_ALL.6417  
!             DIRECT SURFACE ALBEDO                                                RAD_ALL.6418  
!                                                                                  RAD_ALL.6419  
      REAL                                                                         RAD_ALL.6420  
     &     INC_SOLAR_FLUX_BAND(NPD_PROFILE)                                        RAD_ALL.6421  
!             INCIDENT SOLAR FLUX IN BAND                                          RAD_ALL.6422  
      REAL                                                                         RAD_ALL.6423  
     &     GAS_FRAC_RESCALED(NPD_PROFILE, 0: NPD_LAYER, NPD_SPECIES)               RAD_ALL.6424  
!             RESCALED GAS MIXING RATIOS                                           RAD_ALL.6425  
     &   , AMOUNT_CONTINUUM(NPD_PROFILE, 0: NPD_LAYER, NPD_CONTINUUM)              RAD_ALL.6426  
!             AMOUNTS OF CONTINUA                                                  RAD_ALL.6427  
     &   , K_CONTINUUM_MONO(NPD_CONTINUUM)                                         RAD_ALL.6428  
!             MONOCHROMATIC CONTINUUM COMPONENTS                                   RAD_ALL.6429  
!                                                                                  RAD_ALL.6430  
!     THERMAL ARRAYS:                                                              RAD_ALL.6431  
      REAL                                                                         RAD_ALL.6432  
     &     PLANCK_SOURCE_BAND(NPD_PROFILE, 0: NPD_LAYER)                           RAD_ALL.6433  
!             PLANCK FUNCTION IN BAND AT LEVELS                                    RAD_ALL.6434  
     &   , DIFF_PLANCK_BAND(NPD_PROFILE, NPD_LAYER)                                RAD_ALL.6435  
!             DIFFERENTIAL THERMAL SOURCE IN BAND                                  RAD_ALL.6436  
     &   , DIFF_PLANCK_BAND_2(NPD_PROFILE, NPD_LAYER)                              RAD_ALL.6437  
!             2 x 2ND DIFF. THERMAL SOURCE IN BAND                                 RAD_ALL.6438  
     &   , THERMAL_GROUND_BAND(NPD_PROFILE)                                        RAD_ALL.6439  
!             GROUND SOURCE FUNCTION IN BAND                                       RAD_ALL.6440  
!                                                                                  RAD_ALL.6441  
!     ATMOSPHERIC DENSITIES:                                                       RAD_ALL.6442  
      REAL                                                                         RAD_ALL.6443  
     &     DENSITY(NPD_PROFILE, 0: NPD_LAYER)                                      RAD_ALL.6444  
!             OVERALL DENSITY                                                      RAD_ALL.6445  
     &   , MOLAR_DENSITY_WATER(NPD_PROFILE, 0: NPD_LAYER)                          RAD_ALL.6446  
!             MOLAR DENSITY OF WATER                                               RAD_ALL.6447  
     &   , MOLAR_DENSITY_FRN(NPD_PROFILE, 0: NPD_LAYER)                            RAD_ALL.6448  
!             MOLAR DENSITY OF FOREIGN SPECIES                                     RAD_ALL.6449  
!                                                                                  RAD_ALL.6450  
!     FIELDS FOR MOIST AEROSOLS:                                                   RAD_ALL.6451  
      REAL                                                                         RAD_ALL.6452  
     &     DELTA_HUMIDITY                                                          RAD_ALL.6453  
!             INCREMENT IN LOOK-UP TABLE FOR HUM.                                  RAD_ALL.6454  
     &   , MEAN_REL_HUMIDITY(NPD_PROFILE, NPD_LAYER)                               RAD_ALL.6455  
!             MEAN RELATIVE HUMIDITY OF LAYERS                                     RAD_ALL.6456  
!                                                                                  RAD_ALL.6457  
!     FUNDAMENTAL OPTICAL PROPERTIES OF LAYERS:                                    RAD_ALL.6458  
      REAL                                                                         RAD_ALL.6459  
     &     K_GREY_TOT_FREE(NPD_PROFILE, NPD_LAYER)                                 RAD_ALL.6460  
!             FREE TOTAL GREY EXTINCTION                                           RAD_ALL.6461  
     &   , K_EXT_SCAT_FREE(NPD_PROFILE, NPD_LAYER)                                 RAD_ALL.6462  
!             FREE SCATTERING EXTINCTION                                           RAD_ALL.6463  
     &   , ASYMMETRY_FREE(NPD_PROFILE, NPD_LAYER)                                  RAD_ALL.6464  
!             FREE ASYMMETRIES                                                     RAD_ALL.6465  
     &   , FORWARD_SCATTER_FREE(NPD_PROFILE, NPD_LAYER)                            RAD_ALL.6466  
!             FREE FORWARD SCATTERING                                              RAD_ALL.6467  
     &   , K_GREY_TOT_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)                RAD_ALL.6468  
!             TOTAL CLOUDY GREY EXTINCTION                                         RAD_ALL.6469  
     &   , K_EXT_SCAT_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)                RAD_ALL.6470  
!             CLOUDY SCATTERING EXTINCTION                                         RAD_ALL.6471  
     &   , ASYMMETRY_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)                 RAD_ALL.6472  
!             CLOUDY ASYMMETRIES                                                   RAD_ALL.6473  
     &   , FORWARD_SCATTER_CLOUD(NPD_PROFILE, NPD_LAYER, NPD_CLOUD_TYPE)           RAD_ALL.6474  
!             CLOUDY FORWARD SCATTERING                                            RAD_ALL.6475  
!                                                                                  RAD_ALL.6476  
!     LOCAL RADIATIVE FLUXES:                                                      RAD_ALL.6477  
      REAL                                                                         RAD_ALL.6478  
     &     FLUX_TOTAL(NPD_PROFILE, 2*NPD_LAYER+2)                                  RAD_ALL.6479  
!             TOTAL FLUX                                                           RAD_ALL.6480  
     &   , FLUX_TOTAL_CLEAR(NPD_PROFILE, 2*NPD_LAYER+2)                            RAD_ALL.6481  
!             CLEAR TOTAL FLUX                                                     RAD_ALL.6482  
     &   , FLUX_DIRECT_BAND(NPD_PROFILE, 0: NPD_LAYER)                             RAD_ALL.6483  
!             DIRECT FLUX IN BAND                                                  RAD_ALL.6484  
     &   , FLUX_TOTAL_BAND(NPD_PROFILE, 2*NPD_LAYER+2)                             RAD_ALL.6485  
!             TOTAL FLUX IN BAND                                                   RAD_ALL.6486  
     &   , FLUX_DIRECT_CLEAR_BAND(NPD_PROFILE, 0: NPD_LAYER)                       RAD_ALL.6487  
!             DIRECT FLUX IN BAND                                                  RAD_ALL.6488  
     &   , FLUX_TOTAL_CLEAR_BAND(NPD_PROFILE, 2*NPD_LAYER+2)                       RAD_ALL.6489  
!             TOTAL FLUX IN BAND                                                   RAD_ALL.6490  
     &   , PLANCK_FLUX(NPD_PROFILE, 0: NPD_LAYER)                                  RAD_ALL.6491  
!             PLANCKIAN FLUX IN BAND                                               RAD_ALL.6492  
!                                                                                  RAD_ALL.6493  
!     COEFFICIENTS FOR THE TRANSFER OF ENERGY BETWEEN                              RAD_ALL.6494  
!     PARTIALLY CLOUDY LAYERS:                                                     RAD_ALL.6495  
      REAL                                                                         RAD_ALL.6496  
     &     CLOUD_OVERLAP(NPD_PROFILE, 0: NPD_LAYER, NPD_OVERLAP_COEFF)             RAD_ALL.6497  
!             COEFFICIENTS DEFINING OVERLAPPING OPTIONS FOR CLOUDS:                RAD_ALL.6498  
!             THESE ALSO DEPEND ON THE SOLVER SELECTED.                            RAD_ALL.6499  
     &   , W_FREE(NPD_PROFILE, NPD_LAYER)                                          RAD_ALL.6500  
!             CLEAR-SKY FRACTION                                                   RAD_ALL.6501  
      INTEGER                                                                      RAD_ALL.6502  
     &     N_COLUMN(NPD_PROFILE)                                                   RAD_ALL.6503  
!             NUMBER OF COLUMNS REQUIRED                                           RAD_ALL.6504  
      LOGICAL                                                                      RAD_ALL.6505  
     &     L_COLUMN(NPD_PROFILE, NPD_LAYER, NPD_COLUMN)                            RAD_ALL.6506  
!             COLUMN FLAGS FOR COLUMNS                                             RAD_ALL.6507  
      REAL                                                                         RAD_ALL.6508  
     &     AREA_COLUMN(NPD_PROFILE, NPD_COLUMN)                                    RAD_ALL.6509  
!             AREAS OF COLUMNS                                                     RAD_ALL.6510  
!                                                                                  RAD_ALL.6511  
!     LOCAL VARIABLES SPECIFIC TO THE UNIFIED MODEL.                               RAD_ALL.6512  
      REAL                                                                         RAD_ALL.6513  
     &     PLANCK_FREEZE_SEA                                                       RAD_ALL.6514  
!             PLANCK FUNCTION OVER FREEZING SEA                                    RAD_ALL.6515  
!                                                                                  RAD_ALL.6516  
!                                                                                  RAD_ALL.6517  
!     SUBROUTINES CALLED:                                                          RAD_ALL.6518  
      EXTERNAL                                                                     RAD_ALL.6519  
     &     SET_CLOUD_POINTER, SET_CLOUD_GEOMETRY, SET_SCATTERING                   RAD_ALL.6520  
     &   , OVERLAP_MIX_MAXIMUM, OVERLAP_MIX_RANDOM                                 RAD_ALL.6521  
     &   , SPLIT_MAXIMUM, COLLECT_SURFACE, INITIALIZE_FLUX                         RAD_ALL.6522  
     &   , CALCULATE_DENSITY, SET_MOIST_AEROSOL_PROPERTIES                         RAD_ALL.6523  
     &   , SCALE_ABSORB, RESCALE_CONTINUUM, GREY_EXTINCTION                        RAD_ALL.6524  
     &   , RESCALE_ASYMMETRY                                                       RAD_ALL.6525  
     &   , DIFF_PLANCK_SOURCE, SET_SURFACE_PROPERTIES                              RAD_ALL.6526  
     &   , SOLVE_BAND_WITHOUT_GAS, SOLVE_BAND_ONE_GAS                              RAD_ALL.6527  
     &   , SOLVE_BAND_RANDOM_OVERLAP, SOLVE_BAND_FESFT                             RAD_ALL.6528  
     &   , SOLVE_BAND_CLR_FESFT, SOLVE_BAND_K_EQV                                  RAD_ALL.6529  
     &   , AUGMENT_TOTAL_FLUX, ASSIGN_FLUX                                         RAD_ALL.6530  
     &   , R2_INIT_COUPLE_DIAG, R2_COUPLE_DIAG                                     RAD_ALL.6531  
     &   , OVERLAP_TRIPLE                                                          RAD_ALL.6532  
!     FUNCTIONS CALLED:                                                            RAD_ALL.6533  
      LOGICAL                                                                      RAD_ALL.6534  
     &     L_CLOUD_DENSITY                                                         RAD_ALL.6535  
!             FLAG FOR CALCULATION OF ATMOSPHERIC DENSITIES FOR CLOUDS             RAD_ALL.6536  
      EXTERNAL                                                                     RAD_ALL.6537  
     &     L_CLOUD_DENSITY                                                         RAD_ALL.6538  
!                                                                                  RAD_ALL.6539  
!                                                                                  RAD_ALL.6540  
!     SETTING OF PROPERTIES OF ARRAYS:                                             RAD_ALL.6541  
!     ------------------------------------------------------------------           CLREPD3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       CLREPD3A.3     
!                                                                                  CLREPD3A.4     
!     MODULE TO SET PROPERTIES OF REPRESENTATIONS OF CLOUDS.                       CLREPD3A.5     
!                                                                                  CLREPD3A.6     
      DATA                                                                         CLREPD3A.7     
     &    NP_CLOUD_TYPE(IP_CLOUD_HOMOGEN)/1/                                       CLREPD3A.8     
     &  , NP_CLOUD_TYPE(IP_CLOUD_ICE_WATER)/2/                                     CLREPD3A.9     
     &  , NP_CLOUD_TYPE(IP_CLOUD_CONV_STRAT)/2/                                    CLREPD3A.10    
     &  , NP_CLOUD_TYPE(IP_CLOUD_CSIW)/4/                                          CLREPD3A.11    
!                                                                                  CLREPD3A.12    
!                                                                                  CLREPD3A.13    
!     THE ARRAY IP_CLOUD_TYPE_MAP INDICATES TO WHICH TYPE OF CLOUD                 CLREPD3A.14    
!     EACH COMPONENT BELONGS IN A PARTICULAR REPRESENTATION. AN                    CLREPD3A.15    
!     ENTRY OF 0 INDICATES THAT THAT COMPONENT SHOULD NOT BE                       CLREPD3A.16    
!     PRESENT IN THE REPRESENTATION.                                               CLREPD3A.17    
!                                                                                  CLREPD3A.18    
      DATA                                                                         CLREPD3A.19    
     &    IP_CLOUD_TYPE_MAP(IP_CLCMP_ST_WATER, IP_CLOUD_HOMOGEN)                   CLREPD3A.20    
     &       /IP_CLOUD_TYPE_HOMOGEN/                                               CLREPD3A.21    
     &  , IP_CLOUD_TYPE_MAP(IP_CLCMP_ST_ICE, IP_CLOUD_HOMOGEN)                     CLREPD3A.22    
     &       /IP_CLOUD_TYPE_HOMOGEN/                                               CLREPD3A.23    
     &  , IP_CLOUD_TYPE_MAP(IP_CLCMP_CNV_WATER, IP_CLOUD_HOMOGEN)                  CLREPD3A.24    
     &       /0/                                                                   CLREPD3A.25    
     &  , IP_CLOUD_TYPE_MAP(IP_CLCMP_CNV_ICE, IP_CLOUD_HOMOGEN)                    CLREPD3A.26    
     &       /0/                                                                   CLREPD3A.27    
      DATA                                                                         CLREPD3A.28    
     &    IP_CLOUD_TYPE_MAP(IP_CLCMP_ST_WATER, IP_CLOUD_ICE_WATER)                 CLREPD3A.29    
     &       /IP_CLOUD_TYPE_WATER/                                                 CLREPD3A.30    
     &  , IP_CLOUD_TYPE_MAP(IP_CLCMP_ST_ICE, IP_CLOUD_ICE_WATER)                   CLREPD3A.31    
     &       /IP_CLOUD_TYPE_ICE/                                                   CLREPD3A.32    
     &  , IP_CLOUD_TYPE_MAP(IP_CLCMP_CNV_WATER, IP_CLOUD_ICE_WATER)                CLREPD3A.33    
     &       /0/                                                                   CLREPD3A.34    
     &  , IP_CLOUD_TYPE_MAP(IP_CLCMP_CNV_ICE, IP_CLOUD_ICE_WATER)                  CLREPD3A.35    
     &       /0/                                                                   CLREPD3A.36    
      DATA                                                                         CLREPD3A.37    
     &    IP_CLOUD_TYPE_MAP(IP_CLCMP_ST_WATER, IP_CLOUD_CONV_STRAT)                CLREPD3A.38    
     &       /IP_CLOUD_TYPE_STRAT/                                                 CLREPD3A.39    
     &  , IP_CLOUD_TYPE_MAP(IP_CLCMP_ST_ICE, IP_CLOUD_CONV_STRAT)                  CLREPD3A.40    
     &       /IP_CLOUD_TYPE_CONV/                                                  CLREPD3A.41    
     &  , IP_CLOUD_TYPE_MAP(IP_CLCMP_CNV_WATER, IP_CLOUD_CONV_STRAT)               CLREPD3A.42    
     &       /IP_CLOUD_TYPE_STRAT/                                                 CLREPD3A.43    
     &  , IP_CLOUD_TYPE_MAP(IP_CLCMP_CNV_ICE, IP_CLOUD_CONV_STRAT)                 CLREPD3A.44    
     &       /IP_CLOUD_TYPE_CONV/                                                  CLREPD3A.45    
      DATA                                                                         CLREPD3A.46    
     &    IP_CLOUD_TYPE_MAP(IP_CLCMP_ST_WATER, IP_CLOUD_CSIW)                      CLREPD3A.47    
     &       /IP_CLOUD_TYPE_SW/                                                    CLREPD3A.48    
     &  , IP_CLOUD_TYPE_MAP(IP_CLCMP_ST_ICE, IP_CLOUD_CSIW)                        CLREPD3A.49    
     &       /IP_CLOUD_TYPE_SI/                                                    CLREPD3A.50    
     &  , IP_CLOUD_TYPE_MAP(IP_CLCMP_CNV_WATER, IP_CLOUD_CSIW)                     CLREPD3A.51    
     &       /IP_CLOUD_TYPE_CW/                                                    CLREPD3A.52    
     &  , IP_CLOUD_TYPE_MAP(IP_CLCMP_CNV_ICE, IP_CLOUD_CSIW)                       CLREPD3A.53    
     &       /IP_CLOUD_TYPE_CI/                                                    CLREPD3A.54    
!                                                                                  CLREPD3A.55    
!     ------------------------------------------------------------------           CLREPD3A.56    
!                                                                                  RAD_ALL.6543  
!                                                                                  RAD_ALL.6544  
!                                                                                  RAD_ALL.6545  
!                                                                                  RAD_ALL.6546  
!                                                                                  RAD_ALL.6547  
!                                                                                  RAD_ALL.6548  
!     INITIAL DETERMINATION OF FLAGS AND SWITCHES:                                 RAD_ALL.6549  
!                                                                                  RAD_ALL.6550  
      IF (I_ANGULAR_INTEGRATION.EQ.IP_TWO_STREAM) THEN                             RAD_ALL.6551  
!                                                                                  RAD_ALL.6552  
!        SET THE FLAG FOR NET FLUXES.                                              RAD_ALL.6553  
         IF ( (I_SOLVER.EQ.IP_SOLVER_TRIDIAG_NET).OR.                              RAD_ALL.6554  
     &        (I_SOLVER.EQ.IP_SOLVER_MIX_NET_APP_SCAT).OR.                         RAD_ALL.6555  
     &        (I_SOLVER.EQ.IP_SOLVER_MIX_DIRECT_NET).OR.                           RAD_ALL.6556  
     &        (I_SOLVER.EQ.IP_SOLVER_MIX_NET) ) THEN                               RAD_ALL.6557  
            L_NET=.TRUE.                                                           RAD_ALL.6558  
         ELSE                                                                      RAD_ALL.6559  
            L_NET=.FALSE.                                                          RAD_ALL.6560  
         ENDIF                                                                     RAD_ALL.6561  
!                                                                                  RAD_ALL.6562  
      ELSE IF (I_ANGULAR_INTEGRATION.EQ.IP_IR_GAUSS) THEN                          RAD_ALL.6563  
!                                                                                  RAD_ALL.6564  
         L_NET=.FALSE.                                                             RAD_ALL.6565  
!                                                                                  RAD_ALL.6566  
      ENDIF                                                                        RAD_ALL.6567  
!                                                                                  RAD_ALL.6568  
!     THE LENGTH OF THE LONG FLUX VECTOR DEPENDS ON WHETHER WE SOLVE               RAD_ALL.6569  
!     FOR THE FULL OR THE NET FLUX.                                                RAD_ALL.6570  
      IF (L_NET) THEN                                                              RAD_ALL.6571  
         N_AUGMENT=N_LAYER+1                                                       RAD_ALL.6572  
      ELSE                                                                         RAD_ALL.6573  
         N_AUGMENT=2*(N_LAYER+1)                                                   RAD_ALL.6574  
      ENDIF                                                                        RAD_ALL.6575  
!                                                                                  RAD_ALL.6576  
!     SET THE TOP LEVEL OF THE PROFILES.                                           RAD_ALL.6577  
      IF (L_LAYER) THEN                                                            RAD_ALL.6578  
         I_TOP=1                                                                   RAD_ALL.6579  
      ELSE                                                                         RAD_ALL.6580  
         I_TOP=0                                                                   RAD_ALL.6581  
      ENDIF                                                                        RAD_ALL.6582  
!                                                                                  RAD_ALL.6583  
!                                                                                  RAD_ALL.6584  
!                                                                                  RAD_ALL.6585  
!     INITIAL CALCULATIONS FOR SURFACE PROPERTIES:                                 RAD_ALL.6586  
!                                                                                  RAD_ALL.6587  
!     COLLECT POINTS WITH THE SAME SURFACE SPECIFICATION.                          RAD_ALL.6588  
      CALL COLLECT_SURFACE(N_PROFILE                                               RAD_ALL.6589  
     &   , I_SURFACE                                                               RAD_ALL.6590  
     &   , N_POINT_TYPE, INDEX_SURFACE                                             RAD_ALL.6591  
     &   , NPD_PROFILE, NPD_SURFACE                                                RAD_ALL.6592  
     &   )                                                                         RAD_ALL.6593  
!                                                                                  RAD_ALL.6594  
!                                                                                  RAD_ALL.6595  
!                                                                                  RAD_ALL.6596  
!     INITIAL CALCULATIONS FOR AEROSOLS:                                           RAD_ALL.6597  
!                                                                                  RAD_ALL.6598  
!     SET THE SPECTRALLY INDEPENDENT PROPERTIES OF MOIST AEROSOLS.                 RAD_ALL.6599  
      L_MOIST_AEROSOL=.FALSE.                                                      RAD_ALL.6600  
      DO J=1, N_AEROSOL                                                            RAD_ALL.6601  
         L_MOIST_AEROSOL=L_MOIST_AEROSOL.OR.                                       RAD_ALL.6602  
     &      (I_AEROSOL_PARAMETRIZATION(J)                                          RAD_ALL.6603  
     &      .EQ.IP_AEROSOL_PARAM_MOIST)                                            RAD_ALL.6604  
      ENDDO                                                                        RAD_ALL.6605  
!                                                                                  RAD_ALL.6606  
      IF (L_MOIST_AEROSOL) THEN                                                    RAD_ALL.6607  
         CALL SET_MOIST_AEROSOL_PROPERTIES(IERR                                    RAD_ALL.6608  
     &      , N_PROFILE, N_LAYER, L_LAYER                                          RAD_ALL.6609  
     &      , N_AEROSOL, I_AEROSOL_PARAMETRIZATION, NHUMIDITY                      RAD_ALL.6610  
     &      , GAS_MIX_RATIO(1, 0, INDEX_WATER), T, P, DELTA_HUMIDITY               RAD_ALL.6611  
     &      , MEAN_REL_HUMIDITY, I_HUMIDITY_POINTER                                RAD_ALL.6612  
     &      , NPD_PROFILE, NPD_LAYER, NPD_AEROSOL_SPECIES                          RAD_ALL.6613  
     &      )                                                                      RAD_ALL.6614  
         IF (IERR.NE.I_NORMAL) RETURN                                              RAD_ALL.6615  
      ENDIF                                                                        RAD_ALL.6616  
!                                                                                  RAD_ALL.6617  
!                                                                                  RAD_ALL.6618  
!     CHECK WHETHER THE DENSITIES WILL BE NEEDED FOR                               RAD_ALL.6619  
!     UNPARAMETRIZED AEROSOLS.                                                     RAD_ALL.6620  
      L_AEROSOL_DENSITY=.FALSE.                                                    RAD_ALL.6621  
      IF (L_AEROSOL) THEN                                                          RAD_ALL.6622  
         DO J=1, N_AEROSOL                                                         RAD_ALL.6623  
            L_AEROSOL_DENSITY=L_AEROSOL_DENSITY.OR.                                RAD_ALL.6624  
     &         (I_AEROSOL_PARAMETRIZATION(J).EQ.                                   RAD_ALL.6625  
     &            IP_AEROSOL_PARAM_MOIST)                                          RAD_ALL.6626  
     &         .OR.(I_AEROSOL_PARAMETRIZATION(J).EQ.                               RAD_ALL.6627  
     &            IP_AEROSOL_UNPARAMETRIZED)                                       RAD_ALL.6628  
         ENDDO                                                                     RAD_ALL.6629  
      ENDIF                                                                        RAD_ALL.6630  
!                                                                                  RAD_ALL.6631  
!                                                                                  RAD_ALL.6632  
!                                                                                  RAD_ALL.6633  
!     INITIAL CALCULATIONS FOR CLOUDS:                                             RAD_ALL.6634  
!                                                                                  RAD_ALL.6635  
!     SET POINTERS TO THE TYPES OF CLOUD.                                          RAD_ALL.6636  
      CALL SET_CLOUD_POINTER(IERR                                                  RAD_ALL.6637  
     &   , N_CONDENSED, TYPE_CONDENSED, I_CLOUD_REPRESENTATION                     RAD_ALL.6638  
     &   , L_DROP, L_ICE                                                           RAD_ALL.6639  
     &   , I_PHASE_CMP, I_CLOUD_TYPE, L_CLOUD_CMP                                  RAD_ALL.6640  
     &   )                                                                         RAD_ALL.6641  
      IF (IERR.NE.I_NORMAL) RETURN                                                 RAD_ALL.6642  
!                                                                                  RAD_ALL.6643  
!                                                                                  RAD_ALL.6644  
!     SET THE GEOMETRY OF THE CLOUDS.                                              RAD_ALL.6645  
      CALL SET_CLOUD_GEOMETRY(N_PROFILE, N_LAYER                                   RAD_ALL.6646  
     &   , L_GLOBAL_CLOUD_TOP, N_CLOUD_TOP_GLOBAL                                  RAD_ALL.6647  
     &   , W_CLOUD                                                                 RAD_ALL.6648  
     &   , N_CLOUD_PROFILE, I_CLOUD_PROFILE                                        RAD_ALL.6649  
     &   , N_CLOUD_TOP                                                             RAD_ALL.6650  
     &   , N_FREE_PROFILE, I_FREE_PROFILE                                          RAD_ALL.6651  
     &   , NPD_PROFILE, NPD_LAYER                                                  RAD_ALL.6652  
     &   )                                                                         RAD_ALL.6653  
!                                                                                  RAD_ALL.6654  
      IF (I_CLOUD.EQ.IP_CLOUD_TRIPLE) THEN                                         RAD_ALL.6655  
!        AGGREGATE CLOUDS INTO REGIONS FOR SOLVING.                                RAD_ALL.6656  
         CALL AGGREGATE_CLOUD(IERR                                                 RAD_ALL.6657  
     &      , N_PROFILE, N_LAYER, N_CLOUD_TOP                                      RAD_ALL.6658  
     &      , I_CLOUD, I_CLOUD_REPRESENTATION                                      RAD_ALL.6659  
     &      , NP_CLOUD_TYPE(I_CLOUD_REPRESENTATION)                                RAD_ALL.6660  
     &      , FRAC_CLOUD                                                           RAD_ALL.6661  
     &      , I_REGION_CLOUD, FRAC_REGION                                          RAD_ALL.6662  
     &      , NPD_PROFILE, NPD_LAYER                                               RAD_ALL.6663  
     &      )                                                                      RAD_ALL.6664  
      ENDIF                                                                        RAD_ALL.6665  
!                                                                                  RAD_ALL.6666  
!     CALCULATE ENERGY TRANSFER COEFFICIENTS IN A MIXED COLUMN,                    RAD_ALL.6667  
!     OR SPLIT THE ATMOSPHERE INTO COLUMNS WITH A COLUMN MODEL:                    RAD_ALL.6668  
!                                                                                  RAD_ALL.6669  
      IF (I_CLOUD.EQ.IP_CLOUD_MIX_MAX) THEN                                        RAD_ALL.6670  
!                                                                                  RAD_ALL.6671  
         CALL OVERLAP_MIX_MAXIMUM(N_PROFILE, N_LAYER, N_CLOUD_TOP                  RAD_ALL.6672  
     &      , ISOLIR, I_SOLVER                                                     RAD_ALL.6673  
     &      , W_CLOUD, W_FREE                                                      RAD_ALL.6674  
     &      , CLOUD_OVERLAP                                                        RAD_ALL.6675  
     &      , NPD_PROFILE, NPD_LAYER                                               RAD_ALL.6676  
     &      )                                                                      RAD_ALL.6677  
      ELSE IF (I_CLOUD.EQ.IP_CLOUD_MIX_RANDOM) THEN                                RAD_ALL.6678  
         CALL OVERLAP_MIX_RANDOM(N_PROFILE, N_LAYER, N_CLOUD_TOP                   RAD_ALL.6679  
     &      , ISOLIR, I_SOLVER                                                     RAD_ALL.6680  
     &      , W_CLOUD, W_FREE                                                      RAD_ALL.6681  
     &      , CLOUD_OVERLAP                                                        RAD_ALL.6682  
     &      , NPD_PROFILE, NPD_LAYER                                               RAD_ALL.6683  
     &      )                                                                      RAD_ALL.6684  
!                                                                                  RAD_ALL.6685  
      ELSE IF (I_CLOUD.EQ.IP_CLOUD_TRIPLE) THEN                                    RAD_ALL.6686  
!                                                                                  RAD_ALL.6687  
!        CALCULATE OVERLAPS FOR THE TRIPLE DECOMPOSITION                           RAD_ALL.6688  
!        OF THE COLUMN INTO STRATIFORM AND CONVECTIVE PARTS.                       RAD_ALL.6689  
         CALL OVERLAP_TRIPLE(N_PROFILE, N_LAYER, N_CLOUD_TOP                       RAD_ALL.6690  
     &      , W_CLOUD, W_FREE, FRAC_REGION                                         RAD_ALL.6691  
     &      , CLOUD_OVERLAP                                                        RAD_ALL.6692  
     &      , NPD_PROFILE, NPD_LAYER                                               RAD_ALL.6693  
     &      )                                                                      RAD_ALL.6694  
         IF (IERR.NE.I_NORMAL) RETURN                                              RAD_ALL.6695  
!                                                                                  RAD_ALL.6696  
      ELSE IF (I_CLOUD.EQ.IP_CLOUD_COLUMN_MAX) THEN                                RAD_ALL.6697  
!                                                                                  RAD_ALL.6698  
         CALL SPLIT_MAXIMUM(N_PROFILE, N_LAYER                                     RAD_ALL.6699  
     &      , W_CLOUD                                                              RAD_ALL.6700  
     &      , N_COLUMN, AREA_COLUMN, L_COLUMN                                      RAD_ALL.6701  
     &      , NPD_PROFILE, NPD_LAYER, NPD_COLUMN                                   RAD_ALL.6702  
     &      )                                                                      RAD_ALL.6703  
      ENDIF                                                                        RAD_ALL.6704  
!                                                                                  RAD_ALL.6705  
!                                                                                  RAD_ALL.6706  
!     CALCULATE THE ATMOSPHERIC DENSITIES:                                         RAD_ALL.6707  
!                                                                                  RAD_ALL.6708  
      IF ( L_CONTINUUM                                                             RAD_ALL.6709  
     &      .OR.L_AEROSOL_DENSITY                                                  RAD_ALL.6710  
     &      .OR.(L_CLOUD                                                           RAD_ALL.6711  
     &      .AND.L_CLOUD_DENSITY(N_CONDENSED, I_PHASE_CMP, L_CLOUD_CMP             RAD_ALL.6712  
     &                        , I_CONDENSED_PARAM                                  RAD_ALL.6713  
     &                        ) ) ) THEN                                           RAD_ALL.6714  
         CALL CALCULATE_DENSITY(N_PROFILE, N_LAYER, L_CONTINUUM                    RAD_ALL.6715  
     &      , GAS_MIX_RATIO(1, 0, INDEX_WATER)                                     RAD_ALL.6716  
     &      , P, T, I_TOP                                                          RAD_ALL.6717  
     &      , DENSITY, MOLAR_DENSITY_WATER, MOLAR_DENSITY_FRN                      RAD_ALL.6718  
     &      , NPD_PROFILE, NPD_LAYER                                               RAD_ALL.6719  
     &      )                                                                      RAD_ALL.6720  
      ENDIF                                                                        RAD_ALL.6721  
!                                                                                  RAD_ALL.6722  
!                                                                                  RAD_ALL.6723  
!                                                                                  RAD_ALL.6724  
!     INITIALIZE THE TOTAL FLUXES.                                                 RAD_ALL.6725  
!                                                                                  RAD_ALL.6726  
      CALL INITIALIZE_FLUX(N_PROFILE, N_LAYER, N_AUGMENT                           RAD_ALL.6727  
     &   , ISOLIR                                                                  RAD_ALL.6728  
     &   , FLUX_DIRECT, FLUX_TOTAL                                                 RAD_ALL.6729  
     &   , L_CLEAR                                                                 RAD_ALL.6730  
     &   , FLUX_DIRECT_CLEAR, FLUX_TOTAL_CLEAR                                     RAD_ALL.6731  
     &   , 0.0E+00                                                                 RAD_ALL.6732  
     &   , NPD_PROFILE, NPD_LAYER                                                  RAD_ALL.6733  
     &   , L_NET                                                                   RAD_ALL.6734  
     &   )                                                                         RAD_ALL.6735  
!                                                                                  RAD_ALL.6736  
!     INITIALIZE THE PLANCKIAN FLUXES IF REQUIRED.                                 RAD_ALL.6737  
      IF ( (ISOLIR.EQ.IP_INFRA_RED).AND.(.NOT.L_NET) ) THEN                        RAD_ALL.6738  
         DO I=0, N_LAYER                                                           RAD_ALL.6739  
            DO L=1, N_PROFILE                                                      RAD_ALL.6740  
               PLANCK_FLUX(L, I)=0.0E+00                                           RAD_ALL.6741  
            ENDDO                                                                  RAD_ALL.6742  
         ENDDO                                                                     RAD_ALL.6743  
      ENDIF                                                                        RAD_ALL.6744  
!                                                                                  RAD_ALL.6745  
!                                                                                  RAD_ALL.6746  
!     INITIALIZATION OF DIAGNOSTICS AND COUPLING ARRAYS FOR THE                    RAD_ALL.6747  
!     UNIFIED MODEL.                                                               RAD_ALL.6748  
      CALL R2_INIT_COUPLE_DIAG(N_PROFILE                                           RAD_ALL.6749  
     &   , SEA_FLUX                                                                RAD_ALL.6750  
     &   , L_SURFACE_DOWN_FLUX, SURFACE_DOWN_FLUX                                  RAD_ALL.6751  
     &   , L_SURF_DOWN_CLR, SURF_DOWN_CLR                                          RAD_ALL.6752  
     &   , L_SURF_UP_CLR, SURF_UP_CLR                                              RAD_ALL.6753  
     &   , L_FLUX_BELOW_690NM_SURF, FLUX_BELOW_690NM_SURF                          RAD_ALL.6754  
     &   , NPD_PROFILE                                                             RAD_ALL.6755  
     &   )                                                                         RAD_ALL.6756  
!                                                                                  RAD_ALL.6757  
!                                                                                  RAD_ALL.6758  
!                                                                                  RAD_ALL.6759  
!                                                                                  RAD_ALL.6760  
!                                                                                  RAD_ALL.6761  
!     SOLVE THE EQUATION OF TRANSFER IN EACH BAND AND                              RAD_ALL.6762  
!     INCREMENT THE FLUXES.                                                        RAD_ALL.6763  
!                                                                                  RAD_ALL.6764  
      DO I_BAND=I_FIRST_BAND, I_LAST_BAND                                          RAD_ALL.6765  
!                                                                                  RAD_ALL.6766  
!                                                                                  RAD_ALL.6767  
!        SET THE FLAG FOR THE TREATMENT OF SCATTERING IN THIS BAND                 RAD_ALL.6768  
         CALL SET_SCATTERING(I_SCATTER_METHOD                                      RAD_ALL.6769  
     &      , L_SWITCH_SCATTER(I_BAND)                                             RAD_ALL.6770  
     &      , I_SCATTER_METHOD_BAND                                                RAD_ALL.6771  
     &      )                                                                      RAD_ALL.6772  
!                                                                                  RAD_ALL.6773  
!        DETERMINE WHETHER GASEOUS ABSORPTION IS INCLUDED IN THIS BAND.            RAD_ALL.6774  
         IF ( (L_GAS).AND.(N_BAND_ABSORB(I_BAND).GT.0) ) THEN                      RAD_ALL.6775  
!                                                                                  RAD_ALL.6776  
!           NOTE: I_GAS_BAND IS USED EXTENSIVELY BELOW SINCE NESTED                RAD_ALL.6777  
!           ARRAY ELEMENTS IN A SUBROUTINE CALL (SEE LATER) CAN                    RAD_ALL.6778  
!           CONFUSE SOME COMPILERS.                                                RAD_ALL.6779  
!                                                                                  RAD_ALL.6780  
!           NORMALLY THE NUMBER OF GASES IN THE CALCULATION WILL BE                RAD_ALL.6781  
!           AS IN THE SPECTRAL FILE, BUT PARTICULAR OPTIONS MAY RESULT             RAD_ALL.6782  
!           IN THE OMISSION OF SOME GASES.                                         RAD_ALL.6783  
!                                                                                  RAD_ALL.6784  
            N_GAS=N_BAND_ABSORB(I_BAND)                                            RAD_ALL.6785  
!                                                                                  RAD_ALL.6786  
            IF (I_GAS_OVERLAP(I_BAND).EQ.IP_OVERLAP_SINGLE) THEN                   RAD_ALL.6787  
!                                                                                  RAD_ALL.6788  
!              THERE WILL BE NO GASEOUS ABSORPTION IN THIS BAND                    RAD_ALL.6789  
!              UNLESS THE SELECTED GAS APPEARS.                                    RAD_ALL.6790  
               N_GAS=0                                                             RAD_ALL.6791  
!                                                                                  RAD_ALL.6792  
               DO I=1, N_BAND_ABSORB(I_BAND)                                       RAD_ALL.6793  
                  IF (INDEX_ABSORB(I, I_BAND).EQ.I_GAS) N_GAS=1                    RAD_ALL.6794  
               ENDDO                                                               RAD_ALL.6795  
!                                                                                  RAD_ALL.6796  
            ENDIF                                                                  RAD_ALL.6797  
!                                                                                  RAD_ALL.6798  
!                                                                                  RAD_ALL.6799  
            IF (N_GAS.GT.0) THEN                                                   RAD_ALL.6800  
!                                                                                  RAD_ALL.6801  
!              SET THE FLAG FOR GASEOUS ABSORPTION IN THE BAND.                    RAD_ALL.6802  
               L_GAS_BAND=.TRUE.                                                   RAD_ALL.6803  
!                                                                                  RAD_ALL.6804  
               DO J=1, N_GAS                                                       RAD_ALL.6805  
!                                                                                  RAD_ALL.6806  
                  I_GAS_BAND=INDEX_ABSORB(J, I_BAND)                               RAD_ALL.6807  
!                                                                                  RAD_ALL.6808  
!                 RESET THE POINTER IF THERE IS JUST ONE GAS.                      RAD_ALL.6809  
!                                                                                  RAD_ALL.6810  
                  IF (I_GAS_OVERLAP(I_BAND).EQ.IP_OVERLAP_SINGLE)                  RAD_ALL.6811  
     &               THEN                                                          RAD_ALL.6812  
!                    ONLY THE SELECTED GAS IS ACTIVE IN THE BAND.                  RAD_ALL.6813  
                     I_GAS_BAND=I_GAS                                              RAD_ALL.6814  
!                                                                                  RAD_ALL.6815  
                  ENDIF                                                            RAD_ALL.6816  
!                                                                                  RAD_ALL.6817  
                  IF (I_SCALE_ESFT(I_BAND, I_GAS_BAND)                             RAD_ALL.6818  
     &               .EQ.IP_SCALE_BAND) THEN                                       RAD_ALL.6819  
!                    RESCALE THE AMOUNT OF GAS FOR THIS BAND NOW.                  RAD_ALL.6820  
                     CALL SCALE_ABSORB(IERR, N_PROFILE, N_LAYER                    RAD_ALL.6821  
     &                  , GAS_MIX_RATIO(1, 0, I_GAS_BAND), P, T                    RAD_ALL.6822  
     &                  , L_LAYER, I_TOP                                           RAD_ALL.6823  
     &                  , GAS_FRAC_RESCALED(1, 0, I_GAS_BAND)                      RAD_ALL.6824  
     &                  , I_SCALE_FNC(I_BAND, I_GAS_BAND)                          RAD_ALL.6825  
     &                  , P_REFERENCE(I_GAS_BAND, I_BAND)                          RAD_ALL.6826  
     &                  , T_REFERENCE(I_GAS_BAND, I_BAND)                          RAD_ALL.6827  
     &                  , SCALE_VECTOR(1, 1, I_BAND, I_GAS_BAND)                   RAD_ALL.6828  
     &                  , L_DOPPLER(I_GAS_BAND)                                    RAD_ALL.6829  
     &                  , DOPPLER_CORRECTION(I_GAS_BAND)                           RAD_ALL.6830  
     &                  , NPD_PROFILE, NPD_LAYER, NPD_SCALE_FNC                    RAD_ALL.6831  
     &                  , NPD_SCALE_VARIABLE                                       RAD_ALL.6832  
     &                  )                                                          RAD_ALL.6833  
                     IF (IERR.NE.I_NORMAL) RETURN                                  RAD_ALL.6834  
!                                                                                  RAD_ALL.6835  
                  ELSE IF (I_SCALE_ESFT(I_BAND, I_GAS_BAND)                        RAD_ALL.6836  
     &               .EQ.IP_SCALE_NULL) THEN                                       RAD_ALL.6837  
!                    COPY ACROSS THE UNSCALED ARRAY.                               RAD_ALL.6838  
                        DO I=1, N_LAYER                                            RAD_ALL.6839  
                           DO L=1, N_PROFILE                                       RAD_ALL.6840  
                              GAS_FRAC_RESCALED(L, I, I_GAS_BAND)                  RAD_ALL.6841  
     &                           =GAS_MIX_RATIO(L, I, I_GAS_BAND)                  RAD_ALL.6842  
                           ENDDO                                                   RAD_ALL.6843  
                        ENDDO                                                      RAD_ALL.6844  
                  ENDIF                                                            RAD_ALL.6845  
               ENDDO                                                               RAD_ALL.6846  
            ELSE                                                                   RAD_ALL.6847  
               L_GAS_BAND=.FALSE.                                                  RAD_ALL.6848  
            ENDIF                                                                  RAD_ALL.6849  
!                                                                                  RAD_ALL.6850  
         ELSE                                                                      RAD_ALL.6851  
            L_GAS_BAND=.FALSE.                                                     RAD_ALL.6852  
         ENDIF                                                                     RAD_ALL.6853  
!                                                                                  RAD_ALL.6854  
!                                                                                  RAD_ALL.6855  
!                                                                                  RAD_ALL.6856  
!        RESCALE AMOUNTS OF CONTINUA.                                              RAD_ALL.6857  
!                                                                                  RAD_ALL.6858  
         IF (L_CONTINUUM) THEN                                                     RAD_ALL.6859  
            N_CONTINUUM=N_BAND_CONTINUUM(I_BAND)                                   RAD_ALL.6860  
            DO I=1, N_CONTINUUM                                                    RAD_ALL.6861  
               I_CONTINUUM_POINTER(I)=INDEX_CONTINUUM(I_BAND, I)                   RAD_ALL.6862  
               I_CONTINUUM=I_CONTINUUM_POINTER(I)                                  RAD_ALL.6863  
               K_CONTINUUM_MONO(I_CONTINUUM)                                       RAD_ALL.6864  
     &            =K_CONTINUUM(I_BAND, I_CONTINUUM)                                RAD_ALL.6865  
               CALL RESCALE_CONTINUUM(N_PROFILE, N_LAYER, I_CONTINUUM              RAD_ALL.6866  
     &            , P, T, L_LAYER, I_TOP                                           RAD_ALL.6867  
     &            , DENSITY, MOLAR_DENSITY_WATER, MOLAR_DENSITY_FRN                RAD_ALL.6868  
     &            , GAS_MIX_RATIO(1, 0, INDEX_WATER)                               RAD_ALL.6869  
     &            , AMOUNT_CONTINUUM(1, 0, I_CONTINUUM)                            RAD_ALL.6870  
     &            , I_SCALE_FNC_CONT(I_BAND, I_CONTINUUM)                          RAD_ALL.6871  
     &            , P_REF_CONTINUUM(I_CONTINUUM, I_BAND)                           RAD_ALL.6872  
     &            , T_REF_CONTINUUM(I_CONTINUUM, I_BAND)                           RAD_ALL.6873  
     &            , SCALE_CONTINUUM(1, I_BAND, I_CONTINUUM)                        RAD_ALL.6874  
     &            , NPD_PROFILE, NPD_LAYER, NPD_SCALE_FNC                          RAD_ALL.6875  
     &            , NPD_SCALE_VARIABLE                                             RAD_ALL.6876  
     &            )                                                                RAD_ALL.6877  
            ENDDO                                                                  RAD_ALL.6878  
         ENDIF                                                                     RAD_ALL.6879  
!                                                                                  RAD_ALL.6880  
!                                                                                  RAD_ALL.6881  
!                                                                                  RAD_ALL.6882  
!        CALCULATE THE GREY EXTINCTION WITHIN THE BAND.                            RAD_ALL.6883  
!                                                                                  RAD_ALL.6884  
         CALL GREY_EXTINCTION(IERR                                                 RAD_ALL.6885  
     &      , N_PROFILE, N_LAYER, L_LAYER, P, T, DENSITY                           RAD_ALL.6886  
     &      , L_RESCALE                                                            RAD_ALL.6887  
     &      , L_RAYLEIGH, RAYLEIGH_COEFFICIENT(I_BAND)                             RAD_ALL.6888  
     &      , L_CONTINUUM, N_CONTINUUM, I_CONTINUUM_POINTER                        RAD_ALL.6889  
     &      , K_CONTINUUM_MONO, AMOUNT_CONTINUUM                                   RAD_ALL.6890  
     &      , L_AEROSOL, N_AEROSOL, AEROSOL_MIX_RATIO                              RAD_ALL.6891  
     &      , I_AEROSOL_PARAMETRIZATION                                            RAD_ALL.6892  
     &      , I_HUMIDITY_POINTER, HUMIDITIES, DELTA_HUMIDITY                       RAD_ALL.6893  
     &      , MEAN_REL_HUMIDITY                                                    RAD_ALL.6894  
     &      , AEROSOL_ABSORPTION(1, 1, I_BAND)                                     RAD_ALL.6895  
     &      , AEROSOL_SCATTERING(1, 1, I_BAND)                                     RAD_ALL.6896  
     &      , AEROSOL_ASYMMETRY(1, 1, I_BAND)                                      RAD_ALL.6897  
     &      , L_CLOUD, N_CLOUD_PROFILE, I_CLOUD_PROFILE, N_CLOUD_TOP               RAD_ALL.6898  
     &      , L_CLOUD_LAYER, I_CLOUD                                               RAD_ALL.6899  
     &      , N_CONDENSED, L_CLOUD_CMP, I_PHASE_CMP                                RAD_ALL.6900  
     &      , I_CONDENSED_PARAM, CONDENSED_PARAM_LIST(1, 1, I_BAND)                RAD_ALL.6901  
     &      , CONDENSED_MIX_RATIO, CONDENSED_DIM_CHAR                              RAD_ALL.6902  
     &      , NP_CLOUD_TYPE(I_CLOUD_REPRESENTATION)                                RAD_ALL.6903  
     &      , I_CLOUD_TYPE                                                         RAD_ALL.6904  
     &      , K_GREY_TOT_FREE, K_EXT_SCAT_FREE, ASYMMETRY_FREE                     RAD_ALL.6905  
     &      , FORWARD_SCATTER_FREE                                                 RAD_ALL.6906  
     &      , K_GREY_TOT_CLOUD, K_EXT_SCAT_CLOUD                                   RAD_ALL.6907  
     &      , ASYMMETRY_CLOUD, FORWARD_SCATTER_CLOUD                               RAD_ALL.6908  
     &      , NPD_PROFILE, NPD_LAYER, NPD_CONTINUUM                                RAD_ALL.6909  
     &      , NPD_AEROSOL_SPECIES, NPD_HUMIDITIES                                  RAD_ALL.6910  
     &      , NPD_CLOUD_PARAMETER                                                  RAD_ALL.6911  
     &      )                                                                      RAD_ALL.6912  
         IF (IERR.NE.I_NORMAL) RETURN                                              RAD_ALL.6913  
                                                                                   RAD_ALL.6914  
                                                                                   RAD_ALL.6915  
!                                                                                  RAD_ALL.6916  
!                                                                                  RAD_ALL.6917  
!                                                                                  RAD_ALL.6918  
         IF (I_ANGULAR_INTEGRATION.EQ.IP_TWO_STREAM) THEN                          RAD_ALL.6919  
!                                                                                  RAD_ALL.6920  
!           RESCALE THE ASYMMETRY AND CALCULATE THE SCATTERING                     RAD_ALL.6921  
!           FRACTIONS. (THESE ARE GREY AND MAY BE CALCULATED OUTSIDE               RAD_ALL.6922  
!           A LOOP OVER GASES).                                                    RAD_ALL.6923  
!                                                                                  RAD_ALL.6924  
            IF (L_RESCALE) THEN                                                    RAD_ALL.6925  
!                                                                                  RAD_ALL.6926  
!              RESCALE FREE ASYMMETRY:                                             RAD_ALL.6927  
!                                                                                  RAD_ALL.6928  
               CALL RESCALE_ASYMMETRY(N_PROFILE, 1, N_LAYER                        RAD_ALL.6929  
     &            , ASYMMETRY_FREE, FORWARD_SCATTER_FREE                           RAD_ALL.6930  
     &            , NPD_PROFILE, NPD_LAYER                                         RAD_ALL.6931  
     &            )                                                                RAD_ALL.6932  
!                                                                                  RAD_ALL.6933  
!                                                                                  RAD_ALL.6934  
               IF (L_CLOUD) THEN                                                   RAD_ALL.6935  
!                                                                                  RAD_ALL.6936  
!                 RESCALE CLOUDY ASYMMETRY:                                        RAD_ALL.6937  
!                                                                                  RAD_ALL.6938  
                  DO K=1, NP_CLOUD_TYPE(I_CLOUD_REPRESENTATION)                    RAD_ALL.6939  
                     CALL RESCALE_ASYMMETRY(N_PROFILE, N_CLOUD_TOP                 RAD_ALL.6940  
     &                  , N_LAYER                                                  RAD_ALL.6941  
     &                  , ASYMMETRY_CLOUD(1, 1, K)                                 RAD_ALL.6942  
     &                  , FORWARD_SCATTER_CLOUD(1, 1, K)                           RAD_ALL.6943  
     &                  , NPD_PROFILE, NPD_LAYER                                   RAD_ALL.6944  
     &                  )                                                          RAD_ALL.6945  
                  ENDDO                                                            RAD_ALL.6946  
!                                                                                  RAD_ALL.6947  
               ENDIF                                                               RAD_ALL.6948  
!                                                                                  RAD_ALL.6949  
            ENDIF                                                                  RAD_ALL.6950  
!                                                                                  RAD_ALL.6951  
         ENDIF                                                                     RAD_ALL.6952  
!                                                                                  RAD_ALL.6953  
!                                                                                  RAD_ALL.6954  
!                                                                                  RAD_ALL.6955  
!                                                                                  RAD_ALL.6956  
!        PRELIMINARY CALCULATIONS FOR SOURCE TERMS:                                RAD_ALL.6957  
!                                                                                  RAD_ALL.6958  
         IF (ISOLIR.EQ.IP_SOLAR) THEN                                              RAD_ALL.6959  
!           CONVERT NORMALIZED BAND FLUXES TO ACTUAL ENERGY FLUXES.                RAD_ALL.6960  
            DO L=1, N_PROFILE                                                      RAD_ALL.6961  
               INC_SOLAR_FLUX_BAND(L)=SOLAR_TOA(L)                                 RAD_ALL.6962  
     &            *SOLAR_FLUX_BAND(I_BAND)/SEC_0(L)                                RAD_ALL.6963  
            ENDDO                                                                  RAD_ALL.6964  
!                                                                                  RAD_ALL.6965  
         ELSE IF (ISOLIR.EQ.IP_INFRA_RED) THEN                                     RAD_ALL.6966  
!                                                                                  RAD_ALL.6967  
!           CALCULATE THE CHANGE IN THE THERMAL SOURCE FUNCTION                    RAD_ALL.6968  
!           ACROSS EACH LAYER FOR THE INFRA-RED PART OF THE SPECTRUM.              RAD_ALL.6969  
!                                                                                  RAD_ALL.6970  
            CALL DIFF_PLANCK_SOURCE(N_PROFILE, N_LAYER                             RAD_ALL.6971  
     &         , N_DEG_FIT, THERMAL_COEFFICIENT(0, I_BAND)                         RAD_ALL.6972  
     &         , T_REF_PLANCK, T_LEVEL, T_GROUND                                   RAD_ALL.6973  
     &         , PLANCK_SOURCE_BAND, DIFF_PLANCK_BAND                              RAD_ALL.6974  
     &         , THERMAL_GROUND_BAND                                               RAD_ALL.6975  
     &         , L_IR_SOURCE_QUAD, T, DIFF_PLANCK_BAND_2                           RAD_ALL.6976  
     &         , N_FRAC_ICE_POINT, I_FRAC_ICE_POINT, ICE_FRACTION                  RAD_ALL.6977  
     &         , PLANCK_FREEZE_SEA                                                 RAD_ALL.6978  
     &         , NPD_PROFILE, NPD_LAYER, NPD_THERMAL_COEFF                         RAD_ALL.6979  
     &         )                                                                   RAD_ALL.6980  
         ENDIF                                                                     RAD_ALL.6981  
!                                                                                  RAD_ALL.6982  
!                                                                                  RAD_ALL.6983  
!                                                                                  RAD_ALL.6984  
!                                                                                  RAD_ALL.6985  
!        SET THE SURFACE PROPERTIES:                                               RAD_ALL.6986  
!                                                                                  RAD_ALL.6987  
         CALL SET_SURFACE_PROPERTIES(N_POINT_TYPE, INDEX_SURFACE                   RAD_ALL.6988  
     &      , I_SPEC_SURFACE                                                       RAD_ALL.6989  
     &      , ISOLIR, I_BAND                                                       RAD_ALL.6990  
     &      , SURFACE_ALBEDO                                                       RAD_ALL.6991  
     &      , ALBEDO_FIELD_DIFF(1, I_BAND), ALBEDO_FIELD_DIR(1, I_BAND)            RAD_ALL.6992  
     &      , N_DIR_ALBEDO_FIT, DIRECT_ALBEDO_PARM, SEC_0                          RAD_ALL.6993  
     &      , EMISSIVITY_GROUND, EMISSIVITY_FIELD(1, I_BAND)                       RAD_ALL.6994  
     &      , ALBEDO_SURFACE_DIFF, ALBEDO_SURFACE_DIR                              RAD_ALL.6995  
     &      , THERMAL_GROUND_BAND                                                  RAD_ALL.6996  
     &      , NPD_PROFILE, NPD_BAND, NPD_SURFACE, NPD_ALBEDO_PARM                  RAD_ALL.6997  
     &      )                                                                      RAD_ALL.6998  
!                                                                                  RAD_ALL.6999  
!                                                                                  RAD_ALL.7000  
!                                                                                  RAD_ALL.7001  
!                                                                                  RAD_ALL.7002  
!                                                                                  RAD_ALL.7003  
!        CALL A SOLVER APPROPRIATE TO THE PRESENCE OF GASES AND                    RAD_ALL.7004  
!        THE OVERLAP ASSUMED:                                                      RAD_ALL.7005  
!                                                                                  RAD_ALL.7006  
         IF (.NOT.L_GAS_BAND) THEN                                                 RAD_ALL.7007  
!                                                                                  RAD_ALL.7008  
!           THERE IS NO GASEOUS ABSORPTION. SOLVE FOR THE                          RAD_ALL.7009  
!           FLUXES DIRECTLY.                                                       RAD_ALL.7010  
!                                                                                  RAD_ALL.7011  
            CALL SOLVE_BAND_WITHOUT_GAS(IERR                                       RAD_ALL.7012  
!                       Atmospheric Properties                                     RAD_ALL.7013  
     &         , N_PROFILE, N_LAYER, D_MASS                                        RAD_ALL.7014  
!                       Angular integration                                        RAD_ALL.7015  
     &         , I_ANGULAR_INTEGRATION, I_2STREAM, L_2_STREAM_CORRECT              RAD_ALL.7016  
     &         , L_RESCALE, N_ORDER_GAUSS                                          RAD_ALL.7017  
!                       Treatment of scattering                                    RAD_ALL.7018  
     &         , I_SCATTER_METHOD_BAND                                             RAD_ALL.7019  
!                       Options for solver                                         RAD_ALL.7020  
     &         , I_SOLVER, L_NET, I_EXTRAPOLATE_MIX_NET, N_AUGMENT                 RAD_ALL.7021  
!                       Spectral region                                            RAD_ALL.7022  
     &         , ISOLIR                                                            RAD_ALL.7023  
!                       Solar Properties                                           RAD_ALL.7024  
     &         , SEC_0, INC_SOLAR_FLUX_BAND                                        RAD_ALL.7025  
!                       Infra-red Properties                                       RAD_ALL.7026  
     &         , PLANCK_SOURCE_BAND(1, 0)                                          RAD_ALL.7027  
     &         , PLANCK_SOURCE_BAND(1, N_LAYER)                                    RAD_ALL.7028  
     &         , DIFF_PLANCK_BAND, L_IR_SOURCE_QUAD, DIFF_PLANCK_BAND_2            RAD_ALL.7029  
!                       Surface Properties                                         RAD_ALL.7030  
     &         , ALBEDO_SURFACE_DIFF, ALBEDO_SURFACE_DIR                           RAD_ALL.7031  
     &         , THERMAL_GROUND_BAND                                               RAD_ALL.7032  
!                       Clear-sky optical properties                               RAD_ALL.7033  
     &         , K_GREY_TOT_FREE, K_EXT_SCAT_FREE, ASYMMETRY_FREE                  RAD_ALL.7034  
     &         , FORWARD_SCATTER_FREE                                              RAD_ALL.7035  
!                       Cloudy properties                                          RAD_ALL.7036  
     &         , L_CLOUD, I_CLOUD                                                  RAD_ALL.7037  
!                       Cloudy Geometry                                            RAD_ALL.7038  
     &         , N_CLOUD_TOP                                                       RAD_ALL.7039  
     &         , NP_CLOUD_TYPE(I_CLOUD_REPRESENTATION), FRAC_CLOUD                 RAD_ALL.7040  
     &         , I_REGION_CLOUD, FRAC_REGION                                       RAD_ALL.7041  
     &         , W_FREE, N_FREE_PROFILE, I_FREE_PROFILE                            RAD_ALL.7042  
     &         , W_CLOUD, N_CLOUD_PROFILE, I_CLOUD_PROFILE                         RAD_ALL.7043  
     &         , CLOUD_OVERLAP                                                     RAD_ALL.7044  
     &         , N_COLUMN, L_COLUMN, AREA_COLUMN                                   RAD_ALL.7045  
!                       Cloudy optical properties                                  RAD_ALL.7046  
     &         , K_GREY_TOT_CLOUD, K_EXT_SCAT_CLOUD                                RAD_ALL.7047  
     &         , ASYMMETRY_CLOUD, FORWARD_SCATTER_CLOUD                            RAD_ALL.7048  
!                       Calculated Fluxes                                          RAD_ALL.7049  
     &         , FLUX_DIRECT_BAND, FLUX_TOTAL_BAND                                 RAD_ALL.7050  
!                       Flags for Clear-sky Fluxes                                 RAD_ALL.7051  
     &         , L_CLEAR, I_SOLVER_CLEAR                                           RAD_ALL.7052  
!                       Calculated Clear-sky Fluxes                                RAD_ALL.7053  
     &         , FLUX_DIRECT_CLEAR_BAND, FLUX_TOTAL_CLEAR_BAND                     RAD_ALL.7054  
!                       Planckian Function                                         RAD_ALL.7055  
     &         , PLANCK_SOURCE_BAND                                                RAD_ALL.7056  
!                       Dimensions of Arrays                                       RAD_ALL.7057  
     &         , NPD_PROFILE, NPD_LAYER, NPD_COLUMN                                RAD_ALL.7058  
     &         )                                                                   RAD_ALL.7059  
            IF (IERR.NE.I_NORMAL) RETURN                                           RAD_ALL.7060  
!                                                                                  RAD_ALL.7061  
!                                                                                  RAD_ALL.7062  
         ELSE                                                                      RAD_ALL.7063  
!                                                                                  RAD_ALL.7064  
!           GASES ARE INCLUDED.                                                    RAD_ALL.7065  
!                                                                                  RAD_ALL.7066  
!           INITIALIZE THE FLUX IN THE BAND TO ZERO.                               RAD_ALL.7067  
            CALL INITIALIZE_FLUX(N_PROFILE, N_LAYER, N_AUGMENT                     RAD_ALL.7068  
     &         , ISOLIR                                                            RAD_ALL.7069  
     &         , FLUX_DIRECT_BAND, FLUX_TOTAL_BAND                                 RAD_ALL.7070  
     &         , L_CLEAR                                                           RAD_ALL.7071  
     &         , FLUX_DIRECT_CLEAR_BAND, FLUX_TOTAL_CLEAR_BAND                     RAD_ALL.7072  
     &         , 0.0E+00                                                           RAD_ALL.7073  
     &         , NPD_PROFILE, NPD_LAYER                                            RAD_ALL.7074  
     &         , L_NET                                                             RAD_ALL.7075  
     &         )                                                                   RAD_ALL.7076  
!                                                                                  RAD_ALL.7077  
!           TREAT THE GASEOUS OVERLAPS AS DIRECTED BY                              RAD_ALL.7078  
!           THE OVERLAP SWITCH.                                                    RAD_ALL.7079  
!                                                                                  RAD_ALL.7080  
            IF (I_GAS_OVERLAP(I_BAND).EQ.IP_OVERLAP_SINGLE) THEN                   RAD_ALL.7081  
!                                                                                  RAD_ALL.7082  
               CALL SOLVE_BAND_ONE_GAS(IERR                                        RAD_ALL.7083  
!                       Atmospheric Properties                                     RAD_ALL.7084  
     &            , N_PROFILE, N_LAYER, L_LAYER, I_TOP, P, T, D_MASS               RAD_ALL.7085  
!                       Angular Integration                                        RAD_ALL.7086  
     &            , I_ANGULAR_INTEGRATION, I_2STREAM, L_2_STREAM_CORRECT           RAD_ALL.7087  
     &            , L_RESCALE, N_ORDER_GAUSS                                       RAD_ALL.7088  
!                       Treatment of Scattering                                    RAD_ALL.7089  
     &            , I_SCATTER_METHOD_BAND                                          RAD_ALL.7090  
!                       Options for solver                                         RAD_ALL.7091  
     &            , I_SOLVER, L_NET, I_EXTRAPOLATE_MIX_NET, N_AUGMENT              RAD_ALL.7092  
!                       Gaseous Properties                                         RAD_ALL.7093  
     &            , I_BAND, I_GAS                                                  RAD_ALL.7094  
     &            , I_BAND_ESFT, I_SCALE_ESFT, I_SCALE_FNC                         RAD_ALL.7095  
     &            , K_ESFT, W_ESFT, SCALE_VECTOR                                   RAD_ALL.7096  
     &            , P_REFERENCE, T_REFERENCE                                       RAD_ALL.7097  
     &            , GAS_MIX_RATIO, GAS_FRAC_RESCALED                               RAD_ALL.7098  
     &            , L_DOPPLER, DOPPLER_CORRECTION                                  RAD_ALL.7099  
!                       Spectral Region                                            RAD_ALL.7100  
     &            , ISOLIR                                                         RAD_ALL.7101  
!                       Solar Properties                                           RAD_ALL.7102  
     &            , SEC_0, INC_SOLAR_FLUX_BAND                                     RAD_ALL.7103  
!                       Infra-red Properties                                       RAD_ALL.7104  
     &            , PLANCK_SOURCE_BAND(1, 0)                                       RAD_ALL.7105  
     &            , PLANCK_SOURCE_BAND(1, N_LAYER)                                 RAD_ALL.7106  
     &            , DIFF_PLANCK_BAND                                               RAD_ALL.7107  
     &            , L_IR_SOURCE_QUAD, DIFF_PLANCK_BAND_2                           RAD_ALL.7108  
!                       Surface Properties                                         RAD_ALL.7109  
     &            , ALBEDO_SURFACE_DIFF, ALBEDO_SURFACE_DIR                        RAD_ALL.7110  
     &            , THERMAL_GROUND_BAND                                            RAD_ALL.7111  
!                       Clear-sky optical Properties                               RAD_ALL.7112  
     &            , K_GREY_TOT_FREE, K_EXT_SCAT_FREE, ASYMMETRY_FREE               RAD_ALL.7113  
     &            , FORWARD_SCATTER_FREE                                           RAD_ALL.7114  
!                       Cloudy properties                                          RAD_ALL.7115  
     &            , L_CLOUD, I_CLOUD                                               RAD_ALL.7116  
!                       Cloud Geometry                                             RAD_ALL.7117  
     &            , N_CLOUD_TOP                                                    RAD_ALL.7118  
     &            , NP_CLOUD_TYPE(I_CLOUD_REPRESENTATION), FRAC_CLOUD              RAD_ALL.7119  
     &            , I_REGION_CLOUD, FRAC_REGION                                    RAD_ALL.7120  
     &            , W_FREE, N_FREE_PROFILE, I_FREE_PROFILE                         RAD_ALL.7121  
     &            , W_CLOUD, N_CLOUD_PROFILE, I_CLOUD_PROFILE                      RAD_ALL.7122  
     &            , CLOUD_OVERLAP                                                  RAD_ALL.7123  
     &            , N_COLUMN, L_COLUMN, AREA_COLUMN                                RAD_ALL.7124  
!                       Cloudy Optical Properties                                  RAD_ALL.7125  
     &            , K_GREY_TOT_CLOUD, K_EXT_SCAT_CLOUD                             RAD_ALL.7126  
     &            , ASYMMETRY_CLOUD                                                RAD_ALL.7127  
     &            , FORWARD_SCATTER_CLOUD                                          RAD_ALL.7128  
!                       Fluxes Calculated                                          RAD_ALL.7129  
     &            , FLUX_DIRECT_BAND, FLUX_TOTAL_BAND                              RAD_ALL.7130  
!                       Flags for clear-sky calculations                           RAD_ALL.7131  
     &            , L_CLEAR, I_SOLVER_CLEAR                                        RAD_ALL.7132  
!                       Clear-sky Fluxes                                           RAD_ALL.7133  
     &            , FLUX_DIRECT_CLEAR_BAND, FLUX_TOTAL_CLEAR_BAND                  RAD_ALL.7134  
!                       Planckian Function                                         RAD_ALL.7135  
     &            , PLANCK_SOURCE_BAND                                             RAD_ALL.7136  
!                       Dimensions of Arrays                                       RAD_ALL.7137  
     &            , NPD_PROFILE, NPD_LAYER, NPD_COLUMN                             RAD_ALL.7138  
     &            , NPD_BAND, NPD_SPECIES                                          RAD_ALL.7139  
     &            , NPD_ESFT_TERM, NPD_SCALE_VARIABLE, NPD_SCALE_FNC               RAD_ALL.7140  
     &            )                                                                RAD_ALL.7141  
!                                                                                  RAD_ALL.7142  
            ELSE IF (I_GAS_OVERLAP(I_BAND).EQ.IP_OVERLAP_RANDOM) THEN              RAD_ALL.7143  
!                                                                                  RAD_ALL.7144  
               CALL SOLVE_BAND_RANDOM_OVERLAP(IERR                                 RAD_ALL.7145  
!                       Atmospheric Properties                                     RAD_ALL.7146  
     &            , N_PROFILE, N_LAYER, L_LAYER, I_TOP, P, T, D_MASS               RAD_ALL.7147  
!                       Angular Integration                                        RAD_ALL.7148  
     &            , I_ANGULAR_INTEGRATION, I_2STREAM, L_2_STREAM_CORRECT           RAD_ALL.7149  
     &            , L_RESCALE, N_ORDER_GAUSS                                       RAD_ALL.7150  
!                       Treatment of Scattering                                    RAD_ALL.7151  
     &            , I_SCATTER_METHOD_BAND                                          RAD_ALL.7152  
!                       Options for solver                                         RAD_ALL.7153  
     &            , I_SOLVER, L_NET, I_EXTRAPOLATE_MIX_NET, N_AUGMENT              RAD_ALL.7154  
!                       Gaseous Properties                                         RAD_ALL.7155  
     &            , I_BAND, N_GAS                                                  RAD_ALL.7156  
     &            , INDEX_ABSORB, I_BAND_ESFT, I_SCALE_ESFT, I_SCALE_FNC           RAD_ALL.7157  
     &            , K_ESFT, W_ESFT, SCALE_VECTOR                                   RAD_ALL.7158  
     &            , P_REFERENCE, T_REFERENCE                                       RAD_ALL.7159  
     &            , GAS_MIX_RATIO, GAS_FRAC_RESCALED                               RAD_ALL.7160  
     &            , L_DOPPLER, DOPPLER_CORRECTION                                  RAD_ALL.7161  
!                       Spectral Region                                            RAD_ALL.7162  
     &            , ISOLIR                                                         RAD_ALL.7163  
!                       Solar Properties                                           RAD_ALL.7164  
     &            , SEC_0, INC_SOLAR_FLUX_BAND                                     RAD_ALL.7165  
!                       Infra-red Properties                                       RAD_ALL.7166  
     &            , PLANCK_SOURCE_BAND(1, 0)                                       RAD_ALL.7167  
     &            , PLANCK_SOURCE_BAND(1, N_LAYER)                                 RAD_ALL.7168  
     &            , DIFF_PLANCK_BAND                                               RAD_ALL.7169  
     &            , L_IR_SOURCE_QUAD, DIFF_PLANCK_BAND_2                           RAD_ALL.7170  
!                       Surface Properties                                         RAD_ALL.7171  
     &            , ALBEDO_SURFACE_DIFF, ALBEDO_SURFACE_DIR                        RAD_ALL.7172  
     &            , THERMAL_GROUND_BAND                                            RAD_ALL.7173  
!                       Clear-sky optical Properties                               RAD_ALL.7174  
     &            , K_GREY_TOT_FREE, K_EXT_SCAT_FREE, ASYMMETRY_FREE               RAD_ALL.7175  
     &            , FORWARD_SCATTER_FREE                                           RAD_ALL.7176  
!                       Cloudy Properties                                          RAD_ALL.7177  
     &            , L_CLOUD, I_CLOUD                                               RAD_ALL.7178  
!                       Cloud Geometry                                             RAD_ALL.7179  
     &            , N_CLOUD_TOP                                                    RAD_ALL.7180  
     &            , NP_CLOUD_TYPE(I_CLOUD_REPRESENTATION), FRAC_CLOUD              RAD_ALL.7181  
     &            , I_REGION_CLOUD, FRAC_REGION                                    RAD_ALL.7182  
     &            , W_FREE, N_FREE_PROFILE, I_FREE_PROFILE                         RAD_ALL.7183  
     &            , W_CLOUD, N_CLOUD_PROFILE, I_CLOUD_PROFILE                      RAD_ALL.7184  
     &            , CLOUD_OVERLAP                                                  RAD_ALL.7185  
     &            , N_COLUMN, L_COLUMN, AREA_COLUMN                                RAD_ALL.7186  
!                       Cloudy optical Properties                                  RAD_ALL.7187  
     &            , K_GREY_TOT_CLOUD, K_EXT_SCAT_CLOUD                             RAD_ALL.7188  
     &            , ASYMMETRY_CLOUD                                                RAD_ALL.7189  
     &            , FORWARD_SCATTER_CLOUD                                          RAD_ALL.7190  
!                       Fluxes Calculated                                          RAD_ALL.7191  
     &            , FLUX_DIRECT_BAND, FLUX_TOTAL_BAND                              RAD_ALL.7192  
!                       Flags for Clear-sky Calculations                           RAD_ALL.7193  
     &            , L_CLEAR, I_SOLVER_CLEAR                                        RAD_ALL.7194  
!                       Clear-sky Fluxes                                           RAD_ALL.7195  
     &            , FLUX_DIRECT_CLEAR_BAND, FLUX_TOTAL_CLEAR_BAND                  RAD_ALL.7196  
!                       Planckian Function                                         RAD_ALL.7197  
     &            , PLANCK_SOURCE_BAND                                             RAD_ALL.7198  
!                       Dimensions of Arrays                                       RAD_ALL.7199  
     &            , NPD_PROFILE, NPD_LAYER, NPD_COLUMN                             RAD_ALL.7200  
     &            , NPD_BAND, NPD_SPECIES                                          RAD_ALL.7201  
     &            , NPD_ESFT_TERM, NPD_SCALE_VARIABLE, NPD_SCALE_FNC               RAD_ALL.7202  
     &            )                                                                RAD_ALL.7203  
!                                                                                  RAD_ALL.7204  
            ELSE IF (I_GAS_OVERLAP(I_BAND).EQ.IP_OVERLAP_FESFT) THEN               RAD_ALL.7205  
!                                                                                  RAD_ALL.7206  
               CALL SOLVE_BAND_FESFT(IERR                                          RAD_ALL.7207  
!                       Atmospheric Properties                                     RAD_ALL.7208  
     &            , N_PROFILE, N_LAYER, L_LAYER, I_TOP, P, T, D_MASS               RAD_ALL.7209  
!                       Angular Integration                                        RAD_ALL.7210  
     &            , I_ANGULAR_INTEGRATION, I_2STREAM, L_2_STREAM_CORRECT           RAD_ALL.7211  
     &            , L_RESCALE, N_ORDER_GAUSS                                       RAD_ALL.7212  
!                       Treatment of Scattering                                    RAD_ALL.7213  
     &            , I_SCATTER_METHOD_BAND                                          RAD_ALL.7214  
!                       Options for solver                                         RAD_ALL.7215  
     &            , I_SOLVER, L_NET, I_EXTRAPOLATE_MIX_NET, N_AUGMENT              RAD_ALL.7216  
!                       Gaseous Properties                                         RAD_ALL.7217  
     &            , I_BAND, N_GAS                                                  RAD_ALL.7218  
     &            , INDEX_ABSORB, I_BAND_ESFT, I_SCALE_ESFT, I_SCALE_FNC           RAD_ALL.7219  
     &            , K_ESFT, W_ESFT, SCALE_VECTOR                                   RAD_ALL.7220  
     &            , P_REFERENCE, T_REFERENCE                                       RAD_ALL.7221  
     &            , GAS_MIX_RATIO, GAS_FRAC_RESCALED                               RAD_ALL.7222  
     &            , L_DOPPLER, DOPPLER_CORRECTION                                  RAD_ALL.7223  
!                       Spectral Region                                            RAD_ALL.7224  
     &            , ISOLIR                                                         RAD_ALL.7225  
!                       Solar Properties                                           RAD_ALL.7226  
     &            , SEC_0, INC_SOLAR_FLUX_BAND                                     RAD_ALL.7227  
!                       Infra-red Properties                                       RAD_ALL.7228  
     &            , PLANCK_SOURCE_BAND(1, 0)                                       RAD_ALL.7229  
     &            , PLANCK_SOURCE_BAND(1, N_LAYER)                                 RAD_ALL.7230  
     &            , DIFF_PLANCK_BAND                                               RAD_ALL.7231  
     &            , L_IR_SOURCE_QUAD, DIFF_PLANCK_BAND_2                           RAD_ALL.7232  
!                       Surface Properties                                         RAD_ALL.7233  
     &            , ALBEDO_SURFACE_DIFF, ALBEDO_SURFACE_DIR                        RAD_ALL.7234  
     &            , THERMAL_GROUND_BAND                                            RAD_ALL.7235  
!                       Clear-sky Optical Properties                               RAD_ALL.7236  
     &            , K_GREY_TOT_FREE, K_EXT_SCAT_FREE, ASYMMETRY_FREE               RAD_ALL.7237  
     &            , FORWARD_SCATTER_FREE                                           RAD_ALL.7238  
!                       Cloudy Properties                                          RAD_ALL.7239  
     &            , L_CLOUD, I_CLOUD                                               RAD_ALL.7240  
!                       Cloud Geometry                                             RAD_ALL.7241  
     &            , N_CLOUD_TOP                                                    RAD_ALL.7242  
     &            , NP_CLOUD_TYPE(I_CLOUD_REPRESENTATION), FRAC_CLOUD              RAD_ALL.7243  
     &            , I_REGION_CLOUD, FRAC_REGION                                    RAD_ALL.7244  
     &            , W_FREE, N_FREE_PROFILE, I_FREE_PROFILE                         RAD_ALL.7245  
     &            , W_CLOUD, N_CLOUD_PROFILE, I_CLOUD_PROFILE                      RAD_ALL.7246  
     &            , CLOUD_OVERLAP                                                  RAD_ALL.7247  
     &            , N_COLUMN, L_COLUMN, AREA_COLUMN                                RAD_ALL.7248  
!                       Cloudy Optical Properties                                  RAD_ALL.7249  
     &            , K_GREY_TOT_CLOUD, K_EXT_SCAT_CLOUD                             RAD_ALL.7250  
     &            , ASYMMETRY_CLOUD, FORWARD_SCATTER_CLOUD                         RAD_ALL.7251  
!                       Fluxes Calculated                                          RAD_ALL.7252  
     &            , FLUX_DIRECT_BAND, FLUX_TOTAL_BAND                              RAD_ALL.7253  
!                       Flags for Clear Fluxes                                     RAD_ALL.7254  
     &            , L_CLEAR, I_SOLVER_CLEAR                                        RAD_ALL.7255  
!                       Clear-sky Fluxes Calculated                                RAD_ALL.7256  
     &            , FLUX_DIRECT_CLEAR_BAND, FLUX_TOTAL_CLEAR_BAND                  RAD_ALL.7257  
!                       Planckian Source Function                                  RAD_ALL.7258  
     &            , PLANCK_SOURCE_BAND                                             RAD_ALL.7259  
!                       Sizes of Arrays                                            RAD_ALL.7260  
     &            , NPD_PROFILE, NPD_LAYER, NPD_COLUMN                             RAD_ALL.7261  
     &            , NPD_BAND, NPD_SPECIES                                          RAD_ALL.7262  
     &            , NPD_ESFT_TERM, NPD_SCALE_VARIABLE, NPD_SCALE_FNC               RAD_ALL.7263  
     &            )                                                                RAD_ALL.7264  
!                                                                                  RAD_ALL.7265  
            ELSE IF (I_GAS_OVERLAP(I_BAND).EQ.IP_OVERLAP_CLR_FESFT) THEN           RAD_ALL.7266  
!                                                                                  RAD_ALL.7267  
               CALL SOLVE_BAND_CLR_FESFT(IERR                                      RAD_ALL.7268  
!                       Atmospheric Properties                                     RAD_ALL.7269  
     &            , N_PROFILE, N_LAYER, L_LAYER, I_TOP, P, T, D_MASS               RAD_ALL.7270  
!                       Angular Integration                                        RAD_ALL.7271  
     &            , I_ANGULAR_INTEGRATION, I_2STREAM, L_2_STREAM_CORRECT           RAD_ALL.7272  
     &            , L_RESCALE, N_ORDER_GAUSS                                       RAD_ALL.7273  
!                       Treatment of Scattering                                    RAD_ALL.7274  
     &            , I_SCATTER_METHOD_BAND                                          RAD_ALL.7275  
!                       Options for Solver                                         RAD_ALL.7276  
     &            , I_SOLVER, L_NET, I_EXTRAPOLATE_MIX_NET, N_AUGMENT              RAD_ALL.7277  
!                       Gaseous Properties                                         RAD_ALL.7278  
     &            , I_BAND, N_GAS                                                  RAD_ALL.7279  
     &            , INDEX_ABSORB, I_BAND_ESFT, I_SCALE_ESFT, I_SCALE_FNC           RAD_ALL.7280  
     &            , K_ESFT, W_ESFT, SCALE_VECTOR                                   RAD_ALL.7281  
     &            , P_REFERENCE, T_REFERENCE                                       RAD_ALL.7282  
     &            , GAS_MIX_RATIO, GAS_FRAC_RESCALED                               RAD_ALL.7283  
     &            , L_DOPPLER, DOPPLER_CORRECTION                                  RAD_ALL.7284  
!                       Spectral Region                                            RAD_ALL.7285  
     &            , ISOLIR                                                         RAD_ALL.7286  
!                       Solar Properties                                           RAD_ALL.7287  
     &            , SEC_0, INC_SOLAR_FLUX_BAND                                     RAD_ALL.7288  
!                       Infra-red Properties                                       RAD_ALL.7289  
     &            , PLANCK_SOURCE_BAND                                             RAD_ALL.7290  
     &            , DIFF_PLANCK_BAND                                               RAD_ALL.7291  
     &            , L_IR_SOURCE_QUAD, DIFF_PLANCK_BAND_2                           RAD_ALL.7292  
!                       Surface Properties                                         RAD_ALL.7293  
     &            , ALBEDO_SURFACE_DIFF, ALBEDO_SURFACE_DIR                        RAD_ALL.7294  
     &            , THERMAL_GROUND_BAND                                            RAD_ALL.7295  
!                       Clear-sky Optical Properties                               RAD_ALL.7296  
     &            , K_GREY_TOT_FREE, K_EXT_SCAT_FREE, ASYMMETRY_FREE               RAD_ALL.7297  
     &            , FORWARD_SCATTER_FREE                                           RAD_ALL.7298  
!                       Cloudy Properties                                          RAD_ALL.7299  
     &            , L_CLOUD, I_CLOUD                                               RAD_ALL.7300  
!                       Cloud Geometry                                             RAD_ALL.7301  
     &            , N_CLOUD_TOP                                                    RAD_ALL.7302  
     &            , NP_CLOUD_TYPE(I_CLOUD_REPRESENTATION), FRAC_CLOUD              RAD_ALL.7303  
     &            , I_REGION_CLOUD, FRAC_REGION                                    RAD_ALL.7304  
     &            , W_FREE, N_FREE_PROFILE, I_FREE_PROFILE                         RAD_ALL.7305  
     &            , W_CLOUD, N_CLOUD_PROFILE, I_CLOUD_PROFILE                      RAD_ALL.7306  
     &            , CLOUD_OVERLAP                                                  RAD_ALL.7307  
     &            , N_COLUMN, L_COLUMN, AREA_COLUMN                                RAD_ALL.7308  
!                       Cloudy Optical Properties                                  RAD_ALL.7309  
     &            , K_GREY_TOT_CLOUD, K_EXT_SCAT_CLOUD                             RAD_ALL.7310  
     &            , ASYMMETRY_CLOUD                                                RAD_ALL.7311  
     &            , FORWARD_SCATTER_CLOUD                                          RAD_ALL.7312  
!                       Fluxes Calculated                                          RAD_ALL.7313  
     &            , FLUX_DIRECT_BAND, FLUX_TOTAL_BAND                              RAD_ALL.7314  
!                       Flags for Clear-sky Fluxes                                 RAD_ALL.7315  
     &            , L_CLEAR, I_SOLVER_CLEAR                                        RAD_ALL.7316  
!                       Clear-sky Fluxes Calculated                                RAD_ALL.7317  
     &            , FLUX_DIRECT_CLEAR_BAND, FLUX_TOTAL_CLEAR_BAND                  RAD_ALL.7318  
     &            , NPD_PROFILE, NPD_LAYER, NPD_COLUMN                             RAD_ALL.7319  
     &            , NPD_BAND, NPD_SPECIES                                          RAD_ALL.7320  
     &            , NPD_ESFT_TERM, NPD_SCALE_VARIABLE, NPD_SCALE_FNC               RAD_ALL.7321  
     &            )                                                                RAD_ALL.7322  
!                                                                                  RAD_ALL.7323  
            ELSE IF (I_GAS_OVERLAP(I_BAND).EQ.IP_OVERLAP_K_EQV) THEN               RAD_ALL.7324  
!                                                                                  RAD_ALL.7325  
               CALL SOLVE_BAND_K_EQV(IERR                                          RAD_ALL.7326  
!                       Atmospheric Properties                                     RAD_ALL.7327  
     &            , N_PROFILE, N_LAYER, L_LAYER, I_TOP, P, T, D_MASS               RAD_ALL.7328  
!                       Angular Integration                                        RAD_ALL.7329  
     &            , I_ANGULAR_INTEGRATION, I_2STREAM, L_2_STREAM_CORRECT           RAD_ALL.7330  
     &            , L_RESCALE, N_ORDER_GAUSS                                       RAD_ALL.7331  
!                       Treatment of Scattering                                    RAD_ALL.7332  
     &            , I_SCATTER_METHOD_BAND                                          RAD_ALL.7333  
!                       Options for Solver                                         RAD_ALL.7334  
     &            , I_SOLVER, L_NET, I_EXTRAPOLATE_MIX_NET, N_AUGMENT              RAD_ALL.7335  
!                       Gaseous Properties                                         RAD_ALL.7336  
     &            , I_BAND, N_GAS                                                  RAD_ALL.7337  
     &            , INDEX_ABSORB, I_BAND_ESFT, I_SCALE_ESFT, I_SCALE_FNC           RAD_ALL.7338  
     &            , K_ESFT, W_ESFT, SCALE_VECTOR                                   RAD_ALL.7339  
     &            , P_REFERENCE, T_REFERENCE                                       RAD_ALL.7340  
     &            , GAS_MIX_RATIO, GAS_FRAC_RESCALED                               RAD_ALL.7341  
     &            , L_DOPPLER, DOPPLER_CORRECTION                                  RAD_ALL.7342  
!                       Spectral Region                                            RAD_ALL.7343  
     &            , ISOLIR                                                         RAD_ALL.7344  
!                       Solar Properties                                           RAD_ALL.7345  
     &            , SEC_0, INC_SOLAR_FLUX_BAND                                     RAD_ALL.7346  
!                       Infra-red Properties                                       RAD_ALL.7347  
     &            , PLANCK_SOURCE_BAND                                             RAD_ALL.7348  
     &            , DIFF_PLANCK_BAND                                               RAD_ALL.7349  
     &            , L_IR_SOURCE_QUAD, DIFF_PLANCK_BAND_2                           RAD_ALL.7350  
!                       Surface Properties                                         RAD_ALL.7351  
     &            , ALBEDO_SURFACE_DIFF, ALBEDO_SURFACE_DIR                        RAD_ALL.7352  
     &            , THERMAL_GROUND_BAND                                            RAD_ALL.7353  
!                       Clear-sky optical properties                               RAD_ALL.7354  
     &            , K_GREY_TOT_FREE, K_EXT_SCAT_FREE, ASYMMETRY_FREE               RAD_ALL.7355  
     &            , FORWARD_SCATTER_FREE                                           RAD_ALL.7356  
!                       Cloudy Properties                                          RAD_ALL.7357  
     &            , L_CLOUD, I_CLOUD                                               RAD_ALL.7358  
!                       Cloud Geometry                                             RAD_ALL.7359  
     &            , N_CLOUD_TOP                                                    RAD_ALL.7360  
     &            , NP_CLOUD_TYPE(I_CLOUD_REPRESENTATION), FRAC_CLOUD              RAD_ALL.7361  
     &            , I_REGION_CLOUD, FRAC_REGION                                    RAD_ALL.7362  
     &            , W_FREE, N_FREE_PROFILE, I_FREE_PROFILE                         RAD_ALL.7363  
     &            , W_CLOUD, N_CLOUD_PROFILE, I_CLOUD_PROFILE                      RAD_ALL.7364  
     &            , CLOUD_OVERLAP                                                  RAD_ALL.7365  
     &            , N_COLUMN, L_COLUMN, AREA_COLUMN                                RAD_ALL.7366  
!                       Cloudy Optical Properties                                  RAD_ALL.7367  
     &            , K_GREY_TOT_CLOUD, K_EXT_SCAT_CLOUD                             RAD_ALL.7368  
     &            , ASYMMETRY_CLOUD                                                RAD_ALL.7369  
     &            , FORWARD_SCATTER_CLOUD                                          RAD_ALL.7370  
!                       Fluxes Calculated                                          RAD_ALL.7371  
     &            , FLUX_DIRECT_BAND, FLUX_TOTAL_BAND                              RAD_ALL.7372  
!                       Flags for Clear-sky Calculations                           RAD_ALL.7373  
     &            , L_CLEAR, I_SOLVER_CLEAR                                        RAD_ALL.7374  
!                       Clear-sky Fluxes Calculated                                RAD_ALL.7375  
     &            , FLUX_DIRECT_CLEAR_BAND, FLUX_TOTAL_CLEAR_BAND                  RAD_ALL.7376  
!                       Dimensions of Arrays                                       RAD_ALL.7377  
     &            , NPD_PROFILE, NPD_LAYER, NPD_COLUMN                             RAD_ALL.7378  
     &            , NPD_BAND, NPD_SPECIES                                          RAD_ALL.7379  
     &            , NPD_ESFT_TERM, NPD_SCALE_VARIABLE, NPD_SCALE_FNC               RAD_ALL.7380  
     &            )                                                                RAD_ALL.7381  
!                                                                                  RAD_ALL.7382  
            ENDIF                                                                  RAD_ALL.7383  
         ENDIF                                                                     RAD_ALL.7384  
!                                                                                  RAD_ALL.7385  
!                                                                                  RAD_ALL.7386  
!                                                                                  RAD_ALL.7387  
!        INCREMENT THE TOTAL FLUXES.                                               RAD_ALL.7388  
!                                                                                  RAD_ALL.7389  
         CALL AUGMENT_TOTAL_FLUX(N_PROFILE, N_LAYER, N_AUGMENT                     RAD_ALL.7390  
     &      , ISOLIR, L_CLEAR, L_NET                                               RAD_ALL.7391  
     &      , WEIGHT_BAND(I_BAND), PLANCK_SOURCE_BAND                              RAD_ALL.7392  
     &      , FLUX_DIRECT, FLUX_TOTAL                                              RAD_ALL.7393  
     &      , FLUX_DIRECT_BAND, FLUX_TOTAL_BAND                                    RAD_ALL.7394  
     &      , FLUX_DIRECT_CLEAR, FLUX_TOTAL_CLEAR                                  RAD_ALL.7395  
     &      , FLUX_DIRECT_CLEAR_BAND, FLUX_TOTAL_CLEAR_BAND                        RAD_ALL.7396  
     &      , PLANCK_FLUX                                                          RAD_ALL.7397  
     &      , NPD_PROFILE, NPD_LAYER                                               RAD_ALL.7398  
     &      , ALBEDO_SURFACE_DIFF                                                  RAD_ALL.7399  
     &      , ALBEDO_SURFACE_DIR                                                   RAD_ALL.7400  
     &      )                                                                      RAD_ALL.7401  
!                                                                                  RAD_ALL.7402  
!                                                                                  RAD_ALL.7403  
!                                                                                  RAD_ALL.7404  
!        INCREMENT THE BAND-DEPENDENT DIAGNOSTICS FOR THE                          RAD_ALL.7405  
!        UNIFIED MODEL.                                                            RAD_ALL.7406  
         CALL R2_COUPLE_DIAG(N_PROFILE, L_NET, ISOLIR                              RAD_ALL.7407  
     &      , ALBEDO_FIELD_DIFF(1, I_BAND), ALBEDO_FIELD_DIR(1, I_BAND)            RAD_ALL.7408  
     &      , ALBEDO_SEA_DIFF(1, I_BAND), ALBEDO_SEA_DIR(1, I_BAND)                RAD_ALL.7409  
     &      , N_FRAC_ICE_POINT, I_FRAC_ICE_POINT, ICE_FRACTION                     RAD_ALL.7410  
     &      , PLANCK_FREEZE_SEA                                                    RAD_ALL.7411  
     &      , PLANCK_SOURCE_BAND(1, N_LAYER), THERMAL_GROUND_BAND                  RAD_ALL.7412  
     &      , FLUX_TOTAL_BAND(1, N_AUGMENT)                                        RAD_ALL.7413  
     &      , FLUX_TOTAL_BAND(1, N_AUGMENT-1)                                      RAD_ALL.7414  
     &      , FLUX_DIRECT_BAND(1, N_LAYER)                                         RAD_ALL.7415  
     &      , FLUX_TOTAL_CLEAR_BAND(1, N_AUGMENT)                                  RAD_ALL.7416  
     &      , FLUX_TOTAL_CLEAR_BAND(1, N_AUGMENT-1)                                RAD_ALL.7417  
     &      , FLUX_DIRECT_CLEAR_BAND(1, N_LAYER)                                   RAD_ALL.7418  
     &      , WEIGHT_690NM(I_BAND)                                                 RAD_ALL.7419  
     &      , SEA_FLUX                                                             RAD_ALL.7420  
     &      , L_SURFACE_DOWN_FLUX, SURFACE_DOWN_FLUX                               RAD_ALL.7421  
     &      , L_SURF_DOWN_CLR, SURF_DOWN_CLR                                       RAD_ALL.7422  
     &      , L_SURF_UP_CLR, SURF_UP_CLR                                           RAD_ALL.7423  
     &      , L_FLUX_BELOW_690NM_SURF, FLUX_BELOW_690NM_SURF                       RAD_ALL.7424  
     &      , NPD_PROFILE                                                          RAD_ALL.7425  
     &      )                                                                      RAD_ALL.7426  
!                                                                                  RAD_ALL.7427  
      ENDDO                                                                        RAD_ALL.7428  
!                                                                                  RAD_ALL.7429  
!                                                                                  RAD_ALL.7430  
!                                                                                  RAD_ALL.7431  
!                                                                                  RAD_ALL.7432  
!     PASS THE CALCULATED FLUXES INTO THE OUTPUT ARRAYS.                           RAD_ALL.7433  
!                                                                                  RAD_ALL.7434  
      CALL ASSIGN_FLUX(N_PROFILE, N_LAYER                                          RAD_ALL.7435  
     &   , FLUX_TOTAL, FLUX_TOTAL_CLEAR                                            RAD_ALL.7436  
     &   , ISOLIR                                                                  RAD_ALL.7437  
     &   , PLANCK_FLUX                                                             RAD_ALL.7438  
     &   , L_CLEAR, L_NET                                                          RAD_ALL.7439  
     &   , FLUX_DOWN, FLUX_UP, FLUX_DOWN_CLEAR, FLUX_UP_CLEAR                      RAD_ALL.7440  
     &   , NPD_PROFILE, NPD_LAYER                                                  RAD_ALL.7441  
     &   )                                                                         RAD_ALL.7442  
!                                                                                  RAD_ALL.7443  
!                                                                                  RAD_ALL.7444  
!                                                                                  RAD_ALL.7445  
      RETURN                                                                       RAD_ALL.7446  
      END  
