-
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
Fixes bugs in Cross-contour_transport.ipynb #406
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Thanks @adele-morrison! So GitHub is not that clever and doesn't understand English so well you need to edit the first post to rephrase to
Otherwise only #327 is linked with the PR... PS: me talking to GitHub: "Come on GitHub -- pull it together!" |
Also: perhaps add the label "bug" since this PR fixes #307? |
I pushed some minor formatting tweaks. This looks good! At least the plot at the end looks how it used to be... But I'd like some experts on the issue give a review on the algorithm-science bit so I'm not approving... |
View / edit / reply to this conversation on ReviewNB navidcy commented on 2024-07-05T02:59:15Z Line #17. #if mask_loc%100 == 0: Line #18. # print('mask for x/y transport at point '+str(mask_loc))
These two lines seem to be just commented out code. If we don't need this code let's just delete it??? |
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.
Nice job!
Just made a minor comment on some code that is commented out... If we don't want that let's delete it.
I'll wait to hear from people who worked on this regarding the science-correctness of what you've propose here @adele-morrison.
Note: @adele-morrison, because I pushed few commits you might need to |
Hi @adele-morrison, regarding
The alert is referring to the issue #383 with figures/output in the comment here: #291 (comment) which happens when you have diagonals in your contour and one offset cell. The problem comes from cell 26 in your notebook, e.g.
where the x transports on either side of the offset cell should be 2 apart in terms of the along contour number and there is a y transport in between. I think this is hard to generalise as it depends on the orientations whether this So I'd recommend to keep the warning until the issue is resolved (or notebook replaced!) |
If the alert is referring to an issue then let's add a reference to the issue in the notebook! If @adele-morrison is confused I imagine that a lot of other people would be confused as well. So, I agree -- keep the warning -- but ensure that is clear to people why the warning is there (e.g. some of the explanation that @claireyung wrote just above I believe belongs in the notebook). |
View / edit / reply to this conversation on ReviewNB anton-seaice commented on 2024-07-09T07:06:50Z Line #1. %matplotlib inline You can delete this line |
View / edit / reply to this conversation on ReviewNB anton-seaice commented on 2024-07-09T07:06:51Z Line #5. import netCDF4 as nc and this isnt used |
View / edit / reply to this conversation on ReviewNB anton-seaice commented on 2024-07-09T07:06:52Z Line #1. start_time = '2170-01-01' These three lines about time don't make sense in this spot in the notebook anymore |
View / edit / reply to this conversation on ReviewNB anton-seaice commented on 2024-07-09T07:06:52Z You can just do this with :
contour_mask_numbered = np.arange(1,len(x_contour)+1) |
View / edit / reply to this conversation on ReviewNB anton-seaice commented on 2024-07-09T07:06:53Z Line #1. contour_mask = 0 * ht can be :
contour_mask = xr.zeros_like(ht) |
Closes #327 and closes #403. This fixes the bugs, so this notebook now works with the default conda environment. I also changed the contour, so it now uses the 1000m Antarctic isobath, which is more commonly used in the COSIMA community.
I'm not sure what the remaining alert at the top of the script is about:
It looks ok to me?