AIBECS.jl for modeling marine biogeochemical tracers

Dear Julians,

I would like to present AIBECS.jl.

I am making this announcement in the hopes to get people to try the AIBECS. Better would be to get some Julian-expert feedback… And even better would be some direct contributions! (issues and PRs welcome of course!)

In short, the AIBECS (for Algebraic Implicit Biogeochemical Elemental Cycling System) allows you to create and run simulations of marine tracers in a just a few lines of code. An AIBECS user just needs to

  1. supply functions to specify the local sources and sinks
  2. chose one of the available (steady-state) ocean circulations
  3. optionally: define a vertical transport if one of the tracers sinks towards the ocean floor (e.g., particulate organic matter)

The AIBECS is still work in progress but it has usable documentation and associated Jupyter notebooks (thanks to Documenter.jl and Literate.jl), so I encourage you to try those if you feel like you want to run a quick marine tracer simulation, as you do.

The AIBECS uses a number of cool packages, including

The AIBECS uses its own root-finding quasi-Newton iterative solver (basically translated to Julia from C.T.Kelley’s MATLAB nsold.m code with a few AIBECS-taylored additions), which maybe could make its way to NLSolvers or DifferentialEquaiton (or something else) at some point.

I’ll stop here for the announcement because I don’t want this to be too long, but I hope it piqued your interest, especially if you’re into oceanography! :slight_smile:

Of course if you are not into oceanography but you have ideas of how to improve things like the API or the performance, that would be amazing, too! So please don’t hesitate to tell me how wrong my code is :sweat_smile:



I would definitely like to see that upstreamed for standard SteadyStateProblem usage. We could do a lot more with that package.

1 Like

@ChrisRackauckas Just to be sure I understand correctly, you are suggesting that the nsold.m equivalent should go in NLsolve.jl so that then SteadyStateProblems would be able to solved by calling the solver directly from NLsolve?

Other thing I wanted to talk about: I would love to make the AIBECS more of a DSL, maybe using something in the vein of ModelingToolkit.jl. I wrote some preliminary notes in this issue. Would you care to have a quick look?

I think this might require some work but it would allow for a better interface for users, and it would probably also allow me to optimize some of the code, e.g., the DSL could generate more efficient in-place functions. I would love to chat about all this more with you :slight_smile:

Well it looks like you implemented a new algorithm for SteadyStateProblem, It would be cool to have CTKAlg join the club, or at least be sufficiently well-documented as an external solver for other people to use.