From b736f5b5ce2e44282e7dde3700f1182352499839 Mon Sep 17 00:00:00 2001 From: andrew-platt Date: Mon, 13 Jan 2020 14:22:18 -0700 Subject: [PATCH] [BugFix] WAMIT2 multidirectional angle issue #9 --- modules/hydrodyn/src/WAMIT2.f90 | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/hydrodyn/src/WAMIT2.f90 b/modules/hydrodyn/src/WAMIT2.f90 index c449ca2be5..006308dfdb 100644 --- a/modules/hydrodyn/src/WAMIT2.f90 +++ b/modules/hydrodyn/src/WAMIT2.f90 @@ -966,7 +966,7 @@ SUBROUTINE MnDrift_InitCalc( InitInp, p, MnDriftData, MnDriftForce, ErrMsg, ErrS 'found in the WAMIT data file '//TRIM(MnDriftData%Filename)//' for the first wave direction.', & ErrStat, ErrMsg, RoutineName) ENDIF - IF ( InitInp%WaveDirMax < MAXVAL(MnDriftData%Data3D%WvDir1) ) THEN + IF ( InitInp%WaveDirMax > MAXVAL(MnDriftData%Data3D%WvDir1) ) 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 first wave direction.', & ErrStat, ErrMsg, RoutineName) @@ -980,7 +980,7 @@ SUBROUTINE MnDrift_InitCalc( InitInp, p, MnDriftData, MnDriftForce, ErrMsg, ErrS 'found in the WAMIT data file '//TRIM(MnDriftData%Filename)//' for the second wave direction.', & ErrStat, ErrMsg, RoutineName) ENDIF - IF ( InitInp%WaveDirMax < MAXVAL(MnDriftData%Data3D%WvDir2) ) THEN + IF ( InitInp%WaveDirMax > MAXVAL(MnDriftData%Data3D%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) @@ -1023,7 +1023,7 @@ SUBROUTINE MnDrift_InitCalc( InitInp, p, MnDriftData, MnDriftForce, ErrMsg, ErrS 'found in the WAMIT data file '//TRIM(MnDriftData%Filename)//' for the first wave direction.', & ErrStat, ErrMsg, RoutineName) ENDIF - IF ( InitInp%WaveDirMax < MAXVAL(MnDriftData%Data4D%WvDir1) ) THEN + IF ( InitInp%WaveDirMax > MAXVAL(MnDriftData%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(MnDriftData%Filename)//' for the first wave direction.', & ErrStat, ErrMsg, RoutineName) @@ -1037,7 +1037,7 @@ SUBROUTINE MnDrift_InitCalc( InitInp, p, MnDriftData, MnDriftForce, ErrMsg, ErrS '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 + 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) @@ -1478,7 +1478,7 @@ SUBROUTINE NewmanApp_InitCalc( InitInp, p, NewmanAppData, NewmanAppForce, ErrMsg 'found in the WAMIT data file '//TRIM(NewmanAppData%Filename)//' for the first wave direction.', & ErrStat, ErrMsg, RoutineName) ENDIF - IF ( InitInp%WaveDirMax < MAXVAL(NewmanAppData%Data3D%WvDir1) ) THEN + IF ( InitInp%WaveDirMax > MAXVAL(NewmanAppData%Data3D%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) @@ -1492,7 +1492,7 @@ SUBROUTINE NewmanApp_InitCalc( InitInp, p, NewmanAppData, NewmanAppForce, ErrMsg 'found in the WAMIT data file '//TRIM(NewmanAppData%Filename)//' for the second wave direction.', & ErrStat, ErrMsg, RoutineName) ENDIF - IF ( InitInp%WaveDirMax < MAXVAL(NewmanAppData%Data3D%WvDir2) ) THEN + IF ( InitInp%WaveDirMax > MAXVAL(NewmanAppData%Data3D%WvDir2) ) 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 second wave direction.', & ErrStat, ErrMsg, RoutineName) @@ -1535,7 +1535,7 @@ SUBROUTINE NewmanApp_InitCalc( InitInp, p, NewmanAppData, NewmanAppForce, ErrMsg '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 + 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) @@ -1549,7 +1549,7 @@ SUBROUTINE NewmanApp_InitCalc( InitInp, p, NewmanAppData, NewmanAppForce, ErrMsg 'found in the WAMIT data file '//TRIM(NewmanAppData%Filename)//' for the second wave direction.', & ErrStat, ErrMsg, RoutineName) ENDIF - IF ( InitInp%WaveDirMax < MAXVAL(NewmanAppData%Data4D%WvDir2) ) THEN + IF ( InitInp%WaveDirMax > MAXVAL(NewmanAppData%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(NewmanAppData%Filename)//' for the second wave direction.', & ErrStat, ErrMsg, RoutineName) @@ -2129,7 +2129,7 @@ SUBROUTINE DiffQTF_InitCalc( InitInp, p, DiffQTFData, DiffQTFForce, ErrMsg, ErrS 'found in the WAMIT data file '//TRIM(DiffQTFData%Filename)//' for the first wave direction.', & ErrStat, ErrMsg, RoutineName) ENDIF - IF ( InitInp%WaveDirMax < MAXVAL(DiffQTFData%Data4D%WvDir1) ) THEN + IF ( InitInp%WaveDirMax > MAXVAL(DiffQTFData%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(DiffQTFData%Filename)//' for the first wave direction.', & ErrStat, ErrMsg, RoutineName) @@ -2143,7 +2143,7 @@ SUBROUTINE DiffQTF_InitCalc( InitInp, p, DiffQTFData, DiffQTFForce, ErrMsg, ErrS 'found in the WAMIT data file '//TRIM(DiffQTFData%Filename)//' for the second wave direction.', & ErrStat, ErrMsg, RoutineName) ENDIF - IF ( InitInp%WaveDirMax < MAXVAL(DiffQTFData%Data4D%WvDir2) ) THEN + IF ( InitInp%WaveDirMax > MAXVAL(DiffQTFData%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(DiffQTFData%Filename)//' for the second wave direction.', & ErrStat, ErrMsg, RoutineName) @@ -2651,7 +2651,7 @@ SUBROUTINE SumQTF_InitCalc( InitInp, p, SumQTFData, SumQTFForce, ErrMsg, ErrStat '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) @@ -2665,7 +2665,7 @@ SUBROUTINE SumQTF_InitCalc( InitInp, p, SumQTFData, SumQTFForce, ErrMsg, ErrStat 'found in the WAMIT data file '//TRIM(SumQTFData%Filename)//' for the second wave direction.', & ErrStat, ErrMsg, RoutineName) ENDIF - IF ( InitInp%WaveDirMax < MAXVAL(SumQTFData%Data4D%WvDir2) ) THEN + IF ( InitInp%WaveDirMax > MAXVAL(SumQTFData%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(SumQTFData%Filename)//' for the second wave direction.', & ErrStat, ErrMsg, RoutineName)