anchor.diff:         x%q(temp_id+1:temp_id+3) = u_tmp%RootMotion%TranslationDisp(1:3,1)
      ENDDO
      CALL BD_CrvExtractCrv(u_tmp%RootMotion%Orientation(1:3,1:3,1),temp3,ErrStat2,ErrMsg2)
  +      CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
  +   CALL BD_CrvExtractCrv(p%GlbRot,temp_glb,ErrStat2,ErrMsg2)
         CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
      DO i=1,p%elem_total
          IF( i .EQ. 1) THEN
  
positive.code:        ENDIF
         DO j=k,p%node_elem
             temp_id = (j-1)*p%dof_node
             ! Rotate initial rotation parameter from blade frame to global frame
             temp_p0 = MATMUL(p%GlbRot,p%uuN0(temp_id+4:temp_id+6,i))
             temp_id = ((i-1)*(p%node_elem-1)+j-1)*p%dof_node
             ! R_f = RR_0 => R = R_f R_0^{T}
             CALL BD_CrvCompose(x%q(temp_id+4:temp_id+6),temp3,temp_p0,2,ErrStat2,ErrMsg2)
                CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
             ! Rotate rotation parameter from global frame to blade frame
             x%q(temp_id+4:temp_id+6) = MATMUL(TRANSPOSE(p%GlbRot),x%q(temp_id+4:temp_id+6))
         ENDDO
     ENDDO
  
negative.code:       end if
     p%beta(:)  = 0.0D0
     p%beta(:)  = InputFileData%InpBl%beta(:)
     IF( ErrStat >= AbortErrLev ) RETURN
  
     WRITE(*,*) "Finished Read Input"
  