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.

transfer_definition

Stable function · Differentiate a model

Tier: stable · Kind: function · Topic: Differentiate a model

JuliaPythonRust
transfer_definitiontransfer_definitiontransfer_definition

Note: The transfer recurrence T = (I − G)⁻¹ a block’s auxiliary field carries (spec §4.5).

Julia

transfer_definition(rec::Recurrence, obs, recs::Vector{Recurrence}, ctx::EarthSciASTDiff.Ctx, tname::String)
transfer_definition(rec::Recurrence, obs, recs, ctx, tname) -> ASTExpr

The transfer recurrence T of rec (esm-jacobian-spec.md §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, ·, ·] = (I − G)⁻¹ on each line. Lower triangular on each line.

Source

Python

transfer_definition(rec: Recurrence, obs: dict, recs: list[Recurrence], ctx, tname: str)

The 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, ·, ·] = (I − G)⁻¹ on each line. Lower triangular on each line.

Source

Rust

pub fn transfer_definition(rec: &Recurrence, obs: &HashMap<String, Expr>, recs: &[Recurrence], ctx: &Ctx, tname: &str) -> Result<Expr, BandError>

The 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, ·, ·] = (I − G)⁻¹ on each line: ∂V[o, k] / ∂(source at [o, j]). Lower triangular on each line (zero for j > k).

Source · Rust docs