-
Notifications
You must be signed in to change notification settings - Fork 82
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
WIP: Quickstart Guide for the docs #271
base: master
Are you sure you want to change the base?
Conversation
Nice quickstart guide! Nothing much more than small details to comment on :).
Apart this quickstart guide, would it be useful if the 1st example was partially model-agnostic? Or maybe easier to do, the simple MITgcm example could describe more the grid and the scale factors / metrics so the grid creation is understandable by more people. This would be a logical continuity of the quickstart guide, where the notions are applied. |
Dear @rcaneill , thanks for reviewing! To your question: It actually works really nicely (especially for text based files) to make a PR to a PR. You just have to edit the file in question on github (no cloning needed), and it will give you the option of creating a new PR. This will show up as a suggestion in the I came across the issue with the boundary as well yesterday. We never really mention it. Only in a convoluted way in the setup code examples. We need to add a more detailed section on I was thinking of making a completely `synthetic example at the end (e.g. make up some data, create a grid, metrics and then apply some operator). It seems that this would be in your interest too, so let me add that. |
Amazing! I try it now! |
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 is a great start.
Co-authored-by: Romain Caneill <romain.caneill@ens-lyon.org>
Co-authored-by: Romain Caneill <romain.caneill@ens-lyon.org>
Co-authored-by: Ryan Abernathey <ryan.abernathey@gmail.com>
Co-authored-by: Ryan Abernathey <ryan.abernathey@gmail.com>
Co-authored-by: Ryan Abernathey <ryan.abernathey@gmail.com>
Co-authored-by: Ryan Abernathey <ryan.abernathey@gmail.com>
Hi @jbusecke. Just pinging on this. Are you ready for another review? Would be great to get this merged. |
Have put aside today for the OMZ paper completely. Ill try to finish this tomorrow or Friday! |
@jbusecke Responding here to your comment/request on #291. The quick start guide seems like a very good start! It definitely makes understanding how At least for me, here's how it goes:
Hope this helps! And keep up the good work |
Thank you for taking the time to go through this @tomchor. This is extremely helpful feedback. Some quick notes:
💯 agree. In fact we barely describe the boundary conditions at all in the docs (see also #273). I am not sure how much detail should go into the quickstart guide vs a separate section. I personally think a lot of these details should go into a more detailed section.
Yeah, this is very confusing, and should definitely be remedied in the future. This will require some rather big changes and a longer deprecation cycle thought (see #195). How about for now I add a cautionary note?
Ok I hear that and will try to spend some time to make this more clear. In short, metrics are quantities that relate the logical rectangular grid (or nd-array) to actual physical space, like distances between cell points, cell volume, and area, etc. How are these kinds of parameters given in the LES world? Perhaps I can draw some inspiration from there to formulate something more general. Again many thanks for using xgcm and providing this great feedback! |
Yeah, a cautionary note would definitely help. Also, adding a
I think what metrics represent, is pretty well-explained. I think what is confusing is how exactly to represent that. Because there are many different sets of metrics that you can come up with that fully represent the geometry of a grid.
For finite volume codes like Oceananigans the usual approach is to use a rectilinear C-grid. So it's even simpler than GCMs, that have to account for curvature, etc. Other types of code (the usual ones mix spectral in the horizontal and finite differences in the vertical) have a slightly different grid where the only variable on cell faces is the vertical velocity. Fully spectral codes (like Dedalus) use only cell centers I think. Again, LES grids should be actually easier in general. |
This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the pull request will be closed in another 30 days. Thank you for your contribution! |
This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request. |
Hello @jbusecke, this is a very nice part of the doc, but that seems stopped for a while... I would be happy to help to finish it, if help is needed for anything! |
Hey @rcaneill, thanks for the ping on this. I could indeed need some help on this. I am working with @TomNicholas on a larger internal refactor, which will fundamentally change some of the terminology regarding padding and boundary. In short we will rename the current 'boundary' to 'padding' (this is only concerned with the array boundaries which do not mean anything in terms of physical boundaries in the domain! This was always a bit confusing). Once we have merged the new internals (https://github.com/xgcm/xgcm/tree/grid_ufunc_refactor_project), we can actually deal with internal boundary conditions (#324). I think this distinction and explanation should be included in the quick start guide, but that might not mean that this should not get finished/merged before that. I think the checklist at the top is still quite up to date. The most important thing to include (as @tomchor mentioned) is how to include metrics I think. It would be amazing if you could take a shot at adding the missing items. Happy to review and also happy to fill in the boundary discussion (perhaps for now with a warning/note until properly implemented?). |
Oh yes I saw the internal refactoring, I really look forward to using the grid_ufuncs! How should I work on this PR, is it possible for me to clone the jbusecke:quickstart_guide branch, and do a PR on it? Or is it easier if I only work via github and propose changes (does not seem very convenient) |
Yeah lets go via the github route. I propose:
|
Actually let me try to resolve the issue in this branch first! |
Ok I think that did the trick. Feel free to fetch this state. And thanks a lot for helping here @rcaneill! |
I opened a PR on your fork, so I guess that if you merge, it will appear here. |
Perfect! |
Hello, |
whats-new.rst