!+ Subroutine to set fields of aerosols.                                           RAD_ALL.4563  
!                                                                                  RAD_ALL.4564  
! Purpose:                                                                         RAD_ALL.4565  
!   The mixing ratios of aerosols are transferred to the large array.              RAD_ALL.4566  
!                                                                                  RAD_ALL.4567  
! Method:                                                                          RAD_ALL.4568  
!   Straightforward.                                                               RAD_ALL.4569  
!                                                                                  RAD_ALL.4570  
! Current Owner of Code: J. M. Edwards                                             RAD_ALL.4571  
!                                                                                  RAD_ALL.4572  
! History:                                                                         RAD_ALL.4573  
!       Version         Date                    Comment                            RAD_ALL.4574  
!       4.0             27-07-95                Original Code                      RAD_ALL.4575  
!                                               (J. M. Edwards)                    RAD_ALL.4576  
!       4.1             12-06-96                Code rewritten to                  RAD_ALL.4577  
!                                               include two types                  RAD_ALL.4578  
!                                               of sulphate provided               RAD_ALL.4579  
!                                               by the sulphur cycle.              RAD_ALL.4580  
!                                               (J. M. Edwards)                    RAD_ALL.4581  
!       4.2             08-08-96                Climatological aerosol             RAD_ALL.4582  
!                                               model added.                       RAD_ALL.4583  
!                                               (J. M. Edwards)                    RAD_ALL.4584  
!       4.4             15-09-97                Code for aerosols                  RAD_ALL.4585  
!                                               generalized to allow               RAD_ALL.4586  
!                                               arbitrary combinations.            RAD_ALL.4587  
!                                               (J. M. Edwards)                    RAD_ALL.4588  
!                                                                                  RAD_ALL.4589  
! Description of Code:                                                             RAD_ALL.4590  
!   FORTRAN 77  with extensions listed in documentation.                           RAD_ALL.4591  
!                                                                                  RAD_ALL.4592  
!- ---------------------------------------------------------------------           RAD_ALL.4593  
      SUBROUTINE R2_SET_AEROSOL_FIELD(IERR                                         RAD_ALL.4594  
     &   , N_PROFILE, NLEVS, N_AEROSOL, TYPE_AEROSOL                               RAD_ALL.4595  
     &   , I_GATHER                                                                RAD_ALL.4596  
     &   , L_CLIMAT_AEROSOL, N_LEVELS_BL                                           RAD_ALL.4597  
     &   , L_USE_SULPC_DIRECT                                                      RAD_ALL.4598  
     &   , SULP_DIM1, SULP_DIM2                                                    RAD_ALL.4599  
     &   , ACCUM_SULPHATE, AITKEN_SULPHATE                                         RAD_ALL.4600  
     &   , LAND, LYING_SNOW, PSTAR, AB, BB, TRINDX                                 RAD_ALL.4601  
     &   , AEROSOL_MIX_RATIO                                                       RAD_ALL.4602  
     &   , NPD_FIELD, NPD_PROFILE, NPD_LAYER, NPD_AEROSOL_SPECIES                  RAD_ALL.4603  
     &   )                                                                         RAD_ALL.4604  
!                                                                                  RAD_ALL.4605  
!                                                                                  RAD_ALL.4606  
!                                                                                  RAD_ALL.4607  
      IMPLICIT NONE                                                                RAD_ALL.4608  
!                                                                                  RAD_ALL.4609  
!                                                                                  RAD_ALL.4610  
!     COMDECKS INCLUDED.                                                           RAD_ALL.4611  
C*L------------------COMDECK C_G----------------------------------------           C_G.2     
C G IS MEAN ACCEL DUE TO GRAVITY AT EARTH'S SURFACE                                C_G.3     
      REAL G                                                                       C_G.4     
                                                                                   C_G.5     
      PARAMETER(G=9.80665)                                                         C_G.6     
C*----------------------------------------------------------------------           C_G.7     
!     ------------------------------------------------------------------           STDIO3A.2     
!     COMDECK FOR TWO-STREAM RADIATION CODE.                                       STDIO3A.3     
!                                                                                  STDIO3A.4     
!     MODULE TO SET UNIT NUMBERS FOR STANDARD I/O.                                 STDIO3A.5     
!                                                                                  STDIO3A.6     
      INTEGER                                                                      STDIO3A.7     
     &     IU_STDIN                                                                STDIO3A.8     
