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