Skip to content

Commit cc68cdb

Browse files
committed
GPU didn't like this constant for some reason
1 parent 0af9aec commit cc68cdb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/eamxx/src/physics/gw/impl/gw_prof_impl.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ void Functions<S,D>::gw_prof(
4444
// Interior points use centered differences.
4545
midpoint_interp(team, t, ekat::subview(ti, Kokkos::pair<int, int>{1, pver}));
4646
team.team_barrier();
47+
static constexpr Real n2min = GWC::n2min;
4748
Kokkos::parallel_for(
4849
Kokkos::TeamVectorRange(team, 1, pver), [&] (const int k) {
4950
rhoi(k) = pint(k) / (C::Rair*ti(k));
5051
const Real dtdp = (t(k)-t(k-1)) / (pmid(k)-pmid(k-1));
5152
const Real n2 = C::gravit*C::gravit/ti(k) * (1/cpair - rhoi(k)*dtdp);
52-
ni(k) = std::sqrt(ekat::impl::max(GWC::n2min, n2));
53+
ni(k) = std::sqrt(ekat::impl::max(n2min, n2));
5354
});
5455

5556
// Bottom interface uses bottom level temperature, density; next interface

0 commit comments

Comments
 (0)