Skip to content

Restore clock iteration conditional to Reactant extension timestepping #5270

@dkytezab

Description

@dkytezab

Currently, incorporating 'paranoid' state updating breaks inside of Reactant compilation, so the following code snippet, present in RK3 and QB2, is deleted from their Reactant-friendly counterparts.

if model.clock.iteration == 0
    update_state!(model, callbacks; compute_tendencies=true)
end

This has the disadvantage of requiring two updates to the body of either timestepper, rather than one. Ideally, we should extend traced_type_inner inside of OceananigansReactantExt to handle RectilinearGrid and other Oceananigans types, which is a prerequisite to using the @trace macro in the snippet above.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions