Maintenance is scheduled between 16:00 and 23:59 CEST (14:00 and 21:59 UTC) on Thursday 2021-10-28. The system may be unavailable at any time during this timeframe. Please plan accordingly.

Commit 34a485da authored by Ignacio Pisso's avatar Ignacio Pisso
Browse files

Messages and comments in releaseparticles.f90. Change one standard output format in timemanager.f90

parent 4d0a334d
...@@ -50,7 +50,8 @@ subroutine releaseparticles(itime) ...@@ -50,7 +50,8 @@ subroutine releaseparticles(itime)
!save idummy,xmasssave !save idummy,xmasssave
!data idummy/-7/,xmasssave/maxpoint*0./ !data idummy/-7/,xmasssave/maxpoint*0./
integer :: verb_dbg=0
!verb_dbg=1
! Determine the actual date and time in Greenwich (i.e., UTC + correction for daylight savings time) ! Determine the actual date and time in Greenwich (i.e., UTC + correction for daylight savings time)
!***************************************************************************** !*****************************************************************************
...@@ -65,11 +66,21 @@ subroutine releaseparticles(itime) ...@@ -65,11 +66,21 @@ subroutine releaseparticles(itime)
! For every release point, check whether we are in the release time interval ! For every release point, check whether we are in the release time interval
!*************************************************************************** !***************************************************************************
if (verb_dbg.gt.0) print*,'releaseparticles.f90>>> START itime=', itime
minpart=1 minpart=1
do i=1,numpoint do i=1,numpoint
if ((itime.ge.ireleasestart(i)).and. &! are we within release interval? if ((itime.ge.ireleasestart(i)).and. &! are we within release interval?
(itime.le.ireleaseend(i))) then (itime.le.ireleaseend(i))) then
!if (verb_dbg.gt.0) print*,'releaseparticles.f90> i,numpoint=', i,numpoint
if (verb_dbg.gt.0) print*,'releaseparticles.f90> i=', i
if (verb_dbg.gt.0) print*,'ireleasestart(i),ireleaseend(i)=', ireleasestart(i), ireleaseend(i)
! Determine the local day and time ! Determine the local day and time
!********************************* !*********************************
...@@ -105,6 +116,9 @@ subroutine releaseparticles(itime) ...@@ -105,6 +116,9 @@ subroutine releaseparticles(itime)
end do end do
average_timecorrect=average_timecorrect/real(nspec) average_timecorrect=average_timecorrect/real(nspec)
if (verb_dbg.gt.0) print*,'releaseparticles.f90> average_timecorrect=', average_timecorrect
! Determine number of particles to be released this time; at start and at end of release, ! Determine number of particles to be released this time; at start and at end of release,
! only half the particles are released ! only half the particles are released
!***************************************************************************** !*****************************************************************************
...@@ -115,18 +129,25 @@ subroutine releaseparticles(itime) ...@@ -115,18 +129,25 @@ subroutine releaseparticles(itime)
if ((itime.eq.ireleasestart(i)).or. & if ((itime.eq.ireleasestart(i)).or. &
(itime.eq.ireleaseend(i))) rfraction=rfraction/2. (itime.eq.ireleaseend(i))) rfraction=rfraction/2.
if (verb_dbg.gt.0) print*,'releaseparticles.f90> rfraction=', rfraction
! Take the species-average time correction factor in order to scale the ! Take the species-average time correction factor in order to scale the
! number of particles released this time ! number of particles released this time
!********************************************************************** !**********************************************************************
rfraction=rfraction*average_timecorrect rfraction=rfraction*average_timecorrect !for time dependency of emissions
rfraction=rfraction+xmasssave(i) ! number to be released at this time rfraction=rfraction+xmasssave(i) ! number to be released at this time
numrel=int(rfraction) numrel=int(rfraction)
xmasssave(i)=rfraction-real(numrel) xmasssave(i)=rfraction-real(numrel)
if (verb_dbg.gt.0) print*,'releaseparticles.f90> xmasssave(i)=', xmasssave(i)
else else
numrel=npart(i) numrel=npart(i)
endif endif
if (verb_dbg.gt.0) print*,'releaseparticles.f90> numrel=', numrel
xaux=xpoint2(i)-xpoint1(i) xaux=xpoint2(i)-xpoint1(i)
yaux=ypoint2(i)-ypoint1(i) yaux=ypoint2(i)-ypoint1(i)
zaux=zpoint2(i)-zpoint1(i) zaux=zpoint2(i)-zpoint1(i)
...@@ -361,18 +382,20 @@ subroutine releaseparticles(itime) ...@@ -361,18 +382,20 @@ subroutine releaseparticles(itime)
do k=1,nspec do k=1,nspec
xmass1(ipart,k)=xmass1(ipart,k)*rhoout xmass1(ipart,k)=xmass1(ipart,k)*rhoout
end do end do
endif endif !ind_rel
numpart=max(numpart,ipart) numpart=max(numpart,ipart)
goto 34 ! Storage space has been found, stop searching goto 34 ! Storage space has been found, stop searching
endif endif !(itra1(ipart).ne.itime) - If a free storage space is found,
end do ! i=1:numpoint end do ! ipart=minpart,maxpart - search for free storage space
if (ipart.gt.maxpart) goto 996 if (ipart.gt.maxpart) goto 996
34 minpart=ipart+1 34 minpart=ipart+1
end do ! ipart=minpart,maxpart end do ! j=1,numrel ! loop over particles to be released this time
endif ! j=1,numrel if (verb_dbg.gt.0) print*,'releaseparticles.f90> ipart=', ipart,'minpart=',minpart
end do
endif ! itime.ge.ireleasestart(i) .and. itime.le.ireleaseend(i) (are we within release interval?)
end do !i=1:numpoint ! release locations
return return
......
...@@ -450,7 +450,7 @@ subroutine timemanager(metdata_format) ...@@ -450,7 +450,7 @@ subroutine timemanager(metdata_format)
!write(*,46) float(itime)/3600,itime,numpart !write(*,46) float(itime)/3600,itime,numpart
45 format(i13,' Seconds simulated: ',i13, ' Particles: Uncertainty: ',3f7.3) 45 format(i13,' Seconds simulated: ',i13, ' Particles: Uncertainty: ',3f7.3)
46 format(' Simulated ',f7.1,' hours (',i13,' s), ',i13, ' particles') 46 format(' Simulated ',f7.2,' hours (',i13,' s), ',i13, ' particles')
if (ipout.ge.1) then if (ipout.ge.1) then
if (mod(itime,ipoutfac*loutstep).eq.0) call partoutput(itime) ! dump particle positions if (mod(itime,ipoutfac*loutstep).eq.0) call partoutput(itime) ! dump particle positions
if (ipout.eq.3) call partoutput_average(itime) ! dump particle positions if (ipout.eq.3) call partoutput_average(itime) ! dump particle positions
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment