Skip to content

Commit

Permalink
Removed temporary forcing at lateral boundaries
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco de Bruine committed Sep 1, 2020
1 parent 36730a8 commit 13e4129
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 43 deletions.
17 changes: 0 additions & 17 deletions src/modboundary.f90
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ subroutine boundary

call cyclicm
call cyclich
call setboundaries

call topm
call toph
Expand Down Expand Up @@ -132,22 +131,6 @@ subroutine cyclicm
return
end subroutine cyclicm

subroutine setboundaries

use modglobal, only : i1,ih,j1,jh,k1,nsv
use modfields, only : sv0, svm
use modmpi, only : closeboundaries

implicit none
integer :: n

do n=1,nsv
call closeboundaries(sv0(2-ih:i1+ih,2-jh:j1+jh,1:k1,n), 2,i1,ih, 2,j1,jh, 1,k1, 0.)
call closeboundaries(svm(2-ih:i1+ih,2-jh:j1+jh,1:k1,n), 2,i1,ih, 2,j1,jh, 1,k1, 0.)
enddo

end subroutine setboundaries

!>
!! grwdamp damps gravity waves in the upper part of the domain.
!>
Expand Down
26 changes: 0 additions & 26 deletions src/modmpi.f90
Original file line number Diff line number Diff line change
Expand Up @@ -394,30 +394,4 @@ subroutine gatherrow(l,g,imax,jmax,itot)

end subroutine gatherrow

subroutine closeboundaries(field, sx,ex,hx, sy,ey,hy, sz,ez, fillvalue_in)

! Clears halo cells of domain edges
! Author: Marco de Bruine (VU), 2020

implicit none
integer sx,ex,hx, sy,ey,hy, sz,ez,hz
real :: field(sx-hx:ex+hx,sy-hy:ey+hy,sz:ez)
real :: fillvalue = 0
real,optional :: fillvalue_in
if(present(fillvalue_in)) fillvalue=fillvalue_in

if (myidx == 0) then ! WEST boundary
field(sx-hx:sx, sy-hy:ey+hy, sz:ez) = fillvalue
else if (myidx == nprocx-1) then ! EAST boundary
field(ex :ex+hx, sy-hy:ey+hy, sz:ez) = fillvalue
end if

if (myidy == 0) then ! SOUTH boundary
field(sx-hx:ex+hx, sy-hy:sy, sz:ez) = fillvalue
else if (myidy == nprocy-1) then ! NORTH boundary
field(sx-hx:ex+hx, ey :ey+hy, sz:ez) = fillvalue
end if

end subroutine closeboundaries

end module

0 comments on commit 13e4129

Please sign in to comment.