anchor.diff:          integer :: uk, vi !store a separate value of i for v and of k for u to we can handle nx+1, ny+1
           integer :: step, dpos, npos, spos, nexts, nextd, nextn
           integer :: north, south, east, west, top, bottom, n
  +        real :: u, v
           real :: dweight, nweight, sweight, curspd, curdir, curnsq, wind_first, wind_second
   
           nx=size(domain%lat,1)
  
positive.code: 
              end do
              !$omp end do
              !$omp end parallel
              write(*,"(A,f5.1,A$)") char(13), loops_completed/real(n_dir_values*n_spd_values)*100," %"
              write(*,*) char(10),"--------  Linear wind look up table generation complete ---------"
  
negative.code:             write(*,*) "Directions:",360*dir_values/(2*pi)
              write(*,*) "Stabilities:",exp(nsq_values)
          endif
          print*, shape(domain%z), shape(domain%u), shape(domain%terrain)
          if (reverse.or.(.not.((options%lt_options%read_LUT).and.(error==0)))) then
              ! loop over combinations of U, V, and Nsq values
              loops_completed = 0
  