anchor.diff:      real(dp), intent(in) :: ky, kz, alpha, beta, TI, wind_speed
   
       ! local (General)
  -    real(dp), dimension(nTurbines) :: yaw, TIturbs, k_star
  +    real(dp), dimension(nTurbines) :: yaw, TIturbs, k_star, ky_local, kz_local
       real(dp) :: x0, deltax0, deltay, theta_c_0, sigmay, sigmaz, wake_offset
       real(dp) :: x, deltav, deltav0m, deltaz, sigmay0, sigmaz0, deficit_sum
       Integer :: u, d, turb, turbI
  
positive.code:                     deltaz = turbineZ(turbI) - turbineZ(turb)
                  
                      ! horizontal spread at far wake onset
                      call sigmay_func(ky, 0.0_dp, rotorDiameter(turb), yaw(turb), sigmay0)
                  
                      ! vertical spread at far wake onset
                      call sigmaz_func(kz, 0.0_dp, rotorDiameter(turb), sigmaz0)
                  
                      ! velocity deficit in the nearwake (linear model)
                      call deltav_near_wake_lin_func(deltay, deltaz, wake_offset, wind_speed, &
  
negative.code:     
      ! initialize TI of all turbines to free-stream value
      TIturbs = TI
      
      ky_local = ky
      kz_local = kz
  
      do, d=1, nTurbines
      
  