Skip to content
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 shiftOutput #2157

Merged
merged 2 commits into from
Dec 1, 2020
Merged

Fix shiftOutput #2157

merged 2 commits into from
Dec 1, 2020

Conversation

johnomotani
Copy link
Contributor

Fixes two bugs:

  • if shiftOutput was set all Field3Ds and FieldPerps would be passed to toFieldAligned() before being written. If an aligned field was added to the output, it would have been too, but this is an error. Add an extra check to skip toFieldAligned() for aligned fields.
  • The attributes in the output file were set from the original variables, without accounting for shiftOutput. When shiftOutput is set, all Field3Ds and FieldPerps should have direction_y = "Aligned" in the output files.

It is an error to call toFieldAligned on a Field that is already
aligned. When shiftOutput==true, add another condition so we skip
calling toFieldAligned() if the field is already aligned.
When shiftOutput is true, Field3D and FieldPerp variables are
transformed to field-aligned form before saving their data. Therefore
the direction_y attribute of the saved field should be 'Aligned', rather
than matching the original variable.
@johnomotani johnomotani added bugfix backport candidiate Does not break backward compatibility, so can be back-ported to v4.4 labels Nov 29, 2020
@johnomotani johnomotani reopened this Nov 30, 2020
@ZedThree ZedThree merged commit 82d633c into next Dec 1, 2020
@ZedThree ZedThree deleted the fix-shiftoutput branch December 1, 2020 13:59
@ZedThree ZedThree mentioned this pull request Aug 4, 2021
28 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport candidiate Does not break backward compatibility, so can be back-ported to v4.4 bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants