Skip to content

Document callback definition and usage #4780

Description

@jefftyoder

Issue:

A search of the dev docs and API for the "callback" shows the docs do not define callbacks, provide a clarifying example, or provide a short comment at the top of the callbacks.jl file discussing implementation. There is are references to callbacks in the docs when discussing other model components or features 1 2, but they do not explicitly demonstrate implementation.

There is a deprecated ClimateMachine.jl docs page which does define callbacks. Assuming callbacks were not radically changed, we could make use of the section here.

Proposed improvements:

  • Add a docstring/module-level comment to callbacks.jl
  • Add a section to the docs explaining what callbacks are, when they fire during the timestepping loop, and how to define a custom one
  • Include a minimal working example

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions