anchor.diff:           !!    and set the TmpFlag to true if there is a sparse matrix for one of them.
            !! FIXME: remove this check and warning once the sparse matrix interpolation routines are implimented.
         TmpFlag = .FALSE.
  -      DO I=1,6
  -         IF ( SumQTFData%Data4D%DataIsSparse(I) .AND. SumQTFData%Data4D%LoadComponents(I) .AND. p%SumQTFDims(I) )    TmpFlag = .TRUE.
  +      DO IBody=1,SumQTFData%Data4D%NumBodies
  +         DO ThisDim=1,6
  +            Idx = (IBody-1)*6+ThisDim
  +            IF ( SumQTFData%Data4D%DataIsSparse(Idx) .AND. SumQTFData%Data4D%LoadComponents(Idx) .AND. p%SumQTFDims(ThisDim) )    TmpFlag = .TRUE.
  +         ENDDO
         ENDDO
         IF (TmpFlag) THEN
            CALL SetErrStat(ErrID_Fatal,' The second order WAMIT data in '//TRIM(SumQTFData%Filename)//' is too sparse '// &
  
positive.code:          !! FIXME: remove this check and warning once the sparse matrix interpolation routines are implimented.
        TmpFlag = .FALSE.
        IF ( MnDriftData%DataIs3D ) THEN
           DO I=1,MnDriftData%Data3D%NumBodies
              IF ( MnDriftData%Data3D%DataIsSparse(I) .AND. MnDriftData%Data3D%LoadComponents(I) .AND. p%MnDriftDims(I) )    TmpFlag = .TRUE.
           ENDDO
        ELSE     ! must be 4D -- we checked that we had something at the start of this routine.
           DO I=1,MnDriftData%Data4D%NumBodies
              IF ( MnDriftData%Data4D%DataIsSparse(I) .AND. MnDriftData%Data4D%LoadComponents(I) .AND. p%MnDriftDims(I) )    TmpFlag = .TRUE.
           ENDDO
        ENDIF
        IF (TmpFlag) THEN
  
negative.code:          ! Summation method
        IF ( p%SumQTFF ) THEN
  
           DO IBody=1,p%NBody        ! Loop through load components. Set ones that are calculated.
              DO ThisDim=1,6
                 Idx =  (IBody-1)*6+ThisDim
                 IF ( p%SumQTFDims(ThisDim) ) THEN
                    p%WaveExctn2(:,Idx) = p%WaveExctn2(:,Idx) + SumQTFForce(:,Idx)
                 ENDIF
              ENDDO
           ENDDO
  
        ENDIF
  