Skip to content
SindbadTEM Module
julia
SindbadTEM

A Julia package for the terrestrial ecosystem model (TEM) implementation within the Strategies to INtegrate Data and BiogeochemicAl moDels (SINDBAD) framework.

The SindbadTEM package serves as the core of the SINDBAD framework, providing foundational types, utilities, and tools for building and managing SINDBAD models.

Purpose

This module is the entry point for the SINDBAD TEM implementation. It pulls together:

  • Core abstract types (notably LandEcosystem, defined in TEMTypes)

  • Utilities for model inspection and tooling

  • A canonical variable catalog for consistent metadata

  • The process/approach hierarchy and default process ordering

Dependencies

Key dependencies used/re-exported by the module include:

  • Reexport: Re-export helpers (@reexport).

  • OmniTools: Shared utilities and purpose integration.

  • CodeTracking: Development/debug helpers.

  • DataStructures: Collection types used across TEM utilities.

  • StaticArraysCore: Fixed-size and sized array types for performance.

  • Accessors: Nested update helpers (@set).

  • StatsBase: Statistical helpers used across processes/utilities.

  • InteractiveUtils, Crayons: Interactive/dev UX helpers.

Included Files

  • Types.jl (module SindbadTEM.TEMTypes): Core TEM types (including LandEcosystem) and shared type utilities.

  • Utils.jl (module SindbadTEM.Utils): Utilities for model inspection/tooling (e.g. I/O parsing).

  • Variables.jl (module SindbadTEM.Variables): Canonical catalog of SINDBAD TEM variables and metadata helpers.

  • Processes.jl (module SindbadTEM.Processes): Process hierarchy, parameter metadata macros, model/approach docstring helpers, and dynamic inclusion of process implementations under src/Processes/.

  • DevTools.jl: test_model/analyse_tem/test_tem, local dev-loop convenience functions for running approach checks/benchmarks (see their docstrings; test_model/analyse_tem additionally need using Test, provided by ext/SindbadTEMTestExt.jl).

  • (Internal) tmp_precompile_placeholder.jl: Auto-managed placeholder to force precompilation when new processes/approaches are added.

Notes

  • The LandEcosystem supertype serves as the foundation for all SINDBAD TEM models/processes, enabling extensibility and modularity.

  • The module re-exports key functionality from several dependencies (e.g., StaticArraysCore, DataStructures) to simplify downstream usage.

  • Designed to be lightweight and modular, allowing seamless integration with other SINDBAD modules in the top src directory of the repository.

Examples

julia
julia> using SindbadTEM

julia> # Define a new SINDBAD model
julia> struct MyProcess <: LandEcosystem
           # Define model-specific fields
       end

julia> # Query the variable catalog
julia> # catalog = getVariableCatalog()
source

Functions

analyse_tem

SindbadTEM.analyse_tem Function
julia
analyse_tem()

Same check CI's analyse-tem job runs: the full ~240-approach catalog, informational only (logs @info/@warn per phase, never throws on a per-approach problem – see SindbadTEM/test/README.md for why). Same using Test / dev-linked-checkout requirement as test_model.

source
Code
julia
function analyse_tem end

function _run_julia_script(repo_root::AbstractString, script::AbstractString)
    run(Cmd(`julia --project=SindbadTEM $script`; dir=repo_root))
    return nothing
end

test_model

SindbadTEM.test_model Function
julia
test_model(names::AbstractString...)

Same check CI's test-model job runs, scoped to the approach(es) you name here instead of a git diff: correctness (runs, type-stable, no NaN/Inf) and zero allocations on a warm precompute/compute call. Throws if any named approach failed – see the error message for exactly which check and why.

julia
using SindbadTEM, Test
test_model("soilProperties_Saxton1986")
test_model("soilProperties_Saxton1986", "plantForm_fixed")

Needs using Test loaded alongside SindbadTEM (this method is provided by SindbadTEM's Test package extension) and a dev-linked checkout of the Sindbad.jl monorepo.

source
Code
julia
function test_model end

"""
    analyse_tem()

Same check CI's `analyse-tem` job runs: the full ~240-approach catalog, informational only (logs
`@info`/`@warn` per phase, never throws on a per-approach problem -- see
`SindbadTEM/test/README.md` for why). Same `using Test` / dev-linked-checkout requirement as
`test_model`.
"""
function analyse_tem end

function _run_julia_script(repo_root::AbstractString, script::AbstractString)
    run(Cmd(`julia --project=SindbadTEM $script`; dir=repo_root))
    return nothing
end

test_tem

SindbadTEM.test_tem Function
julia
test_tem()

Same check CI's test-tem job runs: full timing/allocation benchmark across every approach, rendered to an HTML report. Spawns a subprocess and prints the report path when done. Needs a dev-linked checkout of the Sindbad.jl monorepo, same as test_model/analyse_tem.

source
Code
julia
function test_tem()
    repo_root = normpath(joinpath(pkgdir(@__MODULE__), ".."))
    isdir(joinpath(repo_root, "tools", "benchmark", "TestSindbadTEM")) || error(
        "test_tem() needs a dev-linked checkout of the Sindbad.jl monorepo -- looked for " *
        "tools/benchmark/TestSindbadTEM next to the SindbadTEM package at $repo_root and didn't find it.",
    )
    _run_julia_script(repo_root, joinpath("tools", "benchmark", "TestSindbadTEM", "benchmarkApproaches.jl"))
    _run_julia_script(repo_root, joinpath("tools", "benchmark", "TestSindbadTEM", "renderBenchmarkReport.jl"))
    report = joinpath(repo_root, "tools", "benchmark", "TestSindbadTEM", "benchmark_output", "benchmark_report.html")
    println("Report: ", report)
    return nothing
end

Modules