Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of PR #2013 and #2016 #2049

Merged
merged 4 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions modules/moordyn/src/MoorDyn_IO.f90
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ SUBROUTINE setupBathymetry(inputString, defaultDepth, BathGrid, BathGrid_Xs, Bat

INTEGER(IntKi) :: ErrStat4
CHARACTER(120) :: ErrMsg4
CHARACTER(120) :: Line2
CHARACTER(4096) :: Line2

CHARACTER(20) :: nGridX_string ! string to temporarily hold the nGridX string from Line2
CHARACTER(20) :: nGridY_string ! string to temporarily hold the nGridY string from Line3
Expand Down Expand Up @@ -182,7 +182,7 @@ SUBROUTINE setupBathymetry(inputString, defaultDepth, BathGrid, BathGrid_Xs, Bat
READ(UnCoef,*,IOSTAT=ErrStat4) nGridY_string, nGridY ! read in the third line as the number of y values in the BathGrid

! Allocate the bathymetry matrix and associated grid x and y values
ALLOCATE(BathGrid(nGridX, nGridY), STAT=ErrStat4)
ALLOCATE(BathGrid(nGridY, nGridX), STAT=ErrStat4)
ALLOCATE(BathGrid_Xs(nGridX), STAT=ErrStat4)
ALLOCATE(BathGrid_Ys(nGridY), STAT=ErrStat4)

Expand Down Expand Up @@ -563,7 +563,7 @@ SUBROUTINE MDIO_ProcessOutList(OutList, p, m, y, InitOut, ErrStat, ErrMsg )
END IF

! Point case
ELSE IF (let1(1:1) == 'P') THEN ! Look for P?xxx or Point?xxx
ELSE IF (let1(1:1) == 'P' .OR. let1(1:1) == 'C') THEN ! Look for P?xxx or Point?xxx (C?xxx and Con?xxx for backwards compatability)
p%OutParam(I)%OType = 2 ! Point object type
qVal = let2 ! quantity type string

Expand Down Expand Up @@ -601,7 +601,7 @@ SUBROUTINE MDIO_ProcessOutList(OutList, p, m, y, InitOut, ErrStat, ErrMsg )
! error
ELSE
CALL DenoteInvalidOutput(p%OutParam(I)) ! flag as invalid
CALL WrScr('Warning: invalid output specifier '//trim(OutListTmp)//'. Must start with L, C, R, or B')
CALL WrScr('Warning: invalid output specifier '//trim(OutListTmp)//'. Must start with L, R, or B')
CYCLE
END IF

Expand Down
5 changes: 2 additions & 3 deletions modules/moordyn/src/MoorDyn_Misc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ SUBROUTINE getDepthFromBathymetry(BathymetryGrid, BathGrid_Xs, BathGrid_Ys, Line
else
dc_dx = 0.0_DbKi ! maybe this should raise an error
end if
if ( dx > 0.0 ) then
if ( dy > 0.0 ) then
dc_dy = (cx1-cx0)/dy
else
dc_dy = 0.0_DbKi ! maybe this should raise an error
Expand Down Expand Up @@ -1297,8 +1297,7 @@ SUBROUTINE setupWaterKin(WaterKinString, p, Tmax, ErrStat, ErrMsg)
REAL(SiKi) :: t, Frac
CHARACTER(1024) :: FileName ! Name of MoorDyn input file
CHARACTER(120) :: Line
CHARACTER(120) :: Line2
CHARACTER(120) :: entries2
CHARACTER(4096) :: entries2
INTEGER(IntKi) :: coordtype

INTEGER(IntKi) :: NStepWave !
Expand Down
Loading