diff --git a/modules/hydrodyn/src/Morison.f90 b/modules/hydrodyn/src/Morison.f90 index 1a861ab5e..36419d3ee 100644 --- a/modules/hydrodyn/src/Morison.f90 +++ b/modules/hydrodyn/src/Morison.f90 @@ -541,7 +541,7 @@ SUBROUTINE WriteSummaryFile( UnSum, g, MSL2SWL, WtrDpth, numJoints, numNodes, no INTEGER, INTENT ( OUT ) :: errStat ! returns a non-zero value when an error occurs CHARACTER(*), INTENT ( OUT ) :: errMsg ! Error message if errStat /= ErrID_None - INTEGER :: I, J + INTEGER :: I, J, II REAL(ReKi) :: l ! length of an element LOGICAL :: filledFlag ! flag indicating if element is filled/flooded CHARACTER(2) :: strFmt @@ -811,7 +811,12 @@ SUBROUTINE WriteSummaryFile( UnSum, g, MSL2SWL, WtrDpth, numJoints, numNodes, no ! need to add MSL2SWL offset from this because the Positons are relative to SWL, but we should report them relative to MSL here pos = nodes(c)%Position pos(3) = pos(3) + MSL2SWL - write( UnSum, '(1X,I5,(2X,I10),3(2X,F10.4),4(2X,ES10.3),2(6X,L6),7(2X,ES10.3),3(7x,A5))' ) c, members(j)%MemberID, pos, members(j)%R(i), members(j)%R(i)-members(j)%Rin(i), members(j)%tMG(i), members(j)%MGdensity(i), members(j)%PropPot, fillFlag, members(j)%m_fb_u(i)+members(j)%m_fb_l(i), members(j)%Cd(i), members(j)%Ca(i), members(j)%Cp(i), members(j)%AxCd(i), members(j)%AxCa(i), members(j)%AxCp(i), ' - ', ' - ', ' - ' + if (members(j)%flipped) then + II=members(j)%NElements+2-I + else + II=I + endif + write( UnSum, '(1X,I5,(2X,I10),3(2X,F10.4),4(2X,ES10.3),2(6X,L6),7(2X,ES10.3),3(7x,A5))' ) c, members(j)%MemberID, pos, members(j)%R(ii), members(j)%R(ii)-members(j)%Rin(ii), members(j)%tMG(ii), members(j)%MGdensity(ii), members(j)%PropPot, fillFlag, members(j)%m_fb_u(ii)+members(j)%m_fb_l(ii), members(j)%Cd(ii), members(j)%Ca(ii), members(j)%Cp(ii), members(j)%AxCd(ii), members(j)%AxCa(ii), members(j)%AxCp(ii), ' - ', ' - ', ' - ' end do end do @@ -1267,7 +1272,7 @@ subroutine AllocateMemberDataArrays( member, memberLoads, errStat, errMsg ) errStat = ErrID_None errMSg = '' - call AllocAry(member%NodeIndx , member%NElements, 'member%NodeIndx' , errStat2, errMsg2); call SetErrStat(errStat2, errMsg2, errStat, errMsg, routineName) + call AllocAry(member%NodeIndx , member%NElements+1, 'member%NodeIndx' , errStat2, errMsg2); call SetErrStat(errStat2, errMsg2, errStat, errMsg, routineName) call AllocAry(member%dRdl_mg , member%NElements, 'member%dRdl_mg' , errStat2, errMsg2); call SetErrStat(errStat2, errMsg2, errStat, errMsg, routineName) call AllocAry(member%dRdl_in , member%NElements, 'member%dRdl_in' , errStat2, errMsg2); call SetErrStat(errStat2, errMsg2, errStat, errMsg, routineName) call AllocAry(member%floodstatus , member%NElements, 'member%floodstatus' , errStat2, errMsg2); call SetErrStat(errStat2, errMsg2, errStat, errMsg, routineName)