-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix valgrind errors in eamxx_homme_iop.cpp #2859
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bogensch , this looks like a bug. How can pressure ever be both low and high? This There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not a bug, just confusing names..... Valid example values: iop_nudge_tq_low = 1000 hPa; iop_nudge_tq_high=700 hPa. Thus low/high refers to the relative position in the atmosphere with respect to the surface rather than the value. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! Makes sense now. |
||
and | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume I should default this mask to all false?