diff --git a/modules/hydrodyn/src/HydroDyn_Output.f90 b/modules/hydrodyn/src/HydroDyn_Output.f90 index 44668a17c7..a48f6429ef 100644 --- a/modules/hydrodyn/src/HydroDyn_Output.f90 +++ b/modules/hydrodyn/src/HydroDyn_Output.f90 @@ -1161,7 +1161,7 @@ SUBROUTINE HDOut_MapOutputs( CurrentTime, p, y, m_WAMIT, m_WAMIT2, NWaveElev, Wa ! Need to use individual components of force for output reporting, the y%mesh data has total forces from all contributions if ( p%potMod == 1 ) then if ( p%NBodyMod == 1 .or. p%NBody == 1 ) then - do iBody = 1,p%NBody + do iBody = 1,min(p%NBody,9) ! Can only output the first 9 bodies for now startIndx = 6*(iBody-1) + 1 endIndx = startIndx + 5 AllOuts(FWaves1 (:,iBody)) = m_WAMIT(1)%F_Waves1(startIndx:endIndx) @@ -1179,7 +1179,7 @@ SUBROUTINE HDOut_MapOutputs( CurrentTime, p, y, m_WAMIT, m_WAMIT2, NWaveElev, Wa ! This happens when NBodyMod > 1, in which case, each WAMIT object is for a single body, but there may be multiple bodies in the HydroDyn model, ! so we need to use BodyID to determine the index into the complete HydroDyn list of WAMIT bodies - do iBody = 1,p%NBody + do iBody = 1,min(p%NBody,9) ! Can only output the first 9 bodies for now startIndx = 6*(iBody-1) + 1 endIndx = startIndx + 5 AllOuts(FWaves1 (:,iBody)) = m_WAMIT(iBody)%F_Waves1