Skip to content

Conversation

@erikvansebille
Copy link
Member

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

Using idealised flow fields
@erikvansebille erikvansebille marked this pull request as ready for review December 17, 2025 16:53
Copy link
Contributor

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 triangle function used: https://rufat.be/triangle/delaunay.html
  • The AdvectionEE_NestedGrids will also be used a lot I assume. The copying of the variables is not so bad, but maybe we should add the errorcode TODO as a box to be checked to Refactor particleset attributes and particle data for vectorized kernels #2143? Alternatively, is there not a way to pass particles[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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I implemented the first two suggestions in 3d1be3e. The third one will indeed be fixed/cleaned when we solve #2143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

4 participants