anchor.diff:     CALL BD_CrvExtractCrv(InitInp%GlbRot,temp_glbrot,ErrStat2,ErrMsg2)
         CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
      CALL AllocAry(p%GlbPos,3,'Global position vector',ErrStat2,ErrMsg2)
  +      CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
      CALL AllocAry(p%GlbRot,3,3,'Global rotation tensor',ErrStat2,ErrMsg2)
  +      CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
      p%GlbPos(:) = 0.0D0
      p%GlbRot(:,:) = 0.0D0
      p%GlbPos(1:3) = InitInp%GlbPos(1:3)
      p%GlbRot(1:3,1:3) = InitInp%GlbRot(1:3,1:3)
  -   ! Hardwire value for initial position vector
  -!   temp_glbrot(:) = 0.0D0
  -!   temp_glbrot(3) = 4.0D0*TAN((3.1415926D0/2.0D0)/4.0D0)
   
      CALL AllocAry(SP_Coef,InputFileData%kp_total-1,4,4,'Spline coefficient matrix',ErrStat2,ErrMsg2)
  +      CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
      SP_Coef(:,:,:) = 0.0D0
   
      temp_id = 0
  
positive.code:                    temp6(1:3) = OS_tmp%Acc(temp_id+1:temp_id+3)
                     temp6(4:6) = OS_tmp%Acc(temp_id+4:temp_id+6)
                 ENDIF
                     temp6(:) = MATMUL(MoTens,temp6)
                     y%BldMotion%TranslationAcc(1:3,temp_id2) = temp6(1:3)
                     y%BldMotion%RotationAcc(1:3,temp_id2) = temp6(4:6)
             ENDDO
         ENDDO
         CALL BD_DynamicSolutionForce(p%uuN0,x_tmp%q,x_tmp%dqdt,OS_tmp%Acc,                              &
  
negative.code:                                     temp_Force)
     ENDIF
  
     temp6(:) = 0.0D0
     IF(p%analysis_type .EQ. 2) THEN
         temp6(1:6) = -OS_tmp%Acc(1:6)
         y%ReactionForce%Force(1:3,1) = MATMUL(p%GlbRot,temp6(1:3))
         y%ReactionForce%Moment(1:3,1) = MATMUL(p%GlbRot,temp6(4:6))
     ENDIF
     DO i=1,p%node_total
         temp_id = (i-1)*p%dof_node
         temp6(:) = 0.0D0
         temp6(:) = temp_Force(temp_id+1:temp_id+6)
         y%BldForce%Force(1:3,i) = MATMUL(p%GlbRot,temp6(1:3))
         y%BldForce%Moment(1:3,i) = MATMUL(p%GlbRot,temp6(4:6))
     ENDDO
  
  
     CALL BD_DestroyInput(u_tmp, ErrStat, ErrMsg)
     CALL BD_DestroyContState(x_tmp, ErrStat, ErrMsg )
  