source: LMDZ5/trunk/libf/phylmd/StratAer/coagulate.F90 @ 4771

Last change on this file since 4771 was 2950, checked in by oboucher, 7 years ago

Correcting a small mistake from last commit.
k_B should be RKBOL

File size: 9.2 KB
RevLine 
[2690]1SUBROUTINE COAGULATE(pdtcoag,mdw,tr_seri,t_seri,pplay,dens_aer,is_strato)
2  !     -----------------------------------------------------------------------
3  !
4  !     Author : Christoph Kleinschmitt (with Olivier Boucher)
5  !     ------
6  !
7  !     purpose
8  !     -------
9  !
10  !     interface
11  !     ---------
12  !      input
13  !       pdtphys        time step duration                 [sec]
14  !       tr_seri        tracer mixing ratios               [kg/kg]
15  !       mdw             # or mass median diameter          [m]
16  !
17  !     method
18  !     ------
19  !
20  !     -----------------------------------------------------------------------
21
22  USE dimphy, ONLY : klon,klev
23  USE aerophys
24  USE infotrac
25  USE phys_local_var_mod, ONLY: DENSO4, f_r_wet
26  USE YOMCST
27
28  IMPLICIT NONE
29
30  !--------------------------------------------------------
31
32  ! transfer variables when calling this routine
33  REAL,INTENT(IN)                               :: pdtcoag ! Time step in coagulation routine [s]
34  REAL,DIMENSION(nbtr_bin),INTENT(IN)           :: mdw     ! aerosol particle diameter in each bin [m]
35  REAL,DIMENSION(klon,klev,nbtr),INTENT(INOUT)  :: tr_seri ! Concentration Traceur [U/KgA]
36  REAL,DIMENSION(klon,klev),INTENT(IN)          :: t_seri  ! Temperature
37  REAL,DIMENSION(klon,klev),INTENT(IN)          :: pplay   ! pression pour le mileu de chaque couche (en Pa)
38  REAL,DIMENSION(klon,klev)                     :: dens_aer! density of aerosol [kg/m3 aerosol] with default H2SO4 mass
39  LOGICAL,DIMENSION(klon,klev),INTENT(IN)       :: is_strato
40
41  ! local variables in coagulation routine
42  INTEGER                                       :: i,j,k,nb,ilon,ilev
43  REAL, DIMENSION(nbtr_bin)                     :: radius ! aerosol particle radius in each bin [m]
44  REAL, DIMENSION(klon,klev,nbtr_bin)           :: tr_t ! Concentration Traceur at time t [U/KgA]
45  REAL, DIMENSION(klon,klev,nbtr_bin)           :: tr_tp1 ! Concentration Traceur at time t+1 [U/KgA]
46  REAL, DIMENSION(nbtr_bin,nbtr_bin,nbtr_bin)   :: ff   ! Volume fraction of intermediate particles
47  REAL, DIMENSION(nbtr_bin)                     :: V    ! Volume of bins
48  REAL, DIMENSION(nbtr_bin,nbtr_bin)            :: Vij  ! Volume sum of i and j
49  REAL                                          :: eta  ! Dynamic viscosity of air
50  REAL, PARAMETER                               :: mair=4.8097E-26 ! Average mass of an air molecule [kg]
51  REAL                                          :: zrho ! Density of air
52  REAL                                          :: mnfrpth ! Mean free path of air
53  REAL, DIMENSION(nbtr_bin)                     :: Kn   ! Knudsen number of particle i
54  REAL, DIMENSION(nbtr_bin)                     :: Di   ! Particle diffusion coefficient
55  REAL, DIMENSION(nbtr_bin)                     :: m_par   ! Mass of particle i
56  REAL, DIMENSION(nbtr_bin)                     :: thvelpar! Thermal velocity of particle i
57  REAL, DIMENSION(nbtr_bin)                     :: mfppar  ! Mean free path of particle i
58  REAL, DIMENSION(nbtr_bin)                     :: delta! delta of particle i (from equation 21)
59  REAL, DIMENSION(nbtr_bin,nbtr_bin)            :: beta ! Coagulation kernel from Brownian diffusion
60  REAL                                          :: beta_const ! Constant coagulation kernel (for comparison)
61  REAL                                          :: num
62  REAL                                          :: numi
63  REAL                                          :: denom
64
[2949]65  ! Additional variables for coagulation enhancement factor due to van der Waals forces
66  ! Taken from Chan and Mozurkewich, Measurement of the coagulation rate constant for sulfuric acid
67  ! particles as a function of particle size using TDMA, Aerosol Science, 32, 321-339, 2001.
68  !--ok_vdw is 0 for no vdW forces, 1 for E(0), 2 for E(infinity)
69  INTEGER, PARAMETER                            :: ok_vdw = 0
70  REAL, PARAMETER                               :: avdW1 = 0.0757
71  REAL, PARAMETER                               :: avdW3 = 0.0015
72  REAL, PARAMETER                               :: bvdW0 = 0.0151
73  REAL, PARAMETER                               :: bvdW1 = -0.186
74  REAL, PARAMETER                               :: bvdW3 = -0.0163
75  REAL, PARAMETER                               :: AvdW = 6.4e-20 !Hamaker constant in J = 1e7 erg
76  REAL                                          :: AvdWi
77  REAL                                          :: xvdW
78  REAL                                          :: EvdW
79
[2690]80  DO i=1, nbtr_bin
81   radius(i)=mdw(i)/2.
82   V(i)= radius(i)**3.  !neglecting factor 4*RPI/3
83  ENDDO
84
85  DO j=1, nbtr_bin
86  DO i=1, nbtr_bin
87   Vij(i,j)= V(i)+V(j)
88  ENDDO
89  ENDDO
90
91!--pre-compute the f(i,j,k) from Jacobson equation 13
92  ff=0.0
93  DO k=1, nbtr_bin
94  DO j=1, nbtr_bin
95  DO i=1, nbtr_bin
96    IF (k.EQ.1) THEN
97      ff(i,j,k)= 0.0
98    ELSEIF (k.GT.1.AND.V(k-1).LT.Vij(i,j).AND.Vij(i,j).LT.V(k)) THEN
99      ff(i,j,k)= 1.-ff(i,j,k-1)
100    ELSEIF (k.EQ.nbtr_bin) THEN
101      IF (Vij(i,j).GE.v(k)) THEN
102        ff(i,j,k)= 1.
103      ELSE
104        ff(i,j,k)= 0.0
105      ENDIF
106    ELSEIF (k.LE.(nbtr_bin-1).AND.V(k).LE.Vij(i,j).AND.Vij(i,j).LT.V(k+1)) THEN
107      ff(i,j,k)= V(k)/Vij(i,j)*(V(k+1)-Vij(i,j))/(V(k+1)-V(k))
108    ENDIF
109  ENDDO
110  ENDDO
111  ENDDO
112
113  DO ilon=1, klon
114  DO ilev=1, klev
115  !only in the stratosphere
116  IF (is_strato(ilon,ilev)) THEN
117  !compute actual wet particle radius & volume for every grid box
118  DO i=1, nbtr_bin
119   radius(i)=f_r_wet(ilon,ilev)*mdw(i)/2.
120   V(i)= radius(i)**3.  !neglecting factor 4*RPI/3
121  ENDDO
122
123!--Calculations for the coagulation kernel---------------------------------------------------------
124
125  zrho=pplay(ilon,ilev)/t_seri(ilon,ilev)/RD
126
127!--initialize the tracer at time t and convert from [number/KgA] to [number/m3]
128  DO i=1, nbtr_bin
129  tr_t(ilon,ilev,i) = tr_seri(ilon,ilev,i+nbtr_sulgas) * zrho
130  ENDDO
131
132  ! mean free path of air (Pruppacher and Klett, 2010, p.417) [m]
133  mnfrpth=6.6E-8*(1.01325E+5/pplay(ilon,ilev))*(t_seri(ilon,ilev)/293.15)
134  ! mnfrpth=2.*eta/(zrho*thvelair)
135  ! mean free path of air (Prupp. Klett) in [10^-6 m]
136  ! ZLAIR = 0.066 *(1.01325E+5/PPLAY)*(T_SERI/293.15)*1.E-06
137
138  ! dynamic viscosity of air (Pruppacher and Klett, 2010, p.417) [kg/(m*s)]
139  IF (t_seri(ilon,ilev).GE.273.15) THEN
140    eta=(1.718+0.0049*(t_seri(ilon,ilev)-273.15))*1.E-5
141  ELSE
142    eta=(1.718+0.0049*(t_seri(ilon,ilev)-273.15)-1.2E-5*(t_seri(ilon,ilev)-273.15)**2)*1.E-5
143  ENDIF
144
145!--pre-compute the particle diffusion coefficient Di(i) from equation 18
146  Di=0.0
147  DO i=1, nbtr_bin
148   Kn(i)=mnfrpth/radius(i)
149   Di(i)=RKBOL*t_seri(ilon,ilev)/(6.*RPI*radius(i)*eta)*(1.+Kn(i)*(1.249+0.42*exp(-0.87/Kn(i))))
150  ENDDO
151
152!--pre-compute the thermal velocity of a particle thvelpar(i) from equation 20
153  thvelpar=0.0
154  DO i=1, nbtr_bin
155   m_par(i)=4./3.*RPI*radius(i)**3.*DENSO4(ilon,ilev)*1000.
156   thvelpar(i)=sqrt(8.*RKBOL*t_seri(ilon,ilev)/(RPI*m_par(i)))
157  ENDDO
158
159!--pre-compute the particle mean free path mfppar(i) from equation 22
160  mfppar=0.0
161  DO i=1, nbtr_bin
162   mfppar(i)=8.*Di(i)/(RPI*thvelpar(i))
163  ENDDO
164
165!--pre-compute the mean distance delta(i) from the center of a sphere reached by particles
166!--leaving the surface of the sphere and traveling a distance of particle mfppar(i) from equation 21
167  delta=0.0
168  DO i=1, nbtr_bin
169   delta(i)=((2.*radius(i)+mfppar(i))**3.-(4.*radius(i)**2.+mfppar(i)**2.)**1.5)/ &
170           & (6.*radius(i)*mfppar(i))-2.*radius(i)
171  ENDDO
172
[2949]173!--pre-compute the beta(i,j) from equation 17 in Jacobson
[2690]174  num=0.0
175  DO j=1, nbtr_bin
176  DO i=1, nbtr_bin
[2949]177!
[2690]178   num=4.*RPI*(radius(i)+radius(j))*(Di(i)+Di(j))
179   denom=(radius(i)+radius(j))/(radius(i)+radius(j)+sqrt(delta(i)**2.+delta(j)**2.))+ &
180        & 4.*(Di(i)+Di(j))/(sqrt(thvelpar(i)**2.+thvelpar(j)**2.)*(radius(i)+radius(j)))
181   beta(i,j)=num/denom
[2949]182!
183!--compute enhancement factor due to van der Waals forces
184   IF (ok_vdw .EQ. 0) THEN      !--no enhancement factor
185     Evdw=1.0
186   ELSEIF (ok_vdw .EQ. 1) THEN  !--E(0) case
[2950]187     AvdWi = AvdW/(RKBOL*t_seri(ilon,ilev))*(4.*radius(i)*radius(j))/(radius(i)+radius(j))**2.
[2949]188     xvdW = LOG(1.+AvdWi)
189     EvdW = 1. + avdW1*xvdW + avdW3*xvdW**3
190   ELSEIF (ok_vdw .EQ. 2) THEN  !--E(infinity) case
[2950]191     AvdWi = AvdW/(RKBOL*t_seri(ilon,ilev))*(4.*radius(i)*radius(j))/(radius(i)+radius(j))**2.
[2949]192     xvdW = LOG(1.+AvdWi)
193     EvdW = 1. + SQRT(AvdWi/3.)/(1.+bvdW0*SQRT(AvdWi)) + bvdW1*xvdW + bvdW3*xvdW**3.
194   ENDIF
195!
196   beta(i,j)=beta(i,j)*EvdW
197
[2690]198  ENDDO
199  ENDDO
200
201!--external loop for equation 14
202  DO k=1, nbtr_bin
203
204!--calculating denominator sum
205  denom=0.0
206  DO j=1, nbtr_bin
207  denom=denom+(1.-ff(k,j,k))*beta(k,j)*tr_t(ilon,ilev,j)
208  ENDDO
209
210  IF (k.EQ.1) THEN
211!--calculate new concentration of smallest bin
212    tr_tp1(ilon,ilev,k)=tr_t(ilon,ilev,k)/(1.+pdtcoag*denom)
213    ELSE
214!--calculating double sum terms in numerator of eq 14
215    num=0.0
216    DO j=1, k
217    numi=0.0
218    DO i=1, k-1
219    numi=numi+ff(i,j,k)*beta(i,j)*V(i)*tr_tp1(ilon,ilev,i)*tr_t(ilon,ilev,j)
220    ENDDO
221    num=num+numi
222    ENDDO
223
224!--calculate new concentration of other bins
225    tr_tp1(ilon,ilev,k)=(V(k)*tr_t(ilon,ilev,k)+pdtcoag*num)/(1.+pdtcoag*denom)/V(k)
226  ENDIF
227
228  ENDDO !--end of loop k
229
230!--convert tracer concentration back from [number/m3] to [number/KgA] and write into tr_seri
231  DO i=1, nbtr_bin
232   tr_seri(ilon,ilev,i+nbtr_sulgas) = tr_tp1(ilon,ilev,i) / zrho
233  ENDDO
234
235  ENDIF ! IF IN STRATOSPHERE
236  ENDDO !--end of loop klev
237  ENDDO !--end of loop klon
238
239END SUBROUTINE COAGULATE
Note: See TracBrowser for help on using the repository browser.