anchor.diff:  
           if (reverse) print*, "WARNING using fixed nsq for linear wind removal: 3e-6"
           !$omp parallel firstprivate(nx,nxu,ny,nyv,nz, reverse, vsmooth, winsz, using_blocked_flow), default(none), &
  -        !$omp private(i,j,k,step, uk, vi, east, west, north, south, top, bottom), &
  +        !$omp private(i,j,k,step, uk, vi, east, west, north, south, top, bottom, u1d, v1d), &
           !$omp private(spos, dpos, npos, nexts,nextd, nextn,n, smoothz, u, v, blocked), &
           !$omp private(wind_first, wind_second, curspd, curdir, curnsq, sweight,dweight, nweight), &
           !$omp shared(domain, spd_values, dir_values, nsq_values, u_LUT, v_LUT, linear_mask), &
           !$omp shared(u_perturbation, v_perturbation, linear_update_fraction, linear_contribution, nsq_calibration), &
           !$omp shared(min_stability, max_stability, n_dir_values, n_spd_values, n_nsq_values, smooth_nsq)
  +
  +        allocate(u1d(nxu), v1d(nxu))
           !$omp do
           do k=1,ny
               do j=1,nz
  
positive.code:             end do
          end do
          !$omp end do
          !$omp end parallel
      end subroutine spatial_winds
  
  
negative.code:                             ! v = sum( domain%v(west:east,j,south:north) ) / n
                          else
                              ! smooth the winds vertically first
                              u = u1d(i)
                              v = v1d(i)
                              ! u = domain%u(i,j,uk)
                              ! v = domain%v(vi,j,k)
                              ! WARNING for now domain%u,v are updated inside the loop, so the code below will end
                              ! up using u and v values that have had the linear theory applied already (not good)
                              ! eventually this should be pulled out and only the pertubration should be updated in the
  