anchor.diff:     INTEGER(IntKi)                                     :: ErrStat2   ! Temporary Error status
      CHARACTER(ErrMsgLen)                               :: ErrMsg2    ! Temporary Error message
      CHARACTER(*), PARAMETER                            :: RoutineName = 'BD_GA2'
  +   INTEGER(IntKi)                                     :: i
   
      ! Initialize ErrStat
   
  
positive.code:    ! Define initialization-routine input here:
  
     u%RootMotion%TranslationDisp(1:3,1) = InitInp%RootDisp(1:3)
     u%RootMotion%Orientation(1:3,1:3,1) = InitInp%GlbRot(:,:)!InitInp%RootOri(1:3,1:3)
     u%RootMotion%TranslationVel(1:3,1)  = InitInp%RootVel(1:3)
     u%RootMotion%RotationVel(1:3,1)     = InitInp%RootVel(4:6)
     u%RootMotion%TranslationAcc(:,:)  = 0.0D0
  
negative.code: 
     CALL BD_CopyInput(u, u_tmp, MESH_NEWCOPY, ErrStat2, ErrMsg2)
        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
  !WRITE(*,*) 'u_Inic'
  !DO k=1,3
  !WRITE(*,*) u%RootMotion%Orientation(k,:,1)
  !ENDDO
  !WRITE(*,*) 'END u_Inic'
     CALL BD_InputGlobalLocal(p,u_tmp,ErrStat2,ErrMsg2)
        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
     CALL BD_CalcIC(u_tmp,p,x,OtherState,ErrStat2,ErrMsg2)
        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
  
     ! Define initial guess for the system outputs here:
  
  