diff --git a/components/omega/src/ocn/OceanState.cpp b/components/omega/src/ocn/OceanState.cpp index a257185f4e1c..ee4aaa46da94 100644 --- a/components/omega/src/ocn/OceanState.cpp +++ b/components/omega/src/ocn/OceanState.cpp @@ -382,25 +382,14 @@ void OceanState::updateTimeLevels() { int NewLevel = NTimeLevels - 1; - // Update time levels for layer thickness - copyToHost(NewLevel); - MeshHalo->exchangeFullArrayHalo(LayerThicknessH[NewLevel], OnCell); - copyToDevice(NewLevel); - - Array2DR8 Temp; - HostArray2DR8 TempH; + // Exchange halo + exchangeHalo(NewLevel); + // Update time levels for layer thickness and normal velocity for (int Level = 0; Level < NTimeLevels - 1; Level++) { std::swap(LayerThickness[Level + 1], LayerThickness[Level]); std::swap(LayerThicknessH[Level + 1], LayerThicknessH[Level]); - } - // Update time levels for normal velocity - copyToHost(NewLevel); - MeshHalo->exchangeFullArrayHalo(NormalVelocityH[NewLevel], OnEdge); - copyToDevice(NewLevel); - - for (int Level = 0; Level < NTimeLevels - 1; Level++) { std::swap(NormalVelocity[Level + 1], NormalVelocity[Level]); std::swap(NormalVelocityH[Level + 1], NormalVelocityH[Level]); }