anchor.diff:                       ! First get the wave amplitude -- must be reconstructed from the WaveElevC array.  First index is the real (1) or
                        ! imaginary (2) part.  Divide by NStepWave2 so that the wave amplitude is of the same form as the paper.
                     aWaveElevC = CMPLX( InitInp%WaveElevC0(1,J), InitInp%WaveElevC0(2,J), SiKi) / InitInp%NStepWave2
  +
                        ! Calculate the frequency
                     Omega1 = J * InitInp%WaveDOmega
   
  
positive.code: 
                       ENDIF !QTF value find
  
  
                    ELSE     ! outside the frequency range
  
                       QTF_Value = CMPLX(0.0,0.0,SiKi)
  
                    ENDIF    ! frequency check
  
  
  
                       ! Check and make sure nothing bombed in the interpolation that we need to be aware of
                    CALL SetErrStat(ErrStatTmp,ErrMsgTmp,ErrStat,ErrMsg,RoutineName)
  
negative.code:          !!
  
  
     USE Waves, ONLY: WaveNumber
     USE WAMIT2_Types
     USE WAMIT_Interp
     USE NWTC_Library
  