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