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