!             UNIT NUMBER FOR STANDARD INPUT                                       STDIO3A.9     
     &   , IU_STDOUT                                                               STDIO3A.10    
!             UNIT NUMBER FOR STANDARD OUTPUT                                      STDIO3A.11    
     *   , IU_ERR                                                                  STDIO3A.12    
!             UNIT NUMBER FOR ERROR MESSAGES                                       STDIO3A.13    
!                                                                                  STDIO3A.14    
      PARAMETER(                                                                   STDIO3A.15    
     &     IU_STDIN=5                                                              STDIO3A.16    
     &   , IU_STDOUT=6                                                             STDIO3A.17    
     *   , IU_ERR=6                                                                STDIO3A.18    
     &   )                                                                         STDIO3A.19    
!                                                                                  STDIO3A.20    
!     ------------------------------------------------------------------           STDIO3A.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    
!     ------------------------------------------------------------------           AERCMP3A.2     
!     MODULE TO SET INDICES OF AEROSOL COMPONENTS.                                 AERCMP3A.3     
!                                                                                  AERCMP3A.4     
!                                                                                  AERCMP3A.5     
      INTEGER                                                                      AERCMP3A.6     
     &     NPD_AEROSOL_COMPONENT                                                   AERCMP3A.7     
!             MAXIMUM NUMBER OF AEROSOL COMPONENTS                                 AERCMP3A.8     
      INTEGER                                                                      AERCMP3A.9     
     &     IP_WATER_SOLUBLE                                                        AERCMP3A.10    
!             WATER SOLUBLE AEROSOL                                                AERCMP3A.11    
     &   , IP_DUST_LIKE                                                            AERCMP3A.12    
!             DUST-LIKE AEROSOL                                                    AERCMP3A.13    
     &   , IP_OCEANIC                                                              AERCMP3A.14    
!             OCEANIC AEROSOL                                                      AERCMP3A.15    
     &   , IP_SOOT                                                                 AERCMP3A.16    
!             SOOT AEROSOL                                                         AERCMP3A.17    
     &   , IP_ASH                                                                  AERCMP3A.18    
!             VOLCANIC ASH                                                         AERCMP3A.19    
     &   , IP_SULPHURIC                                                            AERCMP3A.20    
!             SULPHURIC ACID                                                       AERCMP3A.21    
     &   , IP_ACCUM_SULPHATE                                                       AERCMP3A.22    
!             ACCUMULATION MODE SULPHATE                                           AERCMP3A.23    
     &   , IP_AITKEN_SULPHATE                                                      AERCMP3A.24    
!             AITKEN MODE SULPHATE                                                 AERCMP3A.25    
!                                                                                  AERCMP3A.26    
      PARAMETER(                                                                   AERCMP3A.27    
     &     NPD_AEROSOL_COMPONENT=11                                                AERCMP3A.28    
     &   )                                                                         AERCMP3A.29    
      PARAMETER(                                                                   AERCMP3A.30    
     &     IP_WATER_SOLUBLE=1                                                      AERCMP3A.31    
     &   , IP_DUST_LIKE=2                                                          AERCMP3A.32    
     &   , IP_OCEANIC=3                                                            AERCMP3A.33    
     &   , IP_SOOT=4                                                               AERCMP3A.34    
     &   , IP_ASH=5                                                                AERCMP3A.35    
     &   , IP_SULPHURIC=6                                                          AERCMP3A.36    
     &   , IP_ACCUM_SULPHATE=10                                                    AERCMP3A.37    
     &   , IP_AITKEN_SULPHATE=11                                                   AERCMP3A.38    
     &   )                                                                         AERCMP3A.39    
!                                                                                  AERCMP3A.40    
!     ------------------------------------------------------------------           AERCMP3A.41    
!                                                                                  RAD_ALL.4616  
!     DUMMY ARGUMENTS.                                                             RAD_ALL.4617  
!                                                                                  RAD_ALL.4618  
!     SIZES OF ARRAYS:                                                             RAD_ALL.4619  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.4620  
     &     NPD_FIELD                                                               RAD_ALL.4621  
!             FIELD SIZE IN CALLING PROGRAM                                        RAD_ALL.4622  
     &   , NPD_PROFILE                                                             RAD_ALL.4623  
