-
Notifications
You must be signed in to change notification settings - Fork 17
Tutorial #72
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
Tutorial #72
Conversation
@andersy005 Can you advise me on how to properly integrate the jupyter notebooks into the docs? |
@lpilz, since we are already using markdown for docs, i would recommend using here's a pointer to the docs as well: https://myst-nb.readthedocs.io/en/latest/use/markdown.html feel free to ping me whenever you need any feedback and/or clarification |
I've had trouble with writing a notebook using |
Alright, thanks @andersy005 and @dcherian for your help! After a bit of trial and error, everything seems to work now and this is ready for review from my end. Looking forward to your suggestions :) |
@lpilz: This is looking great! Thanks for doing this! Some comments:
|
|
||
def interp_and_keep_attrs(grid, da, axis): | ||
_attrs = da.attrs | ||
da = grid.interp(da, axis=axis) |
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.
This makes it seem like the "stagger" attribute should not be present at all.
The information about staggering is already present in the dimension names, indeed that is the xarray+xgcm data model: we know where the variables are on the grid by looking at names of dimensions.
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 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 just read this one again and maybe we should refrain from manually adding the stagger
attribute here, since this is really not needed. My thinking was just that somebody might want to simply copy and paste this code...
@lpilz: I believe I have developed a "hack" to fix the xarray HTML repr display issues. It turns out the that Xarray HTML repr includes/ships CSS that assumes that any theme changes will be contained in the |
I'm not sure what the proper fix for this is...whether it should go in the Furo theme or in Xarray to specifically deal with the Furo theme. |
BTW, this fix works on Chrome, and I haven't verified with other browsers. |
I also put some thought into that and decided to preliminarily go with the backticked version simply because of capitalization issues at the start of sentences. However, I agree that it adds a level of highlight that is maybe too much. I'll change it and we can just see if we like it like that. |
@kmpaul Thanks for your work on the styling issue. Unfortuately, I don't have a lot of experience with front end engineering, so I won't be able to help a lot on this. But if there is something I can do nonetheless - don't hesitate to delegate. |
In my opinion, we should document the styling issue in a separate issue and address it at a later time |
@andersy005: I think that's fine. Yes. I realized that my fix might be browser limited...but I wasn't expecting it to be that limited. Since it displays fine with the light theme of Furo, which is always an option, let's not let the styling issue hold up this PR. |
See #73 |
Incidentally, I implemented the "proper fix" for this in Xarray yesterday (see pydata/xarray#6500 and pydata/xarray#6501). So, after the next release of Xarray, we won't need this hacky fix anyway. |
Well... So, I know we said we'd fix this in another PR, but it turns out the fix was really easy. It shouldn't have worked on Chrome, either, but it turns out Chrome is a little more forgiving about assigning values to |
thank you 🙏, @kmpaul! the fix looks great |
Thanks, @andersy005! I'm appreciate that. |
I concur, nice work. Thanks a lot @kmpaul :) |
@lpilz, you are welcome! Glad I could help! |
Change Summary
Tutorial showing
xWRF
usage.Related issue number
Checklist