Changeset 8 for trunk/libf/dyn3dpar/infotrac.F90
- Timestamp:
- Nov 2, 2010, 12:38:23 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libf/dyn3dpar/infotrac.F90
r7 r8 65 65 INTEGER :: nqtrue ! number of tracers read from tracer.def, without higer order of moment 66 66 INTEGER :: iq, new_iq, iiq, jq, ierr 67 67 68 68 character(len=*),parameter :: modname="infotrac_init" 69 69 !----------------------------------------------------------------------- … … 84 84 descrq(30)='PRA' 85 85 86 87 IF (config_inca=='none') THEN86 IF (planet_type=='earth') THEN 87 IF (config_inca=='none') THEN 88 88 type_trac='lmdz' 89 ELSE 90 type_trac='inca' 91 END IF 89 92 ELSE 90 type_trac='inca'91 END 93 type_trac='plnt' ! planets... May want to dissociate between each later. 94 ENDIF 92 95 93 96 !----------------------------------------------------------------------- … … 97 100 ! 98 101 !----------------------------------------------------------------------- 99 IF (type_trac == 'lmdz') THEN 102 IF (planet_type=='earth') THEN 103 IF (type_trac == 'lmdz') THEN 100 104 OPEN(90,file='traceur.def',form='formatted',status='old', iostat=ierr) 101 105 IF(ierr.EQ.0) THEN 102 WRITE(lunout,*) trim(modname),':Open traceur.def : ok'106 WRITE(lunout,*) 'Open traceur.def : ok' 103 107 READ(90,*) nqtrue 104 108 ELSE 105 WRITE(lunout,*) trim(modname),':Problem in opening traceur.def'106 WRITE(lunout,*) trim(modname),': WARNINGusing defaut values'109 WRITE(lunout,*) 'Problem in opening traceur.def' 110 WRITE(lunout,*) 'ATTENTION using defaut values' 107 111 nqtrue=4 ! Defaut value 108 112 END IF 109 if ( planet_type=='earth') then 110 ! For Earth, water vapour & liquid tracers are not in the physics 111 nbtr=nqtrue-2 112 else 113 ! Other planets (for now); we have the same number of tracers 114 ! in the dynamics than in the physics 115 nbtr=nqtrue 116 endif 117 ELSE 113 ! For Earth, water vapour & liquid tracers are not in the physics 114 nbtr=nqtrue-2 115 ELSE 118 116 ! nbtr has been read from INCA by init_cont_lmdz() in gcm.F 119 117 nqtrue=nbtr+2 120 END IF121 122 IF ((planet_type=="earth").and.(nqtrue < 2)) THEN118 END IF 119 120 IF (nqtrue < 2) THEN 123 121 WRITE(lunout,*) trim(modname),': nqtrue=',nqtrue, ' is not allowded. 2 tracers is the minimum' 124 122 CALL abort_gcm('infotrac_init','Not enough tracers',1) 125 END IF 123 END IF 124 125 ELSE ! not Earth 126 OPEN(90,file='traceur.def',form='formatted',status='old', iostat=ierr) 127 IF(ierr.EQ.0) THEN 128 WRITE(lunout,*) 'Open traceur.def : ok' 129 READ(90,*) nqtrue 130 ELSE 131 WRITE(lunout,*) 'Problem in opening traceur.def' 132 WRITE(lunout,*) 'ATTENTION using defaut values: nqtrue=1' 133 nqtrue=1 ! Defaut value 134 END IF 135 ! Other planets (for now); we have the same number of tracers 136 ! in the dynamics than in the physics 137 nbtr=nqtrue 138 139 ENDIF ! planet_type 126 140 ! 127 141 ! Allocate variables depending on nqtrue and nbtr … … 158 172 ! Get choice of advection schema from file tracer.def or from INCA 159 173 !--------------------------------------------------------------------- 160 IF (type_trac == 'lmdz') THEN 174 IF (planet_type=='earth') THEN 175 IF (type_trac == 'lmdz') THEN 161 176 IF(ierr.EQ.0) THEN 162 177 ! Continue to read tracer.def … … 194 209 END DO 195 210 196 ELSE ! type_trac=inca : config_inca='aero' ou 'chem'211 ELSE ! type_trac=inca : config_inca='aero' ou 'chem' 197 212 ! le module de chimie fournit les noms des traceurs 198 213 ! et les schemas d'advection associes. … … 213 228 END DO 214 229 215 END IF ! type_trac 230 END IF ! type_trac 231 232 ELSE ! not Earth 233 IF(ierr.EQ.0) THEN 234 ! Continue to read tracer.def 235 DO iq=1,nqtrue 236 READ(90,999) hadv(iq),vadv(iq),tnom_0(iq) 237 END DO 238 CLOSE(90) 239 ELSE ! Without tracer.def 240 hadv(1) = 10 241 vadv(1) = 10 242 tnom_0(1) = 'dummy' 243 END IF 244 245 WRITE(lunout,*) trim(modname),': Valeur de traceur.def :' 246 WRITE(lunout,*) trim(modname),': nombre de traceurs ',nqtrue 247 DO iq=1,nqtrue 248 WRITE(lunout,*) hadv(iq),vadv(iq),tnom_0(iq) 249 END DO 250 251 ENDIF ! planet_type 216 252 217 253 !----------------------------------------------------------------------- … … 280 316 tname(new_iq)= tnom_0(iq) 281 317 IF (iadv(new_iq)==0) THEN 282 ttext(new_iq)= trim(str1)318 ttext(new_iq)=str1(1:lnblnk(str1)) 283 319 ELSE 284 ttext(new_iq)= trim(tnom_0(iq))//descrq(iadv(new_iq))320 ttext(new_iq)=str1(1:lnblnk(str1))//descrq(iadv(new_iq)) 285 321 END IF 286 322
Note: See TracChangeset
for help on using the changeset viewer.