Skip to content

Move to Oceananigans 0.117 - #467

Merged
tomchor merged 8 commits into
OceanBioME:mainfrom
dkytezab:patch-1
Nov 10, 2026
Merged

tomchor merged 8 commits into
OceanBioME:mainfrom
dkytezab:patch-1

Conversation

@dkytezab

@dkytezab dkytezab commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Moves OceanBioME to Oceananigans 0.117. Three of its changes reach OceanBioME:

  • Oceananigans.Models no longer binds default_nan_checker or iteration (they are extended from Diagnostics and Solvers), so BoxModels' import failed at precompile. The box model's own two methods were redundant with the generic ones, default_nan_checker(model) = nothing and iteration(model::AbstractModel) = model.clock.iteration, so both go.
  • The particle advection kernel _advect_particles! takes ParticleBoundaryConditions and an absorption record in place of a restitution. LagrangianAdvection now passes the default reflecting boundaries, whose restitution is 1 as before, and nothing for the record, since OceanBioME removes no particles.
  • A Field's data is a StaticStridesOffsetArray (Static dimensions and offsets CliMA/Oceananigans.jl#6270), so the particle tracer uptake's atomic add, which dispatched on OffsetArray, found no method inside kernels. It now dispatches on AbstractOffsetArray and indexes the parent through the array's offsets, which both types provide.

The compat is 0.117 alone rather than a shim over both kernel signatures, so this is 0.22.0. The docs environment moves with it. No other name OceanBioME imports from Oceananigans changed, and the particle hooks it extends, step_lagrangian_particles! and update_lagrangian_particle_state!, keep their arity and dispatch.

Downstream, NumericalEarth pins OceanBioME from main in its test environment and cannot move to Oceananigans 0.117 until a release admits it.

🤖 Generated with Claude Code

dkytezab and others added 4 commits November 6, 2026 15:38
…igans already provides

Oceananigans 0.117 no longer binds either name in Models (default_nan_checker is extended
from Diagnostics, iteration from Solvers), so the import failed at precompile. The generic
methods, default_nan_checker(model) = nothing and iteration(model::AbstractModel) =
model.clock.iteration, already cover a BoxModel on every supported Oceananigans.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ernel expects

Oceananigans 0.117 replaced _advect_particles!'s restitution with ParticleBoundaryConditions
and added an absorption record. The default reflecting boundary matches the restitution of 1
used before, and nothing records no absorption.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Oceananigans 0.117 gives the particle advection kernel ParticleBoundaryConditions and an
absorption record in place of a restitution, and binds default_nan_checker and iteration
outside Models. OceanBioME calls the new kernel directly and drops its redundant box-model
methods; the compat moves to 0.117 alone, so the version is 0.22.0.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@dkytezab dkytezab changed the title Update Oceananigans version to include 0.117 Move to Oceananigans 0.117 Nov 9, 2026
Oceananigans 0.117 stores a Field's data in a StaticStridesOffsetArray, so the OffsetArray
method no longer applied inside kernels. Dispatch on AbstractOffsetArray and index the parent
through the array's offsets, which both types provide.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@dkytezab

dkytezab commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

cc @jagoosw

Comment thread docs/Project.toml Resolved
Comment thread Project.toml Resolved
@tomchor
tomchor merged commit 1c6e5b5 into OceanBioME:main Nov 10, 2026
14 checks passed
@tomchor

tomchor commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

@jagoosw I'm going to try and tag a new version. Hope that's okay

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