1 subroutine da_smooth_anl(slab,imx,jmx,kx,npass,icrsdot)
3 !-----------------------------------------------------------------------
4 ! Purpose: spatially smooth (usually slab) to remove high
6 !-----------------------------------------------------------------------
10 real, intent(inout) :: SLAB(:,:,:)
11 integer, intent(in) :: imx, jmx, kx
12 integer, intent(in) :: npass
13 integer, intent(in) :: icrsdot
15 real, allocatable :: SLABNEW(:,:)
18 integer :: loop, n, i, j
20 if (trace_use) call da_trace_entry("da_smooth_anl")
22 allocate (slabnew(imx,jmx))
32 ! first smooth in the imx direction
36 slabnew(i,j)=slab(i,j,k)+xnu(n) * &
37 ((slab(i,j+1,k)+slab(i,j-1,k))*0.5-slab(i,j,k))
42 slab(i,j,k)=slabnew(i,j)
46 ! now smooth in the jmx direction
50 slabnew(i,j)=slab(i,j,k)+xnu(n) * &
51 ((slab(i+1,j,k)+slab(i-1,j,k))*0.5-slab(i,j,k))
57 slab(i,j,k)=slabnew(i,j)
65 if (trace_use) call da_trace_exit("da_smooth_anl")
67 end subroutine da_smooth_anl