!             SIZE OF ARRAY OF PROFILES                                            RAD_ALL.4624  
     &   , NPD_LAYER                                                               RAD_ALL.4625  
!             MAXIMUM NUMBER OF LAYERS                                             RAD_ALL.4626  
     &   , NPD_AEROSOL_SPECIES                                                     RAD_ALL.4627  
!             MAXIMUM NUMBER OF AEROSOL SPECIES                                    RAD_ALL.4628  
!                                                                                  RAD_ALL.4629  
      INTEGER   !, INTENT(OUT)                                                     RAD_ALL.4630  
     &     IERR                                                                    RAD_ALL.4631  
!             ERROR FLAG                                                           RAD_ALL.4632  
!                                                                                  RAD_ALL.4633  
!     ACTUAL SIZES USED:                                                           RAD_ALL.4634  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.4635  
     &     N_PROFILE                                                               RAD_ALL.4636  
!             NUMBER OF PROFILES                                                   RAD_ALL.4637  
     &   , NLEVS                                                                   RAD_ALL.4638  
!             NUMBER OF ATMOSPHERIC LAYERS                                         RAD_ALL.4639  
     &   , N_LEVELS_BL                                                             RAD_ALL.4640  
!             NUMBER OF LEVELS IN THE BOUNDARY LAYER                               RAD_ALL.4641  
     &   , N_AEROSOL                                                               RAD_ALL.4642  
!             NUMBER OF AEROSOLS IN SPECTRAL FILE                                  RAD_ALL.4643  
     &   , TYPE_AEROSOL(NPD_AEROSOL_SPECIES)                                       RAD_ALL.4644  
!             ACTUAL TYPES OF AEROSOLS                                             RAD_ALL.4645  
!                                                                                  RAD_ALL.4646  
!     GATHERING ARRAY:                                                             RAD_ALL.4647  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.4648  
     &     I_GATHER(NPD_FIELD)                                                     RAD_ALL.4649  
!             LIST OF POINTS TO GATHER                                             RAD_ALL.4650  
!                                                                                  RAD_ALL.4651  
!     FLAG FOR THE CLIMATOLOGICAL AEROSOL DISTRIBUTION.                            RAD_ALL.4652  
      LOGICAL      !, INTENT(IN)                                                   RAD_ALL.4653  
     &     L_CLIMAT_AEROSOL                                                        RAD_ALL.4654  
!             FLAG FOR CLIMATOLOGICAL AEROSOL DISTRIBUTION                         RAD_ALL.4655  
!                                                                                  RAD_ALL.4656  
!     VARIABLES FOR THE SULPHUR CYCLE:                                             RAD_ALL.4657  
      LOGICAL      !, INTENT(IN)                                                   RAD_ALL.4658  
     &     L_USE_SULPC_DIRECT                                                      RAD_ALL.4659  
!             FLAG TO USE SULPHUR CYCLE FOR DIRECT EFFECT                          RAD_ALL.4660  
      INTEGER      !, INTENT(IN)                                                   RAD_ALL.4661  
     &     SULP_DIM1,SULP_DIM2                                                     RAD_ALL.4662  
!             DIMENSIONS FOR _SULPHATE ARRAYS, (P_FIELD,P_LEVELS or 1,1)           RAD_ALL.4663  
      REAL      !, INTENT(IN)                                                      RAD_ALL.4664  
     &     ACCUM_SULPHATE(SULP_DIM1, SULP_DIM2)                                    RAD_ALL.4665  
!             MASS MIXING RATIOS OF ACCUMULATION MODE AEROSOL                      RAD_ALL.4666  
     &   , AITKEN_SULPHATE(SULP_DIM1, SULP_DIM2)                                   RAD_ALL.4667  
!             MASS MIXING RATIOS OF AITKEN MODE AEROSOL                            RAD_ALL.4668  
!                                                                                  RAD_ALL.4669  
!     GENERAL ATMOSPHERIC PROPERTIES:                                              RAD_ALL.4670  
      INTEGER   !, INTENT(IN)                                                      RAD_ALL.4671  
     &     TRINDX(NPD_FIELD)                                                       RAD_ALL.4672  
!             LAYER BOUNDARY OF TROPOPAUSE                                         RAD_ALL.4673  
      REAL      !, INTENT(IN)                                                      RAD_ALL.4674  
     &     PSTAR(NPD_FIELD)                                                        RAD_ALL.4675  
