Skip to content

Bracket a curvilinear child from its boundary line - #799

Open
ewquon wants to merge 1 commit into
mainfrom
eq/curvilinear-source-bracket
Open

ewquon wants to merge 1 commit into
mainfrom
eq/curvilinear-source-bracket

Conversation

@ewquon

@ewquon ewquon commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Closes #798

`validate_source_bracket` read the child's horizontal extent one axis at a time
through `ξnodes`/`ηnodes`, which are the separable-axis accessors and exist only
for `LatitudeLongitudeGrid` and `RectilinearGrid`. A curvilinear grid indexes its
coordinates jointly in `(i, j)`, so attaching an `Interpolated` boundary
condition to such a child threw a `MethodError` once Oceananigans filled in the
condition's location, dimension and side.

Read the extent from the face coordinates of the boundary's own line instead.
That is what the boundary condition samples, and keeping it to the line rather
than the whole hull leaves a per-side source free to span only its own side,
which the boundary strips rely on.

No test built a model on a curvilinear child, which is why this went unnoticed;
the new testset regularizes all four sides and still rejects a parent that
covers only part of the child.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ewquon
ewquon requested a review from glwagner October 22, 2026 19:41
@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interpolated boundary conditions throw on a curvilinear child

1 participant