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