Skip to content

Fix HydroStaticFreeSurfaceModel init for open boundary conditions with SplitExplicitFreeSurface#5378

Merged
simone-silvestri merged 7 commits intoCliMA:ss/open-boundary-conditionsfrom
rafmudaf:ss/open-boundary-conditions
Mar 6, 2026
Merged

Fix HydroStaticFreeSurfaceModel init for open boundary conditions with SplitExplicitFreeSurface#5378
simone-silvestri merged 7 commits intoCliMA:ss/open-boundary-conditionsfrom
rafmudaf:ss/open-boundary-conditions

Conversation

@rafmudaf
Copy link
Copy Markdown

@rafmudaf rafmudaf commented Mar 6, 2026

Currently, the internal_tide_open_boundaries example fails with:

ArgumentError: Cannot specify bottom boundary condition FluxBoundaryCondition: Nothing on a field at nothing!

I think this is for two reasons:

  • U and V are not listed in the assumed_field_location mapping for boundary condition locations, so they fall through to the Center(), Center(), Center() default which is incorrect for a 2D field
  • Missing dispatch for validating boundary conditions on a nothing z-location, so this also falls through to a catch-all error Note: this was extra, I've removed it after review.

This pull request adds a mapping for U and V. I've also added missing references in a couple of places. The example runs with these changes, but I have not checked it for correctness.

I'm very new to Oceananigans, so please double check and feel free to make any changes to this branch.

Copy link
Copy Markdown
Collaborator

@simone-silvestri simone-silvestri left a comment

Choose a reason for hiding this comment

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

Thanks for the bugfixes! I have added some comments.

@simone-silvestri simone-silvestri merged commit 3d690c8 into CliMA:ss/open-boundary-conditions Mar 6, 2026
21 of 54 checks passed
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.

2 participants