Skip to content

Add regression test for PrescribedOcean exchange_grid#374

Open
glwagner wants to merge 3 commits into
mainfrom
glw/test-prescribed-ocean-exchange-grid
Open

Add regression test for PrescribedOcean exchange_grid#374
glwagner wants to merge 3 commits into
mainfrom
glw/test-prescribed-ocean-exchange-grid

Conversation

@glwagner

Copy link
Copy Markdown
Member

Follow-up to #359, which added the land=nothing argument to
exchange_grid(atmosphere, ocean::PrescribedOcean, sea_ice, land) so a
PrescribedOcean can be coupled alongside a land component.

This adds a focused regression test (test/test_prescribed_ocean.jl) for that
path. Without the fix, the 4-argument call falls through to the generic
exchange_grid method (ocean.model.grid) and throws FieldError, since
PrescribedOcean has no model field — confirmed by running the test against
the pre-#359 code.

The test is download-free, runs on both CPU and GPU, and completes in ~10s.
It is auto-discovered by ParallelTestRunner.find_tests, so no change to
runtests.jl is needed.

🤖 Generated with Claude Code

Covers the `exchange_grid(atmosphere, ocean::PrescribedOcean, sea_ice, land)`
with-land path fixed in #359. Without the `land=nothing` argument the 4-argument
call falls through to the generic method (`ocean.model.grid`) and throws, since
`PrescribedOcean` has no `model` field. This test is download-free and runs on
both CPU and GPU.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread test/test_prescribed_ocean.jl Outdated
glwagner and others added 2 commits June 20, 2026 01:42
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
@navidcy navidcy added the testing 🧪 trust but verify label Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing 🧪 trust but verify

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants