anchor.diff:           z%tanInduction = 0.0_ReKi
            do j = 1,p%numBlades       
               do i = 1,p%numBladeNodes 
  -               z%phi(i,j) = ComputePhiWithInduction(u%Vx(i,j), u%Vy(i,j),  0.0_ReKi, 0.0_ReKi, errStat, errMsg)
  +                
  +                phitemp=z%phi(i,j)  ! Store this time step phi before updating it for the next time step, so that UA does not get messed up - RRD
  +                z%phi(i,j) = ComputePhiWithInduction(u%Vx(i,j), u%Vy(i,j),  0.0_ReKi, 0.0_ReKi, errStat, errMsg)
  +                
                  if (OtherState%UA_Flag(i,j)) then
                        ! Set the active blade element for UnsteadyAero
                     OtherState%UA%iBladeNode = i
                     OtherState%UA%iBlade     = j
  +                  
                    ! u_UA%U = BEMTC_Wind(z%axInduction(i,j), z%tanInduction(i,j), u%Vx(i,j), u%Vy(i,j), p%chord(i,j), u%theta(i,j), p%airDens, p%kinVisc, u%chi0, u%psi(j), z%phi(i,j), u_UA%alpha, u_UA%Re, chi)
                        ! Uncoupled wind for determining alpha, and U, and Re
  -                  call BEMTU_Wind(z%phi(i,j), 0.0_ReKi, 0.0_ReKi, u%Vx(i,j), u%Vy(i,j), p%chord(i,j), u%theta(i,j), p%airDens, p%kinVisc, u_UA%alpha,  u_UA%U, u_UA%Re)
  +                  call BEMTU_Wind(phitemp, 0.0_ReKi, 0.0_ReKi, u%Vx(i,j), u%Vy(i,j), p%chord(i,j), u%theta(i,j), p%airDens, p%kinVisc, u_UA%alpha,  u_UA%U, u_UA%Re)
                         
                     if ( abs(u_UA%alpha) > AFInfo(p%AFIndx(i,j))%Table(1)%UA_BL%UACutout*D2R ) then ! p%UACutout ) 
                        OtherState%UA_Flag(i,j) = .FALSE.
  
positive.code:                   ! Need to generate the inputs for the unsteady aero module for time t
                    ! These are the local relative wind velocity, the angle of attack, and the Reynolds number
                    ! We can get all of these from the BEMT Wind routines
                     
                    
                    if ( p%SkewWakeMod < SkewMod_Coupled ) then
                          ! Need to compute local velocity including both axial and tangential induction
                       call BEMTU_Wind(phiOut, axInduction, tanInduction, u%Vx(i,j), u%Vy(i,j), p%chord(i,j), u%theta(i,j), p%airDens, p%kinVisc, u_UA%alpha,  u_UA%U, u_UA%Re)
                       
                    else
                       phi = ComputePhiWithInduction(u%Vx(i,j), u%Vy(i,j), z%axInduction(i,j), z%tanInduction(i,j), errStat, errMsg)
                       u_UA%U = BEMTC_Wind(z%axInduction(i,j), z%tanInduction(i,j), u%Vx(i,j), u%Vy(i,j), p%chord(i,j), u%theta(i,j), p%airDens, p%kinVisc, u%chi0, u%psi(j), phi, u_UA%alpha, u_UA%Re, chi)
                    end if
  
                    if ( abs(u_UA%alpha) > AFInfo(p%AFIndx(i,j))%Table(1)%UA_BL%UACutout*D2R ) then ! p%UACutout ) then
  
negative.code:                               .FALSE., p%UA, xd%UA, OtherState%UA, &  !p%UA_Flag
                                p%numReIterations, p%maxIndIterations, p%aTol,  &
                                phiOut, errStat, errMsg) 
                  
                    if (errStat >= AbortErrLev) return
                    
                    phitemp=z%phi(i,j)  ! Store this time step phi before updating it for the next time step, so that UA does not get messed up - RRD  
                    z%phi(i,j) = phiOut
                    
                 else if ( p%SkewWakeMod == SkewMod_Coupled ) then
           
  