Skip to content

Commit

Permalink
Fixed coefficient a1 in subroutine two_delta_filter. Corners were use…
Browse files Browse the repository at this point in the history
…d, but not initialized.
  • Loading branch information
RatkoVasic-NOAA committed Sep 1, 2021
1 parent 88fa6d9 commit 852405d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sorc/grid_tools.fd/filter_topo.fd/filter_topo.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1400,6 +1400,16 @@ subroutine two_delta_filter(is, ie, js, je, isd, ied, jsd, jed, npx, npy, ntiles
a1(npx+1) = c3*q(npx,j,t) + c2*q(npx+1,j,t) + c1*q(npx+2,j,t)
endif

if ( regional .and. grid_type<3 ) then
a1(0) = c1*q(-1,j,t) + c2*q(-1,j,t) + c3*q(0,j,t)
a1(2) = c3*q(1,j,t) + c2*q(2,j,t) + c1*q(3,j,t)
a1(1) = 0.5*(a1(0) + a1(2))

a1(npx-1) = c1*q(npx-3,j,t) + c2*q(npx-2,j,t) + c3*q(npx-1,j,t)
a1(npx+1) = c3*q(npx,j,t) + c2*q(npx+1,j,t) + c1*q(npx+2,j,t)
a1(npx) = 0.5*(a1(npx-1)+a1(npx+1))
endif

if ( filter_type == 0 ) then
do i=is-1, ie+1
if( abs(3.*(a1(i)+a1(i+1)-2.*q(i,j,t))) > abs(a1(i)-a1(i+1)) ) then
Expand Down

0 comments on commit 852405d

Please sign in to comment.