Skip to content

Commit 6643429

Browse files
committed
fixing out of bounds issue
1 parent 2b900ac commit 6643429

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/omega/src/ocn/VertMix.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ConvectiveMix {
4343
KOKKOS_FUNCTION void operator()(Array2DReal VertDiff, Array2DReal VertVisc,
4444
I4 ICell,
4545
const Array2DReal &BruntVaisalaFreq) const {
46-
for (int K = 1; K <= NVertLayers; ++K) {
46+
for (int K = 1; K < NVertLayers; ++K) {
4747
if (K == 0) {
4848
VertVisc(ICell, K) = 0.0_Real;
4949
VertDiff(ICell, K) = 0.0_Real;
@@ -80,7 +80,7 @@ class PPShearMix {
8080
const Array2DReal &TangentialVelocity,
8181
const Array2DReal &BruntVaisalaFreq) const {
8282

83-
for (int K = 0; K <= NVertLayers; ++K) {
83+
for (int K = 0; K < NVertLayers; ++K) {
8484
if (K == 0) {
8585
VertVisc(ICell, K) = 0.0_Real;
8686
VertDiff(ICell, K) = 0.0_Real;

0 commit comments

Comments
 (0)