anchor.diff:     ! Number of key points in each member
      CALL AllocAry(p%kp_member,InputFileData%member_total,'Number of key points in each memeber',ErrStat2,ErrMsg2)
         CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
  -   p%kp_member(:) = 0
      p%kp_member(:) = InputFileData%kp_member(:)
  -   ! Number of nodes per elelemt
  -   p%node_elem  = InputFileData%order_elem + 1   
  -   ! Factorization frequency
  -   p%n_fact = InputFileData%n_fact
  -   ! Quadrature method: 1 Gauss 2 Trapezoidal
  -   p%quadrature = InputFileData%quadrature
  -   IF(p%quadrature .EQ. 1) THEN
  -       ! Number of Gauss points
  -       p%ngp = p%node_elem - 1
  -   ELSEIF(p%quadrature .EQ. 2) THEN 
  -       p%refine = InputFileData%refine
  -       p%ngp = (InputFileData%kp_member(1) - 1)*p%refine + 1
  -   ENDIF
  -
  -   ! Degree-of-freedom (DoF) per node
  -   p%dof_node   = 6
  -   ! Total number of (finite element) nodes
  -   p%node_total  = p%elem_total*(p%node_elem-1) + 1         
  -   ! Total number of (finite element) dofs
  -   p%dof_total   = p%node_total*p%dof_node   
  -   
  -      ! allocate arry for mapping PointLoad to BldMotion (for writeOutput)
  -   CALL AllocAry(p%NdIndx,p%node_total,'p%NdIndx',ErrStat2,ErrMsg2)
  -      CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
  +
  +   
      ! Compute coefficients for cubic spline fit, clamped at two ends
      CALL AllocAry(SP_Coef,InputFileData%kp_total-1,4,4,'Spline coefficient matrix',ErrStat2,ErrMsg2)
         CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
  
positive.code:    end if   
  ! END Actuator
     
  
     ! set data for File I/O data:
     !...............................................
     p%numOuts   = InputFileData%NumOuts  
     p%NNodeOuts = InputFileData%NNodeOuts      
     p%OutNd     = InputFileData%OutNd
  
     call SetOutParam(InputFileData%OutList, p, ErrStat2, ErrMsg2 ) ! requires: p%NumOuts, p%NumBlNds, sets: p%OutParam.
        call setErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)
        if (ErrStat >= AbortErrLev) return  
        
     call SetInitOut(p, InitOut, errStat, errMsg)
        call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
  
negative.code:       
     CALL BD_ReadInput(InitInp%InputFile,InputFileData,InitInp%RootName,Interval,ErrStat2,ErrMsg2)
        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
        if (ErrStat >= AbortErrLev) then
           call cleanup()
           return
        end if
     CALL BD_ValidateInputData( InputFileData, ErrStat2, ErrMsg2 )
        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
        if (ErrStat >= AbortErrLev) then
           call cleanup()
           return
        end if
        
    call setParameters(InitInp, InputFileData, p, ErrStat2, ErrMsg2)
        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
        if (ErrStat >= AbortErrLev) then
           call cleanup()
           return
        end if
        
           p%OutFmt = InputFileData%OutFmt
  
        
  
  
     ! Key point coordinates
     CALL AllocAry(p%kp_coordinate,p%kp_total,3,'Key point coordinates array',ErrStat2,ErrMsg2)
        CALL SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName )
  