Changeset 1446 for LMDZ5/branches/LMDZ5V1.0-dev/libf/dyn3d/infotrac.F90
- Timestamp:
- Oct 22, 2010, 11:27:25 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/LMDZ5V1.0-dev/libf/dyn3d/infotrac.F90
r1443 r1446 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 character(len=*),parameter :: modname="infotrac_init" 68 69 !----------------------------------------------------------------------- 69 70 ! Initialization : … … 99 100 OPEN(90,file='traceur.def',form='formatted',status='old', iostat=ierr) 100 101 IF(ierr.EQ.0) THEN 101 WRITE(lunout,*) 'Open traceur.def : ok'102 WRITE(lunout,*) trim(modname),': Open traceur.def : ok' 102 103 READ(90,*) nqtrue 103 104 ELSE 104 WRITE(lunout,*) 'Problem in opening traceur.def'105 WRITE(lunout,*) 'ATTENTIONusing defaut values'105 WRITE(lunout,*) trim(modname),': Problem in opening traceur.def' 106 WRITE(lunout,*) trim(modname),': WARNING using defaut values' 106 107 nqtrue=4 ! Defaut value 107 108 END IF 108 ! Attention! Only for planet_type=='earth' 109 nbtr=nqtrue-2 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 110 117 ELSE 111 118 ! nbtr has been read from INCA by init_cont_lmdz() in gcm.F … … 113 120 END IF 114 121 115 IF ( nqtrue < 2) THEN116 WRITE(lunout,*) 'nqtrue=',nqtrue, ' is not allowded. 2 tracers is the minimum'122 IF ((planet_type=="earth").and.(nqtrue < 2)) THEN 123 WRITE(lunout,*) trim(modname),': nqtrue=',nqtrue, ' is not allowded. 2 tracers is the minimum' 117 124 CALL abort_gcm('infotrac_init','Not enough tracers',1) 118 125 END IF … … 158 165 END DO 159 166 CLOSE(90) 160 ELSE ! Without tracer.def 167 ELSE ! Without tracer.def, set default values (for Earth!) 168 if ((nqtrue==4).and.(planet_type=="earth")) then 161 169 hadv(1) = 14 162 170 vadv(1) = 14 … … 171 179 vadv(4) = 10 172 180 tnom_0(4) = 'PB' 181 else 182 ! Error message, we need a traceur.def file 183 write(lunout,*) trim(modname),& 184 ': Cannot set default tracer names!' 185 write(lunout,*) trim(modname),' Make a traceur.def file!!!' 186 CALL abort_gcm('infotrac_init','Need a traceur.def file!',1) 187 endif ! of if (nqtrue==4) 173 188 END IF 174 189 175 WRITE(lunout,*) 'Valeur de traceur.def :'176 WRITE(lunout,*) 'nombre de traceurs ',nqtrue190 WRITE(lunout,*) trim(modname),': Valeur de traceur.def :' 191 WRITE(lunout,*) trim(modname),': nombre de traceurs ',nqtrue 177 192 DO iq=1,nqtrue 178 193 WRITE(lunout,*) hadv(iq),vadv(iq),tnom_0(iq) … … 216 231 new_iq=new_iq+10 ! 9 tracers added 217 232 ELSE 218 WRITE(lunout,*) 'This choice of advection schema is not available',iq,hadv(iq),vadv(iq)233 WRITE(lunout,*) trim(modname),': This choice of advection schema is not available',iq,hadv(iq),vadv(iq) 219 234 CALL abort_gcm('infotrac_init','Bad choice of advection schema - 1',1) 220 235 END IF … … 226 241 nqtot = new_iq 227 242 228 WRITE(lunout,*) 'The choice of advection schema for one or more tracers'243 WRITE(lunout,*) trim(modname),': The choice of advection schema for one or more tracers' 229 244 WRITE(lunout,*) 'makes it necessary to add tracers' 230 WRITE(lunout,*) nqtrue,' is the number of true tracers'231 WRITE(lunout,*) nqtot, ' is the total number of tracers needed'245 WRITE(lunout,*) trim(modname)//': ',nqtrue,' is the number of true tracers' 246 WRITE(lunout,*) trim(modname)//': ',nqtot, ' is the total number of tracers needed' 232 247 233 248 ELSE … … 257 272 iadv(new_iq)=11 258 273 ELSE 259 WRITE(lunout,*) 'This choice of advection schema is not available',iq,hadv(iq),vadv(iq)274 WRITE(lunout,*)trim(modname),': This choice of advection schema is not available',iq,hadv(iq),vadv(iq) 260 275 261 276 CALL abort_gcm('infotrac_init','Bad choice of advection schema - 2',1) … … 303 318 304 319 305 WRITE(lunout,*) 'Information stored in infotrac :'306 WRITE(lunout,*) 'iadv niadv tname ttext :'320 WRITE(lunout,*) trim(modname),': Information stored in infotrac :' 321 WRITE(lunout,*) trim(modname),': iadv niadv tname ttext :' 307 322 DO iq=1,nqtot 308 WRITE(lunout,*) iadv(iq),niadv(iq), tname(iq), ttext(iq) 323 WRITE(lunout,*) iadv(iq),niadv(iq),& 324 ' ',trim(tname(iq)),' ',trim(ttext(iq)) 309 325 END DO 310 326 … … 315 331 DO iq=1,nqtot 316 332 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'333 WRITE(lunout,*)trim(modname),' STOP : The option iadv=',iadv(iq),' is not tested in this version of LMDZ' 318 334 CALL abort_gcm('infotrac_init','In this version only iadv=10 and iadv=14 is tested!',1) 319 335 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'336 WRITE(lunout,*)trim(modname),'STOP : The option iadv=',iadv(iq),' is not tested in this version of LMDZ' 321 337 CALL abort_gcm('infotrac_init','In this version iadv=14 is only permitted for water vapour!',1) 322 338 END IF
Note: See TracChangeset
for help on using the changeset viewer.