[5246] | 1 | SUBROUTINE inscav_spl(pdtime,it,masse,henry,kk,qliq, & |
---|
| 2 | flxr,flxs,zrho,zdz,t,x, & |
---|
| 3 | his_dh) |
---|
| 4 | USE dimphy |
---|
[5289] | 5 | USE yomcst_mod_h |
---|
| 6 | USE yoecumf_mod_h |
---|
[5292] | 7 | USE chem_mod_h |
---|
[5271] | 8 | IMPLICIT NONE |
---|
[5246] | 9 | !===================================================================== |
---|
| 10 | ! Objet : depot humide de traceurs |
---|
| 11 | ! Date : mars 1998 |
---|
| 12 | ! Auteur: O. Boucher (LOA) |
---|
| 13 | !===================================================================== |
---|
[5271] | 14 | |
---|
[5246] | 15 | ! |
---|
| 16 | INTEGER :: it |
---|
| 17 | REAL :: pdtime ! pas de temps (s) |
---|
| 18 | REAL :: masse ! molar mass (except for BC/OM/IF/DUST=Nav) |
---|
| 19 | REAL :: henry ! constante de Henry en mol/l/atm |
---|
| 20 | REAL :: kk ! coefficient de dependence en T (K) |
---|
| 21 | REAL :: qliq ! contenu en eau liquide dans le nuage (kg/kg) |
---|
| 22 | ! REAL flxr(klon,klev+1) ! flux precipitant de pluie |
---|
| 23 | ! REAL flxs(klon,klev+1) ! flux precipitant de neige |
---|
| 24 | REAL :: flxr(klon,klev) ! flux precipitant de pluie ! Titane |
---|
| 25 | REAL :: flxs(klon,klev) ! flux precipitant de neige ! Titane |
---|
| 26 | REAL :: flxr_aux(klon,klev+1) |
---|
| 27 | REAL :: flxs_aux(klon,klev+1) |
---|
| 28 | REAL :: zrho(klon,klev) |
---|
| 29 | REAL :: zdz(klon,klev) |
---|
| 30 | REAL :: t(klon,klev) |
---|
| 31 | REAL :: x(klon,klev) ! q de traceur |
---|
| 32 | REAL :: his_dh(klon) ! tendance de traceur integre verticalement |
---|
| 33 | ! |
---|
| 34 | !--variables locales |
---|
| 35 | INTEGER :: i, k |
---|
| 36 | ! |
---|
| 37 | REAL :: dx ! tendance de traceur |
---|
| 38 | REAL :: f_a !--rapport de la phase aqueuse a la phase gazeuse |
---|
| 39 | REAL :: beta !--taux de conversion de l'eau en pluie |
---|
| 40 | REAL :: henry_t !--constante de Henry a T t (mol/l/atm) |
---|
| 41 | REAL :: scav(klon,klev) !--fraction aqueuse du constituant |
---|
| 42 | REAL :: K1, K2, ph, frac |
---|
| 43 | REAL :: frac_gas, frac_aer !-cste pour la reevaporation |
---|
| 44 | PARAMETER (ph=5., frac_gas=1.0, frac_aer=0.5) |
---|
| 45 | !---cste de dissolution pour le depot humide |
---|
| 46 | REAL :: frac_fine_scav,frac_coar_scav |
---|
| 47 | !---added by nhl |
---|
| 48 | REAL :: aux_cte |
---|
[2630] | 49 | |
---|
[5246] | 50 | PARAMETER (frac_fine_scav=0.7) |
---|
| 51 | PARAMETER (frac_coar_scav=0.7) |
---|
[2630] | 52 | |
---|
[5246] | 53 | !--101.325 m3/l x Pa/atm |
---|
| 54 | !--R Pa.m3/mol/K |
---|
| 55 | ! |
---|
| 56 | !------------------------------------------ |
---|
| 57 | ! |
---|
| 58 | !nhl IF (it.EQ.2.OR.it.EQ.3) THEN !--aerosol ! AS IT WAS FIRST |
---|
| 59 | IF (it.EQ.2.OR.it.EQ.3.OR.it.EQ.4) THEN !--aerosol |
---|
| 60 | frac=frac_aer |
---|
| 61 | ELSE !--gas |
---|
| 62 | frac=frac_gas |
---|
| 63 | ENDIF |
---|
| 64 | ! |
---|
| 65 | IF (it.EQ.1) THEN |
---|
| 66 | DO k=1, klev |
---|
| 67 | DO i=1, klon |
---|
| 68 | henry_t=henry*exp(-kk*(1./298.-1./t(i,k))) !--mol/l/atm |
---|
| 69 | K1=1.2e-2*exp(-2010*(1/298.-1/t(i,k))) |
---|
| 70 | K2=6.6e-8*exp(-1510*(1/298.-1/t(i,k))) |
---|
| 71 | henry_t=henry_t*(1 + K1/10.**(-ph) + K1*K2/(10.**(-ph))**2) |
---|
| 72 | f_a=henry_t/101.325*R*t(i,k)*qliq*zrho(i,k)/rho_water |
---|
| 73 | scav(i,k)=f_a/(1.+f_a) |
---|
| 74 | ENDDO |
---|
| 75 | ENDDO |
---|
| 76 | ELSEIF (it.EQ.2) THEN |
---|
| 77 | DO k=1, klev |
---|
| 78 | DO i=1, klon |
---|
| 79 | scav(i,k)=frac_fine_scav |
---|
| 80 | ENDDO |
---|
| 81 | ENDDO |
---|
| 82 | ELSEIF (it.EQ.3) THEN |
---|
| 83 | DO k=1, klev |
---|
| 84 | DO i=1, klon |
---|
| 85 | scav(i,k)=frac_coar_scav |
---|
| 86 | ENDDO |
---|
| 87 | ENDDO |
---|
| 88 | ELSEIF (it.EQ.4) THEN |
---|
| 89 | DO k=1, klev |
---|
| 90 | DO i=1, klon |
---|
| 91 | scav(i,k)=frac_coar_scav |
---|
| 92 | ENDDO |
---|
| 93 | ENDDO |
---|
| 94 | ELSE |
---|
| 95 | PRINT *,'it non pris en compte' |
---|
| 96 | STOP |
---|
| 97 | ENDIF |
---|
| 98 | ! |
---|
| 99 | ! NHL |
---|
| 100 | ! Auxiliary variables defined to deal with the fact that precipitation |
---|
| 101 | ! fluxes are defined on klev levels only. |
---|
| 102 | ! NHL |
---|
| 103 | ! |
---|
| 104 | flxr_aux(:,klev+1)=0.0 |
---|
| 105 | flxs_aux(:,klev+1)=0.0 |
---|
| 106 | flxr_aux(:,1:klev)=flxr(:,:) |
---|
| 107 | flxs_aux(:,1:klev)=flxs(:,:) |
---|
| 108 | DO k=klev, 1, -1 |
---|
| 109 | DO i=1, klon |
---|
| 110 | !--scavenging |
---|
| 111 | beta=flxr_aux(i,k)-flxr_aux(i,k+1)+flxs_aux(i,k)-flxs_aux(i,k+1) |
---|
| 112 | beta=beta/zdz(i,k)/qliq/zrho(i,k) |
---|
| 113 | beta=MAX(0.0,beta) |
---|
| 114 | dx=x(i,k)*(exp(-scav(i,k)*beta*pdtime)-1.) |
---|
| 115 | x(i,k)=x(i,k)+dx |
---|
| 116 | his_dh(i)=his_dh(i)-dx/RNAVO* & |
---|
| 117 | masse*1.e3*1.e6*zdz(i,k)/pdtime !--mgS/m2/s |
---|
| 118 | !--reevaporation |
---|
| 119 | beta=flxr_aux(i,k)-flxr_aux(i,k+1)+flxs_aux(i,k)-flxs_aux(i,k+1) |
---|
| 120 | IF (beta.LT.0.) beta=beta/(flxr_aux(i,k+1)+flxs_aux(i,k+1)) |
---|
| 121 | IF (flxr_aux(i,k)+flxs_aux(i,k).EQ.0) THEN !--reevaporation totale |
---|
| 122 | beta=MIN(MAX(0.0,-beta),1.0) |
---|
| 123 | ELSE !--reevaporation non totale pour aerosols |
---|
| 124 | ! !print *,'FRAC USED IN INSCAV_SPL' |
---|
| 125 | beta=MIN(MAX(0.0,-beta)*frac,1.0) |
---|
| 126 | ENDIF |
---|
| 127 | dx=beta*his_dh(i)*RNAVO/masse/1.e3/1.e6/zdz(i,k)*pdtime !ORIG LINE |
---|
| 128 | ! funny line for TL/AD |
---|
| 129 | ! AD test works without (x) and for xd = dxd*1.e5 : 2.79051851638 times the 0. |
---|
| 130 | ! AD test does not work with the line : 754592404.083 times the 0. |
---|
| 131 | ! problem seems to be linked to the largest dx wrt x |
---|
| 132 | ! x(i, k) = x(i, k) + dx |
---|
| 133 | ! x(i, k) = x(i, k) + dx ! THIS LINE WAS COMMENTED OUT ORIGINALY !nhl |
---|
| 134 | his_dh(i)=(1.-beta)*his_dh(i) |
---|
| 135 | ENDDO |
---|
| 136 | ENDDO |
---|
| 137 | ! |
---|
| 138 | RETURN |
---|
| 139 | END SUBROUTINE inscav_spl |
---|