function [xs] = smoothb(x,nz,jmin,jmax)
%
% This is a simple 1-2-1 two-dimensional data smoother. It can be applied multiple times.
% K. Emanuel, 1/24/2005
%
xs=x;
for i=2:nz
   for j=jmin:jmax
      xs(i,j)=0.125.*(x(i-1,j)+x(i+1,j)+x(i,j-1)+x(i,j+1))+0.5.*x(i,j);
   end   
end


