source: LMDZ5/trunk/libf/phylmd/rrtm/aeropt_5wv_rrtm.F90 @ 2748

Last change on this file since 2748 was 2748, checked in by oboucher, 8 years ago

Small tweaks to aeropt RRTM routines

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:keywords set to Author Date Id Revi
File size: 19.3 KB
Line 
1!
2! $Id: aeropt_5wv_rrtm.F90 2748 2017-01-08 12:47:25Z oboucher $
3!
4
5SUBROUTINE AEROPT_5WV_RRTM(  &
6   pdel, m_allaer,           &
7   RHcl, ai, flag_aerosol,   &
8   flag_bc_internal_mixture, &
9   pplay, t_seri,            &
10   tausum, tau )
11
12  USE DIMPHY
13  USE aero_mod
14  USE phys_local_var_mod, ONLY: od550aer,od865aer,ec550aer,od550lt1aer
15  USE YOMCST, ONLY: RD,RG
16
17  !
18  !    Yves Balkanski le 12 avril 2006
19  !    Celine Deandreis
20  !    Anne Cozic  Avril 2009
21  !    a partir d'une sous-routine de Johannes Quaas pour les sulfates
22  !    Olivier Boucher mars 2014 pour adaptation RRTM
23  !   
24  !
25  ! Refractive indices for seasalt come from Shettle and Fenn (1979)
26  !
27  ! Refractive indices from water come from Hale and Querry (1973)
28  !
29  ! Refractive indices from Ammonium Sulfate Toon and Pollack (1976)
30  !
31  ! Refractive indices for Dust, internal mixture of minerals coated with 1.5% hematite
32  ! by Volume (Balkanski et al., 2006)
33  !
34  ! Refractive indices for POM: Kinne (pers. Communication
35  !
36  ! Refractive index for BC from Shettle and Fenn (1979)
37  !
38  ! Shettle, E. P., & Fenn, R. W. (1979), Models for the aerosols of the lower atmosphere and
39  ! the effects of humidity variations on their optical properties, U.S. Air Force Geophysics
40  ! Laboratory Rept. AFGL-TR-79-0214, Hanscomb Air Force Base, MA.
41  !
42  ! Hale, G. M. and M. R. Querry, Optical constants of water in the 200-nm to 200-m
43  ! wavelength region, Appl. Opt., 12, 555-563, 1973.
44  !
45  ! Toon, O. B. and J. B. Pollack, The optical constants of several atmospheric aerosol species:
46  ! Ammonium sulfate, aluminum oxide, and sodium chloride, J. Geohys. Res., 81, 5733-5748,
47  ! 1976.
48  !
49  ! Balkanski, Y., M. Schulz, T. Claquin And O. Boucher, Reevaluation of mineral aerosol
50  ! radiative forcings suggests a better agreement with satellite and AERONET data, Atmospheric
51  ! Chemistry and Physics Discussions., 6, pp 8383-8419, 2006.
52  !
53  IMPLICIT NONE
54  !
55  ! Input arguments:
56  !
57  REAL, DIMENSION(klon,klev), INTENT(IN)   :: pdel
58  REAL, DIMENSION(klon,klev,naero_tot), INTENT(IN) :: m_allaer
59  REAL, DIMENSION(klon,klev), INTENT(IN)   :: RHcl     ! humidite relative ciel clair
60  INTEGER,INTENT(IN)                       :: flag_aerosol
61  LOGICAL,INTENT(IN)                       :: flag_bc_internal_mixture
62  REAL, DIMENSION(klon,klev), INTENT(IN)   :: pplay
63  REAL, DIMENSION(klon,klev), INTENT(IN)   :: t_seri
64  !
65  ! Output arguments:
66  !
67  REAL, DIMENSION(klon), INTENT(OUT)                      :: ai      ! POLDER aerosol index
68  REAL, DIMENSION(klon,nwave,naero_tot), INTENT(OUT)      :: tausum
69  REAL, DIMENSION(klon,klev,nwave,naero_tot), INTENT(OUT) :: tau
70
71  !
72  ! Local
73  !
74  INTEGER, PARAMETER :: las = nwave_sw
75  LOGICAL :: soluble
76 
77  INTEGER :: i, k, m, aerindex
78  INTEGER :: spsol, spinsol, la
79  INTEGER :: RH_num(klon,klev)
80  INTEGER, PARAMETER :: la443 = 1
81  INTEGER, PARAMETER :: la550 = 2
82  INTEGER, PARAMETER :: la670 = 3
83  INTEGER, PARAMETER :: la765 = 4
84  INTEGER, PARAMETER :: la865 = 5
85  INTEGER, PARAMETER :: nbre_RH=12
86  INTEGER, PARAMETER :: naero_soluble=9   !  1- BC soluble; 2- POM soluble; 3- SO4 coarse
87                                          !  4- SO4 acc; 5 seasalt super-C; 6 seasalt coarse; 7 seasalt acc.
88                                          !  8- NO3 coarse; 9- NO3 accumulation
89  INTEGER, PARAMETER :: naero_insoluble=4 !  1- Dust; 2- BC insoluble; 3- POM insoluble; 4- NO3 insoluble
90
91  REAL :: zrho
92
93  REAL, PARAMETER :: RH_tab(nbre_RH)=(/0.,10.,20.,30.,40.,50.,60.,70.,80.,85.,90.,95./)
94  REAL, PARAMETER :: RH_MAX=95.
95  REAL :: delta(klon,klev), rh(klon,klev)
96  REAL :: tau_ae5wv_int   ! Intermediate computation of epaisseur optique aerosol
97  REAL :: od670aer(klon)  ! epaisseur optique aerosol extinction 670 nm
98  REAL :: fac
99  INTEGER, ALLOCATABLE, DIMENSION(:)  :: aerosol_name
100  INTEGER :: nb_aer, itau
101  LOGICAL :: ok_itau
102 
103  REAL :: zdh(klon,klev)
104 
105  REAL :: alpha_aers_5wv(nbre_RH,las,naero_soluble)   ! Ext. coeff. ** m2/g
106  REAL :: alpha_aeri_5wv(las,naero_insoluble)         ! Ext. coeff. ** m2/g
107
108  !
109  ! BC internal mixture
110  !
111  INTEGER, PARAMETER ::  nbclassbc = 6  ! Added by Rong Wang/OB for the 5 fractions
112                                        ! of BC in the soluble mode:
113                                        ! bc_content/0.001, 0.01, 0.02, 0.05, 0.1/
114  ! for Maxwell-Garnet internal mixture
115  ! Detailed theory can be found in R. Wang Estimation of global black carbon ! direct
116  ! radiative forcing and its uncertainty constrained by observations. J.
117  ! Geophys. Res. Atmos. Added by R. Wang and OB
118  REAL :: alpha_MG_5wv(nbre_RH,las,nbclassbc)
119
120  !
121  ! Proprietes optiques
122  !
123  REAL :: fact_RH(nbre_RH), BC_massfra
124  INTEGER :: n, classbc
125
126! From here on we look at the optical parameters at 5 wavelengths: 443, 550, 670, 765 and 865 nm
127
128 DATA alpha_aers_5wv/ &
129   ! BC Accumulation Soluble (AS)     
130  5.342, 5.342, 5.342, 5.342, 5.342, 5.829, 6.344, 7.470, 8.603, 8.736, 8.870,10.149, &
131  5.159, 5.159, 5.159, 5.159, 5.159, 5.608, 6.083, 7.121, 8.169, 8.293, 8.418, 9.612, &
132  4.849, 4.849, 4.849, 4.849, 4.849, 5.251, 5.674, 6.598, 7.533, 7.644, 7.756, 8.829, &
133  4.573, 4.573, 4.573, 4.573, 4.573, 4.936, 5.318, 6.152, 6.996, 7.096, 7.198, 8.171, &
134  4.274, 4.274, 4.274, 4.274, 4.274, 4.600, 4.942, 5.686, 6.441, 6.530, 6.621, 7.495, &
135   ! POM Accumulation Soluble (AS)   
136  5.300, 5.300, 5.300, 5.300, 5.300, 5.827, 6.392, 7.640, 8.898, 9.046, 9.195,10.606, &
137  4.569, 4.569, 4.569, 4.569, 4.569, 5.029, 5.528, 6.649, 7.802, 7.939, 8.077, 9.400, &
138  3.768, 3.768, 3.768, 3.768, 3.768, 4.152, 4.573, 5.533, 6.538, 6.658, 6.780, 7.955, &
139  3.210, 3.210, 3.210, 3.210, 3.210, 3.542, 3.909, 4.752, 5.644, 5.751, 5.860, 6.916, &
140  2.709, 2.709, 2.709, 2.709, 2.709, 2.994, 3.309, 4.041, 4.823, 4.917, 5.013, 5.949, &
141   ! Sulfate Coarse Soluble (CS)     
142  0.702, 0.702, 0.702, 0.702, 0.947, 1.025, 1.127, 1.266, 1.490, 1.675, 2.003, 2.857, &
143  0.725, 0.725, 0.725, 0.725, 0.977, 1.057, 1.163, 1.304, 1.529, 1.718, 2.051, 2.914, &
144  0.751, 0.751, 0.751, 0.751, 1.011, 1.093, 1.200, 1.345, 1.576, 1.768, 2.110, 2.973, &
145  0.769, 0.769, 0.769, 0.769, 1.034, 1.120, 1.227, 1.375, 1.613, 1.811, 2.153, 3.032, &
146  0.786, 0.786, 0.786, 0.786, 1.056, 1.144, 1.254, 1.406, 1.646, 1.850, 2.202, 3.088, &
147   !-- Sulfate Accumulation (BC content=0)
148  4.639, 4.639, 4.639, 4.639, 6.244, 6.878, 7.684, 8.805,10.638,12.174,14.880,21.828, &
149  3.966, 3.966, 3.966, 3.966, 5.359, 5.950, 6.707, 7.771, 9.540,11.046,13.742,20.884, &
150  3.234, 3.234, 3.234, 3.234, 4.393, 4.914, 5.587, 6.543, 8.160, 9.556,12.101,19.072, &
151  2.721, 2.721, 2.721, 2.721, 3.712, 4.175, 4.774, 5.634, 7.101, 8.383,10.747,17.381, &
152  2.262, 2.262, 2.262, 2.262, 3.102, 3.505, 4.030, 4.789, 6.097, 7.251, 9.403,15.581, &
153   ! Seasalt Super Coarse Soluble (SS)
154  0.194, 0.237, 0.254, 0.275, 0.299, 0.327, 0.366, 0.432, 0.544, 0.642, 0.824, 1.265, &
155  0.196, 0.240, 0.257, 0.278, 0.303, 0.331, 0.371, 0.437, 0.550, 0.648, 0.831, 1.274, &
156  0.198, 0.243, 0.260, 0.283, 0.306, 0.335, 0.376, 0.442, 0.557, 0.654, 0.839, 1.285, &
157  0.201, 0.246, 0.263, 0.286, 0.308, 0.338, 0.380, 0.445, 0.559, 0.660, 0.846, 1.289, &
158  0.203, 0.249, 0.266, 0.289, 0.312, 0.341, 0.384, 0.449, 0.564, 0.665, 0.852, 1.297, &
159   ! Seasalt Coarse Soluble (CS)     
160  0.576, 0.690, 0.738, 0.789, 0.855, 0.935, 1.046, 1.212, 1.512, 1.785, 2.258, 3.449, &
161  0.595, 0.713, 0.763, 0.814, 0.880, 0.963, 1.079, 1.248, 1.550, 1.826, 2.306, 3.507, &
162  0.617, 0.738, 0.789, 0.842, 0.911, 0.996, 1.113, 1.286, 1.592, 1.871, 2.369, 3.562, &
163  0.632, 0.755, 0.808, 0.862, 0.931, 1.018, 1.140, 1.316, 1.626, 1.909, 2.409, 3.622, &
164  0.645, 0.771, 0.825, 0.880, 0.951, 1.039, 1.164, 1.344, 1.661, 1.948, 2.455, 3.682, &
165   ! Seasalt Accumulation Soluble (AS)
166  3.684, 4.367, 4.711, 5.074, 5.438, 6.046, 6.793, 7.964,10.200,12.246,15.959,24.642, &
167  3.126, 3.717, 4.023, 4.349, 4.673, 5.229, 5.918, 7.018, 9.179,11.208,14.994,24.184, &
168  2.482, 2.973, 3.233, 3.511, 3.788, 4.272, 4.876, 5.858, 7.836, 9.739,13.393,22.658, &
169  2.086, 2.509, 2.735, 2.979, 3.220, 3.649, 4.186, 5.068, 6.874, 8.642,12.099,21.146, &
170  1.737, 2.097, 2.292, 2.503, 2.711, 3.086, 3.556, 4.337, 5.960, 7.571,10.779,19.427, &
171   ! Nitrate Coarse Soluble (CS)     
172  0.726, 0.726, 0.726, 0.796, 0.868, 0.947, 1.041, 1.246, 1.563, 1.872, 2.328, 2.447, &
173  0.753, 0.753, 0.753, 0.825, 0.900, 0.979, 1.075, 1.285, 1.610, 1.922, 2.385, 2.503, &
174  0.780, 0.780, 0.780, 0.854, 0.932, 1.013, 1.113, 1.326, 1.656, 1.979, 2.447, 2.579, &
175  0.797, 0.797, 0.797, 0.874, 0.953, 1.035, 1.138, 1.356, 1.697, 2.020, 2.495, 2.621, &
176  0.811, 0.811, 0.811, 0.890, 0.971, 1.055, 1.160, 1.384, 1.733, 2.062, 2.547, 2.675, &
177   ! Nitrate Accumulation Soluble (AS)
178  4.208, 4.208, 4.208, 4.693, 5.217, 5.778, 6.502, 8.108,10.722,13.327,17.185,18.210, &
179  3.386, 3.386, 3.386, 3.808, 4.268, 4.768, 5.420, 6.897, 9.377,11.923,15.803,16.852, &
180  2.650, 2.650, 2.650, 2.997, 3.380, 3.801, 4.357, 5.638, 7.850,10.189,13.858,14.870, &
181  2.174, 2.174, 2.174, 2.471, 2.802, 3.167, 3.652, 4.784, 6.774, 8.917,12.345,13.302, &
182  1.776, 1.776, 1.776, 2.028, 2.309, 2.622, 3.040, 4.026, 5.787, 7.717,10.858,11.745  /
183
184 DATA alpha_aeri_5wv/ &
185   ! Dust insoluble
186  0.788, 0.818, 0.842, 0.851, 0.853, &
187   ! BC insoluble
188  5.342, 5.159, 4.849, 4.573, 4.274, &
189   ! POM insoluble
190  5.300, 4.569, 3.768, 3.210, 2.709, &
191   ! Nitrate insoluble
192  0.726, 0.753, 0.780, 0.797, 0.811 /
193
194! Added by R. Wang (July 31 2016)
195! properties for BC assuming Maxwell-Garnett rule and internal mixture
196
197   DATA alpha_MG_5wv/ &
198 !--BC content=0.001
199   4.293,  4.293,  4.293,  4.293,  4.320,  4.342,  4.271,  4.320,  4.476,  4.772,  5.310,  7.434, &
200   4.687,  4.687,  4.687,  4.687,  4.693,  4.602,  4.492,  4.413,  4.374,  4.462,  4.729,  6.274, &
201   4.802,  4.802,  4.802,  4.802,  4.776,  4.646,  4.516,  4.371,  4.231,  4.173,  4.217,  5.072, &
202   4.716,  4.716,  4.716,  4.716,  4.668,  4.548,  4.408,  4.249,  4.047,  3.951,  3.850,  4.259, &
203   4.520,  4.520,  4.520,  4.520,  4.461,  4.353,  4.230,  4.069,  3.850,  3.707,  3.524,  3.565, &
204 !--BC content=0.010
205   4.298,  4.298,  4.298,  4.298,  4.343,  4.333,  4.283,  4.325,  4.472,  4.751,  5.298,  7.402, &
206   4.692,  4.692,  4.692,  4.692,  4.695,  4.598,  4.499,  4.410,  4.383,  4.454,  4.739,  6.260, &
207   4.796,  4.796,  4.796,  4.796,  4.768,  4.644,  4.518,  4.376,  4.230,  4.172,  4.225,  5.048, &
208   4.708,  4.708,  4.708,  4.708,  4.659,  4.543,  4.411,  4.256,  4.053,  3.945,  3.855,  4.242, &
209   4.509,  4.509,  4.509,  4.509,  4.456,  4.351,  4.229,  4.072,  3.852,  3.707,  3.531,  3.560, &
210 !--BC content=0.020
211   4.301,  4.301,  4.301,  4.301,  4.353,  4.330,  4.291,  4.326,  4.478,  4.738,  5.288,  7.393, &
212   4.688,  4.688,  4.688,  4.688,  4.695,  4.596,  4.500,  4.412,  4.386,  4.454,  4.737,  6.248, &
213   4.787,  4.787,  4.787,  4.787,  4.761,  4.641,  4.516,  4.378,  4.231,  4.176,  4.226,  5.041, &
214   4.696,  4.696,  4.696,  4.696,  4.651,  4.538,  4.409,  4.256,  4.055,  3.948,  3.858,  4.240, &
215   4.497,  4.497,  4.497,  4.497,  4.448,  4.345,  4.225,  4.072,  3.854,  3.709,  3.535,  3.561, &
216 !--BC content=0.050
217   4.318,  4.318,  4.318,  4.318,  4.377,  4.337,  4.310,  4.334,  4.488,  4.724,  5.267,  7.342, &
218   4.678,  4.678,  4.678,  4.678,  4.693,  4.595,  4.506,  4.421,  4.396,  4.458,  4.734,  6.203, &
219   4.760,  4.760,  4.760,  4.760,  4.742,  4.631,  4.512,  4.381,  4.237,  4.185,  4.229,  5.015, &
220   4.662,  4.662,  4.662,  4.662,  4.629,  4.522,  4.401,  4.254,  4.062,  3.955,  3.867,  4.229, &
221   4.461,  4.461,  4.461,  4.461,  4.424,  4.328,  4.215,  4.068,  3.858,  3.718,  3.545,  3.562, &
222 !--BC content=0.100
223   4.348,  4.348,  4.348,  4.348,  4.404,  4.361,  4.337,  4.358,  4.503,  4.717,  5.240,  7.239, &
224   4.662,  4.662,  4.662,  4.662,  4.685,  4.596,  4.513,  4.437,  4.411,  4.468,  4.729,  6.123, &
225   4.716,  4.716,  4.716,  4.716,  4.713,  4.613,  4.505,  4.384,  4.249,  4.199,  4.235,  4.974, &
226   4.607,  4.607,  4.607,  4.607,  4.593,  4.497,  4.387,  4.252,  4.072,  3.969,  3.882,  4.212, &
227   4.403,  4.403,  4.403,  4.403,  4.385,  4.299,  4.196,  4.061,  3.865,  3.731,  3.564,  3.563, &
228 !--BC content=0.200
229   4.401,  4.401,  4.401,  4.401,  4.447,  4.409,  4.389,  4.405,  4.529,  4.715,  5.183,  7.007, &
230   4.631,  4.631,  4.631,  4.631,  4.666,  4.594,  4.526,  4.463,  4.439,  4.488,  4.714,  5.958, &
231   4.633,  4.633,  4.633,  4.633,  4.654,  4.575,  4.488,  4.387,  4.271,  4.224,  4.250,  4.894, &
232   4.505,  4.505,  4.505,  4.505,  4.520,  4.444,  4.356,  4.243,  4.089,  3.997,  3.912,  4.179, &
233   4.295,  4.295,  4.295,  4.295,  4.307,  4.239,  4.157,  4.045,  3.876,  3.757,  3.602,  3.569  /
234  !
235  ! Initialisations
236  ai(:) = 0.
237  tausum(:,:,:) = 0.
238  tau(:,:,:,:)=0.
239
240  DO k=1, klev
241    DO i=1, klon
242      zrho=pplay(i,k)/t_seri(i,k)/RD                  ! kg/m3
243      zdh(i,k)=pdel(i,k)/(RG*zrho)                    ! m
244    ENDDO
245  ENDDO
246
247  IF (flag_aerosol .EQ. 1) THEN
248     nb_aer = 2
249     ALLOCATE (aerosol_name(nb_aer))
250     aerosol_name(1) = id_ASSO4M_phy
251     aerosol_name(2) = id_CSSO4M_phy
252  ELSEIF (flag_aerosol .EQ. 2) THEN
253     nb_aer = 2
254     ALLOCATE (aerosol_name(nb_aer))
255     aerosol_name(1) = id_ASBCM_phy
256     aerosol_name(2) = id_AIBCM_phy
257  ELSEIF (flag_aerosol .EQ. 3) THEN
258     nb_aer = 2
259     ALLOCATE (aerosol_name(nb_aer))
260     aerosol_name(1) = id_ASPOMM_phy
261     aerosol_name(2) = id_AIPOMM_phy
262  ELSEIF (flag_aerosol .EQ. 4) THEN
263     nb_aer = 3
264     ALLOCATE (aerosol_name(nb_aer))
265     aerosol_name(1) = id_CSSSM_phy
266     aerosol_name(2) = id_SSSSM_phy
267     aerosol_name(3) = id_ASSSM_phy
268  ELSEIF (flag_aerosol .EQ. 5) THEN
269     nb_aer = 1
270     ALLOCATE (aerosol_name(nb_aer))
271     aerosol_name(1) = id_CIDUSTM_phy
272  ELSEIF (flag_aerosol .EQ. 6) THEN
273     nb_aer = 13
274     ALLOCATE (aerosol_name(nb_aer))
275     aerosol_name(1) = id_ASSO4M_phy     
276     aerosol_name(2) = id_ASBCM_phy
277     aerosol_name(3) = id_AIBCM_phy
278     aerosol_name(4) = id_ASPOMM_phy
279     aerosol_name(5) = id_AIPOMM_phy
280     aerosol_name(6) = id_CSSSM_phy
281     aerosol_name(7) = id_SSSSM_phy
282     aerosol_name(8) = id_ASSSM_phy
283     aerosol_name(9) = id_CIDUSTM_phy
284     aerosol_name(10)= id_CSSO4M_phy
285     aerosol_name(11)= id_CSNO3M_phy
286     aerosol_name(12)= id_ASNO3M_phy
287     aerosol_name(13)= id_CINO3M_phy
288  ENDIF
289
290  !
291  ! Loop over modes, use of precalculated nmd and corresponding sigma
292  !    loop over wavelengths
293  !    for each mass species in mode
294  !      interpolate from Sext to retrieve Sext_at_gridpoint_per_species
295  !      compute optical_thickness_at_gridpoint_per_species
296  !
297  ! Calculations that need to be done since we are not in the subroutines INCA
298  !     
299
300  DO n=1,nbre_RH-1
301    fact_RH(n)=1./(RH_tab(n+1)-RH_tab(n))
302  ENDDO
303   
304  DO k=1, klev
305    DO i=1, klon
306      rh(i,k)=MIN(RHcl(i,k)*100.,RH_MAX)
307      RH_num(i,k) = INT( rh(i,k)/10. + 1.)
308      IF (rh(i,k).GT.85.) RH_num(i,k)=10
309      IF (rh(i,k).GT.90.) RH_num(i,k)=11
310      delta(i,k)=(rh(i,k)-RH_tab(RH_num(i,k)))*fact_RH(RH_num(i,k))
311    ENDDO
312  ENDDO
313
314  DO m=1,nb_aer   ! tau is only computed for each mass   
315    fac=1.0
316    IF (aerosol_name(m).EQ.id_ASBCM_phy) THEN
317        soluble=.TRUE.
318        spsol=1
319    ELSEIF (aerosol_name(m).EQ.id_ASPOMM_phy) THEN
320        soluble=.TRUE.
321        spsol=2
322    ELSEIF (aerosol_name(m).EQ.id_ASSO4M_phy) THEN
323        soluble=.TRUE.
324        spsol=3
325        fac=1.375    ! (NH4)2-SO4/SO4 132/96 mass conversion factor for AOD
326    ELSEIF (aerosol_name(m).EQ.id_CSSO4M_phy) THEN
327        soluble=.TRUE.
328        spsol=4
329        fac=1.375    ! (NH4)2-SO4/SO4 132/96 mass conversion factor for AOD
330    ELSEIF (aerosol_name(m).EQ.id_SSSSM_phy) THEN
331        soluble=.TRUE.
332        spsol=5
333    ELSEIF (aerosol_name(m).EQ.id_CSSSM_phy) THEN
334        soluble=.TRUE.
335        spsol=6
336    ELSEIF (aerosol_name(m).EQ.id_ASSSM_phy) THEN
337        soluble=.TRUE.
338        spsol=7
339    ELSEIF (aerosol_name(m).EQ.id_CSNO3M_phy) THEN
340        soluble=.TRUE.
341        spsol=8
342        fac=1.2903    ! NO3NH4/NO3 / mass conversion factor for AOD
343    ELSEIF (aerosol_name(m).EQ.id_ASNO3M_phy) THEN
344        soluble=.TRUE.
345        spsol=9
346        fac=1.2903    ! NO3NH4/NO3 / mass conversion factor for AOD
347    ELSEIF (aerosol_name(m).EQ.id_CIDUSTM_phy) THEN
348        soluble=.FALSE.
349        spinsol=1
350    ELSEIF  (aerosol_name(m).EQ.id_AIBCM_phy) THEN
351        soluble=.FALSE.
352        spinsol=2
353    ELSEIF (aerosol_name(m).EQ.id_AIPOMM_phy) THEN
354        soluble=.FALSE.
355        spinsol=3
356    ELSEIF (aerosol_name(m).EQ.id_CINO3M_phy) THEN
357        soluble=.FALSE.
358        spinsol=4
359        fac=1.2903    ! NO3NH4/NO3 / mass conversion factor for AOD
360    ELSE
361        CYCLE
362    ENDIF
363
364    aerindex=aerosol_name(m)
365
366    DO la=1,las
367
368    !--only 550, 670 and 865 nm are used
369    IF (la.NE.la550.AND.la.NE.la670.AND.la.NE.la865) CYCLE
370
371      IF (soluble) THEN            ! For soluble aerosol
372
373        !--treat special case of soluble BC internal mixture
374        IF (spsol.EQ.1 .AND. flag_bc_internal_mixture) THEN
375
376          DO k=1, klev
377            DO i=1, klon
378
379             BC_massfra = m_allaer(i,k,id_ASBCM_phy)/(m_allaer(i,k,id_ASBCM_phy)+m_allaer(i,k,id_ASSO4M_phy))
380
381             IF (BC_massfra.GE.0.20) THEN
382               classbc = 6
383             ELSEIF (BC_massfra.GE.0.10) THEN
384               classbc = 5
385             ELSEIF  (BC_massfra.GE.0.05) THEN
386               classbc = 4
387             ELSEIF  (BC_massfra.GE.0.02) THEN
388               classbc = 3
389             ELSEIF  (BC_massfra.GE.0.01) THEN
390               classbc = 2
391             ELSE
392               classbc = 1
393             ENDIF
394
395              tau_ae5wv_int = alpha_MG_5wv(RH_num(i,k),la,classbc)+DELTA(i,k)* &
396                             (alpha_MG_5wv(RH_num(i,k)+1,la,classbc) - &
397                              alpha_MG_5wv(RH_num(i,k),la,classbc))
398              tau(i,k,la,aerindex) = m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*tau_ae5wv_int*fac
399              tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex)
400            ENDDO
401          ENDDO
402
403        !--other cases of soluble aerosols
404        ELSE
405
406          DO k=1, klev
407            DO i=1, klon
408              tau_ae5wv_int = alpha_aers_5wv(RH_num(i,k),la,spsol)+DELTA(i,k)* &
409                             (alpha_aers_5wv(RH_num(i,k)+1,la,spsol) - &
410                              alpha_aers_5wv(RH_num(i,k),la,spsol))
411              tau(i,k,la,aerindex) = m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*tau_ae5wv_int*fac
412              tausum(i,la,aerindex)=tausum(i,la,aerindex)+tau(i,k,la,aerindex)
413            ENDDO
414          ENDDO
415
416        ENDIF
417 
418      ! cases of insoluble aerosol
419      ELSE                         
420
421        DO k=1, klev
422          DO i=1, klon
423            tau_ae5wv_int = alpha_aeri_5wv(la,spinsol)
424            tau(i,k,la,aerindex) = m_allaer(i,k,aerindex)/1.e6*zdh(i,k)*tau_ae5wv_int*fac
425            tausum(i,la,aerindex)= tausum(i,la,aerindex)+tau(i,k,la,aerindex)
426          ENDDO
427        ENDDO
428
429      ENDIF
430
431    ENDDO   ! Boucle sur les longueurs d'onde
432  ENDDO     ! Boucle sur les masses de traceurs
433
434!--AOD calculations for diagnostics
435  od550aer(:)=SUM(tausum(:,la550,:),dim=2)
436  od670aer(:)=SUM(tausum(:,la670,:),dim=2)
437  od865aer(:)=SUM(tausum(:,la865,:),dim=2)
438
439!--extinction coefficient for diagnostic
440  ec550aer(:,:)=SUM(tau(:,:,la550,:),dim=3)/zdh(:,:)
441
442!--aerosol index
443  ai(:)=-LOG(MAX(od670aer(:),1.e-8)/MAX(od865aer(:),1.e-8))/LOG(670./865.)
444
445  od550lt1aer(:)=tausum(:,la550,id_ASSO4M_phy)+tausum(:,la550,id_ASBCM_phy) +tausum(:,la550,id_AIBCM_phy)+ &
446                 tausum(:,la550,id_ASPOMM_phy)+tausum(:,la550,id_AIPOMM_phy)+tausum(:,la550,id_ASSSM_phy)+ &
447                 0.03*tausum(:,la550,id_CSSSM_phy)+0.4*tausum(:,la550,id_CIDUSTM_phy)
448
449  DEALLOCATE(aerosol_name)
450 
451END SUBROUTINE AEROPT_5WV_RRTM
Note: See TracBrowser for help on using the repository browser.