Version: dev

term_origin

Stable type · Other

Tier: stable · Kind: type · Topic: Other

JuliaTypeScriptPythonRustGo
TermOriginTermOriginTermOriginTermOriginTermOrigin

Julia

struct TermOrigin
TermOrigin(component, coupling)
TermOrigin(; component, coupling)
TermOrigin(; component=nothing, coupling=nothing)

Who authored one Contribution . Exactly one field is set:

  • component: the full dotted path of the model, subsystem or reaction system whose equation contained the expression ("Atmosphere.Chemistry");
  • coupling: the 0-based index of the coupling entry that wrote the expression itself, in the coupling sequence AFTER coupling_import expansion (the sequence metadata.coupling_rules_applied lists).

Source

TypeScript

type TermOrigin = {
    component: string;
} | {
    coupling: number;
};

Who authored one contribution to a flattened equation. Exactly one of the two keys is present: component is the full dotted path of the model, subsystem or reaction system whose equation contained the expression ("Atmosphere.Chemistry"); coupling is the 0-based index of the coupling entry that wrote the expression itself, counted in the coupling sequence AFTER coupling_import expansion (the sequence metadata.couplingRules lists).

Source

Python

class TermOrigin
TermOrigin(component: str | None = None, coupling: int | None = None)
TermOrigin.to_json() -> dict[str, Any]

Who authored one contribution to a flattened equation (esm-libraries-spec §4.7.5, “Per-term provenance”).

Exactly one of the two fields is set: component is the full dotted path of the model, subsystem or reaction system whose equation contained the expression ("Atmosphere.Chemistry"); coupling is the 0-based index of the coupling entry that wrote the expression itself, counted in the coupling sequence AFTER coupling_import expansion (the sequence metadata.coupling_rules lists).

Members

  • to_json — The corpus form: {"component": path} or {"coupling": index}.

Source

Rust

pub enum TermOrigin {
    Component { component: String },
    Coupling { coupling: usize },
}

Who authored one Contribution to a flattened equation (esm-libraries-spec §4.7.5, “Per-term provenance”).

Serialized untagged, as {"component": "<dotted path>"} or {"coupling": <k>}.

Source · Rust docs

Go

type TermOrigin struct {
	Component string `json:"component,omitempty"`
	Coupling  *int   `json:"coupling,omitempty"`
}

TermOrigin names who authored one contribution to a flattened equation. Exactly one field is set: Component is the full dotted path of the model, subsystem or reaction system whose equation contained the expression (“Atmosphere.Chemistry”); Coupling is the 0-based index of the coupling entry that wrote the expression itself, counted in the coupling sequence AFTER coupling_import expansion (the sequence FlattenMetadata.CouplingRules lists).

Its JSON form is the corpus form: {“component”: path} or {“coupling”: k}.

Source · Go docs