!             SURFACE PRESSURES                                                    RAD_ALL.4676  
     &   , AB(NLEVS+1)                                                             RAD_ALL.4677  
!             A AT BOUNDARIES OF LAYERS                                            RAD_ALL.4678  
     &   , BB(NLEVS+1)                                                             RAD_ALL.4679  
!             B AT BOUNDARIES OF LAYERS                                            RAD_ALL.4680  
!                                                                                  RAD_ALL.4681  
!     SURFACE FIELDS                                                               RAD_ALL.4682  
      LOGICAL   !, INTENT(IN)                                                      RAD_ALL.4683  
     &     LAND(NPD_FIELD)                                                         RAD_ALL.4684  
!             LAND SEA MASK                                                        RAD_ALL.4685  
      REAL      !, INTENT(IN)                                                      RAD_ALL.4686  
     &     LYING_SNOW(NPD_FIELD)                                                   RAD_ALL.4687  
!             DEPTH OF LYING SNOW                                                  RAD_ALL.4688  
!                                                                                  RAD_ALL.4689  
      REAL      !, INTENT(OUT)                                                     RAD_ALL.4690  
     &     AEROSOL_MIX_RATIO(NPD_PROFILE, 0: NPD_LAYER                             RAD_ALL.4691  
     &        , NPD_AEROSOL_SPECIES)                                               RAD_ALL.4692  
!             MIXING RATIOS OF AEROSOLS                                            RAD_ALL.4693  
!                                                                                  RAD_ALL.4694  
!                                                                                  RAD_ALL.4695  
!                                                                                  RAD_ALL.4696  
!     LOCAL VARIABLES:                                                             RAD_ALL.4697  
      INTEGER                                                                      RAD_ALL.4698  
     &     I                                                                       RAD_ALL.4699  
!             LOOP VARIABLE                                                        RAD_ALL.4700  
     &   , J                                                                       RAD_ALL.4701  
!             LOOP VARIABLE                                                        RAD_ALL.4702  
     &   , L                                                                       RAD_ALL.4703  
!             LOOP VARIABLE                                                        RAD_ALL.4704  
     &   , LG                                                                      RAD_ALL.4705  
!             INDEX FOR GATHERING                                                  RAD_ALL.4706  
     &   , BLTOP                                                                   RAD_ALL.4707  
!             INDEX OF UPPER BOUNDARY OF PLANETARY BOUNDARY LAYER                  RAD_ALL.4708  
     &   , I_AEROSOL                                                               RAD_ALL.4709  
!             ACTUAL TYPE OF AEROSOL BEING CONSIDERED                              RAD_ALL.4710  
!                                                                                  RAD_ALL.4711  
!                                                                                  RAD_ALL.4712  
!     ARRAYS FOR THE CLIMATOLOGICAL AEROSOL MODEL                                  RAD_ALL.4713  
      LOGICAL                                                                      RAD_ALL.4714  
     &     L_IN_CLIMAT(NPD_AEROSOL_COMPONENT)                                      RAD_ALL.4715  
!             FLAGS TO INDICATE WHICH AEROSOLS ARE INCLUDED IN                     RAD_ALL.4716  
!             THE CLIMATOLOGY: THIS MAY BE USED                                    RAD_ALL.4717  
!             TO ENABLE VARIOUS COMPONENTS TO BE REPLACED BY                       RAD_ALL.4718  
!             FULLY PROGNOSTIC SCHEMES.                                            RAD_ALL.4719  
      INTEGER                                                                      RAD_ALL.4720  
     &     I_CLIM_POINTER(NPD_AEROSOL_COMPONENT)                                   RAD_ALL.4721  
!             POINTERS TO HARD-WIRED INDICES OF THE ORIGINAL                       RAD_ALL.4722  
!             CLIMATOLOGICAL AEROSOL MODEL                                         RAD_ALL.4723  
      REAL                                                                         RAD_ALL.4724  
     &     AEROSOL_MIX_RATIO_CLIM(NPD_PROFILE, 0: NPD_LAYER, 5)                    RAD_ALL.4725  
