1 | !$Id $ |
---|
2 | |
---|
3 | SUBROUTINE lsc_scav_orig(pdtime,it,iflag_lscav,oliq,flxr,flxs,rneb,beta_fisrt, & |
---|
4 | beta_v1,pplay,paprs,t,tr_seri,d_tr_insc, & |
---|
5 | d_tr_bcscav,d_tr_evap,qPrls) |
---|
6 | USE ioipsl |
---|
7 | USE dimphy |
---|
8 | USE mod_grid_phy_lmdz |
---|
9 | USE mod_phys_lmdz_para |
---|
10 | USE traclmdz_mod |
---|
11 | USE infotrac_phy, ONLY: nbtr |
---|
12 | !!! USE geometry_mod |
---|
13 | USE iophy |
---|
14 | |
---|
15 | USE yomcst_mod_h |
---|
16 | USE yoecumf_mod_h |
---|
17 | USE chem_mod_h |
---|
18 | IMPLICIT NONE |
---|
19 | !===================================================================== |
---|
20 | ! Objet : depot humide (lessivage et evaporation) de traceurs |
---|
21 | ! Inspired by routines of Olivier Boucher (mars 1998) |
---|
22 | ! author R. Pilon 10 octobre 2012 |
---|
23 | ! last modification 16/01/2013 (reformulation partie evaporation) |
---|
24 | !===================================================================== |
---|
25 | |
---|
26 | |
---|
27 | REAL,INTENT(IN) :: pdtime ! time step (s) |
---|
28 | INTEGER,INTENT(IN) :: it ! tracer number |
---|
29 | INTEGER,INTENT(IN) :: iflag_lscav ! LS scavenging param: |
---|
30 | ! 3=Reddy_Boucher2004, 4=3+RPilon. |
---|
31 | REAL,DIMENSION(klon,klev+1),INTENT(IN) :: flxr ! flux precipitant de pluie |
---|
32 | REAL,DIMENSION(klon,klev+1),INTENT(IN) :: flxs ! flux precipitant de neige |
---|
33 | REAL,INTENT(IN) :: oliq ! contenu en eau liquide dans le nuage (kg/kg) |
---|
34 | REAL,DIMENSION(klon,klev),INTENT(IN) :: rneb |
---|
35 | REAL,DIMENSION(klon,klev),INTENT(IN) :: pplay ! pression |
---|
36 | REAL,DIMENSION(klon,klev+1),INTENT(IN) :: paprs ! pression |
---|
37 | REAL,DIMENSION(klon,klev),INTENT(IN) :: t ! temperature |
---|
38 | ! tracers |
---|
39 | REAL,DIMENSION(klon,klev,nbtr),INTENT(IN) :: tr_seri ! q de traceur |
---|
40 | REAL,DIMENSION(klon,klev),INTENT(IN) :: beta_fisrt ! taux de conversion de l'eau cond |
---|
41 | REAL,DIMENSION(klon,klev),INTENT(OUT) :: beta_v1 ! -- (originale version) |
---|
42 | REAL,DIMENSION(klon) :: his_dh ! tendance de traceur integre verticalement |
---|
43 | REAL,DIMENSION(klon,klev,nbtr),INTENT(OUT) :: d_tr_insc ! tendance du traceur |
---|
44 | REAL,DIMENSION(klon,klev,nbtr),INTENT(OUT) :: d_tr_bcscav ! tendance de traceur |
---|
45 | REAL,DIMENSION(klon,klev,nbtr),INTENT(OUT) :: d_tr_evap |
---|
46 | REAL,DIMENSION(klon,nbtr),INTENT(OUT) :: qPrls !jyg: concentration tra dans pluie LS a la surf. |
---|
47 | REAL :: dxin,dxev ! tendance temporaire de traceur incloud |
---|
48 | REAL,DIMENSION(klon,klev) :: dxbc ! tendance temporaire de traceur bc |
---|
49 | |
---|
50 | |
---|
51 | ! variables locales |
---|
52 | LOGICAL,SAVE :: debut=.true. |
---|
53 | !$OMP THREADPRIVATE(debut) |
---|
54 | ! |
---|
55 | REAL,PARAMETER :: henry=1.4 ! constante de Henry en mol/l/atm ~1.4 for gases |
---|
56 | REAL :: henry_t ! constante de Henry a T t (mol/l/atm) |
---|
57 | REAL,PARAMETER :: kk=2900. ! coefficient de dependence en T (K) |
---|
58 | REAL :: f_a ! rapport de la phase aqueuse a la phase gazeuse |
---|
59 | REAL :: beta ! taux de conversion de l'eau en pluie |
---|
60 | |
---|
61 | INTEGER :: i, k |
---|
62 | REAL,DIMENSION(klon,klev) :: scav ! water liquid content / fraction aqueuse du constituant |
---|
63 | REAL,DIMENSION(klon,klev) :: zrho |
---|
64 | REAL,DIMENSION(klon,klev) :: zdz |
---|
65 | REAL,DIMENSION(klon,klev) :: zmass ! layer mass |
---|
66 | |
---|
67 | REAL :: frac_ev ! cste pour la reevaporation : dropplet shrinking |
---|
68 | ! frac_ev = frac_gas ou frac_aer |
---|
69 | REAL,PARAMETER :: frac_gas=1.0 ! cste pour la reevaporation pour les gaz |
---|
70 | REAL :: frac_aer ! cste pour la reevaporation pour les particules |
---|
71 | REAL,DIMENSION(klon,klev) :: deltaP ! P(i+1)-P(i) |
---|
72 | REAL,DIMENSION(klon,klev) :: beta_ev ! dP/P(i+1) |
---|
73 | |
---|
74 | ! 101.325 m3/l x Pa/atm |
---|
75 | ! R Pa.m3/mol/K |
---|
76 | ! cste de dissolution pour le depot humide |
---|
77 | REAL,SAVE :: frac_fine_scav |
---|
78 | REAL,SAVE :: frac_coar_scav |
---|
79 | !$OMP THREADPRIVATE(frac_fine_scav, frac_coar_scav) |
---|
80 | |
---|
81 | ! below-cloud scav variables |
---|
82 | ! aerosol : alpha_r=0.001, gas 0.001 (Pruppacher & Klett 1967) |
---|
83 | REAL,SAVE :: alpha_r ! coefficient d'impaction pour la pluie |
---|
84 | REAL,SAVE :: alpha_s ! coefficient d'impaction pour la neige |
---|
85 | REAL,SAVE :: R_r ! mean raindrop radius (m) |
---|
86 | REAL,SAVE :: R_s ! mean snow crystal radius (m) |
---|
87 | !$OMP THREADPRIVATE(alpha_r, alpha_s, R_r, R_s) |
---|
88 | REAL :: pr, ps, ice, water |
---|
89 | real :: conserv |
---|
90 | ! |
---|
91 | !!!!!!!!!!!!!!!!!!!! choix lessivage !!!!!!!!!!!!!!!!!!!!!!!! |
---|
92 | !! logical,save :: inscav_fisrt |
---|
93 | !!! $OMP THREADPRIVATE(inscav_first) |
---|
94 | ! |
---|
95 | !!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
96 | IF (debut) THEN |
---|
97 | ! |
---|
98 | ! inscav_fisrt=.true. |
---|
99 | ! call getin('inscav_fisrt',inscav_fisrt) |
---|
100 | ! if(inscav_fisrt) then |
---|
101 | ! print*,'beta from fisrtilp.F90, beta = (z_cond - z_oliq)/z_cond, inscav_fisrt=',inscav_fisrt |
---|
102 | ! else |
---|
103 | ! print*,'beta from Reddy and Bocuher 2004 (original version), inscav_fisrt=',inscav_fisrt |
---|
104 | ! endif |
---|
105 | ! |
---|
106 | alpha_r=0.001 ! coefficient d'impaction pour la pluie |
---|
107 | alpha_s=0.01 ! coefficient d'impaction pour la neige |
---|
108 | R_r=0.001 ! mean raindrop radius (m) |
---|
109 | R_s=0.001 ! mean snow crystal radius (m) |
---|
110 | frac_fine_scav=0.7 |
---|
111 | frac_coar_scav=0.7 |
---|
112 | ! frac_aer=0.5 ~ droplet size shrinks by evap |
---|
113 | frac_aer=0.5 |
---|
114 | ! |
---|
115 | |
---|
116 | !JE to speed up, commented 20140219 |
---|
117 | ! |
---|
118 | ! OPEN(99,file='lsc_scav_param.data',status='old', & |
---|
119 | ! form='formatted',err=9999) |
---|
120 | ! READ(99,*,end=9998) alpha_r |
---|
121 | ! READ(99,*,end=9998) alpha_s |
---|
122 | ! READ(99,*,end=9998) R_r |
---|
123 | ! READ(99,*,end=9998) R_s |
---|
124 | ! READ(99,*,end=9998) frac_fine_scav |
---|
125 | ! READ(99,*,end=9998) frac_coar_scav |
---|
126 | ! READ(99,*,end=9998) frac_aer |
---|
127 | !9998 Continue |
---|
128 | ! CLOSE(99) |
---|
129 | !9999 Continue |
---|
130 | ! |
---|
131 | ! print*,'alpha_r',alpha_r |
---|
132 | ! print*,'alpha_s',alpha_s |
---|
133 | ! print*,'R_r',R_r |
---|
134 | ! print*,'R_s',R_s |
---|
135 | ! print*,'frac_fine_scav',frac_fine_scav |
---|
136 | ! print*,'frac_coar_scav',frac_coar_scav |
---|
137 | ! print*,'frac_aer ev',frac_aer |
---|
138 | ! |
---|
139 | ! JE endcomment |
---|
140 | ! |
---|
141 | ENDIF !(debut) |
---|
142 | !!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
143 | ! |
---|
144 | ! initialization |
---|
145 | dxin=0. |
---|
146 | dxev=0. |
---|
147 | beta_ev=0. |
---|
148 | |
---|
149 | DO i=1,klon |
---|
150 | his_dh(i)=0. |
---|
151 | ENDDO |
---|
152 | |
---|
153 | DO k=1,klev |
---|
154 | DO i=1, klon |
---|
155 | dxbc(i,k)=0. |
---|
156 | beta_v1(i,k)=0. |
---|
157 | deltaP(i,k)=0. |
---|
158 | ENDDO |
---|
159 | ENDDO |
---|
160 | |
---|
161 | DO k=1,klev |
---|
162 | DO i=1, klon |
---|
163 | d_tr_insc(i,k,it)=0. |
---|
164 | d_tr_bcscav(i,k,it)=0. |
---|
165 | d_tr_evap(i,k,it)=0. |
---|
166 | ENDDO |
---|
167 | ENDDO |
---|
168 | |
---|
169 | ! pressure and size of the layer |
---|
170 | DO k=klev-1, 1, -1 |
---|
171 | DO i=1, klon |
---|
172 | zrho(i,k)=pplay(i,k)/t(i,k)/RD |
---|
173 | zdz(i,k)=(paprs(i,k)-paprs(i,k+1))/zrho(i,k)/RG |
---|
174 | zmass(i,k)=(paprs(i,k)-paprs(i,k+1))/RG |
---|
175 | ENDDO |
---|
176 | ENDDO |
---|
177 | |
---|
178 | IF (it.gt.1) THEN ! aerosol |
---|
179 | frac_ev=frac_aer |
---|
180 | ELSE ! gas |
---|
181 | frac_ev=frac_gas |
---|
182 | ENDIF |
---|
183 | |
---|
184 | IF(it.gt.1) then ! aerosol |
---|
185 | DO k=1, klev |
---|
186 | DO i=1, klon |
---|
187 | scav(i,k)=frac_fine_scav |
---|
188 | ENDDO |
---|
189 | ENDDO |
---|
190 | ELSE ! gas |
---|
191 | DO k=1, klev |
---|
192 | DO i=1, klon |
---|
193 | henry_t=henry*exp(-kk*(1./298.-1./t(i,k))) ! mol/l/atm |
---|
194 | f_a=henry_t/101.325*R*t(i,k)*oliq*zrho(i,k)/rho_water |
---|
195 | scav(i,k)=f_a/(1.+f_a) |
---|
196 | ENDDO |
---|
197 | ENDDO |
---|
198 | ENDIF |
---|
199 | |
---|
200 | DO k=klev-1, 1, -1 |
---|
201 | DO i=1, klon |
---|
202 | ! incloud scavenging |
---|
203 | ! if(inscav_fisrt) then |
---|
204 | if (iflag_lscav .eq. 4) then |
---|
205 | beta=beta_fisrt(i,k)*rneb(i,k) |
---|
206 | else |
---|
207 | beta=flxr(i,k)-flxr(i,k+1)+flxs(i,k)-flxs(i,k+1) |
---|
208 | ! beta=beta/zdz(i,k)/oliq/zrho(i,k) |
---|
209 | beta=beta/zmass(i,k)/oliq |
---|
210 | beta=MAX(0.,beta) |
---|
211 | endif ! (iflag_lscav .eq. 4) |
---|
212 | beta_v1(i,k)=beta !! for output |
---|
213 | ! |
---|
214 | dxin=tr_seri(i,k,it)*(exp(-scav(i,k)*beta*pdtime)-1.) |
---|
215 | ! his_dh(i)=his_dh(i)-dxin*zrho(i,k)*zdz(i,k)/pdtime ! kg/m2/s |
---|
216 | his_dh(i)=his_dh(i)-dxin*zmass(i,k)/pdtime ! kg/m2/s |
---|
217 | d_tr_insc(i,k,it)=dxin |
---|
218 | |
---|
219 | ! below-cloud impaction |
---|
220 | IF(it.eq.1) then |
---|
221 | d_tr_bcscav(i,k,it)=0. |
---|
222 | ELSE |
---|
223 | pr=0.5*(flxr(i,k)+flxr(i,k+1)) |
---|
224 | ps=0.5*(flxs(i,k)+flxs(i,k+1)) |
---|
225 | water=pr*alpha_r/R_r/rho_water |
---|
226 | ice=ps*alpha_s/R_s/rho_ice |
---|
227 | dxbc(i,k)=-3./4.*tr_seri(i,k,it)*pdtime*(water+ice) |
---|
228 | ! add tracers from below cloud scav in his_dh |
---|
229 | his_dh(i)=his_dh(i)-dxbc(i,k)*zmass(i,k)/pdtime ! kg/m2/s |
---|
230 | d_tr_bcscav(i,k,it)=dxbc(i,k) |
---|
231 | ENDIF |
---|
232 | |
---|
233 | ! reevaporation |
---|
234 | deltaP(i,k)=flxr(i,k+1)+flxs(i,k+1)-flxr(i,k)-flxs(i,k) |
---|
235 | deltaP(i,k)=max(deltaP(i,k),0.) |
---|
236 | |
---|
237 | if(flxr(i,k+1)+flxs(i,k+1).gt.1.e-16) then |
---|
238 | beta_ev(i,k)=deltaP(i,k)/(flxr(i,k+1)+flxs(i,k+1)) |
---|
239 | else |
---|
240 | beta_ev(i,k)=0. |
---|
241 | endif |
---|
242 | |
---|
243 | beta_ev(i,k)=max(min(1.,beta_ev(i,k)),0.) |
---|
244 | |
---|
245 | !jyg |
---|
246 | |
---|
247 | if(abs(1-(1-frac_ev)*beta_ev(i,k)).gt.1.e-16) then |
---|
248 | ! remove tracers from precipitation owing to release by evaporation in his_dh |
---|
249 | ! dxev=frac_ev*beta_ev(i,k)*his_dh(i) *pdtime/(zrho(i,k)*zdz(i,k)) & |
---|
250 | dxev=frac_ev*beta_ev(i,k)*his_dh(i) *pdtime/(zmass(i,k)) & |
---|
251 | /(1 -(1-frac_ev)*beta_ev(i,k)) |
---|
252 | his_dh(i)=his_dh(i)*(1 - frac_ev*beta_ev(i,k) / (1 -(1-frac_ev)*beta_ev(i,k))) |
---|
253 | else |
---|
254 | ! dxev=his_dh(i) *pdtime/(zrho(i,k)*zdz(i,k)) |
---|
255 | dxev=his_dh(i) *pdtime/(zmass(i,k)) |
---|
256 | his_dh(i)=0. |
---|
257 | endif |
---|
258 | ! print*, k, 'beta_ev',beta_ev |
---|
259 | ! remove tracers from precipitation owing to release by evaporation in his_dh |
---|
260 | !! dxev=frac_ev*deltaP(i,k)*pdtime * his_dh(i) /(zrho(i,k)*zdz(i,k)) |
---|
261 | !rplmd |
---|
262 | !! dxev=frac_ev*deltaP(i,k)*his_dh(i) *pdtime/(zrho(i,k)*zdz(i,k)) & |
---|
263 | !! /max(flxr(i,k)+flxs(i,k),1.e-16) |
---|
264 | |
---|
265 | |
---|
266 | d_tr_evap(i,k,it)=dxev |
---|
267 | !! tendency is further added in phytrac x = x + dx |
---|
268 | ENDDO !! do i |
---|
269 | ENDDO !! do k |
---|
270 | |
---|
271 | !jyg (20130114) |
---|
272 | DO i = 1,klon |
---|
273 | qPrls(i,it) = his_dh(i)/max(flxr(i,1)+flxs(i,1),1.e-16) |
---|
274 | ENDDO |
---|
275 | !jyg end |
---|
276 | |
---|
277 | |
---|
278 | ! test de conservation |
---|
279 | conserv=0. |
---|
280 | ! DO k= klev,1,-1 |
---|
281 | ! DO i=1, klon |
---|
282 | ! conserv=conserv+d_tr_insc(i,k,it)*(paprs(i,k)-paprs(i,k+1))/RG & |
---|
283 | ! +d_tr_bcscav(i,k,it)*(paprs(i,k)-paprs(i,k+1))/RG & |
---|
284 | ! +d_tr_evap(i,k,it)*(paprs(i,k)-paprs(i,k+1))/RG |
---|
285 | ! if(it.eq.3) write(*,'(I2,2X,a,e20.12,2X,a,e20.12,2X,a,e20.12,2X,a,e20.12)'),& |
---|
286 | ! k,'lsc conserv ',conserv,'insc',d_tr_insc(i,k,it),'bc',d_tr_bcscav(i,k,it),'ev',d_tr_evap(i,k,it) |
---|
287 | ! ENDDO |
---|
288 | ! ENDDO |
---|
289 | |
---|
290 | END SUBROUTINE lsc_scav_orig |
---|