Changeset 1279 for LMDZ4/trunk/libf/dyn3dpar/infotrac.F90
- Timestamp:
- Dec 10, 2009, 10:02:56 AM (15 years ago)
- Location:
- LMDZ4/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk
- Property svn:mergeinfo changed
/LMDZ4/branches/LMDZ4-dev merged: 1150-1162,1164-1193,1195-1231,1234-1235,1237-1240,1242-1274,1276
- Property svn:mergeinfo changed
-
LMDZ4/trunk/libf/dyn3dpar/infotrac.F90
r1146 r1279 1 ! $Id$ 2 ! 1 3 MODULE infotrac 2 4 3 5 ! nqtot : total number of tracers and higher order of moment, water vapor and liquid included 4 6 INTEGER, SAVE :: nqtot 5 !!$OMP THREADPRIVATE(nqtot)6 7 7 8 ! nbtr : number of tracers not including higher order of moment or water vapor or liquid 8 9 ! number of tracers used in the physics 9 10 INTEGER, SAVE :: nbtr 10 !!$OMP THREADPRIVATE(nbtr)11 11 12 12 ! Name variables 13 13 CHARACTER(len=20), ALLOCATABLE, DIMENSION(:), SAVE :: tname ! tracer short name for restart and diagnostics 14 14 CHARACTER(len=23), ALLOCATABLE, DIMENSION(:), SAVE :: ttext ! tracer long name for diagnostics 15 !!$OMP THREADPRIVATE(tname,ttext)16 15 17 16 ! iadv : index of trasport schema for each tracer 18 17 INTEGER, ALLOCATABLE, DIMENSION(:), SAVE :: iadv 19 !!$OMP THREADPRIVATE(iadv)20 18 21 19 ! niadv : vector keeping the coorspondance between all tracers(nqtot) treated in the 22 20 ! dynamic part of the code and the tracers (nbtr+2) used in the physics part of the code. 23 21 INTEGER, ALLOCATABLE, DIMENSION(:), SAVE :: niadv ! equivalent dyn / physique 24 !!$OMP THREADPRIVATE(niadv) 25 26 ! Variables for INCA 22 23 ! conv_flg(it)=0 : convection desactivated for tracer number it 27 24 INTEGER, ALLOCATABLE, DIMENSION(:), SAVE :: conv_flg 25 ! pbl_flg(it)=0 : boundary layer diffusion desactivaded for tracer number it 28 26 INTEGER, ALLOCATABLE, DIMENSION(:), SAVE :: pbl_flg 29 !!$OMP THREADPRIVATE(conv_flg, pbl_flg) 30 27 28 CHARACTER(len=4),SAVE :: type_trac 29 31 30 CONTAINS 32 31 … … 57 56 INTEGER, ALLOCATABLE, DIMENSION(:) :: vadv ! index of vertical trasport schema 58 57 59 CHARACTER(len= 8), ALLOCATABLE, DIMENSION(:) :: tnom_0 ! tracer short name58 CHARACTER(len=15), ALLOCATABLE, DIMENSION(:) :: tnom_0 ! tracer short name 60 59 CHARACTER(len=8), ALLOCATABLE, DIMENSION(:) :: tracnam ! name from INCA 61 60 CHARACTER(len=3), DIMENSION(30) :: descrq … … 84 83 descrq(20)='SLP' 85 84 descrq(30)='PRA' 85 86 87 IF (config_inca=='none') THEN 88 type_trac='lmdz' 89 ELSE 90 type_trac='inca' 91 END IF 86 92 87 93 !----------------------------------------------------------------------- … … 91 97 ! 92 98 !----------------------------------------------------------------------- 93 IF ( config_inca == 'none') THEN99 IF (type_trac == 'lmdz') THEN 94 100 OPEN(90,file='traceur.def',form='formatted',status='old', iostat=ierr) 95 101 IF(ierr.EQ.0) THEN … … 113 119 END IF 114 120 ! 115 ! Allocate variables depending on nqtrue 121 ! Allocate variables depending on nqtrue and nbtr 116 122 ! 117 123 ALLOCATE(tnom_0(nqtrue), hadv(nqtrue), vadv(nqtrue)) 118 119 IF (config_inca /= 'none') THEN 120 ! Varaibles only needed in case of INCA 121 ALLOCATE(conv_flg(nbtr), pbl_flg(nbtr), tracnam(nbtr)) 122 END IF 123 124 ALLOCATE(conv_flg(nbtr), pbl_flg(nbtr), tracnam(nbtr)) 125 conv_flg(:) = 1 ! convection activated for all tracers 126 pbl_flg(:) = 1 ! boundary layer activated for all tracers 127 124 128 !----------------------------------------------------------------------- 125 129 ! 2) Choix des schemas d'advection pour l'eau et les traceurs … … 148 152 ! Get choice of advection schema from file tracer.def or from INCA 149 153 !--------------------------------------------------------------------- 150 IF ( config_inca == 'none') THEN154 IF (type_trac == 'lmdz') THEN 151 155 IF(ierr.EQ.0) THEN 152 156 ! Continue to read tracer.def … … 176 180 END DO 177 181 178 ELSE ! config_inca='aero' ou 'chem'182 ELSE ! type_trac=inca : config_inca='aero' ou 'chem' 179 183 ! le module de chimie fournit les noms des traceurs 180 184 ! et les schemas d'advection associes. … … 195 199 END DO 196 200 197 END IF ! config_inca201 END IF ! type_trac 198 202 199 203 !----------------------------------------------------------------------- … … 299 303 300 304 301 WRITE(lunout,*) 'Information stored in dimtrac :'305 WRITE(lunout,*) 'Information stored in infotrac :' 302 306 WRITE(lunout,*) 'iadv niadv tname ttext :' 303 307 DO iq=1,nqtot … … 305 309 END DO 306 310 311 ! 312 ! Test for advection schema. 313 ! This version of LMDZ only garantees iadv=10 and iadv=14 (14 only for water vapour) . 314 ! 315 DO iq=1,nqtot 316 IF (iadv(iq)/=10 .AND. iadv(iq)/=14 .AND. iadv(iq)/=0) THEN 317 WRITE(lunout,*)'STOP : The option iadv=',iadv(iq),' is not tested in this version of LMDZ' 318 CALL abort_gcm('infotrac_init','In this version only iadv=10 and iadv=14 is tested!',1) 319 ELSE IF (iadv(iq)==14 .AND. iq/=1) THEN 320 WRITE(lunout,*)'STOP : The option iadv=',iadv(iq),' is not tested in this version of LMDZ' 321 CALL abort_gcm('infotrac_init','In this version iadv=14 is only permitted for water vapour!',1) 322 END IF 323 END DO 324 307 325 !----------------------------------------------------------------------- 308 326 ! Finalize : 309 327 ! 310 328 DEALLOCATE(tnom_0, hadv, vadv) 311 IF (config_inca /= 'none')DEALLOCATE(tracnam)312 313 999 FORMAT (i2,1x,i2,1x,a 8)329 DEALLOCATE(tracnam) 330 331 999 FORMAT (i2,1x,i2,1x,a15) 314 332 315 333 END SUBROUTINE infotrac_init
Note: See TracChangeset
for help on using the changeset viewer.