anchor.diff:        ErrMsg = ' Error allocating memory for LinAccESt.'
         RETURN
      ENDIF
  -!SP_start
  -   ALLOCATE ( RtHS%AngVelHM( Dims, 0:p%TipNode, p%NumBl ) , STAT=ErrStat )
  -   IF ( ErrStat /= 0_IntKi )  THEN
  -      ErrStat = ErrID_Fatal
  -      ErrMsg = ' Error allocating memory for AngVelHM.'
  -      RETURN
  -   ENDIF
      ALLOCATE ( RtHS%AngAccEKt( Dims, 0:p%TipNode, p%NumBl ) , STAT=ErrStat )
      IF ( ErrStat /= 0_IntKi )  THEN
         ErrStat = ErrID_Fatal
         ErrMsg = ' Error allocating memory for AngAccEKt.'
         RETURN
      ENDIF
  -!SP_end
   
      ALLOCATE(RtHS%AngPosHM(Dims, p%NumBl, 0:p%TipNode), STAT=ErrStat )
      IF ( ErrStat /= 0_IntKi )  THEN
  
positive.code:             y%BladeLn2Mesh(K)%TranslationAcc(1,NodeNum) =     LinAccES(1,J2,K)
              y%BladeLn2Mesh(K)%TranslationAcc(2,NodeNum) = -1.*LinAccES(3,J2,K)
              y%BladeLn2Mesh(K)%TranslationAcc(3,NodeNum) =     LinAccES(2,J2,K)  
  !SP had this: FIXME: check if valid
  !            y%BladeLn2Mesh(K)%RotationVel(1,NodeNum)     =     m%RtHS%AngVelHM(1,J2,K)
  !            y%BladeLn2Mesh(K)%RotationVel(2,NodeNum)     = -1.*m%RtHS%AngVelHM(3,J2,K)
  !            y%BladeLn2Mesh(K)%RotationVel(3,NodeNum)     =     m%RtHS%AngVelHM(2,J2,K) 
  
  !SP_start
              y%BladeLn2Mesh(K)%RotationAcc(1,NodeNum)     =     AngAccEK(1,J2,K)
              y%BladeLn2Mesh(K)%RotationAcc(2,NodeNum)     = -1.*AngAccEK(3,J2,K)
              y%BladeLn2Mesh(K)%RotationAcc(3,NodeNum)     =     AngAccEK(2,J2,K) 
  !SP_end
                 
              
           END DO !J = 1,p%BldNodes ! Loop through the blade nodes / elements
  
negative.code:    REAL(R8Ki)                   :: TmpVec2   (NDims)                               ! A temporary vector.
  
     REAL(ReKi)                   :: LinAccES (NDims,0:p%TipNode,p%NumBl)            ! Total linear acceleration of a point on a   blade (point S) in the inertia frame (body E for earth).
     REAL(ReKi)                   :: AngAccEK (NDims,0:p%TipNode,p%NumBl)            ! Total rotational acceleration of a point on a blade (point S) in the inertia frame (body E for earth).
     REAL(ReKi)                   :: LinAccET (NDims,0:p%TwrNodes)                   ! Total linear acceleration of a point on the tower (point T) in the inertia frame (body E for earth).
     REAL(ReKi)                   :: AngAccEF (NDims,0:p%TwrNodes)                   ! Total angular acceleration of tower element J (body F) in the inertia frame (body E for earth).
     REAL(ReKi)                   :: FrcS0B   (NDims,p%NumBl)                        ! Total force at the blade root (point S(0)) due to the blade.
  