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