Skip to content

Update the sugar kelp test to the current API and run it in CI - #462

Merged
ali-ramadhan merged 2 commits into
mainfrom
ali/fix-sugar-kelp-test
Oct 30, 2026
Merged

ali-ramadhan merged 2 commits into
mainfrom
ali/fix-sugar-kelp-test

Conversation

@ali-ramadhan

Copy link
Copy Markdown
Collaborator

test_sugar_kelp.jl passed keyword arguments that LOBSTER no longer accepts (carbonates, variable_redfield, oxygen = true, sinking_speeds) and read Redfield ratios off the old struct, so it errored. It never ran in CI because runtests.jl only had a commented-out include under its old name, test_slatissima.jl.

  • Build LOBSTER with CarbonateSystem(), CarbonNitrogenDissolvedParticulate(grid) and Oxygen(), which provide the tracers the kelp couples to.
  • Sum the nitrogen and carbon in the tracers with conserved_tracers.
  • Include the test in runtests.jl.

The full test suite passes on CPU and GPU with Oceananigans 0.115.0, and the test also passes on CPU with 0.116.1.

The tolerances are unchanged, but the carbon tolerance (~1.5e-3 mmol C) is ~80× the carbon the kelp exchanges with the tracers in this test (~1.9e-5 mmol C), so it can't catch a sign error in the carbon coupling. Tightening it is left for a follow-up.

🤖 Generated with Claude Code

`test_sugar_kelp.jl` still passed the pre-NutrientsPlanktonDetritus `carbonates`,
`variable_redfield`, `oxygen = true`, and `sinking_speeds` keyword arguments to
`LOBSTER` and read the Redfield ratios off the struct, so it errored. It was also
never run because `runtests.jl` only had a commented-out include of its old name,
`test_slatissima.jl`.

The test now builds LOBSTER with `CarbonateSystem()`, `CarbonNitrogenDissolvedParticulate`
and `Oxygen()` (the tracers the kelp couples to), sums the nitrogen and carbon in
the tracers with `conserved_tracers`, and is included in `runtests.jl`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ali-ramadhan
ali-ramadhan requested a review from jagoosw October 28, 2026 22:00

@jagoosw jagoosw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!

@ali-ramadhan
ali-ramadhan merged commit 863e34c into main Oct 30, 2026
14 checks passed
@ali-ramadhan
ali-ramadhan deleted the ali/fix-sugar-kelp-test branch October 30, 2026 20:00
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