anchor.diff:              buffer_topo(:,ny-pos) =buffer_topo(:,buffer+1)*(  weight) + buffer_topo(:,ny-buffer)*(1-weight)
           enddo
           
  +        ! smooth the outer most grid cells in all directions to minimize artifacts at the borders of real terrain
  +        ! smoothing effectively increases as it gets further from the real terrain border (window=min(j,smooth_window))
           if (smooth_window>0) then
               do j=1,buffer
                   window=min(j,smooth_window)
  +                ! smooth the top and bottom borders
                   do i=1,nx
                       xs=max(1, i-window)
                       xe=min(nx,i+window)
  
positive.code:         
          if (.not.data_allocated) then
              if (debug) then
                  write(*,*) "Allocating Linear Wind Data and FFTW plans"
              endif
              ! using fftw_alloc routines to ensure better allignment for vectorization
              n_elements=nx*ny*nz
  
negative.code:                 
                      buffer_topo(i,ny-(buffer-j))=sum(buffer_topo(xs:xe,ys:ye))/((xe-xs+1) * (ye-ys+1))
                  end do
                  ! smooth the left and right borders
                  do i=1,ny
                      xs=max(1, buffer-j+1-window)
                      xe=min(nx,buffer-j+1+window)
  