Changeset d7935de in flexpart.git for src/readreleases.f90
- Timestamp:
- Sep 11, 2018, 6:06:31 PM (6 years ago)
- Branches:
- univie
- Children:
- 93786a1
- Parents:
- 34f1452
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/readreleases.f90
r5184a7c rd7935de 33 33 ! Update: 29 January 2001 * 34 34 ! Release altitude can be either in magl or masl * 35 ! HSO, 12 August 2013 36 ! Added optional namelist input 35 ! HSO, 12 August 2013: Added optional namelist input * 36 ! PS, 2/2015: access= -> position= (ported from 9.2 review) * 37 ! PS, 8/2018: check for uninitialised mass (ticket:204), * 38 ! rename int/real variables, a bit of code layout improvement * 37 39 ! * 38 40 !***************************************************************************** … … 74 76 implicit none 75 77 76 integer :: numpartmax,i,j,id1,it1,id2,it2,idum, stat,irel,ispc,nsettle78 integer :: numpartmax,i,j,id1,it1,id2,it2,idum,iallocstat,irel,ispc,nsettle 77 79 integer,parameter :: num_min_discrete=100 78 80 real :: vsh(ni),fracth(ni),schmih(ni),releaserate,xdum,cun 79 81 real(kind=dp) :: jul1,jul2,julm,juldate 80 real,parameter :: eps2=1.e-981 82 character(len=50) :: line 82 83 logical :: old 83 84 84 85 ! help variables for namelist reading 85 integer :: numpoints, parts, readerror86 integer*2 :: zkind86 integer :: numpoints, nparts, ios 87 integer*2 :: ikindz 87 88 integer :: idate1, itime1, idate2, itime2 88 real :: lon1,lon2,lat1,lat2,z1,z289 real :: rlon1,rlon2,rlat1,rlat2,z1,z2 89 90 character*40 :: comment 90 91 integer,parameter :: unitreleasesout=2 91 real,allocatable, dimension (:) :: mass92 integer,allocatable, dimension (:) :: specnum_rel,specnum_rel292 real,allocatable, dimension (:) :: rmass 93 integer,allocatable, dimension (:) :: numspec_rel,numspec_rel2 93 94 94 95 ! declare namelists 95 96 namelist /releases_ctrl/ & 96 97 nspec, & 97 specnum_rel98 numspec_rel 98 99 99 100 namelist /release/ & 100 101 idate1, itime1, & 101 102 idate2, itime2, & 102 lon1,lon2, &103 lat1,lat2, &103 rlon1, rlon2, & 104 rlat1, rlat2, & 104 105 z1, z2, & 105 zkind, &106 mass, &107 parts, &106 ikindz, & 107 rmass, & 108 nparts, & 108 109 comment 110 ! initialiase mass 109 111 110 112 numpoint=0 111 113 112 113 allocate( mass(maxspec),stat=stat)114 if ( stat.ne.0) write(*,*)'ERROR: could not allocatemass'115 allocate( specnum_rel(maxspec),stat=stat)116 if ( stat.ne.0) write(*,*)'ERROR: could not allocate specnum_rel'117 118 114 ! allocate with maxspec for first input loop 115 allocate(rmass(maxspec),stat=iallocstat) 116 if (iallocstat.ne.0) write(*,*)'ERROR: could not allocate rmass' 117 allocate(numspec_rel(maxspec),stat=iallocstat) 118 if (iallocstat.ne.0) write(*,*)'ERROR: could not allocate numspec_rel' 119 120 ! presetting namelist releases_ctrl 119 121 nspec = -1 ! use negative value to determine failed namelist input 120 specnum_rel = 0 121 122 !sec, read release to find how many releasepoints should be allocated 123 open(unitreleases,file=path(1)(1:length(1))//'RELEASES',status='old',form='formatted',err=999) 124 125 ! check if namelist input provided 126 read(unitreleases,releases_ctrl,iostat=readerror) 127 128 ! prepare namelist output if requested 122 numspec_rel = 0 123 124 !SEC: read release to find how many releasepoints should be allocated 125 open(unitreleases,file=path(1)(1:length(1))//'RELEASES',status='old', & 126 form='formatted',err=999) 127 128 ! prepare namelist output if requested 129 129 if (nmlout.and.lroot) then 130 open(unitreleasesout,file=path(2)(1:length(2))//'RELEASES.namelist',access='append',status='replace',err=1000) 131 endif 132 133 if ((readerror.ne.0).or.(nspec.lt.0)) then 134 135 ! no namelist format, close file and allow reopening in old format 130 open(unitreleasesout,file=path(2)(1:length(2))//'RELEASES.namelist', & 131 position='append',status='replace',err=1000) 132 endif 133 134 ! check whether namelist input is available 135 read(unitreleases,releases_ctrl,iostat=ios) 136 137 if (ios .ne. 0 .or. nspec .lt. 0 ) then 138 139 ! not in namelist format, close file and reopen as simple text file 140 136 141 close(unitreleases) 137 open(unitreleases,file=path(1)(1:length(1))//'RELEASES',status='old',err=999) 138 139 readerror=1 ! indicates old format 140 141 ! Check the format of the RELEASES file (either in free format, 142 ! or using a formatted mask) 142 open(unitreleases,file=path(1)(1:length(1))//'RELEASES', status='old', & 143 err=999) 144 145 ios=1 ! indicates old format 146 147 ! Check the format of the RELEASES file 148 ! (either in free format, or using a formatted mask) 143 149 ! Use of formatted mask is assumed if line 10 contains the word 'DIRECTION' 144 150 !************************************************************************** 151 ! Note PS: something has changed, now Total is checked. Is this compatible?? 145 152 146 153 call skplin(12,unitreleases) … … 163 170 if (old) call skplin(2,unitreleases) 164 171 do i=1,nspec 165 read(unitreleases,*,err=998) specnum_rel(i)172 read(unitreleases,*,err=998) numspec_rel(i) 166 173 if (old) call skplin(2,unitreleases) 167 174 end do … … 202 209 25 numpoint=numpoint-1 203 210 204 else 205 206 readerror=0207 do while ( readerror.eq.0)211 else ! read namelist input 212 213 ios=0 214 do while (ios.eq.0) ! loop over release points 208 215 idate1=-1 209 read(unitreleases,release,iostat= readerror)210 if ( (idate1.lt.0).or.(readerror.ne.0)) then211 readerror=1216 read(unitreleases,release,iostat=ios) 217 if (idate1.lt.0 .or. ios.ne.0) then 218 ios=1 212 219 else 213 220 numpoint=numpoint+1 214 221 endif 215 222 end do 216 readerror=0 217 endif ! if namelist input 223 ios=0 224 225 endif 218 226 219 227 rewind(unitreleases) … … 221 229 if (nspec.gt.maxspec) goto 994 222 230 223 ! allocate arrays of matching size for number of species (namelist output) 224 deallocate(mass) 225 allocate(mass(nspec),stat=stat) 226 if (stat.ne.0) write(*,*)'ERROR: could not allocate mass' 227 allocate(specnum_rel2(nspec),stat=stat) 228 if (stat.ne.0) write(*,*)'ERROR: could not allocate specnum_rel2' 229 specnum_rel2=specnum_rel(1:nspec) 230 deallocate(specnum_rel) 231 ! allocate arrays of matching size for number of species (namelist output) 232 deallocate(rmass) 233 allocate(rmass(nspec),stat=iallocstat) 234 if (iallocstat.ne.0) write(*,*)'ERROR: could not allocate rmass' 235 allocate(numspec_rel2(nspec),stat=iallocstat) 236 if (iallocstat.ne.0) write(*,*)'ERROR: could not allocate numspec_rel2' 237 238 numspec_rel2 = numspec_rel(1:nspec) 239 240 deallocate(numspec_rel) 231 241 ! eso: BUG, crashes here for nspec=12 and maxspec=6, 232 242 ! TODO: catch error and exit 233 allocate(specnum_rel(nspec),stat=stat) 234 if (stat.ne.0) write(*,*)'ERROR: could not allocate specnum_rel' 235 specnum_rel=specnum_rel2 236 deallocate(specnum_rel2) 237 238 !allocate memory for numpoint releaspoints 239 allocate(ireleasestart(numpoint),stat=stat) 240 if (stat.ne.0) write(*,*)'ERROR: could not allocate ireleasestart' 241 allocate(ireleaseend(numpoint),stat=stat) 242 if (stat.ne.0) write(*,*)'ERROR: could not allocate ireleaseend' 243 allocate(xpoint1(numpoint),stat=stat) 244 if (stat.ne.0) write(*,*)'ERROR: could not allocate xpoint1' 245 allocate(xpoint2(numpoint),stat=stat) 246 if (stat.ne.0) write(*,*)'ERROR: could not allocate xpoint2' 247 allocate(ypoint1(numpoint),stat=stat) 248 if (stat.ne.0) write(*,*)'ERROR: could not allocate ypoint1' 249 allocate(ypoint2(numpoint),stat=stat) 250 if (stat.ne.0) write(*,*)'ERROR: could not allocate ypoint2' 251 allocate(zpoint1(numpoint),stat=stat) 252 if (stat.ne.0) write(*,*)'ERROR: could not allocate zpoint1' 253 allocate(zpoint2(numpoint),stat=stat) 254 if (stat.ne.0) write(*,*)'ERROR: could not allocate zpoint2' 255 allocate(kindz(numpoint),stat=stat) 256 if (stat.ne.0) write(*,*)'ERROR: could not allocate kindz' 257 allocate(xmass(numpoint,maxspec),stat=stat) 258 if (stat.ne.0) write(*,*)'ERROR: could not allocate xmass' 259 allocate(rho_rel(numpoint),stat=stat) 260 if (stat.ne.0) write(*,*)'ERROR: could not allocate rho_rel' 261 allocate(npart(numpoint),stat=stat) 262 if (stat.ne.0) write(*,*)'ERROR: could not allocate npart' 263 allocate(xmasssave(numpoint),stat=stat) 264 if (stat.ne.0) write(*,*)'ERROR: could not allocate xmasssave' 265 266 if (lroot) write (*,*) 'Releasepoints : ', numpoint 267 268 do i=1,numpoint 269 xmasssave(i)=0. 270 end do 243 allocate(numspec_rel(nspec),stat=iallocstat) 244 if (iallocstat.ne.0) write(*,*)'ERROR: could not allocate numspec_rel' 245 246 numspec_rel = numspec_rel2 247 248 deallocate(numspec_rel2) 249 250 ! allocate memory for numpoint releaspoints 251 allocate ( & 252 ireleasestart(numpoint), ireleaseend(numpoint),xpoint1(numpoint), & 253 xpoint2(numpoint), ypoint1(numpoint), ypoint2(numpoint), & 254 zpoint1(numpoint), zpoint2(numpoint), kindz(numpoint), & 255 xmass(numpoint,maxspec), rho_rel(numpoint), npart(numpoint), & 256 xmasssave(numpoint), & 257 stat=iallocstat ) 258 if (iallocstat.ne.0) write(*,*)'ERROR: could not allocate variables' // & 259 ' dimensioned numpoint =', numpoint 260 261 if (lroot) write (*,*) 'Release points : ', numpoint 262 263 xmasssave(:)=0. 271 264 272 265 !now save the information 273 DEP=.false. 274 DRYDEP=.false. 275 WETDEP=.false. 276 OHREA=.false. 277 do i=1,maxspec 278 DRYDEPSPEC(i)=.false. 279 WETDEPSPEC(i)=.false. 280 end do 281 282 if (readerror.ne.0) then 266 dep =.false. 267 drydep=.false. 268 wetdep=.false. 269 ohrea =.false. 270 drydepspec(:)=.false. 271 wetdepspec(:)=.false. 272 273 if (ios.ne.0) then 274 283 275 ! Skip first 11 lines (file header) 284 276 !********************************** … … 292 284 if (nspec.gt.maxspec) goto 994 293 285 if (old) call skplin(2,unitreleases) 294 endif 295 296 ! namelist output 297 if (nmlout.and.lroot) then 298 299 endif 300 286 287 endif 288 289 ! namelist output 290 if (nmlout.and.lroot) write(unitreleasesout,nml=releases_ctrl) 291 292 ! species loop 301 293 do i=1,nspec 302 if (readerror.ne.0) then 303 read(unitreleases,*,err=998) specnum_rel(i) 294 295 if (ios.ne.0) then 296 read(unitreleases,*,err=998) numspec_rel(i) 304 297 if (old) call skplin(2,unitreleases) 305 call readspecies( specnum_rel(i),i)298 call readspecies(numspec_rel(i),i) 306 299 else 307 call readspecies( specnum_rel(i),i)300 call readspecies(numspec_rel(i),i) 308 301 endif 309 302 … … 322 315 !***************** 323 316 324 if ( ((iout.eq.2).or.(iout.eq.3)).and.(weightmolar(i).lt.0.)) then317 if ( (iout.eq.2 .or. iout.eq.3) .and. weightmolar(i).lt.0. ) then 325 318 write(*,*) 'For mixing ratio output, valid molar weight' 326 319 write(*,*) 'must be specified for all simulated species.' … … 334 327 335 328 decay(i)=0.693147/decay(i) !conversion half life to decay constant 336 329 ! Note PS: this should be replace by = alog(2.)/decay(i) 330 ! keep it for the moment so that results are not affect in test phase of v10 337 331 338 332 ! Dry deposition of gases 339 333 !************************ 340 334 341 if (reldiff(i).gt.0.) rm(i)=1./( henry(i)/3000.+100.*f0(i))! mesophyll resistance335 if (reldiff(i).gt.0.) rm(i)=1./( henry(i)/3000. + 100.*f0(i) )! mesophyll resistance 342 336 343 337 ! Dry deposition of particles 344 338 !**************************** 345 339 346 vsetaver(i) =0.347 cunningham(i) =0.348 dquer(i) =dquer(i)*1000000.! Conversion m to um340 vsetaver(i) = 0. 341 cunningham(i) = 0. 342 dquer(i) = dquer(i)*1.e6 ! Conversion m to um 349 343 if (density(i).gt.0.) then ! Additional parameters 350 344 call part0(dquer(i),dsigma(i),density(i),fracth,schmih,cun,vsh) 351 345 do j=1,ni 352 fract(i,j) =fracth(j)353 schmi(i,j) =schmih(j)354 vset(i,j) =vsh(j)355 cunningham(i) =cunningham(i)+cun*fract(i,j)356 vsetaver(i) =vsetaver(i)-vset(i,j)*fract(i,j)346 fract(i,j) = fracth(j) 347 schmi(i,j) = schmih(j) 348 vset(i,j) = vsh(j) 349 cunningham(i) = cunningham(i) + cun*fract(i,j) 350 vsetaver(i) = vsetaver(i) - vset(i,j)*fract(i,j) 357 351 end do 358 352 if (lroot) write(*,*) 'Average settling velocity: ',i,vsetaver(i) … … 368 362 369 363 ! ESO 04.2016 check for below-cloud scavenging (gas or aerosol) 370 if ((dquer(i).le.0..and.(weta_gas(i).gt.0. .or. wetb_gas(i).gt.0.)) .or. & 371 &(dquer(i).gt.0. .and. (crain_aero(i) .gt. 0. .or. csnow_aero(i).gt.0.))) then 372 WETDEP=.true. 373 WETDEPSPEC(i)=.true. 364 if ( & 365 dquer(i).le.0. .and. (weta_gas(i) .gt.0. .or. wetb_gas(i) .gt.0.) .or. & 366 dquer(i).gt.0. .and. (crain_aero(i).gt.0. .or. csnow_aero(i).gt.0.) & 367 ) then 368 wetdep = .true. 369 wetdepspec(i) = .true. 374 370 if (lroot) then 375 371 write (*,*) ' Below-cloud scavenging: ON' … … 381 377 382 378 ! NIK 31.01.2013 + 10.12.2013 + 15.02.2015 383 if (dquer(i).gt.0. .and.(ccn_aero(i).gt.0. .or. in_aero(i).gt.0.)) then384 WETDEP=.true.385 WETDEPSPEC(i)=.true.379 if (dquer(i).gt.0. .and. (ccn_aero(i).gt.0. .or. in_aero(i).gt.0.)) then 380 wetdep = .true. 381 wetdepspec(i) = .true. 386 382 if (lroot) then 387 383 write (*,*) ' In-cloud scavenging: ON' … … 394 390 395 391 if (ohcconst(i).gt.0.) then 396 OHREA=.true.392 ohrea = .true. 397 393 if (lroot) write (*,*) ' OHreaction switched on: ',ohcconst(i),i 398 394 endif 399 395 400 if ( (reldiff(i).gt.0.).or.(density(i).gt.0.).or.(dryvel(i).gt.0.)) then401 DRYDEP=.true.402 DRYDEPSPEC(i)=.true.396 if (reldiff(i).gt.0. .or. density(i).gt.0. .or. dryvel(i).gt.0.) then 397 drydep = .true. 398 drydepspec(i) = .true. 403 399 endif 404 400 … … 415 411 101 numpoint=numpoint+1 416 412 417 if ( readerror.lt.1) then ! reading namelist format413 if (ios.lt.1) then ! reading namelist format 418 414 419 415 if (numpoint.gt.numpoints) goto 250 420 zkind= 1421 mass = 0422 parts = 0416 ikindz = 1 417 rmass = -1. ! initialise as negative to catch if not given in input 418 nparts = 0 423 419 comment = ' ' 424 read(unitreleases,release,iostat= readerror)420 read(unitreleases,release,iostat=ios) 425 421 id1=idate1 426 422 it1=itime1 427 423 id2=idate2 428 424 it2=itime2 429 xpoint1(numpoint)= lon1430 xpoint2(numpoint)= lon2431 ypoint1(numpoint)= lat1432 ypoint2(numpoint)= lat2425 xpoint1(numpoint)=rlon1 426 xpoint2(numpoint)=rlon2 427 ypoint1(numpoint)=rlat1 428 ypoint2(numpoint)=rlat2 433 429 zpoint1(numpoint)=z1 434 430 zpoint2(numpoint)=z2 435 kindz(numpoint)= zkind431 kindz(numpoint)=ikindz 436 432 do i=1,nspec 437 xmass(numpoint,i)=mass(i) 433 if (rmass(i) .lt. 0.) goto 995 ! write error and stop 434 xmass(numpoint,i)=rmass(i) 438 435 end do 439 npart(numpoint)= parts436 npart(numpoint)=nparts 440 437 compoint(min(1001,numpoint))=comment 441 438 … … 445 442 endif 446 443 447 else 444 else ! simple text format 448 445 449 446 read(unitreleases,*,end=250) … … 471 468 read(unitreleases,*,err=998) xmass(numpoint,i) 472 469 if (old) call skplin(2,unitreleases) 473 mass(i)=xmass(numpoint,i)470 rmass(i)=xmass(numpoint,i) 474 471 end do 475 472 !save compoint only for the first 1000 release points … … 489 486 idate2=id2 490 487 itime2=it2 491 lon1=xpoint1(numpoint)492 lon2=xpoint2(numpoint)493 lat1=ypoint1(numpoint)494 lat2=ypoint2(numpoint)488 rlon1=xpoint1(numpoint) 489 rlon2=xpoint2(numpoint) 490 rlat1=ypoint1(numpoint) 491 rlat2=ypoint2(numpoint) 495 492 z1=zpoint1(numpoint) 496 493 z2=zpoint2(numpoint) 497 zkind=kindz(numpoint)498 parts=npart(numpoint)494 ikindz=kindz(numpoint) 495 nparts=npart(numpoint) 499 496 write(unitreleasesout,nml=release) 500 497 endif 501 498 502 499 if (numpoint.le.1000) then 503 if ((xpoint1(numpoint).eq.0.).and.(ypoint1(numpoint).eq.0.).and. &504 (xpoint2(numpoint).eq.0.).and.(ypoint2(numpoint).eq.0.).and. &505 (compoint(numpoint)(1:8).eq.' ')) goto 250500 if (xpoint1(numpoint).eq.0. .and. ypoint1(numpoint).eq.0. .and. & 501 xpoint2(numpoint).eq.0. .and. ypoint2(numpoint).eq.0. .and. & 502 compoint(numpoint)(1:8).eq.' ') goto 250 506 503 else 507 if ((xpoint1(numpoint).eq.0.).and.(ypoint1(numpoint).eq.0.).and. &508 (xpoint2(numpoint).eq.0.).and.(ypoint2(numpoint).eq.0.)) goto 250504 if (xpoint1(numpoint).eq.0. .and. ypoint1(numpoint).eq.0. .and. & 505 xpoint2(numpoint).eq.0. .and. ypoint2(numpoint).eq.0.) goto 250 509 506 endif 510 507 … … 539 536 !********************************************************************* 540 537 541 if (xpoint1(numpoint) .lt.xlon0) &542 xpoint1(numpoint)=xpoint1(numpoint)+360.543 if (xpoint1(numpoint) .gt.xlon0+(nxmin1)*dx) &544 xpoint1(numpoint)=xpoint1(numpoint)-360.545 if (xpoint2(numpoint) .lt.xlon0) &546 xpoint2(numpoint)=xpoint2(numpoint)+360.547 if (xpoint2(numpoint) .gt.xlon0+(nxmin1)*dx) &548 xpoint2(numpoint)=xpoint2(numpoint)-360.538 if (xpoint1(numpoint) .lt. xlon0) & 539 xpoint1(numpoint) = xpoint1(numpoint) + 360. 540 if (xpoint1(numpoint) .gt. xlon0+nxmin1*dx) & 541 xpoint1(numpoint) = xpoint1(numpoint) - 360. 542 if (xpoint2(numpoint) .lt. xlon0) & 543 xpoint2(numpoint) = xpoint2(numpoint) + 360. 544 if (xpoint2(numpoint) .gt. xlon0+nxmin1*dx) & 545 xpoint2(numpoint) = xpoint2(numpoint) - 360. 549 546 550 547 ! Determine relative beginning and ending times of particle release … … 562 559 if (mdomainfill.eq.0) then ! no domain filling 563 560 if (ldirect.eq.1) then 564 if ( (jul1.lt.bdate).or.(jul2.gt.edate)) then561 if (jul1.lt.bdate .or. jul2.gt.edate) then 565 562 write(*,*) 'FLEXPART MODEL ERROR' 566 563 write(*,*) 'Release starts before simulation begins or ends' … … 577 574 endif 578 575 else if (ldirect.eq.-1) then 579 if ( (jul1.lt.edate).or.(jul2.gt.bdate)) then576 if (jul1.lt.edate .or. jul2.gt.bdate) then 580 577 write(*,*) 'FLEXPART MODEL ERROR' 581 578 write(*,*) 'Release starts before simulation begins or ends' … … 586 583 if (npart(numpoint).gt.num_min_discrete) then 587 584 ireleasestart(numpoint)=int((jul1-bdate)*86400.) 588 ireleaseend(numpoint) =int((jul2-bdate)*86400.)585 ireleaseend(numpoint) = int((jul2-bdate)*86400.) 589 586 else 590 587 ireleasestart(numpoint)=int((julm-bdate)*86400.) 591 ireleaseend(numpoint) =int((julm-bdate)*86400.)588 ireleaseend(numpoint) = int((julm-bdate)*86400.) 592 589 endif 593 590 endif … … 600 597 601 598 if (ireleasestart(numpoint).ne.ireleaseend(numpoint)) then 602 releaserate =releaserate+real(npart(numpoint))/ &603 real(ireleaseend(numpoint)-ireleasestart(numpoint))599 releaserate = releaserate + real( npart(numpoint) ) / & 600 real( ireleaseend(numpoint) - ireleasestart(numpoint) ) 604 601 else 605 602 releaserate=99999999 … … 634 631 nsettle=0 635 632 do ispc=1,nspec 636 if (xmass(irel,ispc).gt. eps2) nsettle=nsettle+1633 if (xmass(irel,ispc).gt.tiny(1.)) nsettle=nsettle+1 637 634 end do 638 635 if (nsettle.gt.1) lsettling=.false. … … 641 638 642 639 if (lroot) then 643 if (.not.lsettling) then 644 write(*,*) 'WARNING: more than 1 species per release point, settling & 645 &disabled' 646 end if 640 if (.not.lsettling) & 641 write(*,*) 'WARNING: more than 1 species per release point,' & 642 // ' settling disabled' 647 643 end if 648 644 … … 651 647 !************************************************************************ 652 648 653 if (releaserate.gt. & 654 0.99*real(maxpart)/real(lage(nageclass))) then 649 if (releaserate .gt. 0.99*real(maxpart)/real(lage(nageclass))) then 655 650 if (numpartmax.gt.maxpart.and.lroot) then 656 651 write(*,*) '#####################################################' … … 670 665 write(*,*) 'Maximum allowed release rate is: ', & 671 666 real(maxpart)/real(lage(nageclass)),' particles per second' 672 write(*,*) & 673 'Total number of particles released during the simulation is: ', & 674 numpartmax 667 write(*,*) 'Total number of particles released during the simulation is:'& 668 ,numpartmax 675 669 write(*,*) 'Maximum allowed number of particles is: ',maxpart 676 670 endif … … 679 673 680 674 if (lroot) then 681 write(*,FMT='(A,ES14.7)') ' Total mass released:', sum(xmass(1:numpoint,1:nspec)) 675 write(*,FMT='(A,ES14.7)') ' Total mass released:', & 676 sum(xmass(1:numpoint,1:nspec)) 682 677 end if 683 678 684 679 return 685 680 686 99 4write(*,*) '#####################################################'681 995 write(*,*) '#####################################################' 687 682 write(*,*) '#### FLEXPART MODEL SUBROUTINE READRELEASES: ####' 688 683 write(*,*) '#### ####' 689 write(*,*) '#### ERROR - MAXIMUM NUMBER OF EMITTED SPECIES IS####' 690 write(*,*) '#### TOO LARGE. PLEASE REDUCE NUMBER OF SPECIES. ####' 684 write(*,*) '#### ERROR - mass for species',i,' not given ####' 691 685 write(*,*) '#####################################################' 686 stop 'readreleases - undefined mass' 687 688 994 write(*,*) '######################################################' 689 write(*,*) '#### FLEXPART MODEL SUBROUTINE READRELEASES: ####' 690 write(*,*) '#### ####' 691 write(*,*) '#### ERROR - MAXIMUM NUMBER OF EMITTED SPECIES IS ####' 692 write(*,*) '#### TOO LARGE. PLEASE REDUCE NUMBER OF SPECIES. ####' 693 write(*,*) '######################################################' 692 694 stop 693 695 … … 702 704 stop 703 705 704 705 706 999 write(*,*) '#####################################################' 706 707 write(*,*) ' FLEXPART MODEL SUBROUTINE READRELEASES: ' … … 713 714 714 715 1000 write(*,*) ' #### FLEXPART MODEL ERROR! FILE "RELEASES" #### ' 715 write(*,*) ' #### CANNOT BE OPENED IN THE DIRECTORY#### '716 write(*,*) ' #### CANNOT BE OPENED IN THE DIRECTORY #### ' 716 717 write(*,'(a)') path(2)(1:length(2)) 717 718 stop
Note: See TracChangeset
for help on using the changeset viewer.