-
Notifications
You must be signed in to change notification settings - Fork 66
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
Bug in Cross-contour_transport.ipynb #291
Comments
Hey Christina, Thanks so much for finding the bug and making this fix! I just have a small problem/question - should we expect the contour number to be monotonically increasing along the contour? At the moment, the two ones that are set at the same time by the new edits are adjacent numbers, whereas if you were following the contour you'd expect their numbers to be 2 apart with the other coordinate in between. E.g. for this contour: Also, for this contour (which I don't think was modified from the changes in #276 for issue #265) the numbers are three apart (3025,3028). This is I suppose another incompatibility of the original code with the contour that has diagonals. I suspect this won't affect which numbers get picked up by the mask algorithm, i.e. we should get correct total transports with your fix and it's much better than when we were completely getting wrong transports due to the misnumbering (sorry for my ignorance of that!!). However I think that the numbering order is not quite right so we plot along-contour transports so a few things will be a little jumbled. Probably worth fixing, but I guess this will be going through more if-and-else-if cases.... Thoughts? |
When adding the two additional options during the last update, we only adjusted mask_x_transport but not mask_x_transport_numbered and the same problem for the other case where we changed mask_y_transport (not shown):
My fix:
A first test confirmed that my addition fixes the bug which resulted in the cross contour transport being really different with the current version, especially across the 2500 m isobath.
Here, I compare the circumpolar cumulative transport summed up over dense layers in year 2000 using the different methods to create the isobath
For the 1000m isobath, the results between old and new are fairly similar, so that’s good. For the 2500 m isobath, the bug really changes the result but also the old and new version are not as similar as I expected. But I do think my fix is correct and it indicates that the additional two options have a greater impact than I realised.
The text was updated successfully, but these errors were encountered: