anchor.diff:        call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)
                     
      call SetOutputsFromBEMT(p, m, y )
  -                          
  +        
  +   if ( p%CompAA ) then
  +      ! We need the outputs from BEMT as inputs to AeroAcoustics module
  +      ! Also,  SetInputs() [called above] calls SetInputsForBEMT() which in turn establishes current versions of the Global to local transformations we need as inputs to AA
  +      call SetInputsForAA(p, u, m, errStat2, errMsg2)  
  +         call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)
  +      call AA_CalcOutput(t, m%AA_u, p%AA, x%AA, xd%AA,  z%AA, OtherState%AA,  m%AA_y, m%AA, errStat2, errMsg2)
  +         call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)
  +   end if  
  +      
  +   
  +
      if ( p%TwrAero ) then
         call ADTwr_CalcOutput(p, u, m, y, ErrStat2, ErrMsg2 )
            call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)      
  
positive.code:    use BEMT
     use AirfoilInfo
     use NWTC_LAPACK
     
     
     implicit none
  
negative.code:          
     call BEMT_CopyInput( m%BEMT_u(1), m%BEMT_u(2), MESH_NEWCOPY, ErrStat2, ErrMsg2 )
        call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) 
  
           
        !............................................................................................
        ! Initialize the AeroAcoustics Module if the CompAA flag is set
        !............................................................................................
     if (p%CompAA) then
        call Init_AAmodule( InitInp, InputFileData, u, m%AA_u, p, x%AA, xd%AA, z%AA, OtherState%AA, m%AA_y, m%AA, ErrStat2, ErrMsg2 )
           call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName ) 
     end if   
        
        
        !............................................................................................
        ! Define outputs here
  