1 | !$Id: phytrac_mod.F90 3649 2020-03-17 11:41:16Z fhourdin $ |
---|
2 | MODULE phytrac_mod |
---|
3 | !================================================================================= |
---|
4 | ! Interface between the LMDZ physical package and tracer computation. |
---|
5 | ! Chemistry modules (INCA, Reprobus or the more specific traclmdz routine) |
---|
6 | ! are called from phytrac. |
---|
7 | ! |
---|
8 | !====================================================================== |
---|
9 | ! Auteur(s) FH |
---|
10 | ! Objet: Moniteur general des tendances traceurs |
---|
11 | ! |
---|
12 | ! iflag_vdf_trac : Options for activating transport by vertical diffusion : |
---|
13 | ! 1. notmal |
---|
14 | ! 0. emission is injected in the first layer only, without diffusion |
---|
15 | ! -1 no emission & no diffusion |
---|
16 | ! Modification 2013/07/22 : transformed into a module to pass tendencies to |
---|
17 | ! physics outputs. Additional keys for controling activation of sub processes. |
---|
18 | ! Modification R. Pilon 10 octobre 2012 large scale scavenging incloud_scav + bc_scav |
---|
19 | ! Modification R. Pilon 01 janvier 2012 transport+scavenging KE scheme : cvltr |
---|
20 | !================================================================================= |
---|
21 | |
---|
22 | ! |
---|
23 | ! Tracer tendencies, for outputs |
---|
24 | !------------------------------- |
---|
25 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_cl ! Td couche limite/traceur |
---|
26 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_dec !RomP |
---|
27 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_cv ! Td convection/traceur |
---|
28 | ! RomP >>> |
---|
29 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_insc |
---|
30 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_bcscav |
---|
31 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_evapls |
---|
32 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_ls |
---|
33 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_trsp |
---|
34 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_sscav |
---|
35 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_sat |
---|
36 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_uscav |
---|
37 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: qPr,qDi ! concentration tra dans pluie,air descente insaturee |
---|
38 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: qPa,qMel |
---|
39 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: qTrdi,dtrcvMA ! conc traceur descente air insaturee et td convective MA |
---|
40 | ! RomP <<< |
---|
41 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_th ! Td thermique |
---|
42 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_lessi_impa ! Td du lessivage par impaction |
---|
43 | REAL,DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_lessi_nucl ! Td du lessivage par nucleation |
---|
44 | REAL,DIMENSION(:,:),ALLOCATABLE,SAVE :: qPrls !jyg: concentration tra dans pluie LS a la surf. |
---|
45 | REAL,DIMENSION(:,:),ALLOCATABLE,SAVE :: d_tr_dry ! Td depot sec/traceur (1st layer),ALLOCATABLE,SAVE jyg |
---|
46 | REAL,DIMENSION(:,:),ALLOCATABLE,SAVE :: flux_tr_dry ! depot sec/traceur (surface),ALLOCATABLE,SAVE jyg |
---|
47 | |
---|
48 | !$OMP THREADPRIVATE(qPa,qMel,qTrdi,dtrcvMA,d_tr_th,d_tr_lessi_impa,d_tr_lessi_nucl) |
---|
49 | !$OMP THREADPRIVATE(d_tr_trsp,d_tr_sscav,d_tr_sat,d_tr_uscav,qPr,qDi) |
---|
50 | !$OMP THREADPRIVATE(d_tr_insc,d_tr_bcscav,d_tr_evapls,d_tr_ls,qPrls) |
---|
51 | !$OMP THREADPRIVATE(d_tr_cl,d_tr_dry,flux_tr_dry,d_tr_dec,d_tr_cv) |
---|
52 | |
---|
53 | |
---|
54 | CONTAINS |
---|
55 | |
---|
56 | SUBROUTINE phytrac_init() |
---|
57 | USE dimphy |
---|
58 | USE infotrac_phy, ONLY: nbtr, type_trac |
---|
59 | USE tracco2i_mod, ONLY: tracco2i_init |
---|
60 | IMPLICIT NONE |
---|
61 | |
---|
62 | ALLOCATE(d_tr_cl(klon,klev,nbtr),d_tr_dry(klon,nbtr)) |
---|
63 | ALLOCATE(flux_tr_dry(klon,nbtr),d_tr_dec(klon,klev,nbtr),d_tr_cv(klon,klev,nbtr)) |
---|
64 | ALLOCATE(d_tr_insc(klon,klev,nbtr),d_tr_bcscav(klon,klev,nbtr)) |
---|
65 | ALLOCATE(d_tr_evapls(klon,klev,nbtr),d_tr_ls(klon,klev,nbtr)) |
---|
66 | ALLOCATE(qPrls(klon,nbtr),d_tr_trsp(klon,klev,nbtr)) |
---|
67 | ALLOCATE(d_tr_sscav(klon,klev,nbtr),d_tr_sat(klon,klev,nbtr)) |
---|
68 | ALLOCATE(d_tr_uscav(klon,klev,nbtr),qPr(klon,klev,nbtr),qDi(klon,klev,nbtr)) |
---|
69 | ALLOCATE(qPa(klon,klev,nbtr),qMel(klon,klev,nbtr)) |
---|
70 | ALLOCATE(qTrdi(klon,klev,nbtr),dtrcvMA(klon,klev,nbtr)) |
---|
71 | ALLOCATE(d_tr_th(klon,klev,nbtr)) |
---|
72 | ALLOCATE(d_tr_lessi_impa(klon,klev,nbtr),d_tr_lessi_nucl(klon,klev,nbtr)) |
---|
73 | |
---|
74 | |
---|
75 | |
---|
76 | !=============================================================================== |
---|
77 | ! -- Do specific treatment according to chemestry model or local LMDZ tracers |
---|
78 | ! |
---|
79 | !=============================================================================== |
---|
80 | SELECT CASE(type_trac) |
---|
81 | CASE('co2i') |
---|
82 | ! -- CO2 interactif -- |
---|
83 | CALL tracco2i_init() |
---|
84 | END SELECT |
---|
85 | |
---|
86 | |
---|
87 | END SUBROUTINE phytrac_init |
---|
88 | |
---|
89 | SUBROUTINE phytrac( & |
---|
90 | nstep, julien, gmtime, debutphy, & |
---|
91 | lafin, pdtphys, u, v, t_seri, & |
---|
92 | paprs, pplay, pmfu, pmfd, & |
---|
93 | pen_u, pde_u, pen_d, pde_d, & |
---|
94 | cdragh, coefh, fm_therm, entr_therm, & |
---|
95 | yu1, yv1, ftsol, pctsrf, & |
---|
96 | ustar, u10m, v10m, & |
---|
97 | wstar, ale_bl, ale_wake, & |
---|
98 | xlat, xlon, & |
---|
99 | frac_impa,frac_nucl,beta_fisrt,beta_v1, & |
---|
100 | presnivs, pphis, pphi, albsol, & |
---|
101 | sh, ch, rh, cldfra, rneb, & |
---|
102 | diafra, cldliq, itop_con, ibas_con, & |
---|
103 | pmflxr, pmflxs, prfl, psfl, & |
---|
104 | da, phi, mp, upwd, & |
---|
105 | phi2, d1a, dam, sij, wght_cvfd, & ! RomP +RL |
---|
106 | wdtrainA, wdtrainM, sigd, clw, elij, & ! RomP |
---|
107 | evap, ep, epmlmMm, eplaMm, & ! RomP |
---|
108 | dnwd, aerosol_couple, flxmass_w, & |
---|
109 | tau_aero, piz_aero, cg_aero, ccm, & |
---|
110 | rfname, & |
---|
111 | d_tr_dyn, & ! RomP |
---|
112 | tr_seri, init_source) |
---|
113 | ! |
---|
114 | !====================================================================== |
---|
115 | ! Auteur(s) FH |
---|
116 | ! Objet: Moniteur general des tendances traceurs |
---|
117 | ! Modification R. Pilon 01 janvier 2012 transport+scavenging KE scheme : cvltr |
---|
118 | ! Modification R. Pilon 10 octobre 2012 large scale scavenging incloud_scav + bc_scav |
---|
119 | !====================================================================== |
---|
120 | |
---|
121 | USE ioipsl |
---|
122 | USE phys_cal_mod, only : hour |
---|
123 | USE dimphy |
---|
124 | USE infotrac_phy, ONLY: nbtr, type_trac, conv_flg, solsym, pbl_flg |
---|
125 | USE mod_grid_phy_lmdz |
---|
126 | USE mod_phys_lmdz_para |
---|
127 | USE iophy |
---|
128 | USE traclmdz_mod |
---|
129 | USE tracinca_mod |
---|
130 | USE tracreprobus_mod |
---|
131 | USE indice_sol_mod |
---|
132 | USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root |
---|
133 | USE print_control_mod, ONLY: lunout |
---|
134 | USE aero_mod, ONLY : naero_grp |
---|
135 | |
---|
136 | USE tracco2i_mod |
---|
137 | |
---|
138 | #ifdef CPP_StratAer |
---|
139 | USE traccoag_mod |
---|
140 | USE phys_local_var_mod, ONLY: mdw |
---|
141 | USE phys_local_var_mod, ONLY: budg_dep_dry_ocs, budg_dep_wet_ocs |
---|
142 | USE phys_local_var_mod, ONLY: budg_dep_dry_so2, budg_dep_wet_so2 |
---|
143 | USE phys_local_var_mod, ONLY: budg_dep_dry_h2so4, budg_dep_wet_h2so4 |
---|
144 | USE phys_local_var_mod, ONLY: budg_dep_dry_part, budg_dep_wet_part |
---|
145 | USE infotrac, ONLY: nbtr_sulgas, id_OCS_strat, id_SO2_strat, id_H2SO4_strat |
---|
146 | USE aerophys |
---|
147 | #endif |
---|
148 | |
---|
149 | IMPLICIT NONE |
---|
150 | |
---|
151 | INCLUDE "YOMCST.h" |
---|
152 | INCLUDE "clesphys.h" |
---|
153 | INCLUDE "thermcell.h" |
---|
154 | !========================================================================== |
---|
155 | ! -- ARGUMENT DESCRIPTION -- |
---|
156 | !========================================================================== |
---|
157 | |
---|
158 | ! Input arguments |
---|
159 | !---------------- |
---|
160 | !Configuration grille,temps: |
---|
161 | INTEGER,INTENT(IN) :: nstep ! Appel physique |
---|
162 | INTEGER,INTENT(IN) :: julien ! Jour julien |
---|
163 | REAL,INTENT(IN) :: gmtime ! Heure courante |
---|
164 | REAL,INTENT(IN) :: pdtphys ! Pas d'integration pour la physique (seconde) |
---|
165 | LOGICAL,INTENT(IN) :: debutphy ! le flag de l'initialisation de la physique |
---|
166 | LOGICAL,INTENT(IN) :: lafin ! le flag de la fin de la physique |
---|
167 | |
---|
168 | REAL,DIMENSION(klon),INTENT(IN) :: xlat ! latitudes pour chaque point |
---|
169 | REAL,DIMENSION(klon),INTENT(IN) :: xlon ! longitudes pour chaque point |
---|
170 | ! |
---|
171 | !Physique: |
---|
172 | !-------- |
---|
173 | REAL,DIMENSION(klon,klev),INTENT(IN) :: t_seri ! Temperature |
---|
174 | REAL,DIMENSION(klon,klev),INTENT(IN) :: u ! variable not used |
---|
175 | REAL,DIMENSION(klon,klev),INTENT(IN) :: v ! variable not used |
---|
176 | REAL,DIMENSION(klon,klev),INTENT(IN) :: sh ! humidite specifique |
---|
177 | REAL,DIMENSION(klon,klev),INTENT(IN) :: rh ! humidite relative |
---|
178 | REAL,DIMENSION(klon,klev),INTENT(IN) :: ch ! eau liquide |
---|
179 | REAL,DIMENSION(klon,klev+1),INTENT(IN) :: paprs ! pression pour chaque inter-couche (en Pa) |
---|
180 | REAL,DIMENSION(klon,klev),INTENT(IN) :: pplay ! pression pour le mileu de chaque couche (en Pa) |
---|
181 | REAL,DIMENSION(klon,klev),INTENT(IN) :: pphi ! geopotentiel |
---|
182 | REAL,DIMENSION(klon),INTENT(IN) :: pphis |
---|
183 | REAL,DIMENSION(klev),INTENT(IN) :: presnivs |
---|
184 | REAL,DIMENSION(klon,klev),INTENT(IN) :: cldliq ! eau liquide nuageuse |
---|
185 | REAL,DIMENSION(klon,klev),INTENT(IN) :: cldfra ! fraction nuageuse (tous les nuages) |
---|
186 | REAL,DIMENSION(klon,klev),INTENT(IN) :: diafra ! fraction nuageuse (convection ou stratus artificiels) |
---|
187 | REAL,DIMENSION(klon,klev),INTENT(IN) :: rneb ! fraction nuageuse (grande echelle) |
---|
188 | ! |
---|
189 | REAL :: ql_incl ! contenu en eau liquide nuageuse dans le nuage ! ql_incl=oliq/rneb |
---|
190 | REAL,DIMENSION(klon,klev),INTENT(IN) :: beta_fisrt ! taux de conversion de l'eau cond (de fisrtilp) |
---|
191 | REAL,DIMENSION(klon,klev),INTENT(out) :: beta_v1 ! -- (originale version) |
---|
192 | |
---|
193 | ! |
---|
194 | INTEGER,DIMENSION(klon),INTENT(IN) :: itop_con |
---|
195 | INTEGER,DIMENSION(klon),INTENT(IN) :: ibas_con |
---|
196 | REAL,DIMENSION(klon),INTENT(IN) :: albsol ! albedo surface |
---|
197 | ! |
---|
198 | !Dynamique |
---|
199 | !-------- |
---|
200 | REAL,DIMENSION(klon,klev,nbtr),INTENT(IN) :: d_tr_dyn |
---|
201 | ! |
---|
202 | !Convection: |
---|
203 | !---------- |
---|
204 | REAL,DIMENSION(klon,klev),INTENT(IN) :: pmfu ! flux de masse dans le panache montant |
---|
205 | REAL,DIMENSION(klon,klev),INTENT(IN) :: pmfd ! flux de masse dans le panache descendant |
---|
206 | REAL,DIMENSION(klon,klev),INTENT(IN) :: pen_u ! flux entraine dans le panache montant |
---|
207 | REAL,DIMENSION(klon,klev),INTENT(IN) :: pde_u ! flux detraine dans le panache montant |
---|
208 | REAL,DIMENSION(klon,klev),INTENT(IN) :: pen_d ! flux entraine dans le panache descendant |
---|
209 | REAL,DIMENSION(klon,klev),INTENT(IN) :: pde_d ! flux detraine dans le panache descendant |
---|
210 | |
---|
211 | !...Tiedke |
---|
212 | REAL,DIMENSION(klon,klev+1),INTENT(IN) :: pmflxr, pmflxs ! Flux precipitant de pluie, neige aux interfaces [convection] |
---|
213 | REAL,DIMENSION(klon,klev+1),INTENT(IN) :: prfl, psfl ! Flux precipitant de pluie, neige aux interfaces [large-scale] |
---|
214 | |
---|
215 | LOGICAL,INTENT(IN) :: aerosol_couple |
---|
216 | REAL,DIMENSION(klon,klev),INTENT(IN) :: flxmass_w |
---|
217 | REAL,DIMENSION(klon,klev,naero_grp,2),INTENT(IN) :: tau_aero |
---|
218 | REAL,DIMENSION(klon,klev,naero_grp,2),INTENT(IN) :: piz_aero |
---|
219 | REAL,DIMENSION(klon,klev,naero_grp,2),INTENT(IN) :: cg_aero |
---|
220 | CHARACTER(len=4),DIMENSION(naero_grp),INTENT(IN) :: rfname |
---|
221 | REAL,DIMENSION(klon,klev,2),INTENT(IN) :: ccm |
---|
222 | !... K.Emanuel |
---|
223 | REAL,DIMENSION(klon,klev),INTENT(IN) :: da |
---|
224 | REAL,DIMENSION(klon,klev,klev),INTENT(IN):: phi |
---|
225 | ! RomP >>> |
---|
226 | REAL,DIMENSION(klon,klev),INTENT(IN) :: d1a,dam |
---|
227 | REAL,DIMENSION(klon,klev,klev),INTENT(IN) :: phi2 |
---|
228 | ! |
---|
229 | REAL,DIMENSION(klon,klev),INTENT(IN) :: wdtrainA |
---|
230 | REAL,DIMENSION(klon,klev),INTENT(IN) :: wdtrainM |
---|
231 | REAL,DIMENSION(klon),INTENT(IN) :: sigd |
---|
232 | ! ---- RomP flux entraine, detraine et precipitant kerry Emanuel |
---|
233 | REAL,DIMENSION(klon,klev),INTENT(IN) :: evap |
---|
234 | REAL,DIMENSION(klon,klev),INTENT(IN) :: ep |
---|
235 | REAL,DIMENSION(klon,klev,klev),INTENT(IN) :: sij |
---|
236 | REAL,DIMENSION(klon,klev),INTENT(IN) :: wght_cvfd !RL |
---|
237 | REAL,DIMENSION(klon,klev,klev),INTENT(IN) :: elij |
---|
238 | REAL,DIMENSION(klon,klev,klev),INTENT(IN) :: epmlmMm |
---|
239 | REAL,DIMENSION(klon,klev),INTENT(IN) :: eplaMm |
---|
240 | REAL,DIMENSION(klon,klev),INTENT(IN) :: clw |
---|
241 | ! RomP <<< |
---|
242 | |
---|
243 | ! |
---|
244 | REAL,DIMENSION(klon,klev),INTENT(IN) :: mp |
---|
245 | REAL,DIMENSION(klon,klev),INTENT(IN) :: upwd ! saturated updraft mass flux |
---|
246 | REAL,DIMENSION(klon,klev),INTENT(IN) :: dnwd ! saturated downdraft mass flux |
---|
247 | ! |
---|
248 | !Thermiques: |
---|
249 | !---------- |
---|
250 | REAL,DIMENSION(klon,klev+1),INTENT(IN) :: fm_therm |
---|
251 | REAL,DIMENSION(klon,klev),INTENT(IN) :: entr_therm |
---|
252 | ! |
---|
253 | !Couche limite: |
---|
254 | !-------------- |
---|
255 | ! |
---|
256 | REAL,DIMENSION(:),INTENT(IN) :: cdragh ! (klon) coeff drag pour T et Q |
---|
257 | REAL,DIMENSION(:,:),INTENT(IN) :: coefh ! (klon,klev) coeff melange CL (m**2/s) |
---|
258 | REAL,DIMENSION(:),INTENT(IN) :: ustar,u10m,v10m ! (klon) u* & vent a 10m (m/s) |
---|
259 | REAL,DIMENSION(:),INTENT(IN) :: wstar,ale_bl,ale_wake ! (klon) w* and Avail. Lifting Ener. |
---|
260 | REAL,DIMENSION(:),INTENT(IN) :: yu1 ! (klon) vents au premier niveau |
---|
261 | REAL,DIMENSION(:),INTENT(IN) :: yv1 ! (klon) vents au premier niveau |
---|
262 | ! |
---|
263 | !Lessivage: |
---|
264 | !---------- |
---|
265 | ! |
---|
266 | REAL, DIMENSION(:), ALLOCATABLE, SAVE :: ccntrAA |
---|
267 | REAL, DIMENSION(:), ALLOCATABLE, SAVE :: ccntrENV |
---|
268 | REAL, DIMENSION(:), ALLOCATABLE, SAVE :: coefcoli |
---|
269 | LOGICAL, DIMENSION(:), ALLOCATABLE, SAVE :: flag_cvltr |
---|
270 | !$OMP THREADPRIVATE(ccntrAA,ccntrENV,coefcoli,flag_cvltr) |
---|
271 | REAL, DIMENSION(klon,klev) :: ccntrAA_3d |
---|
272 | REAL, DIMENSION(klon,klev) :: ccntrENV_3d |
---|
273 | REAL, DIMENSION(klon,klev) :: coefcoli_3d |
---|
274 | ! |
---|
275 | ! pour le ON-LINE |
---|
276 | ! |
---|
277 | REAL,DIMENSION(klon,klev),INTENT(IN) :: frac_impa ! fraction d'aerosols non impactes |
---|
278 | REAL,DIMENSION(klon,klev),INTENT(IN) :: frac_nucl ! fraction d'aerosols non nuclees |
---|
279 | |
---|
280 | ! Arguments necessaires pour les sources et puits de traceur: |
---|
281 | REAL,DIMENSION(klon,nbsrf),INTENT(IN) :: ftsol ! Temperature du sol (surf)(Kelvin) |
---|
282 | REAL,DIMENSION(klon,nbsrf),INTENT(IN) :: pctsrf ! Pourcentage de sol (nature du sol) |
---|
283 | |
---|
284 | #ifdef CPP_StratAer |
---|
285 | REAL,DIMENSION(klon) :: v_dep_dry !dry deposition velocity of stratospheric sulfate in m/s |
---|
286 | #endif |
---|
287 | ! Output argument |
---|
288 | !---------------- |
---|
289 | REAL,DIMENSION(klon,klev,nbtr),INTENT(INOUT) :: tr_seri ! Concentration Traceur [U/KgA] |
---|
290 | REAL,DIMENSION(klon,klev) :: sourceBE |
---|
291 | REAL,DIMENSION(klon,nbtr), INTENT(IN) :: init_source |
---|
292 | |
---|
293 | !======================================================================================= |
---|
294 | ! -- LOCAL VARIABLES -- |
---|
295 | !======================================================================================= |
---|
296 | |
---|
297 | INTEGER :: i, k, it |
---|
298 | INTEGER :: nsplit |
---|
299 | |
---|
300 | !Sources et Reservoirs de traceurs (ex:Radon): |
---|
301 | !-------------------------------------------- |
---|
302 | ! |
---|
303 | REAL,DIMENSION(:,:),ALLOCATABLE,SAVE :: source ! a voir lorsque le flux de surface est prescrit |
---|
304 | !$OMP THREADPRIVATE(source) |
---|
305 | |
---|
306 | ! |
---|
307 | !Entrees/Sorties: (cf ini_histrac.h et write_histrac.h) |
---|
308 | !--------------- |
---|
309 | INTEGER :: iiq, ierr |
---|
310 | INTEGER :: nhori, nvert |
---|
311 | REAL :: zsto, zout, zjulian |
---|
312 | INTEGER,SAVE :: nid_tra ! pointe vers le fichier histrac.nc |
---|
313 | !$OMP THREADPRIVATE(nid_tra) |
---|
314 | REAL,DIMENSION(klon) :: zx_tmp_fi2d ! variable temporaire grille physique |
---|
315 | INTEGER :: itau_w ! pas de temps ecriture = nstep + itau_phy |
---|
316 | LOGICAL,PARAMETER :: ok_sync=.TRUE. |
---|
317 | ! |
---|
318 | ! Nature du traceur |
---|
319 | !------------------ |
---|
320 | LOGICAL,DIMENSION(:),ALLOCATABLE,SAVE :: aerosol ! aerosol(it) = true => aerosol => lessivage |
---|
321 | !$OMP THREADPRIVATE(aerosol) ! aerosol(it) = false => gaz |
---|
322 | REAL,DIMENSION(klon,klev) :: delp ! epaisseur de couche (Pa) |
---|
323 | ! |
---|
324 | ! Tendances de traceurs (Td) et flux de traceurs: |
---|
325 | !------------------------ |
---|
326 | REAL,DIMENSION(klon,klev) :: d_tr ! Td dans l'atmosphere |
---|
327 | REAL,DIMENSION(klon,klev) :: Mint |
---|
328 | REAL,DIMENSION(klon,klev,nbtr) :: zmfd1a |
---|
329 | REAL,DIMENSION(klon,klev,nbtr) :: zmfdam |
---|
330 | REAL,DIMENSION(klon,klev,nbtr) :: zmfphi2 |
---|
331 | ! Physique |
---|
332 | !---------- |
---|
333 | REAL,DIMENSION(klon,klev,nbtr) :: flestottr ! flux de lessivage dans chaque couche |
---|
334 | REAL,DIMENSION(klon,klev) :: zmasse ! densité atmosphérique Kg/m2 |
---|
335 | REAL,DIMENSION(klon,klev) :: ztra_th |
---|
336 | !PhH |
---|
337 | REAL,DIMENSION(klon,klev) :: zrho |
---|
338 | REAL,DIMENSION(klon,klev) :: zdz |
---|
339 | REAL :: evaplsc,dx,beta ! variable pour lessivage Genthon |
---|
340 | REAL,DIMENSION(klon) :: his_dh ! --- |
---|
341 | ! in-cloud scav variables |
---|
342 | REAL :: ql_incloud_ref ! ref value of in-cloud condensed water content |
---|
343 | |
---|
344 | !Controles: |
---|
345 | !--------- |
---|
346 | INTEGER,SAVE :: iflag_vdf_trac,iflag_con_trac,iflag_the_trac |
---|
347 | INTEGER,SAVE :: iflag_con_trac_omp, iflag_vdf_trac_omp,iflag_the_trac_omp |
---|
348 | !$OMP THREADPRIVATE(iflag_vdf_trac,iflag_con_trac,iflag_the_trac) |
---|
349 | |
---|
350 | LOGICAL,SAVE :: lessivage |
---|
351 | !$OMP THREADPRIVATE(lessivage) |
---|
352 | |
---|
353 | !RomP >>> |
---|
354 | INTEGER,SAVE :: iflag_lscav_omp,iflag_lscav |
---|
355 | REAL, SAVE :: ccntrAA_in,ccntrAA_omp |
---|
356 | REAL, SAVE :: ccntrENV_in,ccntrENV_omp |
---|
357 | REAL, SAVE :: coefcoli_in,coefcoli_omp |
---|
358 | |
---|
359 | LOGICAL,SAVE :: convscav_omp,convscav |
---|
360 | !$OMP THREADPRIVATE(iflag_lscav) |
---|
361 | !$OMP THREADPRIVATE(ccntrAA_in,ccntrENV_in,coefcoli_in) |
---|
362 | !$OMP THREADPRIVATE(convscav) |
---|
363 | !RomP <<< |
---|
364 | !###################################################################### |
---|
365 | ! -- INITIALIZATION -- |
---|
366 | !###################################################################### |
---|
367 | |
---|
368 | DO k=1,klev |
---|
369 | DO i=1,klon |
---|
370 | sourceBE(i,k)=0. |
---|
371 | Mint(i,k)=0. |
---|
372 | zrho(i,k)=0. |
---|
373 | zdz(i,k)=0. |
---|
374 | END DO |
---|
375 | END DO |
---|
376 | |
---|
377 | DO it=1, nbtr |
---|
378 | DO k=1,klev |
---|
379 | DO i=1,klon |
---|
380 | d_tr_insc(i,k,it)=0. |
---|
381 | d_tr_bcscav(i,k,it)=0. |
---|
382 | d_tr_evapls(i,k,it)=0. |
---|
383 | d_tr_ls(i,k,it)=0. |
---|
384 | d_tr_cv(i,k,it)=0. |
---|
385 | d_tr_cl(i,k,it)=0. |
---|
386 | d_tr_trsp(i,k,it)=0. |
---|
387 | d_tr_sscav(i,k,it)=0. |
---|
388 | d_tr_sat(i,k,it)=0. |
---|
389 | d_tr_uscav(i,k,it)=0. |
---|
390 | d_tr_lessi_impa(i,k,it)=0. |
---|
391 | d_tr_lessi_nucl(i,k,it)=0. |
---|
392 | qDi(i,k,it)=0. |
---|
393 | qPr(i,k,it)=0. |
---|
394 | qPa(i,k,it)=0. |
---|
395 | qMel(i,k,it)=0. |
---|
396 | qTrdi(i,k,it)=0. |
---|
397 | dtrcvMA(i,k,it)=0. |
---|
398 | zmfd1a(i,k,it)=0. |
---|
399 | zmfdam(i,k,it)=0. |
---|
400 | zmfphi2(i,k,it)=0. |
---|
401 | END DO |
---|
402 | END DO |
---|
403 | END DO |
---|
404 | |
---|
405 | DO it=1, nbtr |
---|
406 | DO i=1,klon |
---|
407 | d_tr_dry(i,it)=0. |
---|
408 | flux_tr_dry(i,it)=0. |
---|
409 | END DO |
---|
410 | END DO |
---|
411 | |
---|
412 | DO k = 1, klev |
---|
413 | DO i = 1, klon |
---|
414 | delp(i,k) = paprs(i,k)-paprs(i,k+1) |
---|
415 | END DO |
---|
416 | END DO |
---|
417 | |
---|
418 | IF (debutphy) THEN |
---|
419 | !!jyg |
---|
420 | !$OMP BARRIER |
---|
421 | ecrit_tra=86400. ! frequence de stokage en dur |
---|
422 | ! obsolete car remplace par des ecritures dans phys_output_write |
---|
423 | !RomP >>> |
---|
424 | ! |
---|
425 | !Config Key = convscav |
---|
426 | !Config Desc = Convective scavenging switch: 0=off, 1=on. |
---|
427 | !Config Def = .FALSE. |
---|
428 | !Config Help = |
---|
429 | ! |
---|
430 | !$OMP MASTER |
---|
431 | convscav_omp=.FALSE. |
---|
432 | call getin('convscav', convscav_omp) |
---|
433 | iflag_vdf_trac_omp=1 |
---|
434 | call getin('iflag_vdf_trac', iflag_vdf_trac_omp) |
---|
435 | iflag_con_trac_omp=1 |
---|
436 | call getin('iflag_con_trac', iflag_con_trac_omp) |
---|
437 | iflag_the_trac_omp=1 |
---|
438 | call getin('iflag_the_trac', iflag_the_trac_omp) |
---|
439 | !$OMP END MASTER |
---|
440 | !$OMP BARRIER |
---|
441 | convscav=convscav_omp |
---|
442 | iflag_vdf_trac=iflag_vdf_trac_omp |
---|
443 | iflag_con_trac=iflag_con_trac_omp |
---|
444 | iflag_the_trac=iflag_the_trac_omp |
---|
445 | write(lunout,*) 'phytrac passage dans routine conv avec lessivage', convscav |
---|
446 | ! |
---|
447 | !Config Key = iflag_lscav |
---|
448 | !Config Desc = Large scale scavenging parametrization: 0=none, 1=old(Genthon92), |
---|
449 | ! 2=1+PHeinrich, 3=Reddy_Boucher2004, 4=3+RPilon. |
---|
450 | !Config Def = 1 |
---|
451 | !Config Help = |
---|
452 | ! |
---|
453 | !$OMP MASTER |
---|
454 | iflag_lscav_omp=1 |
---|
455 | call getin('iflag_lscav', iflag_lscav_omp) |
---|
456 | ccntrAA_omp=1 |
---|
457 | ccntrENV_omp=1. |
---|
458 | coefcoli_omp=0.001 |
---|
459 | call getin('ccntrAA', ccntrAA_omp) |
---|
460 | call getin('ccntrENV', ccntrENV_omp) |
---|
461 | call getin('coefcoli', coefcoli_omp) |
---|
462 | !$OMP END MASTER |
---|
463 | !$OMP BARRIER |
---|
464 | iflag_lscav=iflag_lscav_omp |
---|
465 | ccntrAA_in=ccntrAA_omp |
---|
466 | ccntrENV_in=ccntrENV_omp |
---|
467 | coefcoli_in=coefcoli_omp |
---|
468 | ! |
---|
469 | SELECT CASE(iflag_lscav) |
---|
470 | CASE(0) |
---|
471 | WRITE(lunout,*) 'Large scale scavenging: none' |
---|
472 | CASE(1) |
---|
473 | WRITE(lunout,*) 'Large scale scavenging: C. Genthon, Tellus(1992), 44B, 371-389' |
---|
474 | CASE(2) |
---|
475 | WRITE(lunout,*) 'Large scale scavenging: C. Genthon, modified P. Heinrich' |
---|
476 | CASE(3) |
---|
477 | WRITE(lunout,*) 'Large scale scavenging: M. Shekkar Reddy and O. Boucher, JGR(2004), 109, D14202' |
---|
478 | CASE(4) |
---|
479 | WRITE(lunout,*) 'Large scale scavenging: Reddy and Boucher, modified R. Pilon' |
---|
480 | END SELECT |
---|
481 | !RomP <<< |
---|
482 | WRITE(*,*) 'FIRST TIME IN PHYTRAC : pdtphys(sec) = ',pdtphys,'ecrit_tra (sec) = ',ecrit_tra |
---|
483 | ALLOCATE( source(klon,nbtr), stat=ierr) |
---|
484 | IF (ierr /= 0) CALL abort_physic('phytrac', 'pb in allocation 1',1) |
---|
485 | |
---|
486 | ALLOCATE( aerosol(nbtr), stat=ierr) |
---|
487 | IF (ierr /= 0) CALL abort_physic('phytrac', 'pb in allocation 2',1) |
---|
488 | |
---|
489 | |
---|
490 | ! Initialize module for specific tracers |
---|
491 | SELECT CASE(type_trac) |
---|
492 | CASE('lmdz') |
---|
493 | CALL traclmdz_init(pctsrf,xlat,xlon,ftsol,tr_seri,t_seri,pplay,sh,pdtphys,aerosol,lessivage) |
---|
494 | CASE('inca') |
---|
495 | source(:,:)=init_source(:,:) |
---|
496 | CALL tracinca_init(aerosol,lessivage) |
---|
497 | CASE('repr') |
---|
498 | source(:,:)=0. |
---|
499 | CASE('co2i') |
---|
500 | source(:,:)=0. |
---|
501 | lessivage = .FALSE. |
---|
502 | aerosol(:) = .FALSE. |
---|
503 | pbl_flg(:) = 1 |
---|
504 | iflag_the_trac= 1 |
---|
505 | iflag_vdf_trac= 1 |
---|
506 | iflag_con_trac= 1 |
---|
507 | #ifdef CPP_StratAer |
---|
508 | CASE('coag') |
---|
509 | source(:,:)=0. |
---|
510 | DO it= 1, nbtr_sulgas |
---|
511 | aerosol(it)=.FALSE. |
---|
512 | IF (it==id_H2SO4_strat) aerosol(it)=.TRUE. |
---|
513 | ENDDO |
---|
514 | DO it= nbtr_sulgas+1, nbtr |
---|
515 | aerosol(it)=.TRUE. |
---|
516 | ENDDO |
---|
517 | #endif |
---|
518 | END SELECT |
---|
519 | |
---|
520 | ! |
---|
521 | !--initialising coefficients for scavenging in the case of NP |
---|
522 | ! |
---|
523 | ALLOCATE(flag_cvltr(nbtr)) |
---|
524 | IF (iflag_con.EQ.3) THEN |
---|
525 | ! |
---|
526 | ALLOCATE(ccntrAA(nbtr)) |
---|
527 | ALLOCATE(ccntrENV(nbtr)) |
---|
528 | ALLOCATE(coefcoli(nbtr)) |
---|
529 | ! |
---|
530 | DO it=1, nbtr |
---|
531 | SELECT CASE(type_trac) |
---|
532 | CASE('lmdz') |
---|
533 | IF (convscav.and.aerosol(it)) THEN |
---|
534 | flag_cvltr(it)=.TRUE. |
---|
535 | ccntrAA(it) =ccntrAA_in !--a modifier par JYG a lire depuis fichier |
---|
536 | ccntrENV(it)=ccntrENV_in |
---|
537 | coefcoli(it)=coefcoli_in |
---|
538 | ELSE |
---|
539 | flag_cvltr(it)=.FALSE. |
---|
540 | ENDIF |
---|
541 | |
---|
542 | CASE('repr') |
---|
543 | flag_cvltr(it)=.FALSE. |
---|
544 | |
---|
545 | CASE('inca') |
---|
546 | ! IF ((it.EQ.id_Rn222) .OR. ((it.GE.id_SO2) .AND. (it.LE.id_NH3)) ) THEN |
---|
547 | ! !--gas-phase species |
---|
548 | ! flag_cvltr(it)=.FALSE. |
---|
549 | ! |
---|
550 | ! ELSEIF ( (it.GE.id_CIDUSTM) .AND. (it.LE.id_AIN) ) THEN |
---|
551 | ! !--insoluble aerosol species |
---|
552 | ! flag_cvltr(it)=.TRUE. |
---|
553 | ! ccntrAA(it)=0.7 |
---|
554 | ! ccntrENV(it)=0.7 |
---|
555 | ! coefcoli(it)=0.001 |
---|
556 | ! ELSEIF ( (it.EQ.id_Pb210) .OR. ((it.GE.id_CSSSM) .AND. (it.LE.id_SSN))) THEN |
---|
557 | ! !--soluble aerosol species |
---|
558 | ! flag_cvltr(it)=.TRUE. |
---|
559 | ! ccntrAA(it)=0.9 |
---|
560 | ! ccntrENV(it)=0.9 |
---|
561 | ! coefcoli(it)=0.001 |
---|
562 | ! ELSE |
---|
563 | ! WRITE(lunout,*) 'pb it=', it |
---|
564 | ! CALL abort_physic('phytrac','pb it scavenging',1) |
---|
565 | ! ENDIF |
---|
566 | !--test OB |
---|
567 | !--for now we do not scavenge in cvltr |
---|
568 | flag_cvltr(it)=.FALSE. |
---|
569 | |
---|
570 | CASE('co2i') |
---|
571 | !--co2 tracers are not scavenged |
---|
572 | flag_cvltr(it)=.FALSE. |
---|
573 | |
---|
574 | #ifdef CPP_StratAer |
---|
575 | CASE('coag') |
---|
576 | IF (convscav.and.aerosol(it)) THEN |
---|
577 | flag_cvltr(it)=.TRUE. |
---|
578 | ccntrAA(it) =ccntrAA_in |
---|
579 | ccntrENV(it)=ccntrENV_in |
---|
580 | coefcoli(it)=coefcoli_in |
---|
581 | ELSE |
---|
582 | flag_cvltr(it)=.FALSE. |
---|
583 | ENDIF |
---|
584 | #endif |
---|
585 | |
---|
586 | END SELECT |
---|
587 | ENDDO |
---|
588 | ! |
---|
589 | ELSE ! iflag_con .ne. 3 |
---|
590 | flag_cvltr(:) = .FALSE. |
---|
591 | ENDIF |
---|
592 | ! |
---|
593 | ! Initialize diagnostic output |
---|
594 | ! ---------------------------- |
---|
595 | #ifdef CPP_IOIPSL |
---|
596 | ! INCLUDE "ini_histrac.h" |
---|
597 | #endif |
---|
598 | ! |
---|
599 | ! print out all tracer flags |
---|
600 | ! |
---|
601 | WRITE(lunout,*) 'print out all tracer flags' |
---|
602 | WRITE(lunout,*) 'type_trac =', type_trac |
---|
603 | WRITE(lunout,*) 'config_inca =', config_inca |
---|
604 | WRITE(lunout,*) 'iflag_con_trac =', iflag_con_trac |
---|
605 | WRITE(lunout,*) 'iflag_con =', iflag_con |
---|
606 | WRITE(lunout,*) 'convscav =', convscav |
---|
607 | WRITE(lunout,*) 'iflag_lscav =', iflag_lscav |
---|
608 | WRITE(lunout,*) 'aerosol =', aerosol |
---|
609 | WRITE(lunout,*) 'iflag_the_trac =', iflag_the_trac |
---|
610 | WRITE(lunout,*) 'iflag_thermals =', iflag_thermals |
---|
611 | WRITE(lunout,*) 'iflag_vdf_trac =', iflag_vdf_trac |
---|
612 | WRITE(lunout,*) 'pbl_flg =', pbl_flg |
---|
613 | WRITE(lunout,*) 'lessivage =', lessivage |
---|
614 | write(lunout,*) 'flag_cvltr = ', flag_cvltr |
---|
615 | |
---|
616 | IF (lessivage .AND. type_trac .EQ. 'inca') THEN |
---|
617 | CALL abort_physic('phytrac', 'lessivage=T config_inca=inca impossible',1) |
---|
618 | ! STOP |
---|
619 | ENDIF |
---|
620 | ! |
---|
621 | ENDIF ! of IF (debutphy) |
---|
622 | !############################################ END INITIALIZATION ####### |
---|
623 | |
---|
624 | DO k=1,klev |
---|
625 | DO i=1,klon |
---|
626 | zmasse(i,k)=(paprs(i,k)-paprs(i,k+1))/rg |
---|
627 | END DO |
---|
628 | END DO |
---|
629 | ! |
---|
630 | IF (id_be .GT. 0) THEN |
---|
631 | DO k=1,klev |
---|
632 | DO i=1,klon |
---|
633 | sourceBE(i,k)=srcbe(i,k) !RomP -> pour sortie histrac |
---|
634 | END DO |
---|
635 | END DO |
---|
636 | ENDIF |
---|
637 | |
---|
638 | !=============================================================================== |
---|
639 | ! -- Do specific treatment according to chemestry model or local LMDZ tracers |
---|
640 | ! |
---|
641 | !=============================================================================== |
---|
642 | SELECT CASE(type_trac) |
---|
643 | CASE('lmdz') |
---|
644 | ! -- Traitement des traceurs avec traclmdz |
---|
645 | CALL traclmdz(nstep, julien, gmtime, pdtphys, t_seri, paprs, pplay, & |
---|
646 | cdragh, coefh, yu1, yv1, ftsol, pctsrf, xlat, xlon,iflag_vdf_trac>=0,sh, & |
---|
647 | rh, pphi, ustar, wstar, ale_bl, ale_wake, u10m, v10m, & |
---|
648 | tr_seri, source, d_tr_cl,d_tr_dec, zmasse) !RomP |
---|
649 | |
---|
650 | CASE('inca') |
---|
651 | ! -- CHIMIE INCA config_inca = aero or chem -- |
---|
652 | ! Appel fait en fin de phytrac pour avoir les emissions modifiees par |
---|
653 | ! la couche limite et la convection avant le calcul de la chimie |
---|
654 | |
---|
655 | CASE('repr') |
---|
656 | ! -- CHIMIE REPROBUS -- |
---|
657 | CALL tracreprobus(pdtphys, gmtime, debutphy, julien, & |
---|
658 | presnivs, xlat, xlon, pphis, pphi, & |
---|
659 | t_seri, pplay, paprs, sh , & |
---|
660 | tr_seri) |
---|
661 | |
---|
662 | CASE('co2i') |
---|
663 | ! -- CO2 interactif -- |
---|
664 | ! -- source is updated with FF and BB emissions |
---|
665 | ! -- and net fluxes from ocean and orchidee |
---|
666 | ! -- sign convention : positive into the atmosphere |
---|
667 | |
---|
668 | CALL tracco2i(pdtphys, debutphy, & |
---|
669 | xlat, xlon, pphis, pphi, & |
---|
670 | t_seri, pplay, paprs, tr_seri, source) |
---|
671 | |
---|
672 | #ifdef CPP_StratAer |
---|
673 | CASE('coag') |
---|
674 | ! --STRATOSPHERIC AER IN THE STRAT -- |
---|
675 | CALL traccoag(pdtphys, gmtime, debutphy, julien, & |
---|
676 | presnivs, xlat, xlon, pphis, pphi, & |
---|
677 | t_seri, pplay, paprs, sh, rh , & |
---|
678 | tr_seri) |
---|
679 | #endif |
---|
680 | |
---|
681 | END SELECT |
---|
682 | !====================================================================== |
---|
683 | ! -- Calcul de l'effet de la convection -- |
---|
684 | !====================================================================== |
---|
685 | |
---|
686 | IF (iflag_con_trac==1) THEN |
---|
687 | |
---|
688 | DO it=1, nbtr |
---|
689 | IF ( conv_flg(it) == 0 ) CYCLE |
---|
690 | IF (iflag_con.LT.2) THEN |
---|
691 | !--pas de transport convectif |
---|
692 | d_tr_cv(:,:,it)=0. |
---|
693 | |
---|
694 | ELSE IF (iflag_con.EQ.2) THEN |
---|
695 | !--ancien transport convectif de Tiedtke |
---|
696 | |
---|
697 | CALL nflxtr(pdtphys, pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, & |
---|
698 | pplay, paprs, tr_seri(:,:,it), d_tr_cv(:,:,it)) |
---|
699 | ELSE |
---|
700 | !--nouveau transport convectif de Emanuel |
---|
701 | |
---|
702 | IF (flag_cvltr(it)) THEN |
---|
703 | !--nouveau transport convectif de Emanuel avec lessivage convectif |
---|
704 | ! |
---|
705 | ! |
---|
706 | ccntrAA_3d(:,:) =ccntrAA(it) |
---|
707 | ccntrENV_3d(:,:)=ccntrENV(it) |
---|
708 | coefcoli_3d(:,:)=coefcoli(it) |
---|
709 | |
---|
710 | !--beware this interface is a bit weird because it is called for each tracer |
---|
711 | !--with the full array tr_seri even if only item it is processed |
---|
712 | |
---|
713 | print*,'CV SCAV ',it,ccntrAA(it),ccntrENV(it) |
---|
714 | |
---|
715 | CALL cvltr_scav(pdtphys, da, phi,phi2,d1a,dam, mp,ep, & |
---|
716 | sigd,sij,wght_cvfd,clw,elij,epmlmMm,eplaMm, & |
---|
717 | pmflxr,pmflxs,evap,t_seri,wdtrainA,wdtrainM, & |
---|
718 | paprs,it,tr_seri,upwd,dnwd,itop_con,ibas_con, & |
---|
719 | ccntrAA_3d,ccntrENV_3d,coefcoli_3d, & |
---|
720 | d_tr_cv,d_tr_trsp,d_tr_sscav,d_tr_sat,d_tr_uscav,qDi,qPr,& |
---|
721 | qPa,qMel,qTrdi,dtrcvMA,Mint, & |
---|
722 | zmfd1a,zmfphi2,zmfdam) |
---|
723 | |
---|
724 | |
---|
725 | ELSE !---flag_cvltr(it).EQ.FALSE |
---|
726 | !--nouveau transport convectif de Emanuel mais pas de lessivage convectif |
---|
727 | |
---|
728 | !--beware this interface is a bit weird because it is called for each tracer |
---|
729 | !--with the full array tr_seri even if only item it is processed |
---|
730 | ! |
---|
731 | CALL cvltr_noscav(it,pdtphys, da, phi,mp,wght_cvfd,paprs,pplay, & !jyg |
---|
732 | tr_seri,upwd,dnwd,d_tr_cv) !jyg |
---|
733 | |
---|
734 | ENDIF |
---|
735 | |
---|
736 | ENDIF !--iflag |
---|
737 | |
---|
738 | !--on ajoute les tendances |
---|
739 | |
---|
740 | DO k = 1, klev |
---|
741 | DO i = 1, klon |
---|
742 | tr_seri(i,k,it) = tr_seri(i,k,it) + d_tr_cv(i,k,it) |
---|
743 | END DO |
---|
744 | END DO |
---|
745 | |
---|
746 | CALL minmaxqfi(tr_seri(:,:,it),0.,1.e33,'convection it = '//solsym(it)) |
---|
747 | |
---|
748 | END DO ! nbtr |
---|
749 | |
---|
750 | #ifdef CPP_StratAer |
---|
751 | IF (type_trac=='coag') THEN |
---|
752 | ! initialize wet deposition flux of sulfur |
---|
753 | budg_dep_wet_ocs(:)=0.0 |
---|
754 | budg_dep_wet_so2(:)=0.0 |
---|
755 | budg_dep_wet_h2so4(:)=0.0 |
---|
756 | budg_dep_wet_part(:)=0.0 |
---|
757 | ! compute wet deposition flux of sulfur (sum over gases and particles) |
---|
758 | ! and convert to kg(S)/m2/s |
---|
759 | DO i = 1, klon |
---|
760 | DO k = 1, klev |
---|
761 | DO it = 1, nbtr |
---|
762 | !do not include SO2 because most of it comes trom the troposphere |
---|
763 | IF (it==id_OCS_strat) THEN |
---|
764 | budg_dep_wet_ocs(i)=budg_dep_wet_ocs(i)+d_tr_cv(i,k,it)*(mSatom/mOCSmol) & |
---|
765 | & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys |
---|
766 | ELSEIF (it==id_SO2_strat) THEN |
---|
767 | budg_dep_wet_so2(i)=budg_dep_wet_so2(i)+d_tr_cv(i,k,it)*(mSatom/mSO2mol) & |
---|
768 | & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys |
---|
769 | ELSEIF (it==id_H2SO4_strat) THEN |
---|
770 | budg_dep_wet_h2so4(i)=budg_dep_wet_h2so4(i)+d_tr_cv(i,k,it)*(mSatom/mH2SO4mol) & |
---|
771 | & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys |
---|
772 | ELSEIF (it.GT.nbtr_sulgas) THEN |
---|
773 | budg_dep_wet_part(i)=budg_dep_wet_part(i)+d_tr_cv(i,k,it)*(mSatom/mH2SO4mol) & |
---|
774 | & *dens_aer_dry*4./3.*RPI*(mdw(it-nbtr_sulgas)/2.)**3 & |
---|
775 | & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys |
---|
776 | ENDIF |
---|
777 | ENDDO |
---|
778 | ENDDO |
---|
779 | ENDDO |
---|
780 | ENDIF |
---|
781 | #endif |
---|
782 | |
---|
783 | ENDIF ! convection |
---|
784 | |
---|
785 | !====================================================================== |
---|
786 | ! -- Calcul de l'effet des thermiques -- |
---|
787 | !====================================================================== |
---|
788 | |
---|
789 | DO it=1,nbtr |
---|
790 | DO k=1,klev |
---|
791 | DO i=1,klon |
---|
792 | d_tr_th(i,k,it)=0. |
---|
793 | tr_seri(i,k,it)=MAX(tr_seri(i,k,it),0.) |
---|
794 | ! the next safeguard causes some problem for stratospheric aerosol tracers (particle number) |
---|
795 | ! and there is little justification for it so it is commented out (4 December 2017) by OB |
---|
796 | ! if reinstated please keep the ifndef CPP_StratAer |
---|
797 | !#ifndef CPP_StratAer |
---|
798 | ! tr_seri(i,k,it)=MIN(tr_seri(i,k,it),1.e10) |
---|
799 | !#endif |
---|
800 | END DO |
---|
801 | END DO |
---|
802 | END DO |
---|
803 | |
---|
804 | IF (iflag_thermals.GT.0.AND.iflag_the_trac>0) THEN |
---|
805 | |
---|
806 | DO it=1, nbtr |
---|
807 | |
---|
808 | CALL thermcell_dq(klon,klev,1,pdtphys,fm_therm,entr_therm, & |
---|
809 | zmasse,tr_seri(1:klon,1:klev,it), & |
---|
810 | d_tr_th(1:klon,1:klev,it),ztra_th,0 ) |
---|
811 | |
---|
812 | DO k=1,klev |
---|
813 | DO i=1,klon |
---|
814 | d_tr_th(i,k,it)=pdtphys*d_tr_th(i,k,it) |
---|
815 | tr_seri(i,k,it)=MAX(tr_seri(i,k,it)+d_tr_th(i,k,it),0.) |
---|
816 | END DO |
---|
817 | END DO |
---|
818 | |
---|
819 | END DO ! it |
---|
820 | |
---|
821 | ENDIF ! Thermiques |
---|
822 | |
---|
823 | !====================================================================== |
---|
824 | ! -- Calcul de l'effet de la couche limite -- |
---|
825 | !====================================================================== |
---|
826 | |
---|
827 | IF (iflag_vdf_trac==1) THEN |
---|
828 | |
---|
829 | ! Injection during BL mixing |
---|
830 | ! |
---|
831 | #ifdef CPP_StratAer |
---|
832 | IF (type_trac=='coag') THEN |
---|
833 | |
---|
834 | ! initialize dry deposition flux of sulfur |
---|
835 | budg_dep_dry_ocs(:)=0.0 |
---|
836 | budg_dep_dry_so2(:)=0.0 |
---|
837 | budg_dep_dry_h2so4(:)=0.0 |
---|
838 | budg_dep_dry_part(:)=0.0 |
---|
839 | |
---|
840 | ! compute dry deposition velocity as function of surface type (numbers |
---|
841 | ! from IPSL note 23, 2002) |
---|
842 | v_dep_dry(:) = pctsrf(:,is_ter) * 2.5e-3 & |
---|
843 | & + pctsrf(:,is_oce) * 0.5e-3 & |
---|
844 | & + pctsrf(:,is_lic) * 2.5e-3 & |
---|
845 | & + pctsrf(:,is_sic) * 2.5e-3 |
---|
846 | |
---|
847 | ! compute surface dry deposition flux |
---|
848 | zrho(:,1)=pplay(:,1)/t_seri(:,1)/RD |
---|
849 | |
---|
850 | DO it=1, nbtr |
---|
851 | source(:,it) = - v_dep_dry(:) * tr_seri(:,1,it) * zrho(:,1) |
---|
852 | ENDDO |
---|
853 | |
---|
854 | ENDIF |
---|
855 | #endif |
---|
856 | |
---|
857 | DO it=1, nbtr |
---|
858 | ! |
---|
859 | IF( pbl_flg(it) /= 0 ) THEN |
---|
860 | ! |
---|
861 | CALL cltrac(pdtphys, coefh,t_seri, & |
---|
862 | tr_seri(:,:,it), source(:,it), & |
---|
863 | paprs, pplay, delp, & |
---|
864 | d_tr_cl(:,:,it),d_tr_dry(:,it),flux_tr_dry(:,it)) |
---|
865 | ! |
---|
866 | tr_seri(:,:,it)=tr_seri(:,:,it)+d_tr_cl(:,:,it) |
---|
867 | ! |
---|
868 | #ifdef CPP_StratAer |
---|
869 | IF (type_trac=='coag') THEN |
---|
870 | ! compute dry deposition flux of sulfur (sum over gases and particles) |
---|
871 | IF (it==id_OCS_strat) THEN |
---|
872 | budg_dep_dry_ocs(:)=budg_dep_dry_ocs(:)-source(:,it)*(mSatom/mOCSmol) |
---|
873 | ELSEIF (it==id_SO2_strat) THEN |
---|
874 | budg_dep_dry_so2(:)=budg_dep_dry_so2(:)-source(:,it)*(mSatom/mSO2mol) |
---|
875 | ELSEIF (it==id_H2SO4_strat) THEN |
---|
876 | budg_dep_dry_h2so4(:)=budg_dep_dry_h2so4(:)-source(:,it)*(mSatom/mH2SO4mol) |
---|
877 | ELSEIF (it.GT.nbtr_sulgas) THEN |
---|
878 | budg_dep_dry_part(:)=budg_dep_dry_part(:)-source(:,it)*(mSatom/mH2SO4mol)*dens_aer_dry & |
---|
879 | & *4./3.*RPI*(mdw(it-nbtr_sulgas)/2.)**3 |
---|
880 | ENDIF |
---|
881 | ENDIF |
---|
882 | #endif |
---|
883 | ! |
---|
884 | ENDIF |
---|
885 | ! |
---|
886 | ENDDO |
---|
887 | ! |
---|
888 | ELSE IF (iflag_vdf_trac==0) THEN |
---|
889 | ! |
---|
890 | ! Injection of source in the first model layer |
---|
891 | ! |
---|
892 | DO it=1,nbtr |
---|
893 | d_tr_cl(:,1,it)=source(:,it)*RG/delp(:,1)*pdtphys |
---|
894 | tr_seri(:,1,it)=tr_seri(:,1,it)+d_tr_cl(:,1,it) |
---|
895 | ENDDO |
---|
896 | d_tr_cl(:,2:klev,1:nbtr)=0. |
---|
897 | ! |
---|
898 | ELSE IF (iflag_vdf_trac==-1) THEN |
---|
899 | ! |
---|
900 | ! Nothing happens |
---|
901 | d_tr_cl=0. |
---|
902 | ! |
---|
903 | ELSE |
---|
904 | ! |
---|
905 | CALL abort_physic('iflag_vdf_trac', 'cas non prevu',1) |
---|
906 | ! |
---|
907 | ENDIF ! couche limite |
---|
908 | |
---|
909 | !====================================================================== |
---|
910 | ! Calcul de l'effet de la precipitation grande echelle |
---|
911 | ! POUR INCA le lessivage est fait directement dans INCA |
---|
912 | !====================================================================== |
---|
913 | |
---|
914 | IF (lessivage) THEN |
---|
915 | |
---|
916 | ql_incloud_ref = 10.e-4 |
---|
917 | ql_incloud_ref = 5.e-4 |
---|
918 | |
---|
919 | |
---|
920 | ! calcul du contenu en eau liquide au sein du nuage |
---|
921 | ql_incl = ql_incloud_ref |
---|
922 | ! choix du lessivage |
---|
923 | ! |
---|
924 | IF (iflag_lscav .EQ. 3 .OR. iflag_lscav .EQ. 4) THEN |
---|
925 | ! ******** Olivier Boucher version (3) possibly with modified ql_incl (4) |
---|
926 | ! |
---|
927 | DO it = 1, nbtr |
---|
928 | |
---|
929 | IF (aerosol(it)) THEN |
---|
930 | ! incloud scavenging and removal by large scale rain ! orig : ql_incl was replaced by 0.5e-3 kg/kg |
---|
931 | ! the value 0.5e-3 kg/kg is from Giorgi and Chameides (1986), JGR |
---|
932 | ! Liu (2001) proposed to use 1.5e-3 kg/kg |
---|
933 | |
---|
934 | !jyg< |
---|
935 | !! CALL lsc_scav(pdtphys,it,iflag_lscav,ql_incl,prfl,psfl,rneb,beta_fisrt, & |
---|
936 | CALL lsc_scav(pdtphys,it,iflag_lscav,aerosol,ql_incl,prfl,psfl,rneb,beta_fisrt, & |
---|
937 | !>jyg |
---|
938 | beta_v1,pplay,paprs,t_seri,tr_seri,d_tr_insc, & |
---|
939 | d_tr_bcscav,d_tr_evapls,qPrls) |
---|
940 | |
---|
941 | !large scale scavenging tendency |
---|
942 | DO k = 1, klev |
---|
943 | DO i = 1, klon |
---|
944 | d_tr_ls(i,k,it)=d_tr_insc(i,k,it)+d_tr_bcscav(i,k,it)+d_tr_evapls(i,k,it) |
---|
945 | tr_seri(i,k,it)=tr_seri(i,k,it)+d_tr_ls(i,k,it) |
---|
946 | ENDDO |
---|
947 | ENDDO |
---|
948 | CALL minmaxqfi(tr_seri(:,:,it),0.,1.e33,'lsc scav it = '//solsym(it)) |
---|
949 | ENDIF |
---|
950 | |
---|
951 | END DO !tr |
---|
952 | |
---|
953 | #ifdef CPP_StratAer |
---|
954 | IF (type_trac=='coag') THEN |
---|
955 | ! compute wet deposition flux of sulfur (sum over gases and |
---|
956 | ! particles) and convert to kg(S)/m2/s |
---|
957 | ! adding contribution of d_tr_ls to d_tr_cv (above) |
---|
958 | DO i = 1, klon |
---|
959 | DO k = 1, klev |
---|
960 | DO it = 1, nbtr |
---|
961 | IF (it==id_OCS_strat) THEN |
---|
962 | budg_dep_wet_ocs(i)=budg_dep_wet_ocs(i)+d_tr_ls(i,k,it)*(mSatom/mOCSmol) & |
---|
963 | & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys |
---|
964 | ELSEIF (it==id_SO2_strat) THEN |
---|
965 | budg_dep_wet_so2(i)=budg_dep_wet_so2(i)+d_tr_ls(i,k,it)*(mSatom/mSO2mol) & |
---|
966 | & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys |
---|
967 | ELSEIF (it==id_H2SO4_strat) THEN |
---|
968 | budg_dep_wet_h2so4(i)=budg_dep_wet_h2so4(i)+d_tr_ls(i,k,it)*(mSatom/mH2SO4mol) & |
---|
969 | & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys |
---|
970 | ELSEIF (it.GT.nbtr_sulgas) THEN |
---|
971 | budg_dep_wet_part(i)=budg_dep_wet_part(i)+d_tr_ls(i,k,it)*(mSatom/mH2SO4mol) & |
---|
972 | & *dens_aer_dry*4./3.*RPI*(mdw(it-nbtr_sulgas)/2.)**3 & |
---|
973 | & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys |
---|
974 | ENDIF |
---|
975 | ENDDO |
---|
976 | ENDDO |
---|
977 | ENDDO |
---|
978 | ENDIF |
---|
979 | #endif |
---|
980 | |
---|
981 | ELSE IF (iflag_lscav .EQ. 2) THEN ! frac_impa, frac_nucl |
---|
982 | ! ********* modified old version |
---|
983 | |
---|
984 | d_tr_lessi_nucl(:,:,:) = 0. |
---|
985 | d_tr_lessi_impa(:,:,:) = 0. |
---|
986 | flestottr(:,:,:) = 0. |
---|
987 | ! Tendance des aerosols nuclees et impactes |
---|
988 | DO it = 1, nbtr |
---|
989 | IF (aerosol(it)) THEN |
---|
990 | his_dh(:)=0. |
---|
991 | DO k = 1, klev |
---|
992 | DO i = 1, klon |
---|
993 | !PhH |
---|
994 | zrho(i,k)=pplay(i,k)/t_seri(i,k)/RD |
---|
995 | zdz(i,k)=(paprs(i,k)-paprs(i,k+1))/zrho(i,k)/RG |
---|
996 | ! |
---|
997 | ENDDO |
---|
998 | ENDDO |
---|
999 | |
---|
1000 | DO k=klev-1, 1, -1 |
---|
1001 | DO i=1, klon |
---|
1002 | ! d_tr_ls(i,k,it)=tr_seri(i,k,it)*(frac_impa(i,k)*frac_nucl(i,k)-1.) |
---|
1003 | dx=d_tr_ls(i,k,it) |
---|
1004 | his_dh(i)=his_dh(i)-dx*zrho(i,k)*zdz(i,k)/pdtphys ! kg/m2/s |
---|
1005 | evaplsc = prfl(i,k) - prfl(i,k+1) + psfl(i,k) - psfl(i,k+1) |
---|
1006 | ! Evaporation Partielle -> Liberation Partielle 0.5*evap |
---|
1007 | IF ( evaplsc .LT.0..and.abs(prfl(i,k+1)+psfl(i,k+1)).gt.1.e-10) THEN |
---|
1008 | evaplsc = (-evaplsc)/(prfl(i,k+1)+psfl(i,k+1)) |
---|
1009 | ! evaplsc est donc positif, his_dh(i) est positif |
---|
1010 | !-------------- |
---|
1011 | d_tr_evapls(i,k,it)=0.5*evaplsc*(d_tr_lessi_nucl(i,k+1,it) & |
---|
1012 | +d_tr_lessi_impa(i,k+1,it)) |
---|
1013 | !------------- d_tr_evapls(i,k,it)=-0.5*evaplsc*(d_tr_lsc(i,k+1,it)) |
---|
1014 | beta=0.5*evaplsc |
---|
1015 | if ((prfl(i,k)+psfl(i,k)).lt.1.e-10) THEN |
---|
1016 | beta=1.0*evaplsc |
---|
1017 | endif |
---|
1018 | dx=beta*his_dh(i)/zrho(i,k)/zdz(i,k)*pdtphys |
---|
1019 | his_dh(i)=(1.-beta)*his_dh(i) ! tracer from |
---|
1020 | d_tr_evapls(i,k,it)=dx |
---|
1021 | ENDIF |
---|
1022 | d_tr_ls(i,k,it)=tr_seri(i,k,it)*(frac_impa(i,k)*frac_nucl(i,k)-1.) & |
---|
1023 | +d_tr_evapls(i,k,it) |
---|
1024 | |
---|
1025 | !-------------- |
---|
1026 | d_tr_lessi_nucl(i,k,it) = d_tr_lessi_nucl(i,k,it) + & |
---|
1027 | ( 1 - frac_nucl(i,k) )*tr_seri(i,k,it) |
---|
1028 | d_tr_lessi_impa(i,k,it) = d_tr_lessi_impa(i,k,it) + & |
---|
1029 | ( 1 - frac_impa(i,k) )*tr_seri(i,k,it) |
---|
1030 | ! |
---|
1031 | ! Flux lessivage total |
---|
1032 | flestottr(i,k,it) = flestottr(i,k,it) - & |
---|
1033 | ( d_tr_lessi_nucl(i,k,it) + & |
---|
1034 | d_tr_lessi_impa(i,k,it) ) * & |
---|
1035 | ( paprs(i,k)-paprs(i,k+1) ) / & |
---|
1036 | (RG * pdtphys) |
---|
1037 | !! Mise a jour des traceurs due a l'impaction,nucleation |
---|
1038 | ! tr_seri(i,k,it)=tr_seri(i,k,it)*frac_impa(i,k)*frac_nucl(i,k) |
---|
1039 | !! calcul de la tendance liee au lessivage stratiforme |
---|
1040 | ! d_tr_ls(i,k,it)=tr_seri(i,k,it)*& |
---|
1041 | ! (1.-1./(frac_impa(i,k)*frac_nucl(i,k))) |
---|
1042 | !-------------- |
---|
1043 | ENDDO |
---|
1044 | ENDDO |
---|
1045 | ENDIF |
---|
1046 | ENDDO |
---|
1047 | ! ********* end modified old version |
---|
1048 | |
---|
1049 | ELSE IF (iflag_lscav .EQ. 1) THEN ! frac_impa, frac_nucl |
---|
1050 | ! ********* old version |
---|
1051 | |
---|
1052 | d_tr_lessi_nucl(:,:,:) = 0. |
---|
1053 | d_tr_lessi_impa(:,:,:) = 0. |
---|
1054 | flestottr(:,:,:) = 0. |
---|
1055 | !========================= |
---|
1056 | ! LESSIVAGE LARGE SCALE : |
---|
1057 | !========================= |
---|
1058 | |
---|
1059 | ! Tendance des aerosols nuclees et impactes |
---|
1060 | ! ----------------------------------------- |
---|
1061 | DO it = 1, nbtr |
---|
1062 | IF (aerosol(it)) THEN |
---|
1063 | DO k = 1, klev |
---|
1064 | DO i = 1, klon |
---|
1065 | d_tr_lessi_nucl(i,k,it) = d_tr_lessi_nucl(i,k,it) + & |
---|
1066 | ( 1 - frac_nucl(i,k) )*tr_seri(i,k,it) |
---|
1067 | d_tr_lessi_impa(i,k,it) = d_tr_lessi_impa(i,k,it) + & |
---|
1068 | ( 1 - frac_impa(i,k) )*tr_seri(i,k,it) |
---|
1069 | |
---|
1070 | ! |
---|
1071 | ! Flux lessivage total |
---|
1072 | ! ------------------------------------------------------------ |
---|
1073 | flestottr(i,k,it) = flestottr(i,k,it) - & |
---|
1074 | ( d_tr_lessi_nucl(i,k,it) + & |
---|
1075 | d_tr_lessi_impa(i,k,it) ) * & |
---|
1076 | ( paprs(i,k)-paprs(i,k+1) ) / & |
---|
1077 | (RG * pdtphys) |
---|
1078 | ! |
---|
1079 | ! Mise a jour des traceurs due a l'impaction,nucleation |
---|
1080 | ! ---------------------------------------------------------------------- |
---|
1081 | tr_seri(i,k,it)=tr_seri(i,k,it)*frac_impa(i,k)*frac_nucl(i,k) |
---|
1082 | ENDDO |
---|
1083 | ENDDO |
---|
1084 | ENDIF |
---|
1085 | ENDDO |
---|
1086 | |
---|
1087 | ! ********* end old version |
---|
1088 | ENDIF ! iflag_lscav . EQ. 1, 2, 3 or 4 |
---|
1089 | ! |
---|
1090 | ENDIF ! lessivage |
---|
1091 | |
---|
1092 | |
---|
1093 | ! -- CHIMIE INCA config_inca = aero or chem -- |
---|
1094 | IF (type_trac == 'inca') THEN |
---|
1095 | |
---|
1096 | CALL tracinca(& |
---|
1097 | nstep, julien, gmtime, lafin, & |
---|
1098 | pdtphys, t_seri, paprs, pplay, & |
---|
1099 | pmfu, upwd, ftsol, pctsrf, pphis, & |
---|
1100 | pphi, albsol, sh, ch, rh, & |
---|
1101 | cldfra, rneb, diafra, cldliq, & |
---|
1102 | itop_con, ibas_con, pmflxr, pmflxs, & |
---|
1103 | prfl, psfl, aerosol_couple, flxmass_w, & |
---|
1104 | tau_aero, piz_aero, cg_aero, ccm, & |
---|
1105 | rfname, & |
---|
1106 | tr_seri, source) |
---|
1107 | |
---|
1108 | |
---|
1109 | ENDIF |
---|
1110 | !============================================================= |
---|
1111 | ! Ecriture des sorties |
---|
1112 | !============================================================= |
---|
1113 | #ifdef CPP_IOIPSL |
---|
1114 | ! INCLUDE "write_histrac.h" |
---|
1115 | #endif |
---|
1116 | |
---|
1117 | END SUBROUTINE phytrac |
---|
1118 | |
---|
1119 | END MODULE |
---|