anchor.diff:                  
                       ! calculate wake spreading parameter at each turbine if desired
                       if (calc_k_star .eqv. .true.) then
  -                        call k_star_func(TIturbs(turb), k_star(turb))
  -                        ky_local(turb) = k_star(turb)
  -                        kz_local(turb) = k_star(turb)
  +                        call k_star_func(TIturbs(turb), k_star)
  +                        ky_local(turb) = k_star
  +                        kz_local(turb) = k_star
                       end if
   
                       ! determine the initial wake angle at the onset of far wake
  
positive.code:                 
                      ! calculate wake spreading parameter at each turbine if desired
                      if (calc_k_star .eqv. .true.) then
                          call k_star_func(TIturbs(turb), k_star(turb))
                          ky_local = k_star(turb)
                          kz_local = k_star(turb)
                      end if
                      
                      !print *, "ky_local ", ky_local
  
negative.code:     
      end do
      
      ! print TIturbs values to a file
      !open(unit=2, file="TIturbs_tmp.txt")
      !do, turb=1, nTurbines 
      !    write(2,*) TIturbs(turb)
      !end do
      !close(2)
      !print *, "TIturbs: ", TIturbs
      !print *, wtVelocity
  
  