From 2a2b5e954e19fc5f77a11a4cbcf9c3c194dc013d Mon Sep 17 00:00:00 2001 From: Naser Mahfouz Date: Thu, 16 May 2024 12:05:35 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Luca Bertagna --- components/eamxx/src/diagnostics/pbl_entrainment_budget.cpp | 2 +- .../eamxx/src/diagnostics/tests/pbl_entrainment_budget_test.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/components/eamxx/src/diagnostics/pbl_entrainment_budget.cpp b/components/eamxx/src/diagnostics/pbl_entrainment_budget.cpp index df99b983505..8843933025a 100644 --- a/components/eamxx/src/diagnostics/pbl_entrainment_budget.cpp +++ b/components/eamxx/src/diagnostics/pbl_entrainment_budget.cpp @@ -119,7 +119,7 @@ void PBLEntrainmentBudget::calc_tl_qt(const view_2d &tm_v, const view_2d &pm_v, int nlevs = m_nlevs; Kokkos::parallel_for( Kokkos::RangePolicy<>(0, ncols * nlevs), KOKKOS_LAMBDA(const int &idx) { - const int icol = idx / ncols; + const int icol = idx / nlevs; const int jlev = idx % nlevs; qt_v(icol, jlev) = qc_v(icol, jlev) + qv_v(icol, jlev); tl_v(icol, jlev) = PF::calculate_thetal_from_theta( diff --git a/components/eamxx/src/diagnostics/tests/pbl_entrainment_budget_test.cpp b/components/eamxx/src/diagnostics/tests/pbl_entrainment_budget_test.cpp index 24074bcacfb..752e2e699df 100644 --- a/components/eamxx/src/diagnostics/tests/pbl_entrainment_budget_test.cpp +++ b/components/eamxx/src/diagnostics/tests/pbl_entrainment_budget_test.cpp @@ -121,7 +121,6 @@ TEST_CASE("entrainment_budget") { constexpr int ntests = 1; for(int itest = 0; itest < ntests; ++itest) { - // { // Randomize randomize(qc, engine, pdf); randomize(qv, engine, pdf);