!             MIXING RATIOS OF THE CLIMATOLOGICAL AEROSOLS                         RAD_ALL.4726  
!                                                                                  RAD_ALL.4727  
!     SUBROUTINES CALLED:                                                          RAD_ALL.4728  
      EXTERNAL                                                                     RAD_ALL.4729  
     &     R2_SET_AERO_CLIM_HADCM3                                                 RAD_ALL.4730  
!                                                                                  RAD_ALL.4731  
!                                                                                  RAD_ALL.4732  
!     INITIALIZATION FOR THE CLIMATOLOGICAL AEROSOL MODEL:                         RAD_ALL.4733  
!                                                                                  RAD_ALL.4734  
!!      DATA L_IN_CLIMAT/NPD_AEROSOL_COMPONENT*.FALSE./                            RAD_ALL.4735  
      DATA L_IN_CLIMAT(IP_WATER_SOLUBLE)/.TRUE./                                   RAD_ALL.4736  
      DATA L_IN_CLIMAT(IP_DUST_LIKE)/.TRUE./                                       RAD_ALL.4737  
      DATA L_IN_CLIMAT(IP_OCEANIC)/.TRUE./                                         RAD_ALL.4738  
      DATA L_IN_CLIMAT(IP_SOOT)/.TRUE./                                            RAD_ALL.4739  
      DATA L_IN_CLIMAT(IP_SULPHURIC)/.TRUE./                                       RAD_ALL.4740  
!                                                                                  RAD_ALL.4741  
!     MATCHING OF COMPONENTS TO ORIGINAL HARD-WIRED SETTINGS:                      RAD_ALL.4742  
      DATA I_CLIM_POINTER(IP_WATER_SOLUBLE)/1/                                     RAD_ALL.4743  
      DATA I_CLIM_POINTER(IP_DUST_LIKE)/2/                                         RAD_ALL.4744  
      DATA I_CLIM_POINTER(IP_OCEANIC)/3/                                           RAD_ALL.4745  
      DATA I_CLIM_POINTER(IP_SOOT)/4/                                              RAD_ALL.4746  
      DATA I_CLIM_POINTER(IP_SULPHURIC)/5/                                         RAD_ALL.4747  
!                                                                                  RAD_ALL.4748  
!                                                                                  RAD_ALL.4749  
!                                                                                  RAD_ALL.4750  
      IF (L_CLIMAT_AEROSOL) THEN                                                   RAD_ALL.4751  
!                                                                                  RAD_ALL.4752  
!        SET THE MIXING RATIOS OF THE CLIMATOLOGICAL AEROSOLS                      RAD_ALL.4753  
!        USED IN THE CLIMATOLOGY OF HADCM3. A SEPARATE SUBROUTINE                  RAD_ALL.4754  
!        IS USED TO ENSURE BIT-REPRODUCIBLE RESULTS BY USING                       RAD_ALL.4755  
!        EARLIER CODE. THIS COULD BE ALTERED IF A NEW CLIMATOLOGY WERE             RAD_ALL.4756  
!        USED.                                                                     RAD_ALL.4757  
!                                                                                  RAD_ALL.4758  
         CALL R2_SET_AERO_CLIM_HADCM3(N_PROFILE, NLEVS                             RAD_ALL.4759  
     &      , I_GATHER                                                             RAD_ALL.4760  
     &      , N_LEVELS_BL                                                          RAD_ALL.4761  
     &      , LAND, LYING_SNOW, PSTAR, AB, BB, TRINDX                              RAD_ALL.4762  
     &      , AEROSOL_MIX_RATIO_CLIM                                               RAD_ALL.4763  
     &      , NPD_FIELD, NPD_PROFILE, NPD_LAYER                                    RAD_ALL.4764  
     &      )                                                                      RAD_ALL.4765  
!                                                                                  RAD_ALL.4766  
      ENDIF                                                                        RAD_ALL.4767  
!                                                                                  RAD_ALL.4768  
!                                                                                  RAD_ALL.4769  
!     THE AEROSOLS REQUIRED BY FOR THE CALCULATION SHOULD HAVE BEEN                RAD_ALL.4770  
!     SELECTED WHEN THE SPECTRAL FILE WAS READ IN. EACH TYPE SHOULD                RAD_ALL.4771  
!     BE SET APPROPRIATELY.                                                        RAD_ALL.4772  
!                                                                                  RAD_ALL.4773  
      DO J=1, N_AEROSOL                                                            RAD_ALL.4774  
