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