anchor.diff:  
               end do
               !$omp end do
  +            ! memory needs to be freed so this structure can be used again when removing linear winds
  +            call destroy_linear_theory_data(lt_data_m)
               !$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 ---------"
  
positive.code:                         u_perturbation(i,j,k) = u_perturbation(i,j,k) * (1-linear_update_fraction) &
                                      + linear_update_fraction * (sweight*wind_first + (1-sweight)*wind_second)
  
                          domain%u(i,j,k) = domain%u(i,j,k) + u_perturbation(i,j,k)
                      endif
                      if (i<=nx) then
                          wind_first =      nweight  * (dweight * v_LUT(spos, dpos,npos, i,j,k) + (1-dweight) * v_LUT(spos, nextd,npos, i,j,k))    &
  
negative.code:         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)
  