-
Notifications
You must be signed in to change notification settings - Fork 4
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
remove separate u/v mask used for prints #1073
base: develop
Are you sure you want to change the base?
Conversation
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.
Looks good to me.
@@ -142,9 +147,9 @@ void Fields::print(std::ostream & os) const { | |||
const auto & vGhost = atlas::array::make_view<int, 1>(field.functionspace().ghost()); | |||
const auto & view = atlas::array::make_view<double, 2>(field); | |||
std::unique_ptr<atlas::array::ArrayView<double, 2> > mask; | |||
if (field.metadata().getBool("masked")) { | |||
if (field.metadata().has(MASK_METADATA)) { |
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.
There is similar logic at line ~108 above, in the norm
method. Did you want to make the same change there? Or is there a reason I'm missing to treat norm
differently from print
...
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.
thanks, you're right, nice catch! My grep
skills have seemingly diminished lately.
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.
Not a soca expert review, but this matches what I would expect.
Description
In order to keep answers from changing when I did a massive C++ refactoring of fields, I added a hack where the U/V fields had a second mask (the true u/v mask) added to the atlas metadata (this was in addition to the interpolation mask, which was the T mask). So that @fmahebert can make progress with regard to having a single "mask" metadata that the generic algorithms can use, I have removed this second mask.
This only impacts the print statements for U/V fields, not any real results.
This is, again, a bit of a hack, U/V fields should not be using the cell center mask, but this will all get sorted out when u/v de-staggering is re-implemented in the variable changes.
Due to these changes, the convert state application should not be used to do a resolution change with uocn and vocn (or you could still use it, and make sure your results don't have missing values in them, the problem at this point is illegal floating point operations where the u/v and t masks don't line up... fix that some other day)
Testing
The reference values for u and v prints for all tests had to be updated
run-ci-on-draft=true
jedi-ci-test-select=clang