anchor.diff:      ! in
       integer, intent(in) :: nTurbines
       integer, intent(in) :: wake_combination_method, TI_calculation_method
  +    logical, intent(in) :: calc_k_star
       real(dp), dimension(nTurbines), intent(in) :: turbineXw, turbineYw, turbineZ
       integer, dimension(nTurbines), intent(in) :: sorted_x_idx
       real(dp), dimension(nTurbines), intent(in) :: rotorDiameter, yawDeg
       real(dp), dimension(nTurbines), intent(in) :: Ct
  -    real(dp), intent(in) :: ky, kz, alpha, beta, I, wind_speed
  +    real(dp), intent(in) :: ky, kz, alpha, beta, TI, wind_speed
   
       ! local (General)
  -    real(dp), dimension(nTurbines) :: yaw
  +    real(dp), dimension(nTurbines) :: yaw, TIturbs, k_star
       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:                                  wake_combination_method, deficit_sum)
                                   
      ! combines wakes to calculate velocity at a given turbine
      ! Uinf      = Free stream velocity
      ! Ueffu     = Effective velocity as seen by the upstream rotor
      ! Ueffd     = Current effective velocity as seen by the downstream rotor
      ! tmp       =
      ! velocity  = new effective velocity at this turbine
       
      implicit none
          
      ! define precision to be the standard for a double precision ! on local system
  
negative.code: ! implementation of the Bastankhah and Porte Agel (BPA) wake model for analysis
  subroutine porteagel_analyze(nTurbines, turbineXw, sorted_x_idx, turbineYw, turbineZ, &
                               rotorDiameter, Ct, wind_speed, &
                               yawDeg, ky, kz, alpha, beta, TI, wake_combination_method, &
                               TI_calculation_method, calc_k_star, wtVelocity)
  
      ! independent variables: turbineXw turbineYw turbineZ rotorDiameter
      !                        Ct yawDeg
  