Skip to content

Commit

Permalink
Merge Pull Request #2859 from E3SM-Project/scream/jgfouca/fix_valgrin…
Browse files Browse the repository at this point in the history
…d_err_homme

Automatically Merged using E3SM Pull Request AutoTester
PR Title: Fix valgrind errors in eamxx_homme_iop.cpp
PR Author: jgfouca
PR LABELS: AT: AUTOMERGE
  • Loading branch information
E3SM-Bot authored Jun 4, 2024
2 parents 9f8ce1f + 54ab366 commit b80e1bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/eamxx/src/dynamics/homme/eamxx_homme_iop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,9 @@ apply_iop_forcing(const Real dt)
// Restrict nudging of T and qv to certain levels if requested by user
// IOP pressure variable is in unitis of [Pa], while iop_nudge_tq_low/high
// is in units of [hPa], thus convert iop_nudge_tq_low/high
Mask nudge_level;
for (int p=0; p<Pack::n; ++p) {
const auto lev = k*Pack::n + p;
Mask nudge_level(false);
int max_size = hyam.size();
for (int lev=k*Pack::n, p = 0; p < Pack::n && lev < max_size; ++lev, ++p) {
const auto pressure_from_iop = hyam(lev)*ps0 + hybm(lev)*ps_iop;
nudge_level.set(p, pressure_from_iop <= iop_nudge_tq_low*100
and
Expand Down

0 comments on commit b80e1bd

Please sign in to comment.