anchor.diff:              
                       ! horizontal spread
                       call sigmay_func(ky_local, deltax0, rotorDiameter(turb), yaw(turb), sigmay)
  -                    print *, "sigmay ", sigmay
  +                    !print *, "sigmay ", sigmay
                       ! vertical spread
                       call sigmaz_func(kz_local, deltax0, rotorDiameter(turb), sigmaz)
  -                    print *, "sigmaz ", sigmaz
  +                    !print *, "sigmaz ", sigmaz
                       ! horizontal cross-wind wake displacement from hub
                       call wake_offset_func(rotorDiameter(turb), theta_c_0, x0, yaw(turb), &
                                            & ky_local, kz_local, Ct(turb), sigmay, sigmaz, wake_offset)
  -                    print *, "wake_offset ", wake_offset                 
  +                    !print *, "wake_offset ", wake_offset                 
                       ! cross wind distance from downstream hub location to wake center
                       deltay = turbineYw(turbI) - (turbineYw(turb) + wake_offset)
                   
  
positive.code:                     ! determine the initial wake angle at the onset of far wake
                      call theta_c_0_func(yaw(turb), Ct(turb), theta_c_0)
      
                      ! horizontal spread
                      call sigmay_func(ky_local, deltax0, rotorDiameter(turb), yaw(turb), sigmay)
                      print *, "near sigmay ", sigmay
                      ! vertical spread
                      call sigmaz_func(kz_local, deltax0, rotorDiameter(turb), sigmaz)
                      print *, "near sigmaz ", sigmaz                   
                      ! horizontal cross-wind wake displacement from hub
                      call wake_offset_func(rotorDiameter(turb), theta_c_0, x0, yaw(turb), &
                                           & ky_local, kz_local, Ct(turb), sigmay, sigmaz, &
                                           & wake_offset)
                      print *, "near wake_offset ", wake_offset
                      ! distance from downstream hub location to wake center
                      deltay = turbineYw(turbI) - (turbineYw(turb) + wake_offset)
                  
  
negative.code:     
      ! intrinsic functions
      intrinsic sqrt
      !print *, "TI_dst in: ", TI_dst
      ! Niayifar and Porte Agel 2015, 2016 (adjusted by Annoni and Thomas for SOWFA match 
      ! and optimization)
      if (TI_calculation_method == 1) then
  