anchor.diff:                    'found in the WAMIT data file '//TRIM(SumQTFData%Filename)//' for the first wave direction.', &
                     ErrStat, ErrMsg, RoutineName)
            ENDIF
  -         IF ( InitInp%WaveDirMax < MAXVAL(SumQTFData%Data4D%WvDir1) ) THEN
  +         IF ( InitInp%WaveDirMax > MAXVAL(SumQTFData%Data4D%WvDir1) ) THEN
               CALL SetErrStat( ErrID_Fatal,' Maximum wave direction required of '//TRIM(Num2LStr(InitInp%WaveDirMax))//' is not'//&
                     'found in the WAMIT data file '//TRIM(SumQTFData%Filename)//' for the first wave direction.', &
                     ErrStat, ErrMsg, RoutineName)
  
positive.code:                      'found in the WAMIT data file '//TRIM(MnDriftData%Filename)//' for the second wave direction.', &
                       ErrStat, ErrMsg, RoutineName)
              ENDIF
              IF ( InitInp%WaveDirMax < MAXVAL(MnDriftData%Data4D%WvDir2) ) THEN
                 CALL SetErrStat( ErrID_Fatal,' Maximum wave direction required of '//TRIM(Num2LStr(InitInp%WaveDirMax))//' is not'//&
                       'found in the WAMIT data file '//TRIM(MnDriftData%Filename)//' for the second wave direction.', &
                       ErrStat, ErrMsg, RoutineName)
  
negative.code:                      'found in the WAMIT data file '//TRIM(NewmanAppData%Filename)//' for the first wave direction.', &
                       ErrStat, ErrMsg, RoutineName)
              ENDIF
              IF ( InitInp%WaveDirMax > MAXVAL(NewmanAppData%Data4D%WvDir1) ) THEN
                 CALL SetErrStat( ErrID_Fatal,' Maximum wave direction required of '//TRIM(Num2LStr(InitInp%WaveDirMax))//' is not'//&
                       'found in the WAMIT data file '//TRIM(NewmanAppData%Filename)//' for the first wave direction.', &
                       ErrStat, ErrMsg, RoutineName)
  