Skip to content

Commit

Permalink
Merge Pull Request E3SM-Project#2966 from E3SM-Project/scream/mahf708…
Browse files Browse the repository at this point in the history
…/fix-host-dev-shoc-warning-redux

Automatically Merged using E3SM Pull Request AutoTester
PR Title: fix dev/host warning in shoc
PR Author: mahf708
PR LABELS: shoc, AT: AUTOMERGE, Quality of Life
  • Loading branch information
E3SM-Bot authored Aug 26, 2024
2 parents edd1e20 + 81f66f5 commit 15f4def
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void Functions<S,D>::shoc_assumed_pdf_compute_s(
std_s = ekat::sqrt(ekat::max(0,
ekat::square(cthl)*thl2
+ ekat::square(cqt)*qw2 - 2*cthl*sqrtthl2*cqt*sqrtqw2*r_qwthl));
const auto std_s_not_small = std_s > std::sqrt(std::numeric_limits<Scalar>::min()) * 100;
const auto std_s_not_small = std_s > std::sqrt(Kokkos::Experimental::norm_min_v<Real>) * 100;
s = qw1-qs*((1 + beta*qw1)/(1 + beta*qs));
if (std_s_not_small.any()) {
C.set(std_s_not_small, sp(0.5)*(1 + ekat::erf(s/(sqrt2*std_s))));
Expand Down

0 comments on commit 15f4def

Please sign in to comment.