Commit 1c0d5e63 authored by Sabine's avatar Sabine
Browse files

adding logical usekernel var-also for dry and wet

parent 8ee24a57
......@@ -751,6 +751,8 @@ module com_mod
integer :: mpi_mode=0 ! .gt. 0 if running MPI version
logical :: lroot=.true. ! true if serial version, or if MPI .and. root process
logical :: usekernel=.false. ! true if the output kernel shall be switched on
contains
subroutine com_mod_allocate_part(nmpart)
!*******************************************************************************
......
......@@ -60,10 +60,7 @@ subroutine conccalc(itime,weight)
real,parameter :: factor=.596831, hxmax=6.0, hymax=4.0, hzmax=150.
integer :: usekernel
usekernel=1
if (usekernel.ne.1) then
if (.not.usekernel) then
write (*,*) 'NOT USING THE KERNEL!'
endif
! For forward simulations, make a loop over the number of species;
......@@ -188,7 +185,7 @@ subroutine conccalc(itime,weight)
if (((itage.lt.10800).or.(xl.lt.0.5).or.(yl.lt.0.5).or. &
(xl.gt.real(numxgrid-1)-0.5).or. &
(yl.gt.real(numygrid-1)-0.5)).or.(usekernel.eq.0)) then ! no kernel, direct attribution to grid cell
(yl.gt.real(numygrid-1)-0.5)).or.(.not.usekernel)) then ! no kernel, direct attribution to grid cell
if ((ix.ge.0).and.(jy.ge.0).and.(ix.le.numxgrid-1).and. &
(jy.le.numygrid-1)) then
if (DRYBKDEP.or.WETBKDEP) then
......@@ -325,7 +322,7 @@ subroutine conccalc(itime,weight)
if ((itage.lt.10800).or.(xl.lt.0.5).or.(yl.lt.0.5).or. &
(xl.gt.real(numxgridn-1)-0.5).or. &
(yl.gt.real(numygridn-1)-0.5).or.(usekernel.eq.0)) then ! no kernel, direct attribution to grid cell
(yl.gt.real(numygridn-1)-0.5).or.(.not.usekernel)) then ! no kernel, direct attribution to grid cell
if ((ix.ge.0).and.(jy.ge.0).and.(ix.le.numxgridn-1).and. &
(jy.le.numygridn-1)) then
if (DRYBKDEP.or.WETBKDEP) then
......
......@@ -80,36 +80,40 @@ subroutine drydepokernel(nunc,deposit,x,y,nage,kp)
if ((abs(deposit(ks)).gt.0).and.DRYDEPSPEC(ks)) then
if ((ix.ge.0).and.(jy.ge.0).and.(ix.le.numxgrid-1).and. &
if (.not.usekernel) then
drygridunc(ix,jy,ks,kp,nunc,nage)= &
drygridunc(ix,jy,ks,kp,nunc,nage)+deposit(ks)
else
if ((ix.ge.0).and.(jy.ge.0).and.(ix.le.numxgrid-1).and. &
(jy.le.numygrid-1)) then
w=wx*wy
w=wx*wy
drygridunc(ix,jy,ks,kp,nunc,nage)= &
drygridunc(ix,jy,ks,kp,nunc,nage)+deposit(ks)*w
continue
endif
endif
if ((ixp.ge.0).and.(jyp.ge.0).and.(ixp.le.numxgrid-1).and. &
if ((ixp.ge.0).and.(jyp.ge.0).and.(ixp.le.numxgrid-1).and. &
(jyp.le.numygrid-1)) then
w=(1.-wx)*(1.-wy)
drygridunc(ixp,jyp,ks,kp,nunc,nage)= &
drygridunc(ixp,jyp,ks,kp,nunc,nage)+deposit(ks)*w
endif
endif
if ((ixp.ge.0).and.(jy.ge.0).and.(ixp.le.numxgrid-1).and. &
if ((ixp.ge.0).and.(jy.ge.0).and.(ixp.le.numxgrid-1).and. &
(jy.le.numygrid-1)) then
w=(1.-wx)*wy
w=(1.-wx)*wy
drygridunc(ixp,jy,ks,kp,nunc,nage)= &
drygridunc(ixp,jy,ks,kp,nunc,nage)+deposit(ks)*w
endif
endif
if ((ix.ge.0).and.(jyp.ge.0).and.(ix.le.numxgrid-1).and. &
if ((ix.ge.0).and.(jyp.ge.0).and.(ix.le.numxgrid-1).and. &
(jyp.le.numygrid-1)) then
w=wx*(1.-wy)
w=wx*(1.-wy)
drygridunc(ix,jyp,ks,kp,nunc,nage)= &
drygridunc(ix,jyp,ks,kp,nunc,nage)+deposit(ks)*w
endif
endif
endif
endif ! kernel
endif ! deposit>0
end do
......
......@@ -78,33 +78,38 @@ subroutine wetdepokernel(nunc,deposit,x,y,nage,kp)
do ks=1,nspec
if ((ix.ge.0).and.(jy.ge.0).and.(ix.le.numxgrid-1).and. &
if (.not.usekernel) then
wetgridunc(ix,jy,ks,kp,nunc,nage)= &
wetgridunc(ix,jy,ks,kp,nunc,nage)+deposit(ks)
else
if ((ix.ge.0).and.(jy.ge.0).and.(ix.le.numxgrid-1).and. &
(jy.le.numygrid-1)) then
w=wx*wy
w=wx*wy
wetgridunc(ix,jy,ks,kp,nunc,nage)= &
wetgridunc(ix,jy,ks,kp,nunc,nage)+deposit(ks)*w
endif
endif
if ((ixp.ge.0).and.(jyp.ge.0).and.(ixp.le.numxgrid-1).and. &
if ((ixp.ge.0).and.(jyp.ge.0).and.(ixp.le.numxgrid-1).and. &
(jyp.le.numygrid-1)) then
w=(1.-wx)*(1.-wy)
w=(1.-wx)*(1.-wy)
wetgridunc(ixp,jyp,ks,kp,nunc,nage)= &
wetgridunc(ixp,jyp,ks,kp,nunc,nage)+deposit(ks)*w
endif
endif
if ((ixp.ge.0).and.(jy.ge.0).and.(ixp.le.numxgrid-1).and. &
if ((ixp.ge.0).and.(jy.ge.0).and.(ixp.le.numxgrid-1).and. &
(jy.le.numygrid-1)) then
w=(1.-wx)*wy
w=(1.-wx)*wy
wetgridunc(ixp,jy,ks,kp,nunc,nage)= &
wetgridunc(ixp,jy,ks,kp,nunc,nage)+deposit(ks)*w
endif
endif
if ((ix.ge.0).and.(jyp.ge.0).and.(ix.le.numxgrid-1).and. &
if ((ix.ge.0).and.(jyp.ge.0).and.(ix.le.numxgrid-1).and. &
(jyp.le.numygrid-1)) then
w=wx*(1.-wy)
w=wx*(1.-wy)
wetgridunc(ix,jyp,ks,kp,nunc,nage)= &
wetgridunc(ix,jyp,ks,kp,nunc,nage)+deposit(ks)*w
endif
endif
endif
end do
end subroutine wetdepokernel
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