[1191] | 1 | !$Id $ |
---|
| 2 | ! |
---|
| 3 | MODULE tracinca_mod |
---|
| 4 | ! |
---|
| 5 | ! This module prepares and calls the INCA main subroutines. |
---|
| 6 | ! |
---|
[2345] | 7 | IMPLICIT NONE |
---|
[1191] | 8 | |
---|
[2345] | 9 | CHARACTER(len=4),SAVE :: config_inca |
---|
| 10 | !$OMP THREADPRIVATE(config_inca) |
---|
| 11 | ! config_inca='none' => without INCA |
---|
| 12 | ! config_inca='chem' => INCA with chemistry |
---|
| 13 | ! config_inca='aero' => INCA with aerosols |
---|
[1191] | 14 | CONTAINS |
---|
| 15 | |
---|
| 16 | SUBROUTINE tracinca_init(aerosol,lessivage) |
---|
| 17 | ! This subroutine initialize some control varaibles. |
---|
| 18 | |
---|
[2320] | 19 | USE infotrac_phy, ONLY: nbtr |
---|
[2345] | 20 | USE ioipsl_getin_p_mod, ONLY: getin_p |
---|
[1191] | 21 | IMPLICIT NONE |
---|
| 22 | |
---|
| 23 | ! Output variables |
---|
| 24 | LOGICAL,DIMENSION(nbtr), INTENT(OUT) :: aerosol |
---|
| 25 | LOGICAL,INTENT(OUT) :: lessivage |
---|
| 26 | |
---|
| 27 | |
---|
| 28 | ! Initialization |
---|
| 29 | lessivage =.FALSE. |
---|
| 30 | aerosol(:) = .FALSE. |
---|
[2345] | 31 | |
---|
[1191] | 32 | END SUBROUTINE tracinca_init |
---|
| 33 | |
---|
| 34 | SUBROUTINE tracinca( & |
---|
| 35 | nstep, julien, gmtime, lafin, & |
---|
| 36 | pdtphys, t_seri, paprs, pplay, & |
---|
[2146] | 37 | pmfu, upwd, ftsol, pctsrf, pphis, & |
---|
[2784] | 38 | pphi, albsol, sh, ch, rh, & |
---|
[1191] | 39 | cldfra, rneb, diafra, cldliq, & |
---|
| 40 | itop_con, ibas_con, pmflxr, pmflxs, & |
---|
| 41 | prfl, psfl, aerosol_couple, flxmass_w, & |
---|
| 42 | tau_aero, piz_aero, cg_aero, ccm, & |
---|
| 43 | rfname, & |
---|
[2180] | 44 | tr_seri, source) |
---|
[1191] | 45 | |
---|
| 46 | !======================================================== |
---|
| 47 | ! -- CHIMIE INCA -- |
---|
| 48 | !======================================================== |
---|
| 49 | |
---|
| 50 | USE dimphy |
---|
[2320] | 51 | USE infotrac_phy, ONLY: nbtr |
---|
[1191] | 52 | USE vampir |
---|
[1785] | 53 | USE indice_sol_mod |
---|
[2363] | 54 | USE geometry_mod, ONLY: cell_area |
---|
| 55 | USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat |
---|
[2394] | 56 | USE aero_mod, ONLY : naero_grp |
---|
[1191] | 57 | IMPLICIT NONE |
---|
| 58 | |
---|
| 59 | !========================================================================== |
---|
| 60 | ! -- DESCRIPTION DES ARGUMENTS -- |
---|
| 61 | !========================================================================== |
---|
| 62 | |
---|
| 63 | |
---|
| 64 | ! EN ENTREE ... |
---|
| 65 | ! |
---|
| 66 | !Configuration grille,temps: |
---|
| 67 | INTEGER,INTENT(IN) :: nstep ! Appel physique |
---|
| 68 | INTEGER,INTENT(IN) :: julien ! Jour julien |
---|
| 69 | REAL,INTENT(IN) :: gmtime |
---|
| 70 | REAL,INTENT(IN) :: pdtphys ! Pas d'integration pour la physique (seconde) |
---|
| 71 | LOGICAL,INTENT(IN) :: lafin ! le flag de la fin de la physique |
---|
| 72 | |
---|
| 73 | |
---|
| 74 | !Physique: |
---|
| 75 | !-------- |
---|
| 76 | REAL,DIMENSION(klon,klev),INTENT(IN) :: t_seri ! Temperature |
---|
| 77 | REAL,DIMENSION(klon,klev),INTENT(IN) :: sh ! humidite specifique |
---|
[2784] | 78 | REAL,DIMENSION(klon,klev),INTENT(IN) :: ch ! eau liquide |
---|
[1191] | 79 | REAL,DIMENSION(klon,klev),INTENT(IN) :: rh ! humidite relative |
---|
| 80 | REAL,DIMENSION(klon,klev+1),INTENT(IN) :: paprs ! pression pour chaque inter-couche (en Pa) |
---|
| 81 | REAL,DIMENSION(klon,klev),INTENT(IN) :: pplay ! pression pour le mileu de chaque couche (en Pa) |
---|
| 82 | REAL,DIMENSION(klon,klev),INTENT(IN) :: pphi ! geopotentiel |
---|
| 83 | REAL,DIMENSION(klon),INTENT(IN) :: pphis |
---|
| 84 | REAL,DIMENSION(klon,klev),INTENT(IN) :: cldliq ! eau liquide nuageuse |
---|
| 85 | REAL,DIMENSION(klon,klev),INTENT(IN) :: cldfra ! fraction nuageuse (tous les nuages) |
---|
| 86 | REAL,DIMENSION(klon,klev),INTENT(IN) :: diafra ! fraction nuageuse (convection ou stratus artificiels) |
---|
| 87 | REAL,DIMENSION(klon,klev),INTENT(IN) :: rneb ! fraction nuageuse (grande echelle) |
---|
| 88 | INTEGER,DIMENSION(klon),INTENT(IN) :: itop_con |
---|
| 89 | INTEGER,DIMENSION(klon),INTENT(IN) :: ibas_con |
---|
| 90 | REAL,DIMENSION(klon),INTENT(IN) :: albsol ! albedo surface |
---|
| 91 | ! |
---|
| 92 | !Convection: |
---|
| 93 | !---------- |
---|
[2146] | 94 | REAL,DIMENSION(klon,klev),INTENT(IN) :: pmfu ! flux de masse dans le panache montant - Tiedtke |
---|
| 95 | REAL,DIMENSION(klon,klev),INTENT(IN) :: upwd ! flux de masse dans le panache montant - Emanuel |
---|
[1191] | 96 | |
---|
| 97 | !...Tiedke |
---|
| 98 | REAL,DIMENSION(klon,klev+1),INTENT(IN) :: pmflxr, pmflxs ! Flux precipitant de pluie, neige aux interfaces [convection] |
---|
| 99 | REAL,DIMENSION(klon,klev+1),INTENT(IN) :: prfl, psfl ! Flux precipitant de pluie, neige aux interfaces [large-scale] |
---|
| 100 | |
---|
| 101 | LOGICAL,INTENT(IN) :: aerosol_couple |
---|
| 102 | REAL,DIMENSION(klon,klev),INTENT(IN) :: flxmass_w |
---|
[2394] | 103 | REAL,DIMENSION(klon,klev,naero_grp,2),INTENT(IN) :: tau_aero |
---|
| 104 | REAL,DIMENSION(klon,klev,naero_grp,2),INTENT(IN) :: piz_aero |
---|
| 105 | REAL,DIMENSION(klon,klev,naero_grp,2),INTENT(IN) :: cg_aero |
---|
| 106 | CHARACTER(len=4),DIMENSION(naero_grp),INTENT(IN) :: rfname |
---|
[1191] | 107 | REAL,DIMENSION(klon,klev,2),INTENT(IN) :: ccm |
---|
| 108 | |
---|
| 109 | ! Arguments necessaires pour les sources et puits de traceur: |
---|
| 110 | REAL,DIMENSION(klon,nbsrf),INTENT(IN) :: ftsol ! Temperature du sol (surf)(Kelvin) |
---|
| 111 | REAL,DIMENSION(klon,nbsrf),INTENT(IN) :: pctsrf ! Pourcentage de sol f(nature du sol) |
---|
| 112 | |
---|
| 113 | |
---|
| 114 | ! InOutput argument |
---|
| 115 | REAL,DIMENSION(klon,klev,nbtr),INTENT(INOUT) :: tr_seri ! Concentration Traceur [U/KgA] |
---|
| 116 | |
---|
| 117 | ! Output arguments |
---|
| 118 | REAL,DIMENSION(klon,nbtr), INTENT(OUT) :: source ! a voir lorsque le flux de surface est prescrit |
---|
| 119 | |
---|
| 120 | !======================================================================================= |
---|
| 121 | ! -- VARIABLES LOCALES TRACEURS -- |
---|
| 122 | !======================================================================================= |
---|
| 123 | |
---|
| 124 | INTEGER :: k |
---|
| 125 | REAL,DIMENSION(klon,klev) :: pdel |
---|
[2146] | 126 | REAL,DIMENSION(klon,klev) :: zpmfu ! flux de masse dans le panache montant |
---|
[1191] | 127 | REAL :: calday |
---|
| 128 | INTEGER :: ncsec |
---|
| 129 | |
---|
| 130 | CALL VTe(VTphysiq) |
---|
| 131 | CALL VTb(VTinca) |
---|
| 132 | |
---|
[1403] | 133 | calday = REAL(julien) + gmtime |
---|
[1191] | 134 | ncsec = NINT (86400.*gmtime) |
---|
| 135 | |
---|
| 136 | DO k = 1, klev |
---|
| 137 | pdel(:,k) = paprs(:,k) - paprs (:,k+1) |
---|
| 138 | END DO |
---|
[2180] | 139 | |
---|
[1191] | 140 | #ifdef INCA |
---|
[2624] | 141 | IF (config_inca == 'aero' .OR. config_inca == 'chem') THEN |
---|
[2180] | 142 | zpmfu(:,:)=pmfu(:,:) |
---|
| 143 | ELSE IF (config_inca == 'aeNP') THEN |
---|
| 144 | zpmfu(:,:)=upwd(:,:) |
---|
| 145 | ENDIF |
---|
[2171] | 146 | |
---|
[2180] | 147 | CALL aerosolmain( & |
---|
| 148 | aerosol_couple,tr_seri,pdtphys, & |
---|
| 149 | pplay,pdel,prfl,pmflxr,psfl, & |
---|
| 150 | pmflxs,zpmfu,itop_con,ibas_con, & |
---|
[2363] | 151 | pphi,cell_area,nstep,rneb,t_seri, & |
---|
[2180] | 152 | rh,tau_aero,piz_aero,cg_aero, & |
---|
[2609] | 153 | rfname,ccm,lafin) |
---|
[2146] | 154 | #endif |
---|
| 155 | |
---|
| 156 | |
---|
| 157 | #ifdef INCA |
---|
[1191] | 158 | CALL chemmain (tr_seri, & !mmr |
---|
| 159 | nstep, & !nstep |
---|
| 160 | calday, & !calday |
---|
| 161 | julien, & !ncdate |
---|
| 162 | ncsec, & !ncsec |
---|
| 163 | 1, & !lat |
---|
| 164 | pdtphys, & !delt |
---|
| 165 | paprs(1,1), & !ps |
---|
| 166 | pplay, & !pmid |
---|
| 167 | pdel, & !pdel |
---|
[2363] | 168 | cell_area, & |
---|
[1191] | 169 | pctsrf(1,1),& !oro |
---|
| 170 | ftsol, & !tsurf |
---|
| 171 | albsol, & !albs |
---|
| 172 | pphi, & !zma |
---|
| 173 | pphis, & !phis |
---|
| 174 | cldfra, & !cldfr |
---|
| 175 | rneb, & !cldfr_st |
---|
| 176 | diafra, & !cldfr_cv |
---|
| 177 | itop_con, & !cldtop |
---|
| 178 | ibas_con, & !cldbot |
---|
| 179 | cldliq, & !cwat |
---|
| 180 | prfl, & !flxrst |
---|
| 181 | pmflxr, & !flxrcv |
---|
| 182 | psfl, & !flxsst |
---|
| 183 | pmflxs, & !flxscv |
---|
[2146] | 184 | zpmfu, & !flxupd !--now depends on whether AP or NP |
---|
[1191] | 185 | flxmass_w, & !flxmass_w |
---|
| 186 | t_seri, & !tfld |
---|
| 187 | sh, & !sh |
---|
[2784] | 188 | ch, & !ql |
---|
[1191] | 189 | rh, & !rh |
---|
[2480] | 190 | nbp_lon, & !nx |
---|
[2363] | 191 | nbp_lat, & !ny |
---|
[2180] | 192 | source ) |
---|
[1191] | 193 | #endif |
---|
| 194 | |
---|
| 195 | CALL VTe(VTinca) |
---|
| 196 | CALL VTb(VTphysiq) |
---|
| 197 | |
---|
| 198 | |
---|
| 199 | END SUBROUTINE tracinca |
---|
| 200 | |
---|
| 201 | |
---|
| 202 | END MODULE tracinca_mod |
---|