Recent Releases of AIBECS.jl
AIBECS.jl - v0.20.0
AIBECS v0.20.0
Breaking changes
CTKAlg's default convergence criterion changed from the NonlinearSolveBase AbsNormSafeBestTerminationMode (absolute, unit-blind) to NormTerminationMode (scale-aware), with new tolerance defaults:
| kwarg | old default | new default |
|---|---|---|
termination_condition |
AbsNormSafeBestTerminationMode(maximum∘abs) |
NormTerminationMode(maximum∘abs) |
abstol |
nothing → NSB default (≈ 3e-13 for Float64) |
0.0 |
reltol |
nothing → NSB default (≈ 3e-13 for Float64) |
1 / ustrip(s, 1Myr) ≈ 3.17e-14 (τstop = 1 Myr) |
The new rule is
‖F‖∞ ≤ abstol || ‖F‖∞ ≤ reltol · ‖F + x‖∞
With abstol = 0 the active branch is the relative one — equivalent to ‖x‖/‖F‖ ≥ τstop, the same physically meaningful "system is steady on timescales longer than τstop" criterion as the original τstop kwarg before AIBECS adopted NonlinearSolveBase termination modes.
Why it changed. The previous default was unit-blind and broke in opposite directions on tutorial problems:
- Radiocarbon:
‖F₀‖∞ ≈ 1e-13already met the absolute tolerance on the first call, so Newton ran zero iterations. Required a manualabstol = …workaround in the tutorial. - Ideal age:
‖F‖∞floored ateps · cond(J) ≈ 1e-10, never met abstol, and NSB safe-best stall detection could not fire insidemaxItNewton = 50(patience = 100, max_stalled_steps = nothing). Solver ground toMaxIters.
The relative criterion side-steps both — ‖x‖∞ provides the scale.
Migration
- Default users: no action required. Both tutorial problems and the test suite converge with the new defaults.
- Users who set
abstolexplicitly: the new defaultreltol ≈ 3.17e-14is now also checked (OR semantics) — for typical AIBECS problems with‖x‖ ≫ 1this is the looser branch and yourabstolstill governs. Passreltol = 0to suppress the relative branch entirely. - Users who relied on
AbsNormSafeBest-specific behaviour (best-iterate tracking, stall-basedStalledSuccess): passtermination_condition = AbsNormSafeBestTerminationMode(maximum∘abs)explicitly.
Other changes
CTKAlgnow emits an@warnwhen it returns a non-success retcode, reportingretcode, residual ∞-norm,abstol,reltol, andmaxItNewton. SilentMaxIters/Unstablefailures are now visible.- The radiocarbon tutorial no longer needs the manual
abstol = ustrip(upreferred(1e-8·Ratm/yr))workaround —solve(prob, CTKAlg())is enough.
Hydrosphere - Ocean Carbon and Temperature
- Julia
Published by github-actions[bot] 3 months ago
AIBECS.jl - v0.19.3
AIBECS v0.19.3
Merged pull requests:
- docs: add parameter optimisation how-to (#130) (@briochemc)
- CompatHelper: bump compat for Bijectors in [weakdeps] to 0.16, (keep existing compat) (#131) (@github-actions[bot])
Hydrosphere - Ocean Carbon and Temperature
- Julia
Published by github-actions[bot] 3 months ago
AIBECS.jl - v0.19.1
AIBECS v0.19.1
Merged pull requests:
- docs: reorganize how-to sidebar, embed benchmarks, rewrite solvers explanation (#128) (@briochemc)
- docs(howto): add Makie-based plotting example (#129) (@briochemc)
Hydrosphere - Ocean Carbon and Temperature
- Julia
Published by github-actions[bot] 3 months ago
AIBECS.jl - v0.19.0
AIBECS v0.19.0
Breaking changes
NewtonChordShamanskiinow returns(x, retcode)instead of a bare state vector. The function is documented as AIBECS-internal, but any external caller that pattern-matched on a single return value will need to unpack the tuple.
New features
solve(::SteadyStateProblem, ::CTKAlg; …)now forwards a meaningful SciML retcode intobuild_solutioninstead of hard-codingReturnCode.Success. The retcode threads:- the NonlinearSolveBase termination-cache verdict (
Success/StalledSuccess/Stalled) MaxIterswhen the Newton budget runs outUnstableon Armijo complete-failure with a fresh Jacobian
- the NonlinearSolveBase termination-cache verdict (
- New
linear_cache::LinearSolve.LinearCachekwarg onsolve(::SteadyStateProblem, ::CTKAlg; …)that bypasses the internalinit(LinearProblem(…))call so callers (F1Method, parameter sweeps) can feed in a pre-factorised Jacobian. Shamanskii's ratio check + Armijo's old-J fallback are the safety net against stale factors.
See #127 for the implementation and rationale.
Hydrosphere - Ocean Carbon and Temperature
- Julia
Published by github-actions[bot] 3 months ago
AIBECS.jl - v0.18.0
AIBECS v0.18.0
Breaking changes
CTKAlg's defaultlinsolvefield now eagerly defaults to
UMFPACKFactorization()instead ofnothing. Runtime behaviour is
unchanged (the previous=== nothingbranch fell back to UMFPACK
too), but the type parameterCTKAlg{L}is now
CTKAlg{UMFPACKFactorization}by default rather than
CTKAlg{Nothing}. Any downstream code dispatching on
CTKAlg{Nothing}will need updating.
New features
-
Analytical
∂Gs/∂Gkeyword onAIBECSFunction— supply
closed-form derivatives of the source–sink termGto skip the
per-blockForwardDiff.derivativecall in Jacobian assembly. Strictly
opt-in; omitting the keyword keeps the existing ForwardDiff path.
Tuple-of-tuples shape for multi-tracer;check_∂Gs(Gs, ∂Gs, x, p, nb)
is exported to validate analytical derivatives against ForwardDiff. -
AD-through-the-solve for
CTKAlg— new
solve(::SteadyStateProblem{…,Dual,…}, ::CTKAlg)dispatch peels
the duals, runs the primal Newton–Chord–Shamanskii at Float64, and
reconstructs∂u*/∂pvia the implicit function theorem
(Jᵤ z = −Jₚ). Nested-Dual (Hessian) calls recurse one Dual layer
per level, routed through LinearSolve'sDualLinearCacheso the
sparse factorisation is reused — no densification.
ForwardDiff.gradient(p -> sum(solve(SteadyStateProblem(F, x, p), CTKAlg()).u), p)
now Just Works on AIBECS's sparse Jacobian. -
AIBECS.nonlinearproblemDual-stripping — the sparse
jac_prototypebuilder now strips Duals before construction, so the
SciML NonlinearSolve IFT path also works withForwardDiffover an
AIBECS steady-state solve.
Caveats
- The IFT dispatch reuses three
NonlinearSolveBasesymbols
(nodual_value,nonlinearsolve_∂f_∂p,nonlinearsolve_dual_solution)
that are public-but-internal-feeling. A one-shot@warnsurfaces this
on first AD-through-solve call. - IFT-reconstructed partials inherit the primal Newton residual; for
machine-precision derivatives the solver must be forced past its
stopping rule (abstol=0, run tomaxItNewton). Not practical at
production grid sizes — useF1Method's analytical gradient/Hessian
there.
Merged pull requests:
- feat: analytical ∂Gs for G + AD-through-the-solve via IFT for CTKAlg (#124) (@briochemc)
Hydrosphere - Ocean Carbon and Temperature
- Julia
Published by github-actions[bot] 3 months ago
AIBECS.jl - v0.17.0
AIBECS v0.17.0
Now opens up to all solvers from NonlinearSolve.jl and LinearSolve.jl.
Breaking changes
-
SciML ecosystem opt-in via a new
AIBECSNonlinearSolveExt(NonlinearSolve + ADTypes + DI + SparseConnectivityTracer + SparseMatrixColorings as weak deps):AIBECS.nonlinearproblem(prob)—SteadyStateProblem → NonlinearProblemwith sparsejac_prototype(sidesteps NonlinearSolve's iip-promotion of 3-argf(u, p, t=0)).AIBECS.recommended_nlalg()—NewtonRaphson + UMFPACKwith sparse-AD fallback.AIBECS.default_sparse_ad()— overridable.
-
CTKAlg overhaul. No longer welded to
factorize/\:CTKAlg(linsolve = …)plugs in any LinearSolve algorithm (UMFPACK, KLU, MKL Pardiso, …); the inner loop mutates aLinearSolve.LinearCacheso Shamanskii's lazy refresh rides the cache'sisfreshtoggle.- Convergence delegates to NonlinearSolveBase termination modes;
abstol/reltol/termination_conditionreplace the oldnrm/τstopkwargs. - LinearSolve promoted to direct dep; NonlinearSolveBase added.
-
Existing tutorials and
SteadyStateProblemusage continue to work modulo thenrm/τstop→abstol/reltol/termination_conditionrename onCTKAlg.
Merged pull requests:
- Open up to all SciML nonlinear/linear solvers (#122) (@briochemc)
Hydrosphere - Ocean Carbon and Temperature
- Julia
Published by github-actions[bot] 3 months ago
AIBECS.jl - v0.16.4
AIBECS v0.16.4
Merged pull requests:
- ci: deploy docs via GitHub Actions, materialising symlinks for VitePress (#119) (@briochemc)
- ci: bump DocumenterVitepress to 0.3 to fix /stable/ hydration (#120) (@briochemc)
Hydrosphere - Ocean Carbon and Temperature
- Julia
Published by github-actions[bot] 4 months ago
AIBECS.jl - v0.16.0
AIBECS v0.16.0
Breaking changes
- all heavy deps have been moved to extensions/weakdeps, so they must be imported (e.g.,
using JLD2before loading OCIM1 matrix, etc.) Docs + tutorials have been updated to reflect that. This is a major breaking change but should reduce load times significantly for all users not using all the deps (because deps that are not used are not precompiled).
Merged pull requests:
- Migrate AIBECS dependencies to package extensions (#102) (@briochemc)
Hydrosphere - Ocean Carbon and Temperature
- Julia
Published by github-actions[bot] 4 months ago
AIBECS.jl - v0.13.6
AIBECS v0.13.6
- CompatHelper: bump compat for Bijectors to 0.15, (keep existing compat)
Merged pull requests:
- CompatHelper: bump compat for Bijectors to 0.15, (keep existing compat) (#99) (@github-actions[bot])
Hydrosphere - Ocean Carbon and Temperature
- Julia
Published by github-actions[bot] over 1 year ago
AIBECS.jl - v0.10.11
AIBECS v0.10.11
Merged pull requests:
- CompatHelper: bump compat for ImageFiltering to 0.7, (keep existing compat) (#79) (@github-actions[bot])
- CompatHelper: bump compat for StringDistances to 0.11, (keep existing compat) (#80) (@github-actions[bot])
Hydrosphere - Ocean Carbon and Temperature
- Julia
Published by github-actions[bot] almost 5 years ago
AIBECS.jl - v0.8.7
AIBECS v0.8.7
Merged pull requests:
- CompatHelper: bump compat for "Bijectors" to "0.9" (#65) (@github-actions[bot])
- CompatHelper: bump compat for "DataFrames" to "1.0" (#66) (@github-actions[bot])
- CompatHelper: bump compat for "Distributions" to "0.25" (#67) (@github-actions[bot])
Hydrosphere - Ocean Carbon and Temperature
- Julia
Published by github-actions[bot] about 5 years ago
AIBECS.jl - v0.8.4
AIBECS v0.8.4
Closed issues:
- Issues with replicating documentation example (#58)
Merged pull requests:
- Update Project.toml (#57) (@briochemc)
- CompatHelper: bump compat for "Shapefile" to "0.7" (#59) (@github-actions[bot])
Hydrosphere - Ocean Carbon and Temperature
- Julia
Published by github-actions[bot] over 5 years ago
AIBECS.jl - v0.7.13
AIBECS v0.7.13
Merged pull requests:
- CompatHelper: bump compat for "Distances" to "0.10" (#45) (@github-actions[bot])
- CompatHelper: bump compat for "UnitfulRecipes" to "1.0" (#46) (@github-actions[bot])
- CompatHelper: bump compat for "Flatten" to "0.4" (#47) (@github-actions[bot])
- Use TransformVariables + without unit conversion (#48) (@briochemc)
Hydrosphere - Ocean Carbon and Temperature
- Julia
Published by github-actions[bot] almost 6 years ago