!                                                                                  RAD_ALL.4775  
         I_AEROSOL=TYPE_AEROSOL(J)                                                 RAD_ALL.4776  
!                                                                                  RAD_ALL.4777  
         IF (L_CLIMAT_AEROSOL.AND.L_IN_CLIMAT(I_AEROSOL)) THEN                     RAD_ALL.4778  
!                                                                                  RAD_ALL.4779  
            DO I=1, NLEVS                                                          RAD_ALL.4780  
               DO L=1, N_PROFILE                                                   RAD_ALL.4781  
                  AEROSOL_MIX_RATIO(L, I, J)                                       RAD_ALL.4782  
     &               =AEROSOL_MIX_RATIO_CLIM(L, I                                  RAD_ALL.4783  
     &               , I_CLIM_POINTER(I_AEROSOL))                                  RAD_ALL.4784  
               ENDDO                                                               RAD_ALL.4785  
            ENDDO                                                                  RAD_ALL.4786  
!                                                                                  RAD_ALL.4787  
         ELSE IF ( (I_AEROSOL.EQ.IP_ACCUM_SULPHATE).AND.                           RAD_ALL.4788  
     &      L_USE_SULPC_DIRECT) THEN                                               RAD_ALL.4789  
!                                                                                  RAD_ALL.4790  
!           Aerosols related to the sulphur cycle (note that dissolved             RAD_ALL.4791  
!           sulphate does not contribute to the direct effect):                    RAD_ALL.4792  
!                                                                                  RAD_ALL.4793  
            DO I=1, NLEVS                                                          RAD_ALL.4794  
               DO L=1, N_PROFILE                                                   RAD_ALL.4795  
                  LG=I_GATHER(L)                                                   RAD_ALL.4796  
                  AEROSOL_MIX_RATIO(L, I, J)                                       RAD_ALL.4797  
     &               =ACCUM_SULPHATE(LG, NLEVS+1-I)                                RAD_ALL.4798  
               ENDDO                                                               RAD_ALL.4799  
            ENDDO                                                                  RAD_ALL.4800  
!                                                                                  RAD_ALL.4801  
         ELSE IF ( (I_AEROSOL.EQ.IP_AITKEN_SULPHATE).AND.                          RAD_ALL.4802  
     &      L_USE_SULPC_DIRECT) THEN                                               RAD_ALL.4803  
            DO I=1, NLEVS                                                          RAD_ALL.4804  
               DO L=1, N_PROFILE                                                   RAD_ALL.4805  
                  LG=I_GATHER(L)                                                   RAD_ALL.4806  
                  AEROSOL_MIX_RATIO(L, I, J)                                       RAD_ALL.4807  
     &               =AITKEN_SULPHATE(LG, NLEVS+1-I)                               RAD_ALL.4808  
               ENDDO                                                               RAD_ALL.4809  
            ENDDO                                                                  RAD_ALL.4810  
!                                                                                  RAD_ALL.4811  
!                                                                                  RAD_ALL.4812  
         ELSE                                                                      RAD_ALL.4813  
!                                                                                  RAD_ALL.4814  
!           The options to the radiation code do not require this                  RAD_ALL.4815  
!           aerosol to be considered: its mixing ratio is set to 0.                RAD_ALL.4816  
!           This block of code should not normally be executed,                    RAD_ALL.4817  
!           but may be required for ease of including modifications.               RAD_ALL.4818  
!                                                                                  RAD_ALL.4819  
            DO I=1, NLEVS                                                          RAD_ALL.4820  
               DO L=1, N_PROFILE                                                   RAD_ALL.4821  
                  LG=I_GATHER(L)                                                   RAD_ALL.4822  
                  AEROSOL_MIX_RATIO(L, I, J)=0.0E+00                               RAD_ALL.4823  
               ENDDO                                                               RAD_ALL.4824  
            ENDDO                                                                  RAD_ALL.4825  
!                                                                                  RAD_ALL.4826  
!                                                                                  RAD_ALL.4827  
         ENDIF                                                                     RAD_ALL.4828  
!                                                                                  RAD_ALL.4829  
      ENDDO                                                                        RAD_ALL.4830  
!                                                                                  RAD_ALL.4831  
!                                                                                  RAD_ALL.4832  
!                                                                                  RAD_ALL.4833  
      RETURN                                                                       RAD_ALL.4834  
      END 
