Changeset 1454 for LMDZ5/trunk/libf/dyn3dpar/infotrac.F90
- Timestamp:
- Nov 18, 2010, 1:01:24 PM (14 years ago)
- Location:
- LMDZ5/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk
- Property svn:mergeinfo changed
/LMDZ5/branches/LMDZ5V1.0-dev (added) merged: 1436-1438,1441-1449,1452-1453
- Property svn:mergeinfo changed
-
LMDZ5/trunk/libf/dyn3dpar/infotrac.F90
r1403 r1454 61 61 CHARACTER(len=1), DIMENSION(3) :: txts 62 62 CHARACTER(len=2), DIMENSION(9) :: txtp 63 CHARACTER(len= 13) :: str1,str263 CHARACTER(len=23) :: str1,str2 64 64 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 INTEGER, EXTERNAL :: lnblnk 68 67 68 character(len=*),parameter :: modname="infotrac_init" 69 69 !----------------------------------------------------------------------- 70 70 ! Initialization : … … 100 100 OPEN(90,file='traceur.def',form='formatted',status='old', iostat=ierr) 101 101 IF(ierr.EQ.0) THEN 102 WRITE(lunout,*) 'Open traceur.def : ok'102 WRITE(lunout,*) trim(modname),': Open traceur.def : ok' 103 103 READ(90,*) nqtrue 104 104 ELSE 105 WRITE(lunout,*) 'Problem in opening traceur.def' 106 WRITE(lunout,*) 'ATTENTION using defaut values' 107 nqtrue=4 ! Defaut value 108 END IF 109 ! Attention! Only for planet_type=='earth' 110 nbtr=nqtrue-2 105 WRITE(lunout,*) trim(modname),': Problem in opening traceur.def' 106 WRITE(lunout,*) trim(modname),': WARNING using defaut values' 107 if (planet_type=='earth') then 108 nqtrue=4 ! Default value for Earth 109 else 110 nqtrue=1 ! Default value for other planets 111 endif 112 END IF 113 if ( planet_type=='earth') then 114 ! For Earth, water vapour & liquid tracers are not in the physics 115 nbtr=nqtrue-2 116 else 117 ! Other planets (for now); we have the same number of tracers 118 ! in the dynamics than in the physics 119 nbtr=nqtrue 120 endif 111 121 ELSE 112 122 ! nbtr has been read from INCA by init_cont_lmdz() in gcm.F … … 114 124 END IF 115 125 116 IF ( nqtrue < 2) THEN117 WRITE(lunout,*) 'nqtrue=',nqtrue, ' is not allowded. 2 tracers is the minimum'126 IF ((planet_type=="earth").and.(nqtrue < 2)) THEN 127 WRITE(lunout,*) trim(modname),': nqtrue=',nqtrue, ' is not allowded. 2 tracers is the minimum' 118 128 CALL abort_gcm('infotrac_init','Not enough tracers',1) 119 129 END IF … … 156 166 ! Continue to read tracer.def 157 167 DO iq=1,nqtrue 158 READ(90, 999) hadv(iq),vadv(iq),tnom_0(iq)168 READ(90,*) hadv(iq),vadv(iq),tnom_0(iq) 159 169 END DO 160 170 CLOSE(90) 161 ELSE ! Without tracer.def 171 ELSE ! Without tracer.def, set default values 172 if (planet_type=="earth") then 173 ! for Earth, default is to have 4 tracers 162 174 hadv(1) = 14 163 175 vadv(1) = 14 … … 172 184 vadv(4) = 10 173 185 tnom_0(4) = 'PB' 186 else ! default for other planets 187 hadv(1) = 10 188 vadv(1) = 10 189 tnom_0(1) = 'dummy' 190 endif ! of if (planet_type=="earth") 174 191 END IF 175 192 176 WRITE(lunout,*) 'Valeur de traceur.def :'177 WRITE(lunout,*) 'nombre de traceurs ',nqtrue193 WRITE(lunout,*) trim(modname),': Valeur de traceur.def :' 194 WRITE(lunout,*) trim(modname),': nombre de traceurs ',nqtrue 178 195 DO iq=1,nqtrue 179 196 WRITE(lunout,*) hadv(iq),vadv(iq),tnom_0(iq) … … 217 234 new_iq=new_iq+10 ! 9 tracers added 218 235 ELSE 219 WRITE(lunout,*) 'This choice of advection schema is not available'236 WRITE(lunout,*) trim(modname),': This choice of advection schema is not available',iq,hadv(iq),vadv(iq) 220 237 CALL abort_gcm('infotrac_init','Bad choice of advection schema - 1',1) 221 238 END IF … … 227 244 nqtot = new_iq 228 245 229 WRITE(lunout,*) 'The choice of advection schema for one or more tracers'246 WRITE(lunout,*) trim(modname),': The choice of advection schema for one or more tracers' 230 247 WRITE(lunout,*) 'makes it necessary to add tracers' 231 WRITE(lunout,*) nqtrue,' is the number of true tracers'232 WRITE(lunout,*) nqtot, ' is the total number of tracers needed'248 WRITE(lunout,*) trim(modname)//': ',nqtrue,' is the number of true tracers' 249 WRITE(lunout,*) trim(modname)//': ',nqtot, ' is the total number of tracers needed' 233 250 234 251 ELSE … … 258 275 iadv(new_iq)=11 259 276 ELSE 260 WRITE(lunout,*)'This choice of advection schema is not available' 277 WRITE(lunout,*)trim(modname),': This choice of advection schema is not available',iq,hadv(iq),vadv(iq) 278 261 279 CALL abort_gcm('infotrac_init','Bad choice of advection schema - 2',1) 262 280 END IF … … 265 283 tname(new_iq)= tnom_0(iq) 266 284 IF (iadv(new_iq)==0) THEN 267 ttext(new_iq)= str1(1:lnblnk(str1))285 ttext(new_iq)=trim(str1) 268 286 ELSE 269 ttext(new_iq)= str1(1:lnblnk(str1))//descrq(iadv(new_iq))287 ttext(new_iq)=trim(tnom_0(iq))//descrq(iadv(new_iq)) 270 288 END IF 271 289 … … 276 294 new_iq=new_iq+1 277 295 iadv(new_iq)=-20 278 ttext(new_iq)= str2(1:lnblnk(str2))//txts(jq)279 tname(new_iq)= str1(1:lnblnk(str1))//txts(jq)296 ttext(new_iq)=trim(str2)//txts(jq) 297 tname(new_iq)=trim(str1)//txts(jq) 280 298 END DO 281 299 ELSE IF (iadv(new_iq)==30) THEN … … 283 301 new_iq=new_iq+1 284 302 iadv(new_iq)=-30 285 ttext(new_iq)= str2(1:lnblnk(str2))//txtp(jq)286 tname(new_iq)= str1(1:lnblnk(str1))//txtp(jq)303 ttext(new_iq)=trim(str2)//txtp(jq) 304 tname(new_iq)=trim(str1)//txtp(jq) 287 305 END DO 288 306 END IF … … 303 321 304 322 305 WRITE(lunout,*) 'Information stored in infotrac :'306 WRITE(lunout,*) 'iadv niadv tname ttext :'323 WRITE(lunout,*) trim(modname),': Information stored in infotrac :' 324 WRITE(lunout,*) trim(modname),': iadv niadv tname ttext :' 307 325 DO iq=1,nqtot 308 WRITE(lunout,*) iadv(iq),niadv(iq), tname(iq), ttext(iq) 326 WRITE(lunout,*) iadv(iq),niadv(iq),& 327 ' ',trim(tname(iq)),' ',trim(ttext(iq)) 309 328 END DO 310 329 … … 315 334 DO iq=1,nqtot 316 335 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'336 WRITE(lunout,*)trim(modname),' STOP : The option iadv=',iadv(iq),' is not tested in this version of LMDZ' 318 337 CALL abort_gcm('infotrac_init','In this version only iadv=10 and iadv=14 is tested!',1) 319 338 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'339 WRITE(lunout,*)trim(modname),'STOP : The option iadv=',iadv(iq),' is not tested in this version of LMDZ' 321 340 CALL abort_gcm('infotrac_init','In this version iadv=14 is only permitted for water vapour!',1) 322 341 END IF … … 329 348 DEALLOCATE(tracnam) 330 349 331 999 FORMAT (i2,1x,i2,1x,a15)332 333 350 END SUBROUTINE infotrac_init 334 351
Note: See TracChangeset
for help on using the changeset viewer.