Commit 0ee21935 authored by Sabine's avatar Sabine
Browse files

BUGFIX: advance_rec lsynctime instead if ideltas

parent d4a42507
......@@ -568,7 +568,6 @@ subroutine advance(itime,nrelpoint,ldt,up,vp,wp, &
! where f(n) is the exponential term
prob(ks)=1.+(prob(ks)-1.)* &
exp(-vdepo(ks)*abs(dt)/(2.*href))
! write(*,*) 'Prob calc: ',zt,href,prob(ks)
endif
end do
endif
......
......@@ -167,7 +167,7 @@ subroutine advance_rec(itime,xt,yt,zt,prob)
! this formulation means that prob(n) = 1 - f(0)*...*f(n)
! where f(n) is the exponential term
prob(ks)=1.+(prob(ks)-1.)* &
exp(-vdepo(ks)*abs(ideltas)/(2.*href))
exp(-vdepo(ks)*abs(lsynctime)/(2.*href))
endif
end do
endif
......
......@@ -552,6 +552,7 @@ subroutine timemanager
do ks=1,nspec
if ((xscav_frac1(j,ks).lt.0)) then
call advance_rec(itime,xtra1(j),ytra1(j),ztra1(j),prob_rec)
if (decay(ks).gt.0.) then ! radioactive decay
decfact=exp(-real(abs(lsynctime))*decay(ks))
else
......@@ -561,11 +562,6 @@ subroutine timemanager
drydeposit(ks)=xmass1(j,ks)*prob_rec(ks)*decfact
xscav_frac1(j,ks)=xscav_frac1(j,ks)*(-1.)* &
drydeposit(ks)/xmass1(j,ks)
!if (xscav_frac1(j,ks).eq.1) then
! write (*,*) 'xscav 1: ',j,prob_rec(ks),xmass1(j,ks), &
! ztra1(j),drydeposit(ks),decfact
! stop
! endif
else
xmass1(j,ks)=0
xscav_frac1(j,ks)=0.
......
Supports Markdown
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