-
Notifications
You must be signed in to change notification settings - Fork 168
Creating a Nested Grid Tutorial #2439
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
base: v4-dev
Are you sure you want to change the base?
Conversation
Using idealised flow fields
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.
Very cool notebook, and so exciting to see this feature in v4! My comments are mostly considering the cases other people will use this feature for.
- When showing the velocity fields in rectangles with the Grid polygons in red, maybe add a note (admonition) discussing the case when the fields come from a nested model: the velocity fields would then be defined for the polygons only, and you would only need to pass the bounding coordinates?
- The triangulation function seems to be the core function that people will use (copy?) to set up their own nested fields. I was thinking about how to make this robust, maybe we can at least link to the documentation of the
trianglefunction used: https://rufat.be/triangle/delaunay.html - The
AdvectionEE_NestedGridswill also be used a lot I assume. The copying of the variables is not so bad, but maybe we should add the errorcodeTODOas a box to be checked to Refactor particleset attributes and particle data for vectorized kernels #2143? Alternatively, is there not a way to passparticles[mask]as a fifth argument?
After writing this I also think it is okay to fix some of these challenges once people start implementing their own nested setups in v4 and come with feedback.
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.
Review suggestions by @reint-fischer
This PR creates a tutorial for how to do nesting in Parcels v4, using a combination of unstructured (for the nest localisation) and structured (for the hydrodynamic data) Fields.
It is different from #2436 in that it uses idealised flow fields, so can be run in CI