subroutine get_vdep_prob(itime,xt,yt,zt,prob) ! i i i i o !***************************************************************************** ! * ! Calculation of the probability for dyr deposition * ! * ! Particle positions are read in - prob returned * ! * !***************************************************************************** ! * ! Variables: * ! itime [s] time at which this subroutine is entered * ! itimec [s] actual time, which is incremented in this subroutine * ! href [m] height for which dry deposition velocity is calculated * ! ldirect 1 forward, -1 backward * ! ldt [s] Time step for the next integration * ! lsynctime [s] Synchronisation interval of FLEXPART * ! ngrid index which grid is to be used * ! prob probability of absorption due to dry deposition * ! vdepo Deposition velocities for all species * ! xt,yt,zt Particle position * ! * !***************************************************************************** use point_mod use par_mod use com_mod use interpol_mod implicit none real(kind=dp) :: xt,yt real :: zt,xtn,ytn integer :: itime,i,j,k,memindnext integer :: nix,njy,ks real :: prob(maxspec),vdepo(maxspec) real,parameter :: eps=nxmax/3.e5 if (DRYDEP) then ! reset probability for deposition do ks=1,nspec depoindicator(ks)=.true. prob(ks)=0. end do endif ! Determine whether lat/long grid or polarstereographic projection ! is to be used ! Furthermore, determine which nesting level to be used !***************************************************************** if (nglobal.and.(yt.gt.switchnorthg)) then ngrid=-1 else if (sglobal.and.(yt.lt.switchsouthg)) then ngrid=-2 else ngrid=0 do j=numbnests,1,-1 if ((xt.gt.xln(j)+eps).and.(xt.lt.xrn(j)-eps).and. & (yt.gt.yln(j)+eps).and.(yt.lt.yrn(j)-eps)) then ngrid=j goto 23 endif end do 23 continue endif !*************************** ! Interpolate necessary data !*************************** if (abs(itime-memtime(1)).lt.abs(itime-memtime(2))) then memindnext=1 else memindnext=2 endif ! Determine nested grid coordinates !********************************** if (ngrid.gt.0) then xtn=(xt-xln(ngrid))*xresoln(ngrid) ytn=(yt-yln(ngrid))*yresoln(ngrid) ix=int(xtn) jy=int(ytn) nix=nint(xtn) njy=nint(ytn) else ix=int(xt) jy=int(yt) nix=nint(xt) njy=nint(yt) endif ixp=ix+1 jyp=jy+1 ! Determine probability of deposition !************************************ if ((DRYDEP).and.(zt.lt.2.*href)) then do ks=1,nspec if (DRYDEPSPEC(ks)) then if (depoindicator(ks)) then if (ngrid.le.0) then call interpol_vdep(ks,vdepo(ks)) else call interpol_vdep_nests(ks,vdepo(ks)) endif endif ! correction by Petra Seibert, 10 April 2001 ! this formulation means that prob(n) = 1 - f(0)*...*f(n) ! where f(n) is the exponential term prob(ks)=vdepo(ks) ! prob(ks)=vdepo(ks)/2./href ! instead of prob - return vdepo -> result kg/m2/s endif end do endif end subroutine get_vdep_prob