Project

EarthSciASTDiff

Analytical sparse Jacobians for EarthSciAST (.esm) models by symbolic differentiation of the expression AST.

Contents

This is the documentation for the older version v0.7.0. For the latest release, see v0.8.0.

Serialize as a document block

The `jacobians` document block, so the Jacobian is itself an `.esm` artifact any binding can evaluate.

OperationKindBindingsSummary
cse_templatesfunctionJulia, Python, RustExtract repeated subtrees of exprs by the rule of esm-jacobian-spec §4.1.
jacobian_blockfunctionPython, RustThe §4 jacobians block for one model: entries (template-CSE’d by default) and the block-local expression_templates; on the state and time axes the structure classification…
jacobian_documentfunctionJuliaThe serialized input document plus the draft "jacobians" top-level block (esm-jacobian-spec.md §4): per model, the differentiation axis, the band entries, and — on the state…
parse_jacobian_blocksfunctionJulia, Python, Rustparse_jacobian_block over a model’s "jacobians" entry, which is either one block or an array of blocks with distinct wrt (esm-jacobian-spec.md §4); returns one `(wrt,…
serialize_bandfunctionPython, RustOne entry of the jacobians block, as a JSON-ready dict (spec §4; a JacEntry2 adds col2 / col2_idx, §4.4).
stable_jsonfunctionJulia, Python, RustDeterministic JSON: object keys emitted in sorted order at every level, scalars formatted by JSON3.

All topics