Ignore:
Timestamp:
Jul 29, 2024, 11:01:04 PM (3 months ago)
Author:
abarral
Message:

Put YOMCST.h into modules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/phylmd/aeropt_2bands.F90

    r5117 r5144  
    1 
    21! $Id$
    32
    4 SUBROUTINE AEROPT_2BANDS( &
    5      pdel, m_allaer, delt, RHcl, &
    6      tau_allaer, piz_allaer, &
    7      cg_allaer, m_allaer_pi, &
    8      flag_aerosol, pplay, t_seri, presnivs)
     3SUBROUTINE AEROPT_2BANDS(&
     4        pdel, m_allaer, delt, RHcl, &
     5        tau_allaer, piz_allaer, &
     6        cg_allaer, m_allaer_pi, &
     7        flag_aerosol, pplay, t_seri, presnivs)
    98
    109  USE dimphy
     
    1211  USE lmdz_pres2lev
    1312  USE lmdz_abort_physic, ONLY: abort_physic
     13  USE lmdz_yomcst
    1414
    1515  !    Yves Balkanski le 12 avril 2006
     
    2020  IMPLICIT NONE
    2121
    22   INCLUDE "YOMCST.h"
    2322
    2423  ! Input arguments:
    2524
    26   REAL, DIMENSION(klon,klev),     INTENT(IN) :: pdel
    27   REAL,                           INTENT(IN) :: delt
    28   REAL, DIMENSION(klon,klev,naero_tot),   INTENT(IN) :: m_allaer
    29   REAL, DIMENSION(klon,klev,naero_tot),   INTENT(IN) :: m_allaer_pi
    30   REAL, DIMENSION(klon,klev),     INTENT(IN) :: RHcl       ! humidite relative ciel clair
    31   INTEGER,                        INTENT(IN) :: flag_aerosol
    32   REAL, DIMENSION(klon,klev),     INTENT(IN) :: pplay
    33   REAL, DIMENSION(klon,klev),     INTENT(IN) :: t_seri
    34   REAL, DIMENSION(klev),          INTENT(IN) :: presnivs
     25  REAL, DIMENSION(klon, klev), INTENT(IN) :: pdel
     26  REAL, INTENT(IN) :: delt
     27  REAL, DIMENSION(klon, klev, naero_tot), INTENT(IN) :: m_allaer
     28  REAL, DIMENSION(klon, klev, naero_tot), INTENT(IN) :: m_allaer_pi
     29  REAL, DIMENSION(klon, klev), INTENT(IN) :: RHcl       ! humidite relative ciel clair
     30  INTEGER, INTENT(IN) :: flag_aerosol
     31  REAL, DIMENSION(klon, klev), INTENT(IN) :: pplay
     32  REAL, DIMENSION(klon, klev), INTENT(IN) :: t_seri
     33  REAL, DIMENSION(klev), INTENT(IN) :: presnivs
    3534
    3635  ! Output arguments:
    3736
    38   REAL, DIMENSION(klon,klev,naero_grp,nbands), INTENT(OUT) :: tau_allaer ! epaisseur optique aerosol
    39   REAL, DIMENSION(klon,klev,naero_grp,nbands), INTENT(OUT) :: piz_allaer ! single scattering albedo aerosol
    40   REAL, DIMENSION(klon,klev,naero_grp,nbands), INTENT(OUT) :: cg_allaer  ! asymmetry parameter aerosol
     37  REAL, DIMENSION(klon, klev, naero_grp, nbands), INTENT(OUT) :: tau_allaer ! epaisseur optique aerosol
     38  REAL, DIMENSION(klon, klev, naero_grp, nbands), INTENT(OUT) :: piz_allaer ! single scattering albedo aerosol
     39  REAL, DIMENSION(klon, klev, naero_grp, nbands), INTENT(OUT) :: cg_allaer  ! asymmetry parameter aerosol
    4140
    4241  ! Local
    4342
    44   REAL, DIMENSION(klon,klev,naero_tot,nbands) :: tau_ae
    45   REAL, DIMENSION(klon,klev,naero_tot,nbands) :: tau_ae_pi
    46   REAL, DIMENSION(klon,klev,naero_tot,nbands) :: piz_ae
    47   REAL, DIMENSION(klon,klev,naero_tot,nbands) :: cg_ae
    48   LOGICAL ::  soluble
    49   INTEGER :: i, k,n, ierr, inu, m, mrfspecies
     43  REAL, DIMENSION(klon, klev, naero_tot, nbands) :: tau_ae
     44  REAL, DIMENSION(klon, klev, naero_tot, nbands) :: tau_ae_pi
     45  REAL, DIMENSION(klon, klev, naero_tot, nbands) :: piz_ae
     46  REAL, DIMENSION(klon, klev, naero_tot, nbands) :: cg_ae
     47  LOGICAL :: soluble
     48  INTEGER :: i, k, n, ierr, inu, m, mrfspecies
    5049  INTEGER :: spsol, spinsol, spss
    51   INTEGER :: RH_num(klon,klev)
    52   INTEGER, PARAMETER :: nb_level=19 ! number of vertical levels in DATA
    53 
    54   INTEGER, PARAMETER :: nbre_RH=12
    55   INTEGER, PARAMETER :: naero_soluble=7    ! 1- BC soluble; 2- POM soluble; 3- SO4. acc. 4- SO4 coarse
    56                                            ! 5- seasalt super coarse  6- seasalt coarse   7- seasalt acc.
    57   INTEGER, PARAMETER :: naero_insoluble=3  ! 1- Dust; 2- BC insoluble; 3- POM insoluble
    58   LOGICAL, SAVE :: firstcall=.TRUE.
    59 !$OMP THREADPRIVATE(firstcall)
    60 
    61 ! Coefficient optiques sur 19 niveaux
     50  INTEGER :: RH_num(klon, klev)
     51  INTEGER, PARAMETER :: nb_level = 19 ! number of vertical levels in DATA
     52
     53  INTEGER, PARAMETER :: nbre_RH = 12
     54  INTEGER, PARAMETER :: naero_soluble = 7    ! 1- BC soluble; 2- POM soluble; 3- SO4. acc. 4- SO4 coarse
     55  ! 5- seasalt super coarse  6- seasalt coarse   7- seasalt acc.
     56  INTEGER, PARAMETER :: naero_insoluble = 3  ! 1- Dust; 2- BC insoluble; 3- POM insoluble
     57  LOGICAL, SAVE :: firstcall = .TRUE.
     58  !$OMP THREADPRIVATE(firstcall)
     59
     60  ! Coefficient optiques sur 19 niveaux
    6261  REAL, SAVE, DIMENSION(nb_level) :: presnivs_19  ! Pression milieux couche pour 19 niveaux (nb_level)
    63 !$OMP THREADPRIVATE(presnivs_19)
    64 
    65   REAL, SAVE, DIMENSION(nb_level) :: A1_ASSSM_b1_19, A2_ASSSM_b1_19, A3_ASSSM_b1_19,&
    66           B1_ASSSM_b1_19, B2_ASSSM_b1_19, C1_ASSSM_b1_19, C2_ASSSM_b1_19,&
    67           A1_CSSSM_b1_19, A2_CSSSM_b1_19, A3_CSSSM_b1_19,&
    68           B1_CSSSM_b1_19, B2_CSSSM_b1_19, C1_CSSSM_b1_19, C2_CSSSM_b1_19,&
    69           A1_SSSSM_b1_19, A2_SSSSM_b1_19, A3_SSSSM_b1_19,&
    70           B1_SSSSM_b1_19, B2_SSSSM_b1_19, C1_SSSSM_b1_19, C2_SSSSM_b1_19,&
    71           A1_ASSSM_b2_19, A2_ASSSM_b2_19, A3_ASSSM_b2_19,&
    72           B1_ASSSM_b2_19, B2_ASSSM_b2_19, C1_ASSSM_b2_19, C2_ASSSM_b2_19,&
    73           A1_CSSSM_b2_19, A2_CSSSM_b2_19, A3_CSSSM_b2_19,&
    74           B1_CSSSM_b2_19, B2_CSSSM_b2_19, C1_CSSSM_b2_19, C2_CSSSM_b2_19,&
    75           A1_SSSSM_b2_19, A2_SSSSM_b2_19, A3_SSSSM_b2_19,&
     62  !$OMP THREADPRIVATE(presnivs_19)
     63
     64  REAL, SAVE, DIMENSION(nb_level) :: A1_ASSSM_b1_19, A2_ASSSM_b1_19, A3_ASSSM_b1_19, &
     65          B1_ASSSM_b1_19, B2_ASSSM_b1_19, C1_ASSSM_b1_19, C2_ASSSM_b1_19, &
     66          A1_CSSSM_b1_19, A2_CSSSM_b1_19, A3_CSSSM_b1_19, &
     67          B1_CSSSM_b1_19, B2_CSSSM_b1_19, C1_CSSSM_b1_19, C2_CSSSM_b1_19, &
     68          A1_SSSSM_b1_19, A2_SSSSM_b1_19, A3_SSSSM_b1_19, &
     69          B1_SSSSM_b1_19, B2_SSSSM_b1_19, C1_SSSSM_b1_19, C2_SSSSM_b1_19, &
     70          A1_ASSSM_b2_19, A2_ASSSM_b2_19, A3_ASSSM_b2_19, &
     71          B1_ASSSM_b2_19, B2_ASSSM_b2_19, C1_ASSSM_b2_19, C2_ASSSM_b2_19, &
     72          A1_CSSSM_b2_19, A2_CSSSM_b2_19, A3_CSSSM_b2_19, &
     73          B1_CSSSM_b2_19, B2_CSSSM_b2_19, C1_CSSSM_b2_19, C2_CSSSM_b2_19, &
     74          A1_SSSSM_b2_19, A2_SSSSM_b2_19, A3_SSSSM_b2_19, &
    7675          B1_SSSSM_b2_19, B2_SSSSM_b2_19, C1_SSSSM_b2_19, C2_SSSSM_b2_19
    77 !$OMP THREADPRIVATE(A1_ASSSM_b1_19, A2_ASSSM_b1_19, A3_ASSSM_b1_19)
    78 !$OMP THREADPRIVATE(B1_ASSSM_b1_19, B2_ASSSM_b1_19, C1_ASSSM_b1_19, C2_ASSSM_b1_19)
    79 !$OMP THREADPRIVATE(A1_CSSSM_b1_19, A2_CSSSM_b1_19, A3_CSSSM_b1_19)
    80 !$OMP THREADPRIVATE(B1_CSSSM_b1_19, B2_CSSSM_b1_19, C1_CSSSM_b1_19, C2_CSSSM_b1_19)
    81 !$OMP THREADPRIVATE(A1_SSSSM_b1_19, A2_SSSSM_b1_19, A3_SSSSM_b1_19)
    82 !$OMP THREADPRIVATE(B1_SSSSM_b1_19, B2_SSSSM_b1_19, C1_SSSSM_b1_19, C2_SSSSM_b1_19)
    83 !$OMP THREADPRIVATE(A1_ASSSM_b2_19, A2_ASSSM_b2_19, A3_ASSSM_b2_19)
    84 !$OMP THREADPRIVATE(B1_ASSSM_b2_19, B2_ASSSM_b2_19, C1_ASSSM_b2_19, C2_ASSSM_b2_19)
    85 !$OMP THREADPRIVATE(A1_CSSSM_b2_19, A2_CSSSM_b2_19, A3_CSSSM_b2_19)
    86 !$OMP THREADPRIVATE(B1_CSSSM_b2_19, B2_CSSSM_b2_19, C1_CSSSM_b2_19, C2_CSSSM_b2_19)
    87 !$OMP THREADPRIVATE(A1_SSSSM_b2_19, A2_SSSSM_b2_19, A3_SSSSM_b2_19)
    88 !$OMP THREADPRIVATE(B1_SSSSM_b2_19, B2_SSSSM_b2_19, C1_SSSSM_b2_19, C2_SSSSM_b2_19)
    89 
    90 
    91 ! Coefficient optiques interpole sur le nombre de niveau du modele
     76  !$OMP THREADPRIVATE(A1_ASSSM_b1_19, A2_ASSSM_b1_19, A3_ASSSM_b1_19)
     77  !$OMP THREADPRIVATE(B1_ASSSM_b1_19, B2_ASSSM_b1_19, C1_ASSSM_b1_19, C2_ASSSM_b1_19)
     78  !$OMP THREADPRIVATE(A1_CSSSM_b1_19, A2_CSSSM_b1_19, A3_CSSSM_b1_19)
     79  !$OMP THREADPRIVATE(B1_CSSSM_b1_19, B2_CSSSM_b1_19, C1_CSSSM_b1_19, C2_CSSSM_b1_19)
     80  !$OMP THREADPRIVATE(A1_SSSSM_b1_19, A2_SSSSM_b1_19, A3_SSSSM_b1_19)
     81  !$OMP THREADPRIVATE(B1_SSSSM_b1_19, B2_SSSSM_b1_19, C1_SSSSM_b1_19, C2_SSSSM_b1_19)
     82  !$OMP THREADPRIVATE(A1_ASSSM_b2_19, A2_ASSSM_b2_19, A3_ASSSM_b2_19)
     83  !$OMP THREADPRIVATE(B1_ASSSM_b2_19, B2_ASSSM_b2_19, C1_ASSSM_b2_19, C2_ASSSM_b2_19)
     84  !$OMP THREADPRIVATE(A1_CSSSM_b2_19, A2_CSSSM_b2_19, A3_CSSSM_b2_19)
     85  !$OMP THREADPRIVATE(B1_CSSSM_b2_19, B2_CSSSM_b2_19, C1_CSSSM_b2_19, C2_CSSSM_b2_19)
     86  !$OMP THREADPRIVATE(A1_SSSSM_b2_19, A2_SSSSM_b2_19, A3_SSSSM_b2_19)
     87  !$OMP THREADPRIVATE(B1_SSSSM_b2_19, B2_SSSSM_b2_19, C1_SSSSM_b2_19, C2_SSSSM_b2_19)
     88
     89
     90  ! Coefficient optiques interpole sur le nombre de niveau du modele
    9291  REAL, ALLOCATABLE, DIMENSION(:), SAVE :: &
    93           A1_ASSSM_b1, A2_ASSSM_b1, A3_ASSSM_b1,&
    94           B1_ASSSM_b1, B2_ASSSM_b1, C1_ASSSM_b1, C2_ASSSM_b1,&
    95           A1_CSSSM_b1, A2_CSSSM_b1, A3_CSSSM_b1,&
    96           B1_CSSSM_b1, B2_CSSSM_b1, C1_CSSSM_b1, C2_CSSSM_b1,&
    97           A1_SSSSM_b1, A2_SSSSM_b1, A3_SSSSM_b1,&
    98           B1_SSSSM_b1, B2_SSSSM_b1, C1_SSSSM_b1, C2_SSSSM_b1,&
    99           A1_ASSSM_b2, A2_ASSSM_b2, A3_ASSSM_b2,&
    100           B1_ASSSM_b2, B2_ASSSM_b2, C1_ASSSM_b2, C2_ASSSM_b2,&
    101           A1_CSSSM_b2, A2_CSSSM_b2, A3_CSSSM_b2,&
    102           B1_CSSSM_b2, B2_CSSSM_b2, C1_CSSSM_b2, C2_CSSSM_b2,&
    103           A1_SSSSM_b2, A2_SSSSM_b2, A3_SSSSM_b2,&
     92          A1_ASSSM_b1, A2_ASSSM_b1, A3_ASSSM_b1, &
     93          B1_ASSSM_b1, B2_ASSSM_b1, C1_ASSSM_b1, C2_ASSSM_b1, &
     94          A1_CSSSM_b1, A2_CSSSM_b1, A3_CSSSM_b1, &
     95          B1_CSSSM_b1, B2_CSSSM_b1, C1_CSSSM_b1, C2_CSSSM_b1, &
     96          A1_SSSSM_b1, A2_SSSSM_b1, A3_SSSSM_b1, &
     97          B1_SSSSM_b1, B2_SSSSM_b1, C1_SSSSM_b1, C2_SSSSM_b1, &
     98          A1_ASSSM_b2, A2_ASSSM_b2, A3_ASSSM_b2, &
     99          B1_ASSSM_b2, B2_ASSSM_b2, C1_ASSSM_b2, C2_ASSSM_b2, &
     100          A1_CSSSM_b2, A2_CSSSM_b2, A3_CSSSM_b2, &
     101          B1_CSSSM_b2, B2_CSSSM_b2, C1_CSSSM_b2, C2_CSSSM_b2, &
     102          A1_SSSSM_b2, A2_SSSSM_b2, A3_SSSSM_b2, &
    104103          B1_SSSSM_b2, B2_SSSSM_b2, C1_SSSSM_b2, C2_SSSSM_b2
    105 !$OMP THREADPRIVATE(A1_ASSSM_b1, A2_ASSSM_b1, A3_ASSSM_b1)
    106 !$OMP THREADPRIVATE(B1_ASSSM_b1, B2_ASSSM_b1, C1_ASSSM_b1, C2_ASSSM_b1)
    107 !$OMP THREADPRIVATE(A1_CSSSM_b1, A2_CSSSM_b1, A3_CSSSM_b1)
    108 !$OMP THREADPRIVATE(B1_CSSSM_b1, B2_CSSSM_b1, C1_CSSSM_b1, C2_CSSSM_b1)
    109 !$OMP THREADPRIVATE(A1_SSSSM_b1, A2_SSSSM_b1, A3_SSSSM_b1)
    110 !$OMP THREADPRIVATE(B1_SSSSM_b1, B2_SSSSM_b1, C1_SSSSM_b1, C2_SSSSM_b1)
    111 !$OMP THREADPRIVATE(A1_ASSSM_b2, A2_ASSSM_b2, A3_ASSSM_b2)
    112 !$OMP THREADPRIVATE(B1_ASSSM_b2, B2_ASSSM_b2, C1_ASSSM_b2, C2_ASSSM_b2)
    113 !$OMP THREADPRIVATE(A1_CSSSM_b2, A2_CSSSM_b2, A3_CSSSM_b2)
    114 !$OMP THREADPRIVATE(B1_CSSSM_b2, B2_CSSSM_b2, C1_CSSSM_b2, C2_CSSSM_b2)
    115 !$OMP THREADPRIVATE(A1_SSSSM_b2, A2_SSSSM_b2, A3_SSSSM_b2)
    116 !$OMP THREADPRIVATE(B1_SSSSM_b2, B2_SSSSM_b2, C1_SSSSM_b2, C2_SSSSM_b2)
    117  
    118   REAL,PARAMETER :: RH_tab(nbre_RH)=(/0.,10.,20.,30.,40.,50.,60.,70.,80.,85.,90.,95./)
    119   REAL, PARAMETER :: RH_MAX=95.
    120   REAL:: DELTA(klon,klev), rh(klon,klev), H
    121   REAL:: tau_ae2b_int   ! Intermediate computation of epaisseur optique aerosol
    122   REAL:: piz_ae2b_int   ! Intermediate computation of Single scattering albedo
    123   REAL:: cg_ae2b_int    ! Intermediate computation of Assymetry parameter
     104  !$OMP THREADPRIVATE(A1_ASSSM_b1, A2_ASSSM_b1, A3_ASSSM_b1)
     105  !$OMP THREADPRIVATE(B1_ASSSM_b1, B2_ASSSM_b1, C1_ASSSM_b1, C2_ASSSM_b1)
     106  !$OMP THREADPRIVATE(A1_CSSSM_b1, A2_CSSSM_b1, A3_CSSSM_b1)
     107  !$OMP THREADPRIVATE(B1_CSSSM_b1, B2_CSSSM_b1, C1_CSSSM_b1, C2_CSSSM_b1)
     108  !$OMP THREADPRIVATE(A1_SSSSM_b1, A2_SSSSM_b1, A3_SSSSM_b1)
     109  !$OMP THREADPRIVATE(B1_SSSSM_b1, B2_SSSSM_b1, C1_SSSSM_b1, C2_SSSSM_b1)
     110  !$OMP THREADPRIVATE(A1_ASSSM_b2, A2_ASSSM_b2, A3_ASSSM_b2)
     111  !$OMP THREADPRIVATE(B1_ASSSM_b2, B2_ASSSM_b2, C1_ASSSM_b2, C2_ASSSM_b2)
     112  !$OMP THREADPRIVATE(A1_CSSSM_b2, A2_CSSSM_b2, A3_CSSSM_b2)
     113  !$OMP THREADPRIVATE(B1_CSSSM_b2, B2_CSSSM_b2, C1_CSSSM_b2, C2_CSSSM_b2)
     114  !$OMP THREADPRIVATE(A1_SSSSM_b2, A2_SSSSM_b2, A3_SSSSM_b2)
     115  !$OMP THREADPRIVATE(B1_SSSSM_b2, B2_SSSSM_b2, C1_SSSSM_b2, C2_SSSSM_b2)
     116
     117  REAL, PARAMETER :: RH_tab(nbre_RH) = (/0., 10., 20., 30., 40., 50., 60., 70., 80., 85., 90., 95./)
     118  REAL, PARAMETER :: RH_MAX = 95.
     119  REAL :: DELTA(klon, klev), rh(klon, klev), H
     120  REAL :: tau_ae2b_int   ! Intermediate computation of epaisseur optique aerosol
     121  REAL :: piz_ae2b_int   ! Intermediate computation of Single scattering albedo
     122  REAL :: cg_ae2b_int    ! Intermediate computation of Assymetry parameter
    124123  REAL :: Fact_RH(nbre_RH)
    125124  REAL :: zrho
    126125  REAL :: fac
    127   REAL :: zdh(klon,klev)
    128   INTEGER, ALLOCATABLE, DIMENSION(:)   :: aerosol_name
     126  REAL :: zdh(klon, klev)
     127  INTEGER, ALLOCATABLE, DIMENSION(:) :: aerosol_name
    129128  INTEGER :: nb_aer
    130129
    131130  ! Proprietes optiques
    132131
    133   REAL:: alpha_aers_2bands(nbre_RH,nbands,naero_soluble)   !--unit m2/g SO4
    134   REAL:: alpha_aeri_2bands(nbands,naero_insoluble)
    135   REAL:: cg_aers_2bands(nbre_RH,nbands,naero_soluble)      !--unit
    136   REAL:: cg_aeri_2bands(nbands,naero_insoluble)
    137   REAL:: piz_aers_2bands(nbre_RH,nbands,naero_soluble)     !-- unit
    138   REAL:: piz_aeri_2bands(nbands,naero_insoluble)           !-- unit
     132  REAL :: alpha_aers_2bands(nbre_RH, nbands, naero_soluble)   !--unit m2/g SO4
     133  REAL :: alpha_aeri_2bands(nbands, naero_insoluble)
     134  REAL :: cg_aers_2bands(nbre_RH, nbands, naero_soluble)      !--unit
     135  REAL :: cg_aeri_2bands(nbands, naero_insoluble)
     136  REAL :: piz_aers_2bands(nbre_RH, nbands, naero_soluble)     !-- unit
     137  REAL :: piz_aeri_2bands(nbands, naero_insoluble)           !-- unit
    139138
    140139  INTEGER :: id
     
    143142
    144143  DATA presnivs_19/&
    145        100426.5, 98327.6, 95346.5, 90966.8, 84776.9, &
    146        76536.5,  66292.2, 54559.3, 42501.8, 31806, &
    147        23787.5,   18252.7, 13996,  10320.8, 7191.1, &
    148        4661.7,    2732.9,  1345.6,  388.2/ 
    149 
    150 
    151 !***********************BAND 1***********************************
    152 !ACCUMULATION MODE
    153   DATA A1_ASSSM_b1_19/ 4.373E+00,  4.361E+00, 4.331E+00, &
    154                     4.278E+00,  4.223E+00, 4.162E+00, &
    155                     4.103E+00,  4.035E+00, 3.962E+00, &
    156                     3.904E+00,  3.871E+00, 3.847E+00, &
    157                     3.824E+00,  3.780E+00, 3.646E+00, &
    158                     3.448E+00,  3.179E+00,  2.855E+00, 2.630E+00/
    159   DATA A2_ASSSM_b1_19/ 2.496E+00,  2.489E+00, 2.472E+00, &
    160                     2.442E+00,  2.411E+00, 2.376E+00, &
    161                     2.342E+00,  2.303E+00, 2.261E+00, &
    162                     2.228E+00,  2.210E+00, 2.196E+00, &
    163                     2.183E+00,  2.158E+00, 2.081E+00, &
    164                     1.968E+00,  1.814E+00,  1.630E+00, 1.501E+00/
     144          100426.5, 98327.6, 95346.5, 90966.8, 84776.9, &
     145          76536.5, 66292.2, 54559.3, 42501.8, 31806, &
     146          23787.5, 18252.7, 13996, 10320.8, 7191.1, &
     147          4661.7, 2732.9, 1345.6, 388.2/
     148
     149
     150  !***********************BAND 1***********************************
     151  !ACCUMULATION MODE
     152  DATA A1_ASSSM_b1_19/ 4.373E+00, 4.361E+00, 4.331E+00, &
     153          4.278E+00, 4.223E+00, 4.162E+00, &
     154          4.103E+00, 4.035E+00, 3.962E+00, &
     155          3.904E+00, 3.871E+00, 3.847E+00, &
     156          3.824E+00, 3.780E+00, 3.646E+00, &
     157          3.448E+00, 3.179E+00, 2.855E+00, 2.630E+00/
     158  DATA A2_ASSSM_b1_19/ 2.496E+00, 2.489E+00, 2.472E+00, &
     159          2.442E+00, 2.411E+00, 2.376E+00, &
     160          2.342E+00, 2.303E+00, 2.261E+00, &
     161          2.228E+00, 2.210E+00, 2.196E+00, &
     162          2.183E+00, 2.158E+00, 2.081E+00, &
     163          1.968E+00, 1.814E+00, 1.630E+00, 1.501E+00/
    165164  DATA A3_ASSSM_b1_19/-4.688E-02, -4.676E-02, -4.644E-02, &
    166                    -4.587E-02, -4.528E-02, -4.463E-02, &
    167                    -4.399E-02, -4.326E-02, -4.248E-02, &
    168                    -4.186E-02, -4.151E-02, -4.125E-02, &
    169                    -4.100E-02, -4.053E-02, -3.910E-02, &
    170                    -3.697E-02, -3.408E-02, -3.061E-02, -2.819E-02/
    171   DATA B1_ASSSM_b1_19/ 1.165E-08,  1.145E-08, 1.097E-08, &
    172                     1.012E-08,  9.233E-09, 8.261E-09, &
    173                     7.297E-09,  6.201E-09, 5.026E-09, &
    174                     4.098E-09,  3.567E-09, 3.187E-09, &
    175                     2.807E-09,  2.291E-09, 2.075E-09, &
    176                     1.756E-09,  1.322E-09, 8.011E-10, 4.379E-10/
    177   DATA B2_ASSSM_b1_19/ 2.193E-08,  2.192E-08, 2.187E-08, &
    178                     2.179E-08,  2.171E-08, 2.162E-08, &
    179                     2.153E-08,  2.143E-08, 2.132E-08, &
    180                     2.124E-08,  2.119E-08, 2.115E-08, &
    181                     2.112E-08,  2.106E-08, 2.100E-08, &
    182                     2.090E-08,  2.077E-08,  2.061E-08, 2.049E-08/
    183   DATA C1_ASSSM_b1_19/ 7.365E-01,  7.365E-01, 7.365E-01, &
    184                     7.364E-01,  7.363E-01, 7.362E-01, &
    185                     7.361E-01,  7.359E-01, 7.358E-01, &
    186                     7.357E-01,  7.356E-01, 7.356E-01, &
    187                     7.356E-01,  7.355E-01, 7.354E-01, &
    188                     7.352E-01,  7.350E-01,  7.347E-01, 7.345E-01/
    189   DATA C2_ASSSM_b1_19/ 5.833E-02,  5.835E-02, 5.841E-02, &
    190                     5.850E-02,  5.859E-02, 5.870E-02, &
    191                     5.880E-02,  5.891E-02, 5.904E-02, &
    192                     5.914E-02,  5.920E-02, 5.924E-02, &
    193                     5.928E-02,  5.934E-02, 5.944E-02, &
    194                     5.959E-02,  5.979E-02,  6.003E-02, 6.020E-02/
    195 !COARSE MODE
    196   DATA A1_CSSSM_b1_19/ 7.403E-01,  7.422E-01, 7.626E-01, &
    197                     8.019E-01,  8.270E-01, 8.527E-01, &
    198                     8.702E-01,  8.806E-01, 8.937E-01, &
    199                     9.489E-01,  1.030E+00, 1.105E+00, &
    200                     1.199E+00,  1.357E+00, 1.660E+00, &
    201                     2.540E+00,  4.421E+00,  2.151E+00, 9.518E-01/
    202   DATA A2_CSSSM_b1_19/ 4.522E-01,  4.532E-01, 4.644E-01, &
    203                     4.859E-01,  4.996E-01, 5.137E-01, &
    204                     5.233E-01,  5.290E-01, 5.361E-01, &
    205                     5.655E-01,  6.085E-01, 6.483E-01, &
    206                     6.979E-01,  7.819E-01, 9.488E-01, &
    207                     1.450E+00,  2.523E+00,  1.228E+00, 5.433E-01/
     165          -4.587E-02, -4.528E-02, -4.463E-02, &
     166          -4.399E-02, -4.326E-02, -4.248E-02, &
     167          -4.186E-02, -4.151E-02, -4.125E-02, &
     168          -4.100E-02, -4.053E-02, -3.910E-02, &
     169          -3.697E-02, -3.408E-02, -3.061E-02, -2.819E-02/
     170  DATA B1_ASSSM_b1_19/ 1.165E-08, 1.145E-08, 1.097E-08, &
     171          1.012E-08, 9.233E-09, 8.261E-09, &
     172          7.297E-09, 6.201E-09, 5.026E-09, &
     173          4.098E-09, 3.567E-09, 3.187E-09, &
     174          2.807E-09, 2.291E-09, 2.075E-09, &
     175          1.756E-09, 1.322E-09, 8.011E-10, 4.379E-10/
     176  DATA B2_ASSSM_b1_19/ 2.193E-08, 2.192E-08, 2.187E-08, &
     177          2.179E-08, 2.171E-08, 2.162E-08, &
     178          2.153E-08, 2.143E-08, 2.132E-08, &
     179          2.124E-08, 2.119E-08, 2.115E-08, &
     180          2.112E-08, 2.106E-08, 2.100E-08, &
     181          2.090E-08, 2.077E-08, 2.061E-08, 2.049E-08/
     182  DATA C1_ASSSM_b1_19/ 7.365E-01, 7.365E-01, 7.365E-01, &
     183          7.364E-01, 7.363E-01, 7.362E-01, &
     184          7.361E-01, 7.359E-01, 7.358E-01, &
     185          7.357E-01, 7.356E-01, 7.356E-01, &
     186          7.356E-01, 7.355E-01, 7.354E-01, &
     187          7.352E-01, 7.350E-01, 7.347E-01, 7.345E-01/
     188  DATA C2_ASSSM_b1_19/ 5.833E-02, 5.835E-02, 5.841E-02, &
     189          5.850E-02, 5.859E-02, 5.870E-02, &
     190          5.880E-02, 5.891E-02, 5.904E-02, &
     191          5.914E-02, 5.920E-02, 5.924E-02, &
     192          5.928E-02, 5.934E-02, 5.944E-02, &
     193          5.959E-02, 5.979E-02, 6.003E-02, 6.020E-02/
     194  !COARSE MODE
     195  DATA A1_CSSSM_b1_19/ 7.403E-01, 7.422E-01, 7.626E-01, &
     196          8.019E-01, 8.270E-01, 8.527E-01, &
     197          8.702E-01, 8.806E-01, 8.937E-01, &
     198          9.489E-01, 1.030E+00, 1.105E+00, &
     199          1.199E+00, 1.357E+00, 1.660E+00, &
     200          2.540E+00, 4.421E+00, 2.151E+00, 9.518E-01/
     201  DATA A2_CSSSM_b1_19/ 4.522E-01, 4.532E-01, 4.644E-01, &
     202          4.859E-01, 4.996E-01, 5.137E-01, &
     203          5.233E-01, 5.290E-01, 5.361E-01, &
     204          5.655E-01, 6.085E-01, 6.483E-01, &
     205          6.979E-01, 7.819E-01, 9.488E-01, &
     206          1.450E+00, 2.523E+00, 1.228E+00, 5.433E-01/
    208207  DATA A3_CSSSM_b1_19/-8.516E-03, -8.535E-03, -8.744E-03, &
    209                    -9.148E-03, -9.406E-03, -9.668E-03, &
    210                    -9.848E-03, -9.955E-03, -1.009E-02, &
    211                    -1.064E-02, -1.145E-02, -1.219E-02, &
    212                    -1.312E-02, -1.470E-02, -1.783E-02, &
    213                    -2.724E-02, -4.740E-02, -2.306E-02, -1.021E-02/
    214   DATA B1_CSSSM_b1_19/ 2.535E-07,  2.530E-07, 2.479E-07, &
    215                     2.380E-07,  2.317E-07, 2.252E-07, &
    216                     2.208E-07,  2.182E-07, 2.149E-07, &
    217                     2.051E-07,  1.912E-07, 1.784E-07, &
    218                     1.624E-07,  1.353E-07, 1.012E-07, &
    219                     6.016E-08,  2.102E-08,  0.000E+00, 0.000E+00/
    220   DATA B2_CSSSM_b1_19/ 1.221E-07,  1.217E-07, 1.179E-07, &
    221                     1.104E-07,  1.056E-07, 1.008E-07, &
    222                     9.744E-08,  9.546E-08, 9.299E-08, &
    223                     8.807E-08,  8.150E-08, 7.544E-08, &
    224                     6.786E-08,  5.504E-08, 4.080E-08, &
    225                     2.960E-08,  2.300E-08,  2.030E-08, 1.997E-08/
    226   DATA C1_CSSSM_b1_19/ 7.659E-01,  7.658E-01, 7.652E-01, &
    227                     7.639E-01,  7.631E-01, 7.623E-01, &
    228                     7.618E-01,  7.614E-01, 7.610E-01, &
    229                     7.598E-01,  7.581E-01, 7.566E-01, &
    230                     7.546E-01,  7.513E-01, 7.472E-01, &
    231                     7.423E-01,  7.376E-01,  7.342E-01, 7.334E-01/
    232   DATA C2_CSSSM_b1_19/ 3.691E-02,  3.694E-02, 3.729E-02, &
    233                     3.796E-02,  3.839E-02, 3.883E-02, &
    234                     3.913E-02,  3.931E-02, 3.953E-02, &
    235                     4.035E-02,  4.153E-02, 4.263E-02, &
    236                     4.400E-02,  4.631E-02, 4.933E-02, &
    237                     5.331E-02,  5.734E-02,  6.053E-02, 6.128E-02/
    238 !SUPER COARSE MODE
    239   DATA A1_SSSSM_b1_19/ 2.836E-01,  2.876E-01, 2.563E-01, &
    240                     2.414E-01,  2.541E-01, 2.546E-01, &
    241                     2.572E-01,  2.638E-01, 2.781E-01, &
    242                     3.167E-01,  4.209E-01, 5.286E-01, &
    243                     6.959E-01,  9.233E-01, 1.282E+00, &
    244                     1.836E+00,  2.981E+00,  4.355E+00, 4.059E+00/
    245   DATA A2_SSSSM_b1_19/ 1.608E-01,  1.651E-01, 1.577E-01, &
    246                     1.587E-01,  1.686E-01, 1.690E-01, &
    247                     1.711E-01,  1.762E-01, 1.874E-01, &
    248                     2.138E-01,  2.751E-01, 3.363E-01, &
    249                     4.279E-01,  5.519E-01, 7.421E-01, &
    250                     1.048E+00,  1.702E+00,  2.485E+00, 2.317E+00/
     208          -9.148E-03, -9.406E-03, -9.668E-03, &
     209          -9.848E-03, -9.955E-03, -1.009E-02, &
     210          -1.064E-02, -1.145E-02, -1.219E-02, &
     211          -1.312E-02, -1.470E-02, -1.783E-02, &
     212          -2.724E-02, -4.740E-02, -2.306E-02, -1.021E-02/
     213  DATA B1_CSSSM_b1_19/ 2.535E-07, 2.530E-07, 2.479E-07, &
     214          2.380E-07, 2.317E-07, 2.252E-07, &
     215          2.208E-07, 2.182E-07, 2.149E-07, &
     216          2.051E-07, 1.912E-07, 1.784E-07, &
     217          1.624E-07, 1.353E-07, 1.012E-07, &
     218          6.016E-08, 2.102E-08, 0.000E+00, 0.000E+00/
     219  DATA B2_CSSSM_b1_19/ 1.221E-07, 1.217E-07, 1.179E-07, &
     220          1.104E-07, 1.056E-07, 1.008E-07, &
     221          9.744E-08, 9.546E-08, 9.299E-08, &
     222          8.807E-08, 8.150E-08, 7.544E-08, &
     223          6.786E-08, 5.504E-08, 4.080E-08, &
     224          2.960E-08, 2.300E-08, 2.030E-08, 1.997E-08/
     225  DATA C1_CSSSM_b1_19/ 7.659E-01, 7.658E-01, 7.652E-01, &
     226          7.639E-01, 7.631E-01, 7.623E-01, &
     227          7.618E-01, 7.614E-01, 7.610E-01, &
     228          7.598E-01, 7.581E-01, 7.566E-01, &
     229          7.546E-01, 7.513E-01, 7.472E-01, &
     230          7.423E-01, 7.376E-01, 7.342E-01, 7.334E-01/
     231  DATA C2_CSSSM_b1_19/ 3.691E-02, 3.694E-02, 3.729E-02, &
     232          3.796E-02, 3.839E-02, 3.883E-02, &
     233          3.913E-02, 3.931E-02, 3.953E-02, &
     234          4.035E-02, 4.153E-02, 4.263E-02, &
     235          4.400E-02, 4.631E-02, 4.933E-02, &
     236          5.331E-02, 5.734E-02, 6.053E-02, 6.128E-02/
     237  !SUPER COARSE MODE
     238  DATA A1_SSSSM_b1_19/ 2.836E-01, 2.876E-01, 2.563E-01, &
     239          2.414E-01, 2.541E-01, 2.546E-01, &
     240          2.572E-01, 2.638E-01, 2.781E-01, &
     241          3.167E-01, 4.209E-01, 5.286E-01, &
     242          6.959E-01, 9.233E-01, 1.282E+00, &
     243          1.836E+00, 2.981E+00, 4.355E+00, 4.059E+00/
     244  DATA A2_SSSSM_b1_19/ 1.608E-01, 1.651E-01, 1.577E-01, &
     245          1.587E-01, 1.686E-01, 1.690E-01, &
     246          1.711E-01, 1.762E-01, 1.874E-01, &
     247          2.138E-01, 2.751E-01, 3.363E-01, &
     248          4.279E-01, 5.519E-01, 7.421E-01, &
     249          1.048E+00, 1.702E+00, 2.485E+00, 2.317E+00/
    251250  DATA A3_SSSSM_b1_19/-3.025E-03, -3.111E-03, -2.981E-03, &
    252                    -3.005E-03, -3.193E-03, -3.200E-03, &
    253                    -3.239E-03, -3.336E-03, -3.548E-03, &
    254                    -4.047E-03, -5.196E-03, -6.345E-03, &
    255                    -8.061E-03, -1.038E-02, -1.395E-02, &
    256                    -1.970E-02, -3.197E-02, -4.669E-02, -4.352E-02/
    257   DATA B1_SSSSM_b1_19/ 6.759E-07,  6.246E-07, 5.542E-07, &
    258                     4.953E-07,  4.746E-07, 4.738E-07, &
    259                     4.695E-07,  4.588E-07, 4.354E-07, &
    260                     3.947E-07,  3.461E-07, 3.067E-07, &
    261                     2.646E-07,  2.095E-07, 1.481E-07, &
    262                     9.024E-08,  5.747E-08,  2.384E-08, 6.599E-09/
    263   DATA B2_SSSSM_b1_19/ 5.977E-07,  5.390E-07, 4.468E-07, &
    264                     3.696E-07,  3.443E-07, 3.433E-07, &
    265                     3.380E-07,  3.249E-07, 2.962E-07, &
    266                     2.483E-07,  1.989E-07, 1.623E-07, &
    267                     1.305E-07,  9.015E-08, 6.111E-08, &
    268                     3.761E-08,  2.903E-08,  2.337E-08, 2.147E-08/
    269   DATA C1_SSSSM_b1_19/ 8.120E-01,  8.084E-01, 8.016E-01, &
    270                     7.953E-01,  7.929E-01, 7.928E-01, &
    271                     7.923E-01,  7.910E-01, 7.882E-01, &
    272                     7.834E-01,  7.774E-01, 7.725E-01, &
    273                     7.673E-01,  7.604E-01, 7.529E-01, &
    274                     7.458E-01,  7.419E-01,  7.379E-01, 7.360E-01/
    275   DATA C2_SSSSM_b1_19/ 2.388E-02,  2.392E-02,  2.457E-02, 2.552E-02, &
    276                     2.615E-02,  2.618E-02,  2.631E-02, 2.663E-02, &
    277                     2.735E-02,  2.875E-02,  3.113E-02, 3.330E-02, &
    278                     3.615E-02,  3.997E-02,  4.521E-02, 5.038E-02, &
    279                     5.358E-02,  5.705E-02, 5.887E-02/
    280 !*********************BAND 2************************************************
    281 !ACCUMULATION MODE
     251          -3.005E-03, -3.193E-03, -3.200E-03, &
     252          -3.239E-03, -3.336E-03, -3.548E-03, &
     253          -4.047E-03, -5.196E-03, -6.345E-03, &
     254          -8.061E-03, -1.038E-02, -1.395E-02, &
     255          -1.970E-02, -3.197E-02, -4.669E-02, -4.352E-02/
     256  DATA B1_SSSSM_b1_19/ 6.759E-07, 6.246E-07, 5.542E-07, &
     257          4.953E-07, 4.746E-07, 4.738E-07, &
     258          4.695E-07, 4.588E-07, 4.354E-07, &
     259          3.947E-07, 3.461E-07, 3.067E-07, &
     260          2.646E-07, 2.095E-07, 1.481E-07, &
     261          9.024E-08, 5.747E-08, 2.384E-08, 6.599E-09/
     262  DATA B2_SSSSM_b1_19/ 5.977E-07, 5.390E-07, 4.468E-07, &
     263          3.696E-07, 3.443E-07, 3.433E-07, &
     264          3.380E-07, 3.249E-07, 2.962E-07, &
     265          2.483E-07, 1.989E-07, 1.623E-07, &
     266          1.305E-07, 9.015E-08, 6.111E-08, &
     267          3.761E-08, 2.903E-08, 2.337E-08, 2.147E-08/
     268  DATA C1_SSSSM_b1_19/ 8.120E-01, 8.084E-01, 8.016E-01, &
     269          7.953E-01, 7.929E-01, 7.928E-01, &
     270          7.923E-01, 7.910E-01, 7.882E-01, &
     271          7.834E-01, 7.774E-01, 7.725E-01, &
     272          7.673E-01, 7.604E-01, 7.529E-01, &
     273          7.458E-01, 7.419E-01, 7.379E-01, 7.360E-01/
     274  DATA C2_SSSSM_b1_19/ 2.388E-02, 2.392E-02, 2.457E-02, 2.552E-02, &
     275          2.615E-02, 2.618E-02, 2.631E-02, 2.663E-02, &
     276          2.735E-02, 2.875E-02, 3.113E-02, 3.330E-02, &
     277          3.615E-02, 3.997E-02, 4.521E-02, 5.038E-02, &
     278          5.358E-02, 5.705E-02, 5.887E-02/
     279  !*********************BAND 2************************************************
     280  !ACCUMULATION MODE
    282281  DATA A1_ASSSM_b2_19/1.256E+00, 1.246E+00, 1.226E+00, 1.187E+00, 1.148E+00, &
    283                    1.105E+00, 1.062E+00, 1.014E+00, 9.616E-01, 9.205E-01, &
    284                    8.970E-01, 8.800E-01, 8.632E-01, 8.371E-01, 7.943E-01, &
    285                    7.308E-01, 6.448E-01, 5.414E-01, 4.693E-01/
     282          1.105E+00, 1.062E+00, 1.014E+00, 9.616E-01, 9.205E-01, &
     283          8.970E-01, 8.800E-01, 8.632E-01, 8.371E-01, 7.943E-01, &
     284          7.308E-01, 6.448E-01, 5.414E-01, 4.693E-01/
    286285  DATA A2_ASSSM_b2_19/5.321E-01, 5.284E-01, 5.196E-01, 5.036E-01, 4.872E-01, &
    287                    4.691E-01, 4.512E-01, 4.308E-01, 4.089E-01, 3.917E-01, &
    288                    3.818E-01, 3.747E-01, 3.676E-01, 3.567E-01, 3.385E-01, &
    289                    3.116E-01, 2.751E-01, 2.312E-01, 2.006E-01/
     286          4.691E-01, 4.512E-01, 4.308E-01, 4.089E-01, 3.917E-01, &
     287          3.818E-01, 3.747E-01, 3.676E-01, 3.567E-01, 3.385E-01, &
     288          3.116E-01, 2.751E-01, 2.312E-01, 2.006E-01/
    290289  DATA A3_ASSSM_b2_19/-1.053E-02, -1.046E-02, -1.028E-02, -9.964E-03, -9.637E-03, &
    291                    -9.279E-03, -8.923E-03, -8.518E-03, -8.084E-03, -7.741E-03, &
    292                    -7.545E-03, -7.405E-03, -7.265E-03, -7.048E-03, -6.687E-03, &
    293                    -6.156E-03, -5.433E-03, -4.565E-03, -3.961E-03/
     290          -9.279E-03, -8.923E-03, -8.518E-03, -8.084E-03, -7.741E-03, &
     291          -7.545E-03, -7.405E-03, -7.265E-03, -7.048E-03, -6.687E-03, &
     292          -6.156E-03, -5.433E-03, -4.565E-03, -3.961E-03/
    294293  DATA B1_ASSSM_b2_19/1.560E-02, 1.560E-02, 1.561E-02, 1.565E-02, 1.568E-02, &
    295                    1.572E-02, 1.576E-02, 1.580E-02, 1.584E-02, 1.588E-02, &
    296                    1.590E-02, 1.592E-02, 1.593E-02, 1.595E-02, 1.599E-02, &
    297                    1.605E-02, 1.612E-02, 1.621E-02, 1.627E-02/
     294          1.572E-02, 1.576E-02, 1.580E-02, 1.584E-02, 1.588E-02, &
     295          1.590E-02, 1.592E-02, 1.593E-02, 1.595E-02, 1.599E-02, &
     296          1.605E-02, 1.612E-02, 1.621E-02, 1.627E-02/
    298297  DATA B2_ASSSM_b2_19/1.073E-02, 1.074E-02, 1.076E-02, 1.079E-02, 1.082E-02, &
    299                    1.085E-02, 1.089E-02, 1.093E-02, 1.097E-02, 1.100E-02, &
    300                    1.102E-02, 1.103E-02, 1.105E-02, 1.107E-02, 1.110E-02, &
    301                    1.115E-02, 1.122E-02, 1.130E-02, 1.136E-02/
     298          1.085E-02, 1.089E-02, 1.093E-02, 1.097E-02, 1.100E-02, &
     299          1.102E-02, 1.103E-02, 1.105E-02, 1.107E-02, 1.110E-02, &
     300          1.115E-02, 1.122E-02, 1.130E-02, 1.136E-02/
    302301  DATA C1_ASSSM_b2_19/7.429E-01, 7.429E-01, 7.429E-01, 7.427E-01, 7.427E-01, &
    303                    7.424E-01, 7.423E-01, 7.422E-01, 7.421E-01, 7.420E-01, &
    304                    7.419E-01, 7.419E-01, 7.418E-01, 7.417E-01, 7.416E-01, &
    305                    7.415E-01, 7.413E-01, 7.409E-01, 7.408E-01/
     302          7.424E-01, 7.423E-01, 7.422E-01, 7.421E-01, 7.420E-01, &
     303          7.419E-01, 7.419E-01, 7.418E-01, 7.417E-01, 7.416E-01, &
     304          7.415E-01, 7.413E-01, 7.409E-01, 7.408E-01/
    306305  DATA C2_ASSSM_b2_19/3.031E-02, 3.028E-02, 3.022E-02, 3.011E-02, 2.999E-02, &
    307                    2.986E-02, 2.973E-02, 2.959E-02, 2.943E-02, 2.931E-02, &
    308                    2.924E-02, 2.919E-02, 2.913E-02, 2.905E-02, 2.893E-02, &
    309                    2.874E-02, 2.847E-02, 2.817E-02, 2.795E-02/
    310 !COARSE MODE
     306          2.986E-02, 2.973E-02, 2.959E-02, 2.943E-02, 2.931E-02, &
     307          2.924E-02, 2.919E-02, 2.913E-02, 2.905E-02, 2.893E-02, &
     308          2.874E-02, 2.847E-02, 2.817E-02, 2.795E-02/
     309  !COARSE MODE
    311310  DATA A1_CSSSM_b2_19/7.061E-01, 7.074E-01, 7.211E-01, 7.476E-01, 7.647E-01, &
    312                    7.817E-01, 7.937E-01, 8.007E-01, 8.095E-01, 8.436E-01, &
    313                    8.932E-01, 9.390E-01, 9.963E-01, 1.093E+00, 1.256E+00, &
    314                    1.668E+00, 1.581E+00, 3.457E-01, 1.331E-01/
     311          7.817E-01, 7.937E-01, 8.007E-01, 8.095E-01, 8.436E-01, &
     312          8.932E-01, 9.390E-01, 9.963E-01, 1.093E+00, 1.256E+00, &
     313          1.668E+00, 1.581E+00, 3.457E-01, 1.331E-01/
    315314  DATA A2_CSSSM_b2_19/3.617E-01, 3.621E-01, 3.662E-01, 3.739E-01, 3.789E-01, &
    316                    3.840E-01, 3.874E-01, 3.895E-01, 3.921E-01, 4.001E-01, &
    317                    4.117E-01, 4.223E-01, 4.356E-01, 4.581E-01, 5.099E-01, &
    318                    6.831E-01, 6.663E-01, 1.481E-01, 5.703E-02/
     315          3.840E-01, 3.874E-01, 3.895E-01, 3.921E-01, 4.001E-01, &
     316          4.117E-01, 4.223E-01, 4.356E-01, 4.581E-01, 5.099E-01, &
     317          6.831E-01, 6.663E-01, 1.481E-01, 5.703E-02/
    319318  DATA A3_CSSSM_b2_19/-6.953E-03, -6.961E-03, -7.048E-03, -7.216E-03, -7.322E-03, &
    320                    -7.431E-03, -7.506E-03, -7.551E-03, -7.606E-03, -7.791E-03, &
    321                    -8.059E-03, -8.305E-03, -8.613E-03, -9.134E-03, -1.023E-02, &
    322                    -1.365E-02, -1.320E-02, -2.922E-03, -1.125E-03/
     319          -7.431E-03, -7.506E-03, -7.551E-03, -7.606E-03, -7.791E-03, &
     320          -8.059E-03, -8.305E-03, -8.613E-03, -9.134E-03, -1.023E-02, &
     321          -1.365E-02, -1.320E-02, -2.922E-03, -1.125E-03/
    323322  DATA B1_CSSSM_b2_19/1.007E-02, 1.008E-02, 1.012E-02, 1.019E-02, 1.024E-02, &
    324                    1.029E-02, 1.033E-02, 1.035E-02, 1.038E-02, 1.056E-02, &
    325                    1.083E-02, 1.109E-02, 1.140E-02, 1.194E-02, 1.270E-02, &
    326                    1.390E-02, 1.524E-02, 1.639E-02, 1.667E-02/
     323          1.029E-02, 1.033E-02, 1.035E-02, 1.038E-02, 1.056E-02, &
     324          1.083E-02, 1.109E-02, 1.140E-02, 1.194E-02, 1.270E-02, &
     325          1.390E-02, 1.524E-02, 1.639E-02, 1.667E-02/
    327326  DATA B2_CSSSM_b2_19/4.675E-03, 4.682E-03, 4.760E-03, 4.908E-03, 5.004E-03, &
    328                    5.102E-03, 5.168E-03, 5.207E-03, 5.256E-03, 5.474E-03, &
    329                    5.793E-03, 6.089E-03, 6.457E-03, 7.081E-03, 7.923E-03, &
    330                    9.127E-03, 1.041E-02, 1.147E-02, 1.173E-02/
     327          5.102E-03, 5.168E-03, 5.207E-03, 5.256E-03, 5.474E-03, &
     328          5.793E-03, 6.089E-03, 6.457E-03, 7.081E-03, 7.923E-03, &
     329          9.127E-03, 1.041E-02, 1.147E-02, 1.173E-02/
    331330  DATA C1_CSSSM_b2_19/7.571E-01, 7.571E-01, 7.570E-01, 7.568E-01, 7.565E-01, &
    332                    7.564E-01, 7.563E-01, 7.562E-01, 7.562E-01, 7.557E-01, &
    333                    7.552E-01, 7.545E-01, 7.539E-01, 7.527E-01, 7.509E-01, &
    334                    7.478E-01, 7.440E-01, 7.404E-01, 7.394E-01/
     331          7.564E-01, 7.563E-01, 7.562E-01, 7.562E-01, 7.557E-01, &
     332          7.552E-01, 7.545E-01, 7.539E-01, 7.527E-01, 7.509E-01, &
     333          7.478E-01, 7.440E-01, 7.404E-01, 7.394E-01/
    335334  DATA C2_CSSSM_b2_19/4.464E-02, 4.465E-02, 4.468E-02, 4.474E-02, 4.477E-02, &
    336                    4.480E-02, 4.482E-02, 4.484E-02, 4.486E-02, 4.448E-02, &
    337                    4.389E-02, 4.334E-02, 4.264E-02, 4.148E-02, 3.957E-02, &
    338                    3.588E-02, 3.149E-02, 2.751E-02, 2.650E-02/
    339 !SUPER COARSE MODE
     335          4.480E-02, 4.482E-02, 4.484E-02, 4.486E-02, 4.448E-02, &
     336          4.389E-02, 4.334E-02, 4.264E-02, 4.148E-02, 3.957E-02, &
     337          3.588E-02, 3.149E-02, 2.751E-02, 2.650E-02/
     338  !SUPER COARSE MODE
    340339  DATA A1_SSSSM_b2_19/2.357E-01, 2.490E-01, 2.666E-01, 2.920E-01, 3.120E-01, &
    341                    3.128E-01, 3.169E-01, 3.272E-01, 3.498E-01, 3.960E-01, &
    342                    4.822E-01, 5.634E-01, 6.763E-01, 8.278E-01, 1.047E+00, &
    343                    1.340E+00, 1.927E+00, 1.648E+00, 1.031E+00/
     340          3.128E-01, 3.169E-01, 3.272E-01, 3.498E-01, 3.960E-01, &
     341          4.822E-01, 5.634E-01, 6.763E-01, 8.278E-01, 1.047E+00, &
     342          1.340E+00, 1.927E+00, 1.648E+00, 1.031E+00/
    344343  DATA A2_SSSSM_b2_19/1.219E-01, 1.337E-01, 1.633E-01, 1.929E-01, 2.057E-01, &
    345                    2.062E-01, 2.089E-01, 2.155E-01, 2.300E-01, 2.560E-01, &
    346                    2.908E-01, 3.199E-01, 3.530E-01, 3.965E-01, 4.475E-01, &
    347                    5.443E-01, 7.943E-01, 6.928E-01, 4.381E-01/
     344          2.062E-01, 2.089E-01, 2.155E-01, 2.300E-01, 2.560E-01, &
     345          2.908E-01, 3.199E-01, 3.530E-01, 3.965E-01, 4.475E-01, &
     346          5.443E-01, 7.943E-01, 6.928E-01, 4.381E-01/
    348347  DATA A3_SSSSM_b2_19/-2.387E-03, -2.599E-03, -3.092E-03, -3.599E-03, -3.832E-03, &
    349                    -3.842E-03, -3.890E-03, -4.012E-03, -4.276E-03, -4.763E-03, &
    350                    -5.455E-03, -6.051E-03, -6.763E-03, -7.708E-03, -8.887E-03, &
    351                    -1.091E-02, -1.585E-02, -1.373E-02, -8.665E-03/
     348          -3.842E-03, -3.890E-03, -4.012E-03, -4.276E-03, -4.763E-03, &
     349          -5.455E-03, -6.051E-03, -6.763E-03, -7.708E-03, -8.887E-03, &
     350          -1.091E-02, -1.585E-02, -1.373E-02, -8.665E-03/
    352351  DATA B1_SSSSM_b2_19/1.260E-02, 1.211E-02, 1.126E-02, 1.056E-02, 1.038E-02, &
    353                    1.037E-02, 1.033E-02, 1.023E-02, 1.002E-02, 9.717E-03, &
    354                    9.613E-03, 9.652E-03, 9.983E-03, 1.047E-02, 1.168E-02, &
    355                    1.301E-02, 1.399E-02, 1.514E-02, 1.578E-02/
     352          1.037E-02, 1.033E-02, 1.023E-02, 1.002E-02, 9.717E-03, &
     353          9.613E-03, 9.652E-03, 9.983E-03, 1.047E-02, 1.168E-02, &
     354          1.301E-02, 1.399E-02, 1.514E-02, 1.578E-02/
    356355  DATA B2_SSSSM_b2_19/2.336E-03, 2.419E-03, 2.506E-03, 2.610E-03, 2.690E-03, &
    357                    2.694E-03, 2.711E-03, 2.752E-03, 2.844E-03, 3.043E-03, &
    358                    3.455E-03, 3.871E-03, 4.507E-03, 5.373E-03, 6.786E-03, &
    359                    8.238E-03, 9.208E-03, 1.032E-02, 1.091E-02/
     356          2.694E-03, 2.711E-03, 2.752E-03, 2.844E-03, 3.043E-03, &
     357          3.455E-03, 3.871E-03, 4.507E-03, 5.373E-03, 6.786E-03, &
     358          8.238E-03, 9.208E-03, 1.032E-02, 1.091E-02/
    360359  DATA C1_SSSSM_b2_19/7.832E-01, 7.787E-01, 7.721E-01, 7.670E-01, 7.657E-01, &
    361                    7.657E-01, 7.654E-01, 7.648E-01, 7.634E-01, 7.613E-01, &
    362                    7.596E-01, 7.585E-01, 7.574E-01, 7.560E-01, 7.533E-01, &
    363                    7.502E-01, 7.476E-01, 7.443E-01, 7.423E-01/
     360          7.657E-01, 7.654E-01, 7.648E-01, 7.634E-01, 7.613E-01, &
     361          7.596E-01, 7.585E-01, 7.574E-01, 7.560E-01, 7.533E-01, &
     362          7.502E-01, 7.476E-01, 7.443E-01, 7.423E-01/
    364363  DATA C2_SSSSM_b2_19/3.144E-02, 3.268E-02, 3.515E-02, 3.748E-02, 3.837E-02, &
    365                    3.840E-02, 3.860E-02, 3.906E-02, 4.006E-02, 4.173E-02, &
    366                    4.338E-02, 4.435E-02, 4.459E-02, 4.467E-02, 4.202E-02, &
    367                    3.864E-02, 3.559E-02, 3.183E-02, 2.964E-02/
    368 !***************************************************************************
     364          3.840E-02, 3.860E-02, 3.906E-02, 4.006E-02, 4.173E-02, &
     365          4.338E-02, 4.435E-02, 4.459E-02, 4.467E-02, 4.202E-02, &
     366          3.864E-02, 3.559E-02, 3.183E-02, 2.964E-02/
     367  !***************************************************************************
     368
     369  DATA alpha_aers_2bands/  &
     370          ! bc soluble
     371          7.675, 7.675, 7.675, 7.675, 7.675, 7.675, &
     372          7.675, 7.675, 10.433, 11.984, 13.767, 15.567, &
     373          4.720, 4.720, 4.720, 4.720, 4.720, 4.720, &
     374          4.720, 4.720, 6.081, 6.793, 7.567, 9.344, &
     375          ! pom soluble
     376          5.503, 5.503, 5.503, 5.503, 5.588, 5.957, &
     377          6.404, 7.340, 8.545, 10.319, 13.595, 20.398, &
     378          1.402, 1.402, 1.402, 1.402, 1.431, 1.562, &
     379          1.715, 2.032, 2.425, 2.991, 4.193, 7.133, &
     380          ! sulfate
     381          4.681, 5.062, 5.460, 5.798, 6.224, 6.733, &
     382          7.556, 8.613, 10.687, 12.265, 16.32, 21.692, &
     383          1.107, 1.239, 1.381, 1.490, 1.635, 1.8030, &
     384          2.071, 2.407, 3.126, 3.940, 5.539, 7.921, &
     385          ! sulfate coarse
     386          4.681, 5.062, 5.460, 5.798, 6.224, 6.733, &
     387          7.556, 8.613, 10.687, 12.265, 16.32, 21.692, &
     388          1.107, 1.239, 1.381, 1.490, 1.635, 1.8030, &
     389          2.071, 2.407, 3.126, 3.940, 5.539, 7.921, &
     390          ! seasalt Super Coarse Soluble (SS)
     391          0.5090, 0.6554, 0.7129, 0.7767, 0.8529, 1.2728, &
     392          1.3820, 1.5792, 1.9173, 2.2002, 2.7173, 4.1487, &
     393          0.5167, 0.6613, 0.7221, 0.7868, 0.8622, 1.3027, &
     394          1.4227, 1.6317, 1.9887, 2.2883, 2.8356, 4.3453, &
     395          ! seasalt  Coarse Soluble (CS)
     396          0.5090, 0.6554, 0.7129, 0.7767, 0.8529, 1.2728, &
     397          1.3820, 1.5792, 1.9173, 2.2002, 2.7173, 4.1487, &
     398          0.5167, 0.6613, 0.7221, 0.7868, 0.8622, 1.3027, &
     399          1.4227, 1.6317, 1.9887, 2.2883, 2.8356, 4.3453, &
     400          ! seasalt  Accumulation Soluble (AS)
     401          4.125, 4.674, 5.005, 5.434, 5.985, 10.006, &
     402          11.175, 13.376, 17.264, 20.540, 26.604, 42.349, &
     403          4.187, 3.939, 3.919, 3.937, 3.995, 5.078, &
     404          5.511, 6.434, 8.317, 10.152, 14.024, 26.537/
     405
     406  DATA alpha_aeri_2bands/  &
     407          ! dust insoluble
     408          0.7661, 0.7123, &
     409          ! bc insoluble
     410          10.360, 4.437, &
     411          ! pom insoluble
     412          3.741, 0.606/
     413
     414  DATA cg_aers_2bands/ &
     415          ! bc soluble
     416          .612, .612, .612, .612, .612, .612, &
     417          .612, .612, .702, .734, .760, .796, &
     418          .433, .433, .433, .433, .433, .433, &
     419          .433, .433, .534, .575, .613, .669, &
     420          ! pom soluble
     421          .663, .663, .663, .663, .666, .674, &
     422          .685, .702, .718, .737, .757, .777, &
     423          .544, .544, .544, .544, .547, .554, &
     424          .565, .583, .604, .631, .661, .698, &
     425          ! sulfate
     426          .658, .669, .680, .688, .698, .707, &
     427          .719, .733, .752, .760, .773, .786, &
     428          .544, .555, .565, .573, .583, .593, &
     429          .610, .628, .655, .666, .692, .719, &
     430          ! sulfate coarse
     431          .658, .669, .680, .688, .698, .707, &
     432          .719, .733, .752, .760, .773, .786, &
     433          .544, .555, .565, .573, .583, .593, &
     434          .610, .628, .655, .666, .692, .719, &
     435          ! seasalt Super Coarse soluble (SS)
     436          .727, .747, .755, .761, .770, .788, &
     437          .792, .799, .805, .809, .815, .826, &
     438          .717, .738, .745, .752, .761, .779, &
     439          .781, .786, .793, .797, .803, .813, &
     440          ! seasalt Coarse soluble (CS)
     441          .727, .747, .755, .761, .770, .788, &
     442          .792, .799, .805, .809, .815, .826, &
     443          .717, .738, .745, .752, .761, .779, &
     444          .781, .786, .793, .797, .803, .813, &
     445          ! Sesalt Accumulation Soluble (AS)
     446          .727, .741, .748, .754, .761, .782, &
     447          .787, .792, .797, .799, .801, .799, &
     448          .606, .645, .658, .669, .681, .726, &
     449          .734, .746, .761, .770, .782, .798/
     450
     451  DATA cg_aeri_2bands/ &
     452          ! dust insoluble
     453          .701, .670, &
     454          ! bc insoluble
     455          .471, .297, &
     456          ! pom insoluble
     457          .568, .365/
     458
     459  DATA piz_aers_2bands/&
     460          ! bc soluble
     461          .445, .445, .445, .445, .445, .445, &
     462          .445, .445, .461, .480, .505, .528, &
     463          .362, .362, .362, .362, .362, .362, &
     464          .362, .362, .381, .405, .437, .483, &
     465          ! pom soluble
     466          .972, .972, .972, .972, .972, .974, &
     467          .976, .979, .982, .986, .989, .992, &
     468          .924, .924, .924, .924, .925, .927, &
     469          .932, .938, .945, .952, .961, .970, &
     470          ! sulfate
     471          1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
     472          1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
     473          .992, .988, .988, .987, .986, .985, &
     474          .985, .985, .984, .984, .984, .984, &
     475          ! sulfate coarse
     476          1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
     477          1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
     478          .992, .988, .988, .987, .986, .985, &
     479          .985, .985, .984, .984, .984, .984, &
     480          ! seasalt Super Coarse Soluble (SS)
     481          1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
     482          1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
     483          0.992, 0.989, 0.987, 0.986, 0.986, 0.980, &
     484          0.980, 0.978, 0.976, 0.976, 0.974, 0.971, &
     485          ! seasalt Coarse soluble (CS)
     486          1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
     487          1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
     488          0.992, 0.989, 0.987, 0.986, 0.986, 0.980, &
     489          0.980, 0.978, 0.976, 0.976, 0.974, 0.971, &
     490          ! seasalt Accumulation Soluble (AS)
     491          1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
     492          1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
     493          0.970, 0.975, 0.976, 0.977, 0.978, 0.982, &
     494          0.982, 0.983, 0.984, 0.984, 0.985, 0.985/
     495
     496  DATA piz_aeri_2bands/ &
     497          ! dust insoluble
     498          .963, .987, &
     499          ! bc insoluble
     500          .395, .264, &
     501          ! pom insoluble
     502          .966, .859/
    369503
    370504  spsol = 0
    371   spinsol = 0
    372   spss = 0
    373 
    374   DATA alpha_aers_2bands/  &
    375        ! bc soluble
    376        7.675,7.675,7.675,7.675,7.675,7.675,    &
    377        7.675,7.675,10.433,11.984,13.767,15.567,&
    378        4.720,4.720,4.720,4.720,4.720,4.720,    &
    379        4.720,4.720,6.081,6.793,7.567,9.344,    &
    380        ! pom soluble
    381        5.503,5.503,5.503,5.503,5.588,5.957,    &
    382        6.404,7.340,8.545,10.319,13.595,20.398, &
    383        1.402,1.402,1.402,1.402,1.431,1.562,    &
    384        1.715,2.032,2.425,2.991,4.193,7.133,    &
    385        ! sulfate   
    386        4.681,5.062,5.460,5.798,6.224,6.733,    &
    387        7.556,8.613,10.687,12.265,16.32,21.692, &
    388        1.107,1.239,1.381,1.490,1.635,1.8030,   &
    389        2.071,2.407,3.126,3.940,5.539,7.921,    &
    390                                 ! sulfate coarse
    391        4.681,5.062,5.460,5.798,6.224,6.733,    &
    392        7.556,8.613,10.687,12.265,16.32,21.692, &
    393        1.107,1.239,1.381,1.490,1.635,1.8030,   &
    394        2.071,2.407,3.126,3.940,5.539,7.921,    &
    395                                 ! seasalt Super Coarse Soluble (SS)
    396        0.5090,0.6554,0.7129,0.7767,0.8529,1.2728, &
    397        1.3820,1.5792,1.9173,2.2002,2.7173,4.1487, &
    398        0.5167,0.6613,0.7221,0.7868,0.8622,1.3027, &
    399        1.4227,1.6317,1.9887,2.2883,2.8356,4.3453, &
    400                                 ! seasalt  Coarse Soluble (CS)
    401        0.5090,0.6554,0.7129,0.7767,0.8529,1.2728, &
    402        1.3820,1.5792,1.9173,2.2002,2.7173,4.1487, &
    403        0.5167,0.6613,0.7221,0.7868,0.8622,1.3027, &
    404        1.4227,1.6317,1.9887,2.2883,2.8356,4.3453, &
    405                                 ! seasalt  Accumulation Soluble (AS)
    406        4.125, 4.674, 5.005, 5.434, 5.985, 10.006, &
    407        11.175,13.376,17.264,20.540,26.604, 42.349,&
    408        4.187, 3.939, 3.919, 3.937, 3.995,  5.078, &
    409        5.511, 6.434, 8.317,10.152,14.024, 26.537/
    410 
    411   DATA alpha_aeri_2bands/  &
    412        ! dust insoluble
    413        0.7661,0.7123,&
    414        ! bc insoluble
    415        10.360,4.437, &
    416        ! pom insoluble
    417        3.741,0.606/
    418 
    419   DATA cg_aers_2bands/ &
    420        ! bc soluble
    421        .612, .612, .612, .612, .612, .612, &
    422        .612, .612, .702, .734, .760, .796, &
    423        .433, .433, .433, .433, .433, .433, &
    424        .433, .433, .534, .575, .613, .669, &
    425        ! pom soluble
    426        .663, .663, .663, .663, .666, .674, &
    427        .685, .702, .718, .737, .757, .777, &
    428        .544, .544, .544, .544, .547, .554, &
    429        .565, .583, .604, .631, .661, .698, &
    430        ! sulfate   
    431        .658, .669, .680, .688, .698, .707, &
    432        .719, .733, .752, .760, .773, .786, &
    433        .544, .555, .565, .573, .583, .593, &
    434        .610, .628, .655, .666, .692, .719, &
    435                                 ! sulfate coarse
    436        .658, .669, .680, .688, .698, .707, &
    437        .719, .733, .752, .760, .773, .786, &
    438        .544, .555, .565, .573, .583, .593, &
    439        .610, .628, .655, .666, .692, .719, &
    440                                 ! seasalt Super Coarse soluble (SS)
    441        .727, .747, .755, .761, .770, .788, &
    442        .792, .799, .805, .809, .815, .826, &
    443        .717, .738, .745, .752, .761, .779, &
    444        .781, .786, .793, .797, .803, .813, &
    445                                 ! seasalt Coarse soluble (CS)
    446        .727, .747, .755, .761, .770, .788, &
    447        .792, .799, .805, .809, .815, .826, &
    448        .717, .738, .745, .752, .761, .779, &
    449        .781, .786, .793, .797, .803, .813, &
    450                                 ! Sesalt Accumulation Soluble (AS)
    451        .727, .741, .748, .754, .761, .782, &
    452        .787, .792, .797, .799, .801, .799, &
    453        .606, .645, .658, .669, .681, .726, &
    454        .734, .746, .761, .770, .782, .798/
    455 
    456   DATA cg_aeri_2bands/ &
    457        ! dust insoluble
    458        .701, .670, &
    459        ! bc insoluble
    460        .471, .297, &
    461        ! pom insoluble
    462        .568, .365/
    463 
    464   DATA piz_aers_2bands/&
    465        ! bc soluble
    466        .445, .445, .445, .445, .445, .445, &
    467        .445, .445, .461, .480, .505, .528, &
    468        .362, .362, .362, .362, .362, .362, &
    469        .362, .362, .381, .405, .437, .483, &
    470        ! pom soluble
    471        .972, .972, .972, .972, .972, .974, &
    472        .976, .979, .982, .986, .989, .992, &
    473        .924, .924, .924, .924, .925, .927, &
    474        .932, .938, .945, .952, .961, .970, &
    475        ! sulfate
    476        1.000,1.000,1.000,1.000,1.000,1.000, &
    477        1.000,1.000,1.000,1.000,1.000,1.000, &
    478        .992, .988, .988, .987, .986, .985,  &
    479        .985, .985, .984, .984, .984, .984,  &
    480                                 ! sulfate coarse
    481        1.000,1.000,1.000,1.000,1.000,1.000, &
    482        1.000,1.000,1.000,1.000,1.000,1.000, &
    483        .992, .988, .988, .987, .986, .985,  &
    484        .985, .985, .984, .984, .984, .984,  &
    485                                 ! seasalt Super Coarse Soluble (SS)
    486        1.000,1.000,1.000,1.000,1.000,1.000, &
    487        1.000,1.000,1.000,1.000,1.000,1.000, &
    488        0.992,0.989,0.987,0.986,0.986,0.980, &
    489        0.980,0.978,0.976,0.976,0.974,0.971, &
    490                                 ! seasalt Coarse soluble (CS)
    491        1.000,1.000,1.000,1.000,1.000,1.000, &
    492        1.000,1.000,1.000,1.000,1.000,1.000, &
    493        0.992,0.989,0.987,0.986,0.986,0.980, &
    494        0.980,0.978,0.976,0.976,0.974,0.971, &
    495                                 ! seasalt Accumulation Soluble (AS)
    496        1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
    497        1.000, 1.000, 1.000, 1.000, 1.000, 1.000, &
    498        0.970, 0.975, 0.976, 0.977, 0.978, 0.982, &
    499        0.982, 0.983, 0.984, 0.984, 0.985, 0.985/
    500 
    501   DATA piz_aeri_2bands/ &
    502        ! dust insoluble
    503        .963, .987, &
    504        ! bc insoluble
    505        .395, .264, &
    506        ! pom insoluble
    507        .966, .859/
    508 
    509 ! Interpolation des coefficients optiques de 19 niveaux vers le nombre des niveaux du model
     505  spinsol = 0
     506  spss = 0
     507
     508  ! Interpolation des coefficients optiques de 19 niveaux vers le nombre des niveaux du model
    510509  IF (firstcall) THEN
    511      firstcall=.FALSE.
    512      
    513      IF (.NOT. ALLOCATED(A1_ASSSM_b1)) THEN
    514         ALLOCATE(A1_ASSSM_b1(klev),A2_ASSSM_b1(klev), A3_ASSSM_b1(klev),&
    515           B1_ASSSM_b1(klev), B2_ASSSM_b1(klev), C1_ASSSM_b1(klev), C2_ASSSM_b1(klev),&
    516           A1_CSSSM_b1(klev), A2_CSSSM_b1(klev), A3_CSSSM_b1(klev),&
    517           B1_CSSSM_b1(klev), B2_CSSSM_b1(klev), C1_CSSSM_b1(klev), C2_CSSSM_b1(klev),&
    518           A1_SSSSM_b1(klev), A2_SSSSM_b1(klev), A3_SSSSM_b1(klev),&
    519           B1_SSSSM_b1(klev), B2_SSSSM_b1(klev), C1_SSSSM_b1(klev), C2_SSSSM_b1(klev),&
    520           A1_ASSSM_b2(klev), A2_ASSSM_b2(klev), A3_ASSSM_b2(klev),&
    521           B1_ASSSM_b2(klev), B2_ASSSM_b2(klev), C1_ASSSM_b2(klev), C2_ASSSM_b2(klev),&
    522           A1_CSSSM_b2(klev), A2_CSSSM_b2(klev), A3_CSSSM_b2(klev),&
    523           B1_CSSSM_b2(klev), B2_CSSSM_b2(klev), C1_CSSSM_b2(klev), C2_CSSSM_b2(klev),&
    524           A1_SSSSM_b2(klev), A2_SSSSM_b2(klev), A3_SSSSM_b2(klev),&
    525           B1_SSSSM_b2(klev), B2_SSSSM_b2(klev), C1_SSSSM_b2(klev), C2_SSSSM_b2(klev), stat=ierr)
    526         IF (ierr /= 0) CALL abort_physic('aeropt_2bands', 'pb in allocation 1',1)
    527      END IF
    528      
    529 ! bande 1
    530      CALL pres2lev(A1_ASSSM_b1_19, A1_ASSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    531      CALL pres2lev(A2_ASSSM_b1_19, A2_ASSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    532      CALL pres2lev(A3_ASSSM_b1_19, A3_ASSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    533      CALL pres2lev(B1_ASSSM_b1_19, B1_ASSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    534      CALL pres2lev(B2_ASSSM_b1_19, B2_ASSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    535      CALL pres2lev(C1_ASSSM_b1_19, C1_ASSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    536      CALL pres2lev(C2_ASSSM_b1_19, C2_ASSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    537 
    538      CALL pres2lev(A1_CSSSM_b1_19, A1_CSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    539      CALL pres2lev(A2_CSSSM_b1_19, A2_CSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    540      CALL pres2lev(A3_CSSSM_b1_19, A3_CSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    541      CALL pres2lev(B1_CSSSM_b1_19, B1_CSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    542      CALL pres2lev(B2_CSSSM_b1_19, B2_CSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    543      CALL pres2lev(C1_CSSSM_b1_19, C1_CSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    544      CALL pres2lev(C2_CSSSM_b1_19, C2_CSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    545 
    546      CALL pres2lev(A1_SSSSM_b1_19, A1_SSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    547      CALL pres2lev(A2_SSSSM_b1_19, A2_SSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    548      CALL pres2lev(A3_SSSSM_b1_19, A3_SSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    549      CALL pres2lev(B1_SSSSM_b1_19, B1_SSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    550      CALL pres2lev(B2_SSSSM_b1_19, B2_SSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    551      CALL pres2lev(C1_SSSSM_b1_19, C1_SSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    552      CALL pres2lev(C2_SSSSM_b1_19, C2_SSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    553 
    554 ! bande 2
    555      CALL pres2lev(A1_ASSSM_b2_19, A1_ASSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    556      CALL pres2lev(A2_ASSSM_b2_19, A2_ASSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    557      CALL pres2lev(A3_ASSSM_b2_19, A3_ASSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    558      CALL pres2lev(B1_ASSSM_b2_19, B1_ASSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    559      CALL pres2lev(B2_ASSSM_b2_19, B2_ASSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    560      CALL pres2lev(C1_ASSSM_b2_19, C1_ASSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    561      CALL pres2lev(C2_ASSSM_b2_19, C2_ASSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    562 
    563      CALL pres2lev(A1_CSSSM_b2_19, A1_CSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    564      CALL pres2lev(A2_CSSSM_b2_19, A2_CSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    565      CALL pres2lev(A3_CSSSM_b2_19, A3_CSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    566      CALL pres2lev(B1_CSSSM_b2_19, B1_CSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    567      CALL pres2lev(B2_CSSSM_b2_19, B2_CSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    568      CALL pres2lev(C1_CSSSM_b2_19, C1_CSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    569      CALL pres2lev(C2_CSSSM_b2_19, C2_CSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    570 
    571      CALL pres2lev(A1_SSSSM_b2_19, A1_SSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    572      CALL pres2lev(A2_SSSSM_b2_19, A2_SSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    573      CALL pres2lev(A3_SSSSM_b2_19, A3_SSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    574      CALL pres2lev(B1_SSSSM_b2_19, B1_SSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    575      CALL pres2lev(B2_SSSSM_b2_19, B2_SSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    576      CALL pres2lev(C1_SSSSM_b2_19, C1_SSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    577      CALL pres2lev(C2_SSSSM_b2_19, C2_SSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     510    firstcall = .FALSE.
     511
     512    IF (.NOT. ALLOCATED(A1_ASSSM_b1)) THEN
     513      ALLOCATE(A1_ASSSM_b1(klev), A2_ASSSM_b1(klev), A3_ASSSM_b1(klev), &
     514              B1_ASSSM_b1(klev), B2_ASSSM_b1(klev), C1_ASSSM_b1(klev), C2_ASSSM_b1(klev), &
     515              A1_CSSSM_b1(klev), A2_CSSSM_b1(klev), A3_CSSSM_b1(klev), &
     516              B1_CSSSM_b1(klev), B2_CSSSM_b1(klev), C1_CSSSM_b1(klev), C2_CSSSM_b1(klev), &
     517              A1_SSSSM_b1(klev), A2_SSSSM_b1(klev), A3_SSSSM_b1(klev), &
     518              B1_SSSSM_b1(klev), B2_SSSSM_b1(klev), C1_SSSSM_b1(klev), C2_SSSSM_b1(klev), &
     519              A1_ASSSM_b2(klev), A2_ASSSM_b2(klev), A3_ASSSM_b2(klev), &
     520              B1_ASSSM_b2(klev), B2_ASSSM_b2(klev), C1_ASSSM_b2(klev), C2_ASSSM_b2(klev), &
     521              A1_CSSSM_b2(klev), A2_CSSSM_b2(klev), A3_CSSSM_b2(klev), &
     522              B1_CSSSM_b2(klev), B2_CSSSM_b2(klev), C1_CSSSM_b2(klev), C2_CSSSM_b2(klev), &
     523              A1_SSSSM_b2(klev), A2_SSSSM_b2(klev), A3_SSSSM_b2(klev), &
     524              B1_SSSSM_b2(klev), B2_SSSSM_b2(klev), C1_SSSSM_b2(klev), C2_SSSSM_b2(klev), stat = ierr)
     525      IF (ierr /= 0) CALL abort_physic('aeropt_2bands', 'pb in allocation 1', 1)
     526    END IF
     527
     528    ! bande 1
     529    CALL pres2lev(A1_ASSSM_b1_19, A1_ASSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     530    CALL pres2lev(A2_ASSSM_b1_19, A2_ASSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     531    CALL pres2lev(A3_ASSSM_b1_19, A3_ASSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     532    CALL pres2lev(B1_ASSSM_b1_19, B1_ASSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     533    CALL pres2lev(B2_ASSSM_b1_19, B2_ASSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     534    CALL pres2lev(C1_ASSSM_b1_19, C1_ASSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     535    CALL pres2lev(C2_ASSSM_b1_19, C2_ASSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     536
     537    CALL pres2lev(A1_CSSSM_b1_19, A1_CSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     538    CALL pres2lev(A2_CSSSM_b1_19, A2_CSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     539    CALL pres2lev(A3_CSSSM_b1_19, A3_CSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     540    CALL pres2lev(B1_CSSSM_b1_19, B1_CSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     541    CALL pres2lev(B2_CSSSM_b1_19, B2_CSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     542    CALL pres2lev(C1_CSSSM_b1_19, C1_CSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     543    CALL pres2lev(C2_CSSSM_b1_19, C2_CSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     544
     545    CALL pres2lev(A1_SSSSM_b1_19, A1_SSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     546    CALL pres2lev(A2_SSSSM_b1_19, A2_SSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     547    CALL pres2lev(A3_SSSSM_b1_19, A3_SSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     548    CALL pres2lev(B1_SSSSM_b1_19, B1_SSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     549    CALL pres2lev(B2_SSSSM_b1_19, B2_SSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     550    CALL pres2lev(C1_SSSSM_b1_19, C1_SSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     551    CALL pres2lev(C2_SSSSM_b1_19, C2_SSSSM_b1, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     552
     553    ! bande 2
     554    CALL pres2lev(A1_ASSSM_b2_19, A1_ASSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     555    CALL pres2lev(A2_ASSSM_b2_19, A2_ASSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     556    CALL pres2lev(A3_ASSSM_b2_19, A3_ASSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     557    CALL pres2lev(B1_ASSSM_b2_19, B1_ASSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     558    CALL pres2lev(B2_ASSSM_b2_19, B2_ASSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     559    CALL pres2lev(C1_ASSSM_b2_19, C1_ASSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     560    CALL pres2lev(C2_ASSSM_b2_19, C2_ASSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     561
     562    CALL pres2lev(A1_CSSSM_b2_19, A1_CSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     563    CALL pres2lev(A2_CSSSM_b2_19, A2_CSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     564    CALL pres2lev(A3_CSSSM_b2_19, A3_CSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     565    CALL pres2lev(B1_CSSSM_b2_19, B1_CSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     566    CALL pres2lev(B2_CSSSM_b2_19, B2_CSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     567    CALL pres2lev(C1_CSSSM_b2_19, C1_CSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     568    CALL pres2lev(C2_CSSSM_b2_19, C2_CSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     569
     570    CALL pres2lev(A1_SSSSM_b2_19, A1_SSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     571    CALL pres2lev(A2_SSSSM_b2_19, A2_SSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     572    CALL pres2lev(A3_SSSSM_b2_19, A3_SSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     573    CALL pres2lev(B1_SSSSM_b2_19, B1_SSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     574    CALL pres2lev(B2_SSSSM_b2_19, B2_SSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     575    CALL pres2lev(C1_SSSSM_b2_19, C1_SSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
     576    CALL pres2lev(C2_SSSSM_b2_19, C2_SSSSM_b2, nb_level, klev, presnivs_19, presnivs, 1, 1, .FALSE.)
    578577
    579578  END IF ! firstcall
    580579
    581   DO k=1, klev
    582     DO i=1, klon
    583       zrho=pplay(i,k)/t_seri(i,k)/RD    ! kg/m3
    584       zdh(i,k)=pdel(i,k)/(RG*zrho)      ! m
     580  DO k = 1, klev
     581    DO i = 1, klon
     582      zrho = pplay(i, k) / t_seri(i, k) / RD    ! kg/m3
     583      zdh(i, k) = pdel(i, k) / (RG * zrho)      ! m
    585584    ENDDO
    586585  ENDDO
    587586
    588587  IF (flag_aerosol == 1) THEN
    589      nb_aer = 2
    590      ALLOCATE (aerosol_name(nb_aer))
    591      aerosol_name(1) = id_ASSO4M_phy
    592      aerosol_name(2) = id_CSSO4M_phy
     588    nb_aer = 2
     589    ALLOCATE (aerosol_name(nb_aer))
     590    aerosol_name(1) = id_ASSO4M_phy
     591    aerosol_name(2) = id_CSSO4M_phy
    593592  ELSEIF (flag_aerosol == 2) THEN
    594      nb_aer = 2
    595      ALLOCATE (aerosol_name(nb_aer))
    596      aerosol_name(1) = id_ASBCM_phy
    597      aerosol_name(2) = id_AIBCM_phy
     593    nb_aer = 2
     594    ALLOCATE (aerosol_name(nb_aer))
     595    aerosol_name(1) = id_ASBCM_phy
     596    aerosol_name(2) = id_AIBCM_phy
    598597  ELSEIF (flag_aerosol == 3) THEN
    599      nb_aer = 2
    600      ALLOCATE (aerosol_name(nb_aer))
    601      aerosol_name(1) = id_ASPOMM_phy
    602      aerosol_name(2) = id_AIPOMM_phy
     598    nb_aer = 2
     599    ALLOCATE (aerosol_name(nb_aer))
     600    aerosol_name(1) = id_ASPOMM_phy
     601    aerosol_name(2) = id_AIPOMM_phy
    603602  ELSEIF (flag_aerosol == 4) THEN
    604      nb_aer = 3
    605      ALLOCATE (aerosol_name(nb_aer))
    606      aerosol_name(1) = id_CSSSM_phy
    607      aerosol_name(2) = id_SSSSM_phy
    608      aerosol_name(3) = id_ASSSM_phy
     603    nb_aer = 3
     604    ALLOCATE (aerosol_name(nb_aer))
     605    aerosol_name(1) = id_CSSSM_phy
     606    aerosol_name(2) = id_SSSSM_phy
     607    aerosol_name(3) = id_ASSSM_phy
    609608  ELSEIF (flag_aerosol == 5) THEN
    610      nb_aer = 1
    611      ALLOCATE (aerosol_name(nb_aer))
    612      aerosol_name(1) = id_CIDUSTM_phy
     609    nb_aer = 1
     610    ALLOCATE (aerosol_name(nb_aer))
     611    aerosol_name(1) = id_CIDUSTM_phy
    613612  ELSEIF (flag_aerosol == 6) THEN
    614      nb_aer = 10
    615      ALLOCATE (aerosol_name(nb_aer))
    616      aerosol_name(1) = id_ASSO4M_phy
    617      aerosol_name(2) = id_ASBCM_phy
    618      aerosol_name(3) = id_AIBCM_phy
    619      aerosol_name(4) = id_ASPOMM_phy
    620      aerosol_name(5) = id_AIPOMM_phy
    621      aerosol_name(6) = id_CSSSM_phy
    622      aerosol_name(7) = id_SSSSM_phy
    623      aerosol_name(8) = id_ASSSM_phy
    624      aerosol_name(9) = id_CIDUSTM_phy
    625      aerosol_name(10)= id_CSSO4M_phy
     613    nb_aer = 10
     614    ALLOCATE (aerosol_name(nb_aer))
     615    aerosol_name(1) = id_ASSO4M_phy
     616    aerosol_name(2) = id_ASBCM_phy
     617    aerosol_name(3) = id_AIBCM_phy
     618    aerosol_name(4) = id_ASPOMM_phy
     619    aerosol_name(5) = id_AIPOMM_phy
     620    aerosol_name(6) = id_CSSSM_phy
     621    aerosol_name(7) = id_SSSSM_phy
     622    aerosol_name(8) = id_ASSSM_phy
     623    aerosol_name(9) = id_CIDUSTM_phy
     624    aerosol_name(10) = id_CSSO4M_phy
    626625  ENDIF
    627626
     
    632631  !      compute optical_thickness_at_gridpoint_per_species
    633632
    634 !CDIR ON_ADB(fact_RH)
    635 !CDIR SHORTLOOP
    636   DO n=1,nbre_RH-1
    637     fact_RH(n)=1./(RH_tab(n+1)-RH_tab(n))
     633  !CDIR ON_ADB(fact_RH)
     634  !CDIR SHORTLOOP
     635  DO n = 1, nbre_RH - 1
     636    fact_RH(n) = 1. / (RH_tab(n + 1) - RH_tab(n))
    638637  ENDDO
    639    
    640   DO k=1, KLEV
    641 !CDIR ON_ADB(fact_RH)
    642     DO i=1, KLON
    643       rh(i,k)=MIN(RHcl(i,k)*100.,RH_MAX)
    644       RH_num(i,k) = INT( rh(i,k)/10. + 1.)
    645       IF (rh(i,k)>85.) RH_num(i,k)=10
    646       IF (rh(i,k)>90.) RH_num(i,k)=11
    647       DELTA(i,k)=(rh(i,k)-RH_tab(RH_num(i,k)))*fact_RH(RH_num(i,k))
     638
     639  DO k = 1, KLEV
     640    !CDIR ON_ADB(fact_RH)
     641    DO i = 1, KLON
     642      rh(i, k) = MIN(RHcl(i, k) * 100., RH_MAX)
     643      RH_num(i, k) = INT(rh(i, k) / 10. + 1.)
     644      IF (rh(i, k)>85.) RH_num(i, k) = 10
     645      IF (rh(i, k)>90.) RH_num(i, k) = 11
     646      DELTA(i, k) = (rh(i, k) - RH_tab(RH_num(i, k))) * fact_RH(RH_num(i, k))
    648647    ENDDO
    649648  ENDDO
    650649
    651   used_aer(:)=.FALSE.
    652    
    653   DO m=1,nb_aer   ! tau is only computed for each mass
    654     fac=1.0
    655      IF (aerosol_name(m)==id_ASBCM_phy) THEN
    656          soluble=.TRUE.
    657          spsol=1
    658          spss=0
    659      ELSEIF (aerosol_name(m)==id_ASPOMM_phy) THEN
    660         soluble=.TRUE.
    661         spsol=2
    662         spss=0
    663      ELSEIF (aerosol_name(m)==id_ASSO4M_phy) THEN
    664         soluble=.TRUE.
    665         spsol=3
    666         spss=0
    667         fac=1.375    ! (NH4)2-SO4/SO4 132/96 mass conversion factor for OD
    668      ELSEIF  (aerosol_name(m)==id_CSSO4M_phy) THEN
    669         soluble=.TRUE.
    670         spsol=4
    671         spss=0
    672         fac=1.375    ! (NH4)2-SO4/SO4 132/96 mass conversion factor for OD
    673      ELSEIF (aerosol_name(m)==id_SSSSM_phy) THEN
    674          soluble=.TRUE.
    675          spsol=5
    676          spss=3
    677      ELSEIF (aerosol_name(m)==id_CSSSM_phy) THEN
    678          soluble=.TRUE.
    679          spsol=6
    680          spss=2
    681      ELSEIF (aerosol_name(m)==id_ASSSM_phy) THEN
    682          soluble=.TRUE.
    683          spsol=7
    684          spss=1
    685      ELSEIF (aerosol_name(m)==id_CIDUSTM_phy) THEN
    686          soluble=.FALSE.
    687          spinsol=1
    688          spss=0
    689      ELSEIF  (aerosol_name(m)==id_AIBCM_phy) THEN
    690          soluble=.FALSE.
    691          spinsol=2
    692          spss=0
    693      ELSEIF (aerosol_name(m)==id_AIPOMM_phy) THEN
    694          soluble=.FALSE.
    695          spinsol=3
    696          spss=0
    697      ELSE
    698          CYCLE
    699      ENDIF
    700 
    701     id=aerosol_name(m)
    702     used_aer(id)=.TRUE.
     650  used_aer(:) = .FALSE.
     651
     652  DO m = 1, nb_aer   ! tau is only computed for each mass
     653    fac = 1.0
     654    IF (aerosol_name(m)==id_ASBCM_phy) THEN
     655      soluble = .TRUE.
     656      spsol = 1
     657      spss = 0
     658    ELSEIF (aerosol_name(m)==id_ASPOMM_phy) THEN
     659      soluble = .TRUE.
     660      spsol = 2
     661      spss = 0
     662    ELSEIF (aerosol_name(m)==id_ASSO4M_phy) THEN
     663      soluble = .TRUE.
     664      spsol = 3
     665      spss = 0
     666      fac = 1.375    ! (NH4)2-SO4/SO4 132/96 mass conversion factor for OD
     667    ELSEIF  (aerosol_name(m)==id_CSSO4M_phy) THEN
     668      soluble = .TRUE.
     669      spsol = 4
     670      spss = 0
     671      fac = 1.375    ! (NH4)2-SO4/SO4 132/96 mass conversion factor for OD
     672    ELSEIF (aerosol_name(m)==id_SSSSM_phy) THEN
     673      soluble = .TRUE.
     674      spsol = 5
     675      spss = 3
     676    ELSEIF (aerosol_name(m)==id_CSSSM_phy) THEN
     677      soluble = .TRUE.
     678      spsol = 6
     679      spss = 2
     680    ELSEIF (aerosol_name(m)==id_ASSSM_phy) THEN
     681      soluble = .TRUE.
     682      spsol = 7
     683      spss = 1
     684    ELSEIF (aerosol_name(m)==id_CIDUSTM_phy) THEN
     685      soluble = .FALSE.
     686      spinsol = 1
     687      spss = 0
     688    ELSEIF  (aerosol_name(m)==id_AIBCM_phy) THEN
     689      soluble = .FALSE.
     690      spinsol = 2
     691      spss = 0
     692    ELSEIF (aerosol_name(m)==id_AIPOMM_phy) THEN
     693      soluble = .FALSE.
     694      spinsol = 3
     695      spss = 0
     696    ELSE
     697      CYCLE
     698    ENDIF
     699
     700    id = aerosol_name(m)
     701    used_aer(id) = .TRUE.
    703702
    704703    IF (soluble) THEN
     
    706705      IF (spss/=0) THEN
    707706
    708          IF (spss==1) THEN !accumulation mode
    709             DO k=1, KLEV
    710 !CDIR ON_ADB(A1_ASSSM_b1)
    711 !CDIR ON_ADB(A2_ASSSM_b1)
    712 !CDIR ON_ADB(A3_ASSSM_b1)
    713 !CDIR ON_ADB(B1_ASSSM_b1)
    714 !CDIR ON_ADB(B2_ASSSM_b1)
    715 !CDIR ON_ADB(C1_ASSSM_b1)
    716 !CDIR ON_ADB(C2_ASSSM_b2)
    717 !CDIR ON_ADB(A1_ASSSM_b2)
    718 !CDIR ON_ADB(A2_ASSSM_b2)
    719 !CDIR ON_ADB(A3_ASSSM_b2)
    720 !CDIR ON_ADB(B1_ASSSM_b2)
    721 !CDIR ON_ADB(B2_ASSSM_b2)
    722 !CDIR ON_ADB(C1_ASSSM_b2)
    723 !CDIR ON_ADB(C2_ASSSM_b2)
    724 
    725               DO i=1, KLON
    726 
    727                 H=rh(i,k)/100
    728                 tmp_var=m_allaer(i,k,spsol)/1.e6*zdh(i,k)*fac
    729                 tmp_var_pi=m_allaer_pi(i,k,spsol)/1.e6*zdh(i,k)*fac
    730 
    731                 ! band 1
    732                 tau_ae2b_int=A1_ASSSM_b1(k)+A2_ASSSM_b1(k)*H+A3_ASSSM_b1(k)/(H-1.05)
    733                 piz_ae2b_int=1-B1_ASSSM_b1(k)-B2_ASSSM_b1(k)*H
    734                 cg_ae2b_int=C1_ASSSM_b1(k)+C2_ASSSM_b1(k)*H
    735 
    736                 tau_ae(i,k,id,1) = tmp_var*tau_ae2b_int
    737                 tau_ae_pi(i,k,id,1) =  tmp_var_pi* tau_ae2b_int
    738                 piz_ae(i,k,id,1) = piz_ae2b_int
    739                 cg_ae(i,k,id,1)= cg_ae2b_int
    740                
    741                 !band 2
    742                 tau_ae2b_int=A1_ASSSM_b2(k)+A2_ASSSM_b2(k)*H+A3_ASSSM_b2(k)/(H-1.05)
    743                 piz_ae2b_int=1-B1_ASSSM_b2(k)-B2_ASSSM_b2(k)*H
    744                 cg_ae2b_int=C1_ASSSM_b2(k)+C2_ASSSM_b2(k)*H
    745 
    746                 tau_ae(i,k,id,2) = tmp_var*tau_ae2b_int
    747                 tau_ae_pi(i,k,id,2) =  tmp_var_pi* tau_ae2b_int
    748                 piz_ae(i,k,id,2) = piz_ae2b_int
    749                 cg_ae(i,k,id,2)= cg_ae2b_int
    750 
    751               ENDDO
     707        IF (spss==1) THEN !accumulation mode
     708          DO k = 1, KLEV
     709            !CDIR ON_ADB(A1_ASSSM_b1)
     710            !CDIR ON_ADB(A2_ASSSM_b1)
     711            !CDIR ON_ADB(A3_ASSSM_b1)
     712            !CDIR ON_ADB(B1_ASSSM_b1)
     713            !CDIR ON_ADB(B2_ASSSM_b1)
     714            !CDIR ON_ADB(C1_ASSSM_b1)
     715            !CDIR ON_ADB(C2_ASSSM_b2)
     716            !CDIR ON_ADB(A1_ASSSM_b2)
     717            !CDIR ON_ADB(A2_ASSSM_b2)
     718            !CDIR ON_ADB(A3_ASSSM_b2)
     719            !CDIR ON_ADB(B1_ASSSM_b2)
     720            !CDIR ON_ADB(B2_ASSSM_b2)
     721            !CDIR ON_ADB(C1_ASSSM_b2)
     722            !CDIR ON_ADB(C2_ASSSM_b2)
     723
     724            DO i = 1, KLON
     725
     726              H = rh(i, k) / 100
     727              tmp_var = m_allaer(i, k, spsol) / 1.e6 * zdh(i, k) * fac
     728              tmp_var_pi = m_allaer_pi(i, k, spsol) / 1.e6 * zdh(i, k) * fac
     729
     730              ! band 1
     731              tau_ae2b_int = A1_ASSSM_b1(k) + A2_ASSSM_b1(k) * H + A3_ASSSM_b1(k) / (H - 1.05)
     732              piz_ae2b_int = 1 - B1_ASSSM_b1(k) - B2_ASSSM_b1(k) * H
     733              cg_ae2b_int = C1_ASSSM_b1(k) + C2_ASSSM_b1(k) * H
     734
     735              tau_ae(i, k, id, 1) = tmp_var * tau_ae2b_int
     736              tau_ae_pi(i, k, id, 1) = tmp_var_pi * tau_ae2b_int
     737              piz_ae(i, k, id, 1) = piz_ae2b_int
     738              cg_ae(i, k, id, 1) = cg_ae2b_int
     739
     740              !band 2
     741              tau_ae2b_int = A1_ASSSM_b2(k) + A2_ASSSM_b2(k) * H + A3_ASSSM_b2(k) / (H - 1.05)
     742              piz_ae2b_int = 1 - B1_ASSSM_b2(k) - B2_ASSSM_b2(k) * H
     743              cg_ae2b_int = C1_ASSSM_b2(k) + C2_ASSSM_b2(k) * H
     744
     745              tau_ae(i, k, id, 2) = tmp_var * tau_ae2b_int
     746              tau_ae_pi(i, k, id, 2) = tmp_var_pi * tau_ae2b_int
     747              piz_ae(i, k, id, 2) = piz_ae2b_int
     748              cg_ae(i, k, id, 2) = cg_ae2b_int
     749
    752750            ENDDO
    753           ENDIF
    754 
    755           IF (spss==2) THEN !coarse mode
    756             DO k=1, KLEV
    757 !CDIR ON_ADB(A1_CSSSM_b1)
    758 !CDIR ON_ADB(A2_CSSSM_b1)
    759 !CDIR ON_ADB(A3_CSSSM_b1)
    760 !CDIR ON_ADB(B1_CSSSM_b1)
    761 !CDIR ON_ADB(B2_CSSSM_b1)
    762 !CDIR ON_ADB(C1_CSSSM_b1)
    763 !CDIR ON_ADB(C2_CSSSM_b2)
    764 !CDIR ON_ADB(A1_CSSSM_b2)
    765 !CDIR ON_ADB(A2_CSSSM_b2)
    766 !CDIR ON_ADB(A3_CSSSM_b2)
    767 !CDIR ON_ADB(B1_CSSSM_b2)
    768 !CDIR ON_ADB(B2_CSSSM_b2)
    769 !CDIR ON_ADB(C1_CSSSM_b2)
    770 !CDIR ON_ADB(C2_CSSSM_b2)
    771 
    772               DO i=1, KLON
    773 
    774                 H=rh(i,k)/100
    775                 tmp_var=m_allaer(i,k,spsol)/1.e6*zdh(i,k)*fac
    776                 tmp_var_pi=m_allaer_pi(i,k,spsol)/1.e6*zdh(i,k)*fac
    777                 ! band 1
    778                 tau_ae2b_int=A1_CSSSM_b1(k)+A2_CSSSM_b1(k)*H+A3_CSSSM_b1(k)/(H-1.05)
    779                 piz_ae2b_int=1-B1_CSSSM_b1(k)-B2_CSSSM_b1(k)*H
    780                 cg_ae2b_int=C1_CSSSM_b1(k)+C2_CSSSM_b1(k)*H
    781 
    782                 tau_ae(i,k,id,1) = tmp_var*tau_ae2b_int
    783                 tau_ae_pi(i,k,id,1) =  tmp_var_pi* tau_ae2b_int
    784                 piz_ae(i,k,id,1) = piz_ae2b_int
    785                 cg_ae(i,k,id,1)= cg_ae2b_int
    786 
    787                 ! band 2
    788                 tau_ae2b_int=A1_CSSSM_b2(k)+A2_CSSSM_b2(k)*H+A3_CSSSM_b2(k)/(H-1.05)
    789                 piz_ae2b_int=1-B1_CSSSM_b2(k)-B2_CSSSM_b2(k)*H
    790                 cg_ae2b_int=C1_CSSSM_b2(k)+C2_CSSSM_b2(k)*H
    791 
    792                 tau_ae(i,k,id,2) = tmp_var*tau_ae2b_int
    793                 tau_ae_pi(i,k,id,2) =  tmp_var_pi* tau_ae2b_int
    794                 piz_ae(i,k,id,2) = piz_ae2b_int
    795                 cg_ae(i,k,id,2)= cg_ae2b_int
    796 
    797              ENDDO
    798            ENDDO
    799          ENDIF
    800 
    801          IF (spss==3) THEN !super coarse mode
    802             DO k=1, KLEV
    803 !CDIR ON_ADB(A1_SSSSM_b1)
    804 !CDIR ON_ADB(A2_SSSSM_b1)
    805 !CDIR ON_ADB(A3_SSSSM_b1)
    806 !CDIR ON_ADB(B1_SSSSM_b1)
    807 !CDIR ON_ADB(B2_SSSSM_b1)
    808 !CDIR ON_ADB(C1_SSSSM_b1)
    809 !CDIR ON_ADB(C2_SSSSM_b2)
    810 !CDIR ON_ADB(A1_SSSSM_b2)
    811 !CDIR ON_ADB(A2_SSSSM_b2)
    812 !CDIR ON_ADB(A3_SSSSM_b2)
    813 !CDIR ON_ADB(B1_SSSSM_b2)
    814 !CDIR ON_ADB(B2_SSSSM_b2)
    815 !CDIR ON_ADB(C1_SSSSM_b2)
    816 !CDIR ON_ADB(C2_SSSSM_b2)
    817 
    818               DO i=1, KLON
    819 
    820                 H=rh(i,k)/100
    821                 tmp_var=m_allaer(i,k,spsol)/1.e6*zdh(i,k)*fac
    822                 tmp_var_pi=m_allaer_pi(i,k,spsol)/1.e6*zdh(i,k)*fac
    823 
    824                 ! band 1
    825                 tau_ae2b_int=A1_SSSSM_b1(k)+A2_SSSSM_b1(k)*H+A3_SSSSM_b1(k)/(H-1.05)
    826                 piz_ae2b_int=1-B1_SSSSM_b1(k)-B2_SSSSM_b1(k)*H
    827                 cg_ae2b_int=C1_SSSSM_b1(k)+C2_SSSSM_b1(k)*H
    828 
    829                 tau_ae(i,k,id,1) = tmp_var*tau_ae2b_int
    830                 tau_ae_pi(i,k,id,1) =  tmp_var_pi* tau_ae2b_int
    831                 piz_ae(i,k,id,1) = piz_ae2b_int
    832                 cg_ae(i,k,id,1)= cg_ae2b_int
    833 
    834                 ! band 2
    835                 tau_ae2b_int=A1_SSSSM_b2(k)+A2_SSSSM_b2(k)*H+A3_SSSSM_b2(k)/(H-1.05)
    836                 piz_ae2b_int=1-B1_SSSSM_b2(k)-B2_SSSSM_b2(k)*H
    837                 cg_ae2b_int=C1_SSSSM_b2(k)+C2_SSSSM_b2(k)*H
    838 
    839                 tau_ae(i,k,id,2) = tmp_var*tau_ae2b_int
    840                 tau_ae_pi(i,k,id,2) =  tmp_var_pi* tau_ae2b_int
    841                 piz_ae(i,k,id,2) = piz_ae2b_int
    842                 cg_ae(i,k,id,2)= cg_ae2b_int
    843 
    844               ENDDO
     751          ENDDO
     752        ENDIF
     753
     754        IF (spss==2) THEN !coarse mode
     755          DO k = 1, KLEV
     756            !CDIR ON_ADB(A1_CSSSM_b1)
     757            !CDIR ON_ADB(A2_CSSSM_b1)
     758            !CDIR ON_ADB(A3_CSSSM_b1)
     759            !CDIR ON_ADB(B1_CSSSM_b1)
     760            !CDIR ON_ADB(B2_CSSSM_b1)
     761            !CDIR ON_ADB(C1_CSSSM_b1)
     762            !CDIR ON_ADB(C2_CSSSM_b2)
     763            !CDIR ON_ADB(A1_CSSSM_b2)
     764            !CDIR ON_ADB(A2_CSSSM_b2)
     765            !CDIR ON_ADB(A3_CSSSM_b2)
     766            !CDIR ON_ADB(B1_CSSSM_b2)
     767            !CDIR ON_ADB(B2_CSSSM_b2)
     768            !CDIR ON_ADB(C1_CSSSM_b2)
     769            !CDIR ON_ADB(C2_CSSSM_b2)
     770
     771            DO i = 1, KLON
     772
     773              H = rh(i, k) / 100
     774              tmp_var = m_allaer(i, k, spsol) / 1.e6 * zdh(i, k) * fac
     775              tmp_var_pi = m_allaer_pi(i, k, spsol) / 1.e6 * zdh(i, k) * fac
     776              ! band 1
     777              tau_ae2b_int = A1_CSSSM_b1(k) + A2_CSSSM_b1(k) * H + A3_CSSSM_b1(k) / (H - 1.05)
     778              piz_ae2b_int = 1 - B1_CSSSM_b1(k) - B2_CSSSM_b1(k) * H
     779              cg_ae2b_int = C1_CSSSM_b1(k) + C2_CSSSM_b1(k) * H
     780
     781              tau_ae(i, k, id, 1) = tmp_var * tau_ae2b_int
     782              tau_ae_pi(i, k, id, 1) = tmp_var_pi * tau_ae2b_int
     783              piz_ae(i, k, id, 1) = piz_ae2b_int
     784              cg_ae(i, k, id, 1) = cg_ae2b_int
     785
     786              ! band 2
     787              tau_ae2b_int = A1_CSSSM_b2(k) + A2_CSSSM_b2(k) * H + A3_CSSSM_b2(k) / (H - 1.05)
     788              piz_ae2b_int = 1 - B1_CSSSM_b2(k) - B2_CSSSM_b2(k) * H
     789              cg_ae2b_int = C1_CSSSM_b2(k) + C2_CSSSM_b2(k) * H
     790
     791              tau_ae(i, k, id, 2) = tmp_var * tau_ae2b_int
     792              tau_ae_pi(i, k, id, 2) = tmp_var_pi * tau_ae2b_int
     793              piz_ae(i, k, id, 2) = piz_ae2b_int
     794              cg_ae(i, k, id, 2) = cg_ae2b_int
     795
    845796            ENDDO
    846           ENDIF
    847 
    848         ELSE
    849                        
    850 !CDIR ON_ADB(alpha_aers_2bands)
    851 !CDIR ON_ADB(piz_aers_2bands)
    852 !CDIR ON_ADB(cg_aers_2bands)
    853           DO k=1, KLEV
    854             DO i=1, KLON
    855               tmp_var=m_allaer(i,k,spsol)/1.e6*zdh(i,k)*fac
    856               tmp_var_pi=m_allaer_pi(i,k,spsol)/1.e6*zdh(i,k)*fac
    857 !CDIR UNROLL=nbands
    858               DO inu=1,nbands
    859 
    860                 tau_ae2b_int= alpha_aers_2bands(RH_num(i,k),inu,spsol)+ &
    861                               DELTA(i,k)* (alpha_aers_2bands(RH_num(i,k)+1,inu,spsol) - &
    862                               alpha_aers_2bands(RH_num(i,k),inu,spsol))
    863                      
    864                 piz_ae2b_int = piz_aers_2bands(RH_num(i,k),inu,spsol) + &
    865                                DELTA(i,k)* (piz_aers_2bands(RH_num(i,k)+1,inu,spsol) - &
    866                                piz_aers_2bands(RH_num(i,k),inu,spsol))
    867                      
    868                 cg_ae2b_int = cg_aers_2bands(RH_num(i,k),inu,spsol) + &
    869                               DELTA(i,k)* (cg_aers_2bands(RH_num(i,k)+1,inu,spsol) - &
    870                               cg_aers_2bands(RH_num(i,k),inu,spsol))
    871 
    872                 tau_ae(i,k,id,inu) = tmp_var*tau_ae2b_int
    873                 tau_ae_pi(i,k,id,inu) =  tmp_var_pi* tau_ae2b_int
    874                 piz_ae(i,k,id,inu) = piz_ae2b_int
    875                 cg_ae(i,k,id,inu)= cg_ae2b_int
    876                          
    877               ENDDO
     797          ENDDO
     798        ENDIF
     799
     800        IF (spss==3) THEN !super coarse mode
     801          DO k = 1, KLEV
     802            !CDIR ON_ADB(A1_SSSSM_b1)
     803            !CDIR ON_ADB(A2_SSSSM_b1)
     804            !CDIR ON_ADB(A3_SSSSM_b1)
     805            !CDIR ON_ADB(B1_SSSSM_b1)
     806            !CDIR ON_ADB(B2_SSSSM_b1)
     807            !CDIR ON_ADB(C1_SSSSM_b1)
     808            !CDIR ON_ADB(C2_SSSSM_b2)
     809            !CDIR ON_ADB(A1_SSSSM_b2)
     810            !CDIR ON_ADB(A2_SSSSM_b2)
     811            !CDIR ON_ADB(A3_SSSSM_b2)
     812            !CDIR ON_ADB(B1_SSSSM_b2)
     813            !CDIR ON_ADB(B2_SSSSM_b2)
     814            !CDIR ON_ADB(C1_SSSSM_b2)
     815            !CDIR ON_ADB(C2_SSSSM_b2)
     816
     817            DO i = 1, KLON
     818
     819              H = rh(i, k) / 100
     820              tmp_var = m_allaer(i, k, spsol) / 1.e6 * zdh(i, k) * fac
     821              tmp_var_pi = m_allaer_pi(i, k, spsol) / 1.e6 * zdh(i, k) * fac
     822
     823              ! band 1
     824              tau_ae2b_int = A1_SSSSM_b1(k) + A2_SSSSM_b1(k) * H + A3_SSSSM_b1(k) / (H - 1.05)
     825              piz_ae2b_int = 1 - B1_SSSSM_b1(k) - B2_SSSSM_b1(k) * H
     826              cg_ae2b_int = C1_SSSSM_b1(k) + C2_SSSSM_b1(k) * H
     827
     828              tau_ae(i, k, id, 1) = tmp_var * tau_ae2b_int
     829              tau_ae_pi(i, k, id, 1) = tmp_var_pi * tau_ae2b_int
     830              piz_ae(i, k, id, 1) = piz_ae2b_int
     831              cg_ae(i, k, id, 1) = cg_ae2b_int
     832
     833              ! band 2
     834              tau_ae2b_int = A1_SSSSM_b2(k) + A2_SSSSM_b2(k) * H + A3_SSSSM_b2(k) / (H - 1.05)
     835              piz_ae2b_int = 1 - B1_SSSSM_b2(k) - B2_SSSSM_b2(k) * H
     836              cg_ae2b_int = C1_SSSSM_b2(k) + C2_SSSSM_b2(k) * H
     837
     838              tau_ae(i, k, id, 2) = tmp_var * tau_ae2b_int
     839              tau_ae_pi(i, k, id, 2) = tmp_var_pi * tau_ae2b_int
     840              piz_ae(i, k, id, 2) = piz_ae2b_int
     841              cg_ae(i, k, id, 2) = cg_ae2b_int
     842
    878843            ENDDO
    879844          ENDDO
    880        
    881         ENDIF                     
    882 
    883       ELSE                                                    ! For all aerosol insoluble components
    884 
    885 !CDIR ON_ADB(alpha_aers_2bands)
    886 !CDIR ON_ADB(piz_aers_2bands)
    887 !CDIR ON_ADB(cg_aers_2bands)
    888         DO k=1, KLEV
    889           DO i=1, KLON
    890             tmp_var=m_allaer(i,k,naero_soluble+spinsol)/1.e6*zdh(i,k)*fac
    891             tmp_var_pi=m_allaer_pi(i,k,naero_soluble+spinsol)/1.e6*zdh(i,k)*fac
    892 !CDIR UNROLL=nbands
    893             DO inu=1,nbands
    894               tau_ae2b_int = alpha_aeri_2bands(inu,spinsol)
    895               piz_ae2b_int = piz_aeri_2bands(inu,spinsol)
    896               cg_ae2b_int = cg_aeri_2bands(inu,spinsol)
    897 
    898               tau_ae(i,k,id,inu) = tmp_var*tau_ae2b_int
    899               tau_ae_pi(i,k,id,inu) = tmp_var_pi*tau_ae2b_int
    900               piz_ae(i,k,id,inu) = piz_ae2b_int
    901               cg_ae(i,k,id,inu)= cg_ae2b_int
     845        ENDIF
     846
     847      ELSE
     848
     849        !CDIR ON_ADB(alpha_aers_2bands)
     850        !CDIR ON_ADB(piz_aers_2bands)
     851        !CDIR ON_ADB(cg_aers_2bands)
     852        DO k = 1, KLEV
     853          DO i = 1, KLON
     854            tmp_var = m_allaer(i, k, spsol) / 1.e6 * zdh(i, k) * fac
     855            tmp_var_pi = m_allaer_pi(i, k, spsol) / 1.e6 * zdh(i, k) * fac
     856            !CDIR UNROLL=nbands
     857            DO inu = 1, nbands
     858
     859              tau_ae2b_int = alpha_aers_2bands(RH_num(i, k), inu, spsol) + &
     860                      DELTA(i, k) * (alpha_aers_2bands(RH_num(i, k) + 1, inu, spsol) - &
     861                              alpha_aers_2bands(RH_num(i, k), inu, spsol))
     862
     863              piz_ae2b_int = piz_aers_2bands(RH_num(i, k), inu, spsol) + &
     864                      DELTA(i, k) * (piz_aers_2bands(RH_num(i, k) + 1, inu, spsol) - &
     865                              piz_aers_2bands(RH_num(i, k), inu, spsol))
     866
     867              cg_ae2b_int = cg_aers_2bands(RH_num(i, k), inu, spsol) + &
     868                      DELTA(i, k) * (cg_aers_2bands(RH_num(i, k) + 1, inu, spsol) - &
     869                              cg_aers_2bands(RH_num(i, k), inu, spsol))
     870
     871              tau_ae(i, k, id, inu) = tmp_var * tau_ae2b_int
     872              tau_ae_pi(i, k, id, inu) = tmp_var_pi * tau_ae2b_int
     873              piz_ae(i, k, id, inu) = piz_ae2b_int
     874              cg_ae(i, k, id, inu) = cg_ae2b_int
     875
    902876            ENDDO
    903877          ENDDO
    904878        ENDDO
    905879
    906       ENDIF ! soluble
    907 
    908     ENDDO  ! nb_aer 
    909 
    910 !correction bug OB
    911 !  DO m=1,nb_aer   
    912   DO m=1,naero_tot   
     880      ENDIF
     881
     882    ELSE                                                    ! For all aerosol insoluble components
     883
     884      !CDIR ON_ADB(alpha_aers_2bands)
     885      !CDIR ON_ADB(piz_aers_2bands)
     886      !CDIR ON_ADB(cg_aers_2bands)
     887      DO k = 1, KLEV
     888        DO i = 1, KLON
     889          tmp_var = m_allaer(i, k, naero_soluble + spinsol) / 1.e6 * zdh(i, k) * fac
     890          tmp_var_pi = m_allaer_pi(i, k, naero_soluble + spinsol) / 1.e6 * zdh(i, k) * fac
     891          !CDIR UNROLL=nbands
     892          DO inu = 1, nbands
     893            tau_ae2b_int = alpha_aeri_2bands(inu, spinsol)
     894            piz_ae2b_int = piz_aeri_2bands(inu, spinsol)
     895            cg_ae2b_int = cg_aeri_2bands(inu, spinsol)
     896
     897            tau_ae(i, k, id, inu) = tmp_var * tau_ae2b_int
     898            tau_ae_pi(i, k, id, inu) = tmp_var_pi * tau_ae2b_int
     899            piz_ae(i, k, id, inu) = piz_ae2b_int
     900            cg_ae(i, k, id, inu) = cg_ae2b_int
     901          ENDDO
     902        ENDDO
     903      ENDDO
     904
     905    ENDIF ! soluble
     906
     907  ENDDO  ! nb_aer
     908
     909  !correction bug OB
     910  !  DO m=1,nb_aer
     911  DO m = 1, naero_tot
    913912    IF (.NOT. used_aer(m)) THEN
    914       tau_ae(:,:,m,:)=0.
    915       tau_ae_pi(:,:,m,:)=0.
    916       piz_ae(:,:,m,:)=0.
    917       cg_ae(:,:,m,:)=0.
     913      tau_ae(:, :, m, :) = 0.
     914      tau_ae_pi(:, :, m, :) = 0.
     915      piz_ae(:, :, m, :) = 0.
     916      cg_ae(:, :, m, :) = 0.
    918917    ENDIF
    919918  ENDDO
    920919
    921   DO inu=1, nbands
     920  DO inu = 1, nbands
    922921
    923922    !!DO mrfspecies=1,naero_grp
    924     DO mrfspecies=2,3    !--only deal with total and natural aerosols
     923    DO mrfspecies = 2, 3    !--only deal with total and natural aerosols
    925924
    926925      IF (mrfspecies == 2) THEN             ! = total aerosol AER
    927926
    928         DO k=1, KLEV
    929           DO i=1, KLON
    930             tau_allaer(i,k,mrfspecies,inu)=tau_ae(i,k,id_ASSO4M_phy,inu)+tau_ae(i,k,id_CSSO4M_phy,inu)+ &
    931                                            tau_ae(i,k,id_ASBCM_phy,inu)+tau_ae(i,k,id_AIBCM_phy,inu)+  &
    932                                            tau_ae(i,k,id_ASPOMM_phy,inu)+tau_ae(i,k,id_AIPOMM_phy,inu)+ &
    933                                            tau_ae(i,k,id_ASSSM_phy,inu)+tau_ae(i,k,id_CSSSM_phy,inu)+  &
    934                                            tau_ae(i,k,id_SSSSM_phy,inu)+ tau_ae(i,k,id_CIDUSTM_phy,inu)
    935             tau_allaer(i,k,mrfspecies,inu)=MAX(tau_allaer(i,k,mrfspecies,inu),1e-5)
    936                  
    937             piz_allaer(i,k,mrfspecies,inu)=(tau_ae(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)+ &
    938                                             tau_ae(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)+ &
    939                                             tau_ae(i,k,id_ASBCM_phy,inu)*piz_ae(i,k,id_ASBCM_phy,inu)+  &
    940                                             tau_ae(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)+  &
    941                                             tau_ae(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)+ &
    942                                             tau_ae(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)+ &
    943                                             tau_ae(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)+  &
    944                                             tau_ae(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)+  &
    945                                             tau_ae(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)+  &
    946                                             tau_ae(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)) &
    947                                             /tau_allaer(i,k,mrfspecies,inu)
    948             piz_allaer(i,k,mrfspecies,inu)=MAX(piz_allaer(i,k,mrfspecies,inu),0.1)
    949 
    950             cg_allaer(i,k,mrfspecies,inu)=(tau_ae(i,k,id_ASSO4M_phy,inu)* &
    951               piz_ae(i,k,id_ASSO4M_phy,inu)*cg_ae(i,k,id_ASSO4M_phy,inu)+ &
    952               tau_ae(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)* &
    953               cg_ae(i,k,id_CSSO4M_phy,inu)+ &
    954               tau_ae(i,k,id_ASBCM_phy,inu)*piz_ae(i,k,id_ASBCM_phy,inu)* &
    955               cg_ae(i,k,id_ASBCM_phy,inu)+ &
    956               tau_ae(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)* &
    957               cg_ae(i,k,id_AIBCM_phy,inu)+ &
    958               tau_ae(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)* &
    959               cg_ae(i,k,id_ASPOMM_phy,inu)+ &
    960               tau_ae(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)* &
    961               cg_ae(i,k,id_AIPOMM_phy,inu)+ &
    962               tau_ae(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)* &
    963               cg_ae(i,k,id_ASSSM_phy,inu)+ &
    964               tau_ae(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)* &
    965               cg_ae(i,k,id_CSSSM_phy,inu)+ &
    966               tau_ae(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)* &
    967               cg_ae(i,k,id_SSSSM_phy,inu)+ &
    968               tau_ae(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)* &
    969               cg_ae(i,k,id_CIDUSTM_phy,inu))/ &
    970               (tau_allaer(i,k,mrfspecies,inu)*piz_allaer(i,k,mrfspecies,inu))
    971           ENDDO   
    972         ENDDO 
     927        DO k = 1, KLEV
     928          DO i = 1, KLON
     929            tau_allaer(i, k, mrfspecies, inu) = tau_ae(i, k, id_ASSO4M_phy, inu) + tau_ae(i, k, id_CSSO4M_phy, inu) + &
     930                    tau_ae(i, k, id_ASBCM_phy, inu) + tau_ae(i, k, id_AIBCM_phy, inu) + &
     931                    tau_ae(i, k, id_ASPOMM_phy, inu) + tau_ae(i, k, id_AIPOMM_phy, inu) + &
     932                    tau_ae(i, k, id_ASSSM_phy, inu) + tau_ae(i, k, id_CSSSM_phy, inu) + &
     933                    tau_ae(i, k, id_SSSSM_phy, inu) + tau_ae(i, k, id_CIDUSTM_phy, inu)
     934            tau_allaer(i, k, mrfspecies, inu) = MAX(tau_allaer(i, k, mrfspecies, inu), 1e-5)
     935
     936            piz_allaer(i, k, mrfspecies, inu) = (tau_ae(i, k, id_ASSO4M_phy, inu) * piz_ae(i, k, id_ASSO4M_phy, inu) + &
     937                    tau_ae(i, k, id_CSSO4M_phy, inu) * piz_ae(i, k, id_CSSO4M_phy, inu) + &
     938                    tau_ae(i, k, id_ASBCM_phy, inu) * piz_ae(i, k, id_ASBCM_phy, inu) + &
     939                    tau_ae(i, k, id_AIBCM_phy, inu) * piz_ae(i, k, id_AIBCM_phy, inu) + &
     940                    tau_ae(i, k, id_ASPOMM_phy, inu) * piz_ae(i, k, id_ASPOMM_phy, inu) + &
     941                    tau_ae(i, k, id_AIPOMM_phy, inu) * piz_ae(i, k, id_AIPOMM_phy, inu) + &
     942                    tau_ae(i, k, id_ASSSM_phy, inu) * piz_ae(i, k, id_ASSSM_phy, inu) + &
     943                    tau_ae(i, k, id_CSSSM_phy, inu) * piz_ae(i, k, id_CSSSM_phy, inu) + &
     944                    tau_ae(i, k, id_SSSSM_phy, inu) * piz_ae(i, k, id_SSSSM_phy, inu) + &
     945                    tau_ae(i, k, id_CIDUSTM_phy, inu) * piz_ae(i, k, id_CIDUSTM_phy, inu)) &
     946                    / tau_allaer(i, k, mrfspecies, inu)
     947            piz_allaer(i, k, mrfspecies, inu) = MAX(piz_allaer(i, k, mrfspecies, inu), 0.1)
     948
     949            cg_allaer(i, k, mrfspecies, inu) = (tau_ae(i, k, id_ASSO4M_phy, inu) * &
     950                    piz_ae(i, k, id_ASSO4M_phy, inu) * cg_ae(i, k, id_ASSO4M_phy, inu) + &
     951                    tau_ae(i, k, id_CSSO4M_phy, inu) * piz_ae(i, k, id_CSSO4M_phy, inu) * &
     952                            cg_ae(i, k, id_CSSO4M_phy, inu) + &
     953                    tau_ae(i, k, id_ASBCM_phy, inu) * piz_ae(i, k, id_ASBCM_phy, inu) * &
     954                            cg_ae(i, k, id_ASBCM_phy, inu) + &
     955                    tau_ae(i, k, id_AIBCM_phy, inu) * piz_ae(i, k, id_AIBCM_phy, inu) * &
     956                            cg_ae(i, k, id_AIBCM_phy, inu) + &
     957                    tau_ae(i, k, id_ASPOMM_phy, inu) * piz_ae(i, k, id_ASPOMM_phy, inu) * &
     958                            cg_ae(i, k, id_ASPOMM_phy, inu) + &
     959                    tau_ae(i, k, id_AIPOMM_phy, inu) * piz_ae(i, k, id_AIPOMM_phy, inu) * &
     960                            cg_ae(i, k, id_AIPOMM_phy, inu) + &
     961                    tau_ae(i, k, id_ASSSM_phy, inu) * piz_ae(i, k, id_ASSSM_phy, inu) * &
     962                            cg_ae(i, k, id_ASSSM_phy, inu) + &
     963                    tau_ae(i, k, id_CSSSM_phy, inu) * piz_ae(i, k, id_CSSSM_phy, inu) * &
     964                            cg_ae(i, k, id_CSSSM_phy, inu) + &
     965                    tau_ae(i, k, id_SSSSM_phy, inu) * piz_ae(i, k, id_SSSSM_phy, inu) * &
     966                            cg_ae(i, k, id_SSSSM_phy, inu) + &
     967                    tau_ae(i, k, id_CIDUSTM_phy, inu) * piz_ae(i, k, id_CIDUSTM_phy, inu) * &
     968                            cg_ae(i, k, id_CIDUSTM_phy, inu)) / &
     969                    (tau_allaer(i, k, mrfspecies, inu) * piz_allaer(i, k, mrfspecies, inu))
     970          ENDDO
     971        ENDDO
    973972
    974973      ELSEIF (mrfspecies == 3) THEN             ! = natural aerosol NAT
    975974
    976         DO k=1, KLEV
    977           DO i=1, KLON
    978 
    979               tau_allaer(i,k,mrfspecies,inu)=tau_ae_pi(i,k,id_ASSO4M_phy,inu)+ &
    980                       tau_ae_pi(i,k,id_CSSO4M_phy,inu)+ &
    981                       tau_ae_pi(i,k,id_ASBCM_phy,inu)+ &
    982                       tau_ae_pi(i,k,id_AIBCM_phy,inu)+ &
    983                       tau_ae_pi(i,k,id_ASPOMM_phy,inu)+ &
    984                       tau_ae_pi(i,k,id_AIPOMM_phy,inu)+ &
    985                       tau_ae_pi(i,k,id_ASSSM_phy,inu)+ &
    986                       tau_ae_pi(i,k,id_CSSSM_phy,inu)+ &
    987                       tau_ae_pi(i,k,id_SSSSM_phy,inu)+ &
    988                       tau_ae_pi(i,k,id_CIDUSTM_phy,inu)
    989               tau_allaer(i,k,mrfspecies,inu)=MAX(tau_allaer(i,k,mrfspecies,inu),1e-5)
    990 
    991               piz_allaer(i,k,mrfspecies,inu)=(tau_ae_pi(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)+ &
    992                       tau_ae_pi(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)+ &
    993                       tau_ae_pi(i,k,id_ASBCM_phy,inu)*piz_ae(i,k,id_ASBCM_phy,inu)+  &
    994                       tau_ae_pi(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)+  &
    995                       tau_ae_pi(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)+ &
    996                       tau_ae_pi(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)+ &
    997                       tau_ae_pi(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)+  &
    998                       tau_ae_pi(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)+  &
    999                       tau_ae_pi(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)+  &
    1000                       tau_ae_pi(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)) &
    1001                       /tau_allaer(i,k,mrfspecies,inu)
    1002               piz_allaer(i,k,mrfspecies,inu)=MAX(piz_allaer(i,k,mrfspecies,inu),0.1)
    1003 
    1004               cg_allaer(i,k,mrfspecies,inu)=(&
    1005                       tau_ae_pi(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)*cg_ae(i,k,id_ASSO4M_phy,inu)+ &
    1006                       tau_ae_pi(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)*cg_ae(i,k,id_CSSO4M_phy,inu)+ &
    1007                       tau_ae_pi(i,k,id_ASBCM_phy,inu)*piz_ae(i,k,id_ASBCM_phy,inu)*cg_ae(i,k,id_ASBCM_phy,inu)+ &
    1008                       tau_ae_pi(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)*cg_ae(i,k,id_AIBCM_phy,inu)+ &
    1009                       tau_ae_pi(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)*cg_ae(i,k,id_ASPOMM_phy,inu)+ &
    1010                       tau_ae_pi(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)*cg_ae(i,k,id_AIPOMM_phy,inu)+ &
    1011                       tau_ae_pi(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)*cg_ae(i,k,id_ASSSM_phy,inu)+ &
    1012                       tau_ae_pi(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)*cg_ae(i,k,id_CSSSM_phy,inu)+ &
    1013                       tau_ae_pi(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)*cg_ae(i,k,id_SSSSM_phy,inu)+ &
    1014                       tau_ae_pi(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)*&
    1015                       cg_ae(i,k,id_CIDUSTM_phy,inu))/ &
    1016                       (tau_allaer(i,k,mrfspecies,inu)*piz_allaer(i,k,mrfspecies,inu))
     975        DO k = 1, KLEV
     976          DO i = 1, KLON
     977
     978            tau_allaer(i, k, mrfspecies, inu) = tau_ae_pi(i, k, id_ASSO4M_phy, inu) + &
     979                    tau_ae_pi(i, k, id_CSSO4M_phy, inu) + &
     980                    tau_ae_pi(i, k, id_ASBCM_phy, inu) + &
     981                    tau_ae_pi(i, k, id_AIBCM_phy, inu) + &
     982                    tau_ae_pi(i, k, id_ASPOMM_phy, inu) + &
     983                    tau_ae_pi(i, k, id_AIPOMM_phy, inu) + &
     984                    tau_ae_pi(i, k, id_ASSSM_phy, inu) + &
     985                    tau_ae_pi(i, k, id_CSSSM_phy, inu) + &
     986                    tau_ae_pi(i, k, id_SSSSM_phy, inu) + &
     987                    tau_ae_pi(i, k, id_CIDUSTM_phy, inu)
     988            tau_allaer(i, k, mrfspecies, inu) = MAX(tau_allaer(i, k, mrfspecies, inu), 1e-5)
     989
     990            piz_allaer(i, k, mrfspecies, inu) = (tau_ae_pi(i, k, id_ASSO4M_phy, inu) * piz_ae(i, k, id_ASSO4M_phy, inu) + &
     991                    tau_ae_pi(i, k, id_CSSO4M_phy, inu) * piz_ae(i, k, id_CSSO4M_phy, inu) + &
     992                    tau_ae_pi(i, k, id_ASBCM_phy, inu) * piz_ae(i, k, id_ASBCM_phy, inu) + &
     993                    tau_ae_pi(i, k, id_AIBCM_phy, inu) * piz_ae(i, k, id_AIBCM_phy, inu) + &
     994                    tau_ae_pi(i, k, id_ASPOMM_phy, inu) * piz_ae(i, k, id_ASPOMM_phy, inu) + &
     995                    tau_ae_pi(i, k, id_AIPOMM_phy, inu) * piz_ae(i, k, id_AIPOMM_phy, inu) + &
     996                    tau_ae_pi(i, k, id_ASSSM_phy, inu) * piz_ae(i, k, id_ASSSM_phy, inu) + &
     997                    tau_ae_pi(i, k, id_CSSSM_phy, inu) * piz_ae(i, k, id_CSSSM_phy, inu) + &
     998                    tau_ae_pi(i, k, id_SSSSM_phy, inu) * piz_ae(i, k, id_SSSSM_phy, inu) + &
     999                    tau_ae_pi(i, k, id_CIDUSTM_phy, inu) * piz_ae(i, k, id_CIDUSTM_phy, inu)) &
     1000                    / tau_allaer(i, k, mrfspecies, inu)
     1001            piz_allaer(i, k, mrfspecies, inu) = MAX(piz_allaer(i, k, mrfspecies, inu), 0.1)
     1002
     1003            cg_allaer(i, k, mrfspecies, inu) = (&
     1004                    tau_ae_pi(i, k, id_ASSO4M_phy, inu) * piz_ae(i, k, id_ASSO4M_phy, inu) * cg_ae(i, k, id_ASSO4M_phy, inu) + &
     1005                            tau_ae_pi(i, k, id_CSSO4M_phy, inu) * piz_ae(i, k, id_CSSO4M_phy, inu) * cg_ae(i, k, id_CSSO4M_phy, inu) + &
     1006                            tau_ae_pi(i, k, id_ASBCM_phy, inu) * piz_ae(i, k, id_ASBCM_phy, inu) * cg_ae(i, k, id_ASBCM_phy, inu) + &
     1007                            tau_ae_pi(i, k, id_AIBCM_phy, inu) * piz_ae(i, k, id_AIBCM_phy, inu) * cg_ae(i, k, id_AIBCM_phy, inu) + &
     1008                            tau_ae_pi(i, k, id_ASPOMM_phy, inu) * piz_ae(i, k, id_ASPOMM_phy, inu) * cg_ae(i, k, id_ASPOMM_phy, inu) + &
     1009                            tau_ae_pi(i, k, id_AIPOMM_phy, inu) * piz_ae(i, k, id_AIPOMM_phy, inu) * cg_ae(i, k, id_AIPOMM_phy, inu) + &
     1010                            tau_ae_pi(i, k, id_ASSSM_phy, inu) * piz_ae(i, k, id_ASSSM_phy, inu) * cg_ae(i, k, id_ASSSM_phy, inu) + &
     1011                            tau_ae_pi(i, k, id_CSSSM_phy, inu) * piz_ae(i, k, id_CSSSM_phy, inu) * cg_ae(i, k, id_CSSSM_phy, inu) + &
     1012                            tau_ae_pi(i, k, id_SSSSM_phy, inu) * piz_ae(i, k, id_SSSSM_phy, inu) * cg_ae(i, k, id_SSSSM_phy, inu) + &
     1013                            tau_ae_pi(i, k, id_CIDUSTM_phy, inu) * piz_ae(i, k, id_CIDUSTM_phy, inu) * &
     1014                                    cg_ae(i, k, id_CIDUSTM_phy, inu)) / &
     1015                    (tau_allaer(i, k, mrfspecies, inu) * piz_allaer(i, k, mrfspecies, inu))
    10171016          ENDDO
    10181017        ENDDO
    1019                    
     1018
    10201019      ELSEIF (mrfspecies == 4) THEN             ! = BC
    10211020
    1022         DO k=1, KLEV
    1023           DO i=1, KLON
    1024             tau_allaer(i,k,mrfspecies,inu)=tau_ae(i,k,id_ASBCM_phy,inu)+tau_ae(i,k,id_AIBCM_phy,inu)
    1025             tau_allaer(i,k,mrfspecies,inu)=MAX(tau_allaer(i,k,mrfspecies,inu),1e-5)
    1026             piz_allaer(i,k,mrfspecies,inu)=(tau_ae(i,k,id_ASBCM_phy,inu)*piz_ae(i,k,id_ASBCM_phy,inu) &
    1027                       +tau_ae(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu))/ &
    1028                       tau_allaer(i,k,mrfspecies,inu)
    1029             piz_allaer(i,k,mrfspecies,inu)=MAX(piz_allaer(i,k,mrfspecies,inu),0.1)
    1030             cg_allaer(i,k,mrfspecies,inu)=(tau_ae(i,k,id_ASBCM_phy,inu)*piz_ae(i,k,id_ASBCM_phy,inu) *cg_ae(i,k,id_ASBCM_phy,inu)&
    1031                       +tau_ae(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)*cg_ae(i,k,id_AIBCM_phy,inu))/ &
    1032                       (tau_allaer(i,k,mrfspecies,inu)*piz_allaer(i,k,mrfspecies,inu))
     1021        DO k = 1, KLEV
     1022          DO i = 1, KLON
     1023            tau_allaer(i, k, mrfspecies, inu) = tau_ae(i, k, id_ASBCM_phy, inu) + tau_ae(i, k, id_AIBCM_phy, inu)
     1024            tau_allaer(i, k, mrfspecies, inu) = MAX(tau_allaer(i, k, mrfspecies, inu), 1e-5)
     1025            piz_allaer(i, k, mrfspecies, inu) = (tau_ae(i, k, id_ASBCM_phy, inu) * piz_ae(i, k, id_ASBCM_phy, inu) &
     1026                    + tau_ae(i, k, id_AIBCM_phy, inu) * piz_ae(i, k, id_AIBCM_phy, inu)) / &
     1027                    tau_allaer(i, k, mrfspecies, inu)
     1028            piz_allaer(i, k, mrfspecies, inu) = MAX(piz_allaer(i, k, mrfspecies, inu), 0.1)
     1029            cg_allaer(i, k, mrfspecies, inu) = (tau_ae(i, k, id_ASBCM_phy, inu) * piz_ae(i, k, id_ASBCM_phy, inu) * cg_ae(i, k, id_ASBCM_phy, inu)&
     1030                    + tau_ae(i, k, id_AIBCM_phy, inu) * piz_ae(i, k, id_AIBCM_phy, inu) * cg_ae(i, k, id_AIBCM_phy, inu)) / &
     1031                    (tau_allaer(i, k, mrfspecies, inu) * piz_allaer(i, k, mrfspecies, inu))
    10331032          ENDDO
    10341033        ENDDO
    1035              
     1034
    10361035      ELSEIF (mrfspecies == 5) THEN             ! = SO4
    10371036
    1038         DO k=1, KLEV
    1039           DO i=1, KLON
    1040             tau_allaer(i,k,mrfspecies,inu)=tau_ae(i,k,id_ASSO4M_phy,inu)+tau_ae(i,k,id_CSSO4M_phy,inu)
    1041             tau_allaer(i,k,mrfspecies,inu)=MAX(tau_allaer(i,k,mrfspecies,inu),1e-5)
    1042             piz_allaer(i,k,mrfspecies,inu)=(tau_ae(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu) &
    1043                       +tau_ae(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu))/ &
    1044                       tau_allaer(i,k,mrfspecies,inu)
    1045             piz_allaer(i,k,mrfspecies,inu)=MAX(piz_allaer(i,k,mrfspecies,inu),0.1)
    1046             cg_allaer(i,k,mrfspecies,inu)=(tau_ae(i,k,id_CSSO4M_phy,inu)* &
    1047             piz_ae(i,k,id_CSSO4M_phy,inu) *cg_ae(i,k,id_CSSO4M_phy,inu)&
    1048             +tau_ae(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)* &
    1049             cg_ae(i,k,id_ASSO4M_phy,inu))/ &
    1050             (tau_allaer(i,k,mrfspecies,inu)*piz_allaer(i,k,mrfspecies,inu))
     1037        DO k = 1, KLEV
     1038          DO i = 1, KLON
     1039            tau_allaer(i, k, mrfspecies, inu) = tau_ae(i, k, id_ASSO4M_phy, inu) + tau_ae(i, k, id_CSSO4M_phy, inu)
     1040            tau_allaer(i, k, mrfspecies, inu) = MAX(tau_allaer(i, k, mrfspecies, inu), 1e-5)
     1041            piz_allaer(i, k, mrfspecies, inu) = (tau_ae(i, k, id_CSSO4M_phy, inu) * piz_ae(i, k, id_CSSO4M_phy, inu) &
     1042                    + tau_ae(i, k, id_ASSO4M_phy, inu) * piz_ae(i, k, id_ASSO4M_phy, inu)) / &
     1043                    tau_allaer(i, k, mrfspecies, inu)
     1044            piz_allaer(i, k, mrfspecies, inu) = MAX(piz_allaer(i, k, mrfspecies, inu), 0.1)
     1045            cg_allaer(i, k, mrfspecies, inu) = (tau_ae(i, k, id_CSSO4M_phy, inu) * &
     1046                    piz_ae(i, k, id_CSSO4M_phy, inu) * cg_ae(i, k, id_CSSO4M_phy, inu)&
     1047                    + tau_ae(i, k, id_ASSO4M_phy, inu) * piz_ae(i, k, id_ASSO4M_phy, inu) * &
     1048                            cg_ae(i, k, id_ASSO4M_phy, inu)) / &
     1049                    (tau_allaer(i, k, mrfspecies, inu) * piz_allaer(i, k, mrfspecies, inu))
    10511050          ENDDO
    10521051        ENDDO
     
    10541053      ELSEIF (mrfspecies == 6) THEN             ! = POM
    10551054
    1056         DO k=1, KLEV
    1057           DO i=1, KLON
    1058             tau_allaer(i,k,mrfspecies,inu)=tau_ae(i,k,id_ASPOMM_phy,inu)+tau_ae(i,k,id_AIPOMM_phy,inu)
    1059             tau_allaer(i,k,mrfspecies,inu)=MAX(tau_allaer(i,k,mrfspecies,inu),1e-5)
    1060             piz_allaer(i,k,mrfspecies,inu)=(tau_ae(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu) &
    1061                       +tau_ae(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu))/ &
    1062                       tau_allaer(i,k,mrfspecies,inu)
    1063             piz_allaer(i,k,mrfspecies,inu)=MAX(piz_allaer(i,k,mrfspecies,inu),0.1)
    1064             cg_allaer(i,k,mrfspecies,inu)=(tau_ae(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)*cg_ae(i,k,id_ASPOMM_phy,inu)&
    1065                       +tau_ae(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)*cg_ae(i,k,id_AIPOMM_phy,inu))/ &
    1066                       (tau_allaer(i,k,mrfspecies,inu)*piz_allaer(i,k,mrfspecies,inu))
     1055        DO k = 1, KLEV
     1056          DO i = 1, KLON
     1057            tau_allaer(i, k, mrfspecies, inu) = tau_ae(i, k, id_ASPOMM_phy, inu) + tau_ae(i, k, id_AIPOMM_phy, inu)
     1058            tau_allaer(i, k, mrfspecies, inu) = MAX(tau_allaer(i, k, mrfspecies, inu), 1e-5)
     1059            piz_allaer(i, k, mrfspecies, inu) = (tau_ae(i, k, id_ASPOMM_phy, inu) * piz_ae(i, k, id_ASPOMM_phy, inu) &
     1060                    + tau_ae(i, k, id_AIPOMM_phy, inu) * piz_ae(i, k, id_AIPOMM_phy, inu)) / &
     1061                    tau_allaer(i, k, mrfspecies, inu)
     1062            piz_allaer(i, k, mrfspecies, inu) = MAX(piz_allaer(i, k, mrfspecies, inu), 0.1)
     1063            cg_allaer(i, k, mrfspecies, inu) = (tau_ae(i, k, id_ASPOMM_phy, inu) * piz_ae(i, k, id_ASPOMM_phy, inu) * cg_ae(i, k, id_ASPOMM_phy, inu)&
     1064                    + tau_ae(i, k, id_AIPOMM_phy, inu) * piz_ae(i, k, id_AIPOMM_phy, inu) * cg_ae(i, k, id_AIPOMM_phy, inu)) / &
     1065                    (tau_allaer(i, k, mrfspecies, inu) * piz_allaer(i, k, mrfspecies, inu))
    10671066          ENDDO
    10681067        ENDDO
    1069              
     1068
    10701069      ELSEIF (mrfspecies == 7) THEN             ! = DUST
    10711070
    1072         DO k=1, KLEV
    1073           DO i=1, KLON
    1074             tau_allaer(i,k,mrfspecies,inu)=tau_ae(i,k,id_CIDUSTM_phy,inu)
    1075             tau_allaer(i,k,mrfspecies,inu)=MAX(tau_allaer(i,k,mrfspecies,inu),1e-5)
    1076             piz_allaer(i,k,mrfspecies,inu)=piz_ae(i,k,id_CIDUSTM_phy,inu)
    1077             cg_allaer(i,k,mrfspecies,inu)=cg_ae(i,k,id_CIDUSTM_phy,inu)
     1071        DO k = 1, KLEV
     1072          DO i = 1, KLON
     1073            tau_allaer(i, k, mrfspecies, inu) = tau_ae(i, k, id_CIDUSTM_phy, inu)
     1074            tau_allaer(i, k, mrfspecies, inu) = MAX(tau_allaer(i, k, mrfspecies, inu), 1e-5)
     1075            piz_allaer(i, k, mrfspecies, inu) = piz_ae(i, k, id_CIDUSTM_phy, inu)
     1076            cg_allaer(i, k, mrfspecies, inu) = cg_ae(i, k, id_CIDUSTM_phy, inu)
    10781077          ENDDO
    10791078        ENDDO
     
    10811080      ELSEIF (mrfspecies == 8) THEN             ! = SS
    10821081
    1083         DO k=1, KLEV
    1084           DO i=1, KLON
    1085             tau_allaer(i,k,mrfspecies,inu)=tau_ae(i,k,id_ASSSM_phy,inu)+tau_ae(i,k,id_CSSSM_phy,inu)+tau_ae(i,k,id_SSSSM_phy,inu)
    1086             tau_allaer(i,k,mrfspecies,inu)=MAX(tau_allaer(i,k,mrfspecies,inu),1e-5)
    1087             piz_allaer(i,k,mrfspecies,inu)=(tau_ae(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu) &
    1088                     +tau_ae(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu) &
    1089                     +tau_ae(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu))/ &
    1090                     tau_allaer(i,k,mrfspecies,inu)
    1091             piz_allaer(i,k,mrfspecies,inu)=MAX(piz_allaer(i,k,mrfspecies,inu),0.1)
    1092             cg_allaer(i,k,mrfspecies,inu)=(tau_ae(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu) *cg_ae(i,k,id_ASSSM_phy,inu)&
    1093                     +tau_ae(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)*cg_ae(i,k,id_CSSSM_phy,inu) &
    1094                     +tau_ae(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)*cg_ae(i,k,id_SSSSM_phy,inu))/ &
    1095                     (tau_allaer(i,k,mrfspecies,inu)*piz_allaer(i,k,mrfspecies,inu))
     1082        DO k = 1, KLEV
     1083          DO i = 1, KLON
     1084            tau_allaer(i, k, mrfspecies, inu) = tau_ae(i, k, id_ASSSM_phy, inu) + tau_ae(i, k, id_CSSSM_phy, inu) + tau_ae(i, k, id_SSSSM_phy, inu)
     1085            tau_allaer(i, k, mrfspecies, inu) = MAX(tau_allaer(i, k, mrfspecies, inu), 1e-5)
     1086            piz_allaer(i, k, mrfspecies, inu) = (tau_ae(i, k, id_ASSSM_phy, inu) * piz_ae(i, k, id_ASSSM_phy, inu) &
     1087                    + tau_ae(i, k, id_CSSSM_phy, inu) * piz_ae(i, k, id_CSSSM_phy, inu) &
     1088                    + tau_ae(i, k, id_SSSSM_phy, inu) * piz_ae(i, k, id_SSSSM_phy, inu)) / &
     1089                    tau_allaer(i, k, mrfspecies, inu)
     1090            piz_allaer(i, k, mrfspecies, inu) = MAX(piz_allaer(i, k, mrfspecies, inu), 0.1)
     1091            cg_allaer(i, k, mrfspecies, inu) = (tau_ae(i, k, id_ASSSM_phy, inu) * piz_ae(i, k, id_ASSSM_phy, inu) * cg_ae(i, k, id_ASSSM_phy, inu)&
     1092                    + tau_ae(i, k, id_CSSSM_phy, inu) * piz_ae(i, k, id_CSSSM_phy, inu) * cg_ae(i, k, id_CSSSM_phy, inu) &
     1093                    + tau_ae(i, k, id_SSSSM_phy, inu) * piz_ae(i, k, id_SSSSM_phy, inu) * cg_ae(i, k, id_SSSSM_phy, inu)) / &
     1094                    (tau_allaer(i, k, mrfspecies, inu) * piz_allaer(i, k, mrfspecies, inu))
    10961095          ENDDO
    10971096        ENDDO
    1098      
     1097
    10991098      ELSEIF (mrfspecies == 9) THEN             ! = NO3
    1100      
    1101         DO k=1, KLEV
    1102           DO i=1, KLON
    1103             tau_allaer(i,k,mrfspecies,inu)=0.   ! preliminary
    1104             piz_allaer(i,k,mrfspecies,inu)=0.
    1105             cg_allaer(i,k,mrfspecies,inu)=0.
     1099
     1100        DO k = 1, KLEV
     1101          DO i = 1, KLON
     1102            tau_allaer(i, k, mrfspecies, inu) = 0.   ! preliminary
     1103            piz_allaer(i, k, mrfspecies, inu) = 0.
     1104            cg_allaer(i, k, mrfspecies, inu) = 0.
    11061105          ENDDO
    11071106        ENDDO
    1108      
     1107
    11091108      ELSE
    11101109
    1111         DO k=1, KLEV
    1112           DO i=1, KLON
    1113             tau_allaer(i,k,mrfspecies,inu)=0. 
    1114             piz_allaer(i,k,mrfspecies,inu)=0.
    1115             cg_allaer(i,k,mrfspecies,inu)=0.
     1110        DO k = 1, KLEV
     1111          DO i = 1, KLON
     1112            tau_allaer(i, k, mrfspecies, inu) = 0.
     1113            piz_allaer(i, k, mrfspecies, inu) = 0.
     1114            cg_allaer(i, k, mrfspecies, inu) = 0.
    11161115          ENDDO
    11171116        ENDDO
    1118            
     1117
    11191118      ENDIF
    11201119
     
    11221121  ENDDO
    11231122
    1124   DEALLOCATE(aerosol_name) 
     1123  DEALLOCATE(aerosol_name)
    11251124
    11261125END SUBROUTINE AEROPT_2BANDS
Note: See TracChangeset for help on using the changeset viewer.