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.

Python API index

Every stable name Python exports, and its extension seams.

Package: earthsci_astdiff 0.7.0

Documentation extracted with griffe 2.3.2.

Extension-tier names are on the Python extension page .

Stable names

PythonCanonicalKindSummary
BandbandtypeOne structured block of ∂(rhs of the equation for u)/∂v — see the Julia reference docstring and esm-jacobian-spec.md §4.
BandErrorband_errorerrorRaised when an expression has a form the band calculus cannot differentiate (for example a joined faq node or a boolean semiring).
bind_planbind_planfunctionCheck plan against the state Jacobian of obj (an EsmFile, a flattened system or a SysView) and precompute its gather.
BlockDiagonalPlanblock_diagonal_plantypePer-cell block LU of a block-diagonal Jacobian: the block variables in Markowitz order, the block pattern, the 1-based ordering and the pattern of the LU factors including fill-in.
column_linescolumn_linesfunctionThe per-line structure of a state Jacobian whose couplings all stay within one line along index set axis, or None when one does not (structure.jl column_lines): every band…
ColumnBlockPlancolumn_block_plantypeLine-by-line factorization info for a "column_block" Jacobian: every coupling stays within one line along axis, so the matrix is one (len(block_vars)·line_length)-square…
cse_templatescse_templatesfunctionExtract repeated subtrees by the rule of esm-jacobian-spec §4.1 (the reference’s cse.jl).
DerivativeRuleErrorderivative_rule_errorerrorRaised when a scalar operator has no derivative rule (spec §3).
detect_structuredetect_structurefunctionClassify the band list: "block_diagonal", "banded", "general" (or "empty" / "other"), read off the column-index expressions without evaluating anything.
dscalardscalarfunctionDerivative of the scalar expression e w.r.t.
evaluation_documentevaluation_documentfunctionThe derived evaluation document of the first-order bands on axis wrt (spec §8, model "JacobianEval"): the source’s observed the coefficients read, every source derivative…
extended_bandsextended_bandsfunctionThe extended first-order system of axis wrt (spec §4.5, ExtendedBands): every state equation’s bands with respect to the axis’s targets and the active recurrences, and each…
forcing_namesforcing_namesfunctionThe forcing set of a system, sorted by name: the parameters whose cells are the columns of the wrt="forcing" axis (esm-jacobian-spec.md §4.3).
hvp_documenthvp_documentfunctionThe second-order product document of spec §9.4 for the axis pair wrt and stages stage pairs: its right-hand side leaves g = ∇_{a2} Σᵢ μᵢᵀ J(u) wᵢ (∇_{a2} (Σᵢ wᵢ μᵢ)ᵀ f_t…
JacEntryjac_entrytypeOne block of the Jacobian: row variable u, column variable v, and the Band giving the rows it covers, the column-index expressions and the coefficient.
JacEntry2jac_entry2typeOne second-order band: ∂²(equation for u)/∂v ∂w.
jacobian_bandsjacobian_bandsfunctionDifferentiate a model’s right-hand side into a list of Jacobian bands.
jacobian_bandsjacobian_structurefunctionDifferentiate a model’s right-hand side into a list of Jacobian bands.
jacobian_bands2jacobian_bands2functionSecond-order bands for the axis pair wrt = (a1, a2), a1 in ("states", "time") and a2 in ("states", "parameters", "forcing"): every first-order entry of the a1 axis…
jacobian_blockjacobian_blockfunctionThe §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_columnsjacobian_columnsfunctionThe column space of a "parameters" or "forcing" block: each column variable with its integer shape ([] for a scalar), sorted by name — the columns field of the emitted…
jacobian_patternjacobian_patternfunctionThe structural sparsity pattern as sorted (rowname, colname) pairs plus the entries — dependency-light (no scipy).
jvp_documentjvp_documentfunctionThe J v product document of spec §9.2 for one first-order axis.
lu_filllu_fillfunctionSymbolic (no-pivoting) LU: the pattern plus every fill-in entry.
markowitz_orderingmarkowitz_orderingfunctionGreedy Markowitz ordering (1-based), first minimal cost wins.
parse_jacobian_blocksparse_jacobian_blocksfunctionparse_jacobian_block over a model’s jacobians entry, which is either one block or a list of blocks with distinct wrt (spec §4); returns one (wrt, entries) per block, in…
plan_factorizationplan_factorizationfunctionSymbolic factorization info for the detected structure.
recurrencesrecurrencesfunctionEvery recurrence of the view, in equation order: each observed whose definition reads itself, with its frame and axis read off the definition.
scatter_planscatter_planfunctionBuild the scatter plan of a model’s state Jacobian for layout.
ScatterPlanscatter_plantype
serialize_bandserialize_bandfunctionOne entry of the jacobians block, as a JSON-ready dict (spec §4; a JacEntry2 adds col2 / col2_idx, §4.4).
serialize_planserialize_planfunction
simplify_branchessimplify_branchesfunctionLiteral-condition fold, equal-branch collapse, same-condition pruning.
SitesitetypeA bare variable reference or one symbolic index(v, i…) cell.
stable_jsonstable_jsonfunctionDeterministic JSON: sorted object keys at every level, floats in the reference’s layout (canonical_float), a const node’s value in canonical-number form (_canon_numbers,…
SysViewsys_viewtypeA model or flattened system as the band calculus sees it: its variables, equations and index sets, with subsystems already expanded.
sysviewsysviewfunctionView a model of an EsmFile, or a FlattenedSystem, for differentiation.
transfer_definitiontransfer_definitionfunctionThe transfer recurrence T of rec (spec §4.5): over the frame plus one output index j on the axis, T[o, k, j] = [k == j] + Σ_{self bands} coef · T[o, k − lag, j], so `T[o,…
vjp_documentvjp_documentfunctionThe Jᵀ λ product document of spec §9.3 for one first-order axis (model "VjpEval"), as jvp_document: io["lam"] maps each state to its adjoint input and io["vjp"] each…