The run configuration
Status: M0 draft, 2026-10-23; M2 additions 2026-10-25 (axes, §6.1; time origin, §1.1; selector attribution, §3.1; refusal codes, §8); M3 additions 2026-11-24 (dt_scope restored, leaf partition keys lanes and reshard, rule 19; spec/partitioning.md). Normative for both implementations (D1, D8). The structure is fixed by schemas/run-config.schema.json
; this chapter gives the meaning, and the rules a schema cannot check (§8). Background is in architecture §3–§5 and decisions D2, D21, D24.
A run configuration says how to integrate one .esm model: how its right-hand side is split into operators, how the operators are scheduled and with which methods, how the macro step is chosen, how the domain is partitioned, at what precision each part runs, and what the adjoint differentiates. The .esm stays free of algorithm names (D2).
1. The document
- A run config is a JSON document (D24) that validates against the schema for its
esm_integratorversion. esm_integratoris the version of this spec, independent of the esm format version. An implementation refuses a version it does not implement.modelis the path of the.esmdocument, resolved relative to the run config’s own location. In conformance cases only,toy:<problem>names a hand-written toy problem instead (spec/toy-problems.md §2).- Precedence (architecture §3.1). The run config’s
modelis authoritative for a run. If the.esmalso carriessolver.external(U1), the two must name each other, or the planner refuses. The planner never writessolver.externalinto derived documents. Solver hints on mounted component files are dropped at assembly (U1), so per-component tolerances are restated here. timeis the run interval (§1.1).- Unknown keys are errors at every level. There is no extension mechanism in 0.1.0.
1.1 The run interval: time
A run integrates over an interval $[t_0, t_f]$. Three sources may give it. In order of preference (D60):
- The caller: an argument of the API call that plans or runs the model, or a command-line option of a tool that does.
- The run config:
time. - The model: the
.esmdocument’ssolver.time_span(U16, in EarthSciAST 0.4.0 and esm 1.3.0; esm-spec §2.2.7), read with EarthSciAST’sresolve_time_span.
The most preferred source that gives an interval gives all of it; start and end are never taken from different sources. If none gives one, the planner refuses (§8 rule 14).
time is {"start": T, "end": T} or {"start": T, "duration": D}. D is a number of seconds or a "<number> <unit>" string (§2.2), but not a parameter name: the interval is fixed when the plan is made, and a parameter can be overridden or differentiated later. T is a time, either:
- a number of seconds of model time; or
- an RFC 3339 timestamp in UTC (
"2019-07-01T00:00:00Z"), meaning the seconds from the model’s time origin to that instant, with no leap seconds.
The time origin is the model’s, by esm-spec §2.2.7: domain.temporal.reference_time, else domain.temporal.start, else 1970-01-01T00:00:00Z (POSIX time). A timestamp from the caller or the run config is converted exactly as EarthSciAST converts a solver.time_span timestamp, so all three sources share one clock (D74; this replaces the M0 rule that fixed run-config timestamps at the POSIX epoch). A model with no temporal anchor whose $t = 0$ is its own start takes numbers. start and end are both numbers or both timestamps; the schema refuses a mix. A timestamp names a real instant: the schema bounds each field and has no second 60 (no leap seconds), and the planner refuses a day the month does not have (§8 rule 14).
The end must be after the start (§8 rule 14). The caller gives a time the same way. solver.time_span numbers are seconds of the document’s independent variable (esm-spec §2.2.7); a timestamp anywhere is refused when the model’s origin field is present but unreadable (§8 rule 14).
Times derived from the interval count from model time zero, not from $t_0$: hit_multiples (§5) and every firing times (§4.9). With timestamps they are therefore aligned to UTC, so a hit_multiples of "1 h" falls on the hour. The one exception is a fixed step.dt, whose macro steps start at $t_0$ (§5).
The planner resolves the interval afresh for every run, from the sources that run has, and records it in seconds in the plan (spec/plan.md §3). The plan does not record which source gave it, so the same interval always gives the same plan. A plan is stale when the interval resolved for a run differs from the one it records.
2. Conventions
2.1 Names
- A qualified name is a model variable, parameter or observed, namespaced by component path with dots:
ssa.nuH,wsm6.dtcld. It is resolved against the flattened model. - An operator name is a plain identifier defined under
operators, or a default operator (§3.3). - The four locality names
pointwise,column,stencilandglobalare reserved. They are never operator names, so wherever a value may be either (§4.5), there is no ambiguity. autoanddefaultare reserved too:autobecause it is the planner’s-choice value (§2.3), anddefaultbecause it is the fallback key ofprecision(§7.1), whose other keys are operator names and node ids. Neither is an operator name or a node id.- Names beginning
default_are reserved for the default operators (§3.3). - A node id is an optional identifier on any schedule node, unique within the schedule. Precision, partition and output may refer to a node by id. The planner gives every node an id in the plan: unnamed nodes get their path from the root (
root,root.0,root.1.every; spec/plan.md §7.1). A run config may write a path-form id only on the node whose path it is.
2.2 Durations
A duration is positive. It is one of:
- a number of seconds;
- a string
"<number> <unit>", with the space optional, where the unit iss,min(60 s),h(3600 s) orday(86 400 s). The number’s digits before any exponent are not all zero, so"0 s"and"0.0 day"are refused by the schema. Its value in seconds is the number parsed as the nearest binary64, times the unit’s seconds (an exact integer), one rounding in all (spec/plan.md §7.1); - the qualified name of a model parameter whose value is in seconds (WRF’s
chemdt). It is read once, at plan time, from the parameter’s default or the value the run supplies, and must be a positive finite number, else the planner refuses (run_config_invalid, at the duration’s key).
The words auto, step and accumulated are reserved and are never parameter names in a duration.
Years and months are not units, because they are not constant durations (D45). Year-scale settings are written in days (eqice’s bed-deformation period is "3650 day"). Calendar-aware periods, if a model needs them, would be a separate construct in a later version.
2.3 "auto"
Where the schema allows "auto", the planner chooses by the rules of architecture §3.5 and records the choice in the plan. Omitting an optional key means the same as "auto" unless the key’s description gives a different default.
3. Operators
An operator is a named group of additive right-hand-side terms, or a step map. The planner forms operators from the flattened model (architecture §3.2 pass 1).
3.1 Term operators: select
{"select": {...}, "bind_dt": {...}}.
- The planner splits every
D(x, t)right-hand side into additive terms: the summands of each U2 contribution (spec/plan.md §5.1.1, D64). Each term carries its provenance, the component (or coupling entry) that authored it, written as a provenance label: the component path,coupling:<k>for the coupling entry at 0-based position $k$, or several joined by+. - A selector matches a term when every key present matches (conjunction):
components: the term’s owner is one of these components or lies under one of them. The owner is the authoring component; for a term a coupling entry wrote, it is the one other component whose variables the term reads, and a term reading variables of two or more other components has none (spec/plan.md §5.1.2, D65). A term with no owner matches when every component it reads lies under one of the listed ones (D162): listing them all in one operator is the author’s attribution, so none is chosen by rule;variables: the term contributes to one of these state variables;locality: the term’s locality (architecture §3.2 pass 2) is one of these;terms: the term’s provenance label is listed exactly.
- Each term belongs to exactly one operator. A term matched by two selectors is an error naming both operators (§8). A term with no owner that no selector matches is an error when any selector uses
components, since its operator would otherwise be chosen by default (§8 rule 4). - Algebraic equations are selected the same way and form algebraic operators, which a
solvenode (§4.10) or acouplednode (§4.3) advances. An algebraic equation is an implicit equation of the flattened model: one whose left-hand side is an expression or a number rather than an unknown, bare, indexed or underD(EarthSciAST’salgebraicstrip class, API_SPEC §5.8). Its residual is $g = \text{rhs} - \text{lhs}$ (D95), and its id and origin are the ones EarthSciAST’s stripped object gives it:<prefix>.residual[j],<prefix>the declaring component’s path orcoupling[k], $j$ 1-based over that origin’s implicit equations in flattened order. For an algebraic equation,componentsmatches its owner (its origin component, or for a coupling origin the one component whose names it reads, spec/plan.md §5.9.1),variablesmatches when it reads a listed variable directly or through observeds,termsmatches its id, andlocalitynever matches. An operator whose selector matches both terms and algebraic equations is refused (rule 20). bind_dt(§4.4) here applies wherever the operator is advanced.
3.2 Map operators: map
{"map": {"<target>": "<observed>", ...}, "bind_dt": {...}}.
- Each target is a state variable or parameter, and each source is a qualified observed that computes its new value. A model writes a map as an observed that reads
dt(eqicestage2/geometry.esm), andbind_dtbinds thatdt. - All sources are evaluated at the pre-map state, then all targets are assigned at once.
- A map that targets parameters is how esm parameter
updaterules run (architecture §3.2 pass 1). - Parameter targets (D146). A target may be a scalar parameter that no
bind_dtbinds and no data source feeds (an array parameter is not yet supported). From the map’s application on, every evaluation of the run reads the new value, in this and later macro steps; the caller’s parameter vector is not changed, and each run starts from it. The map’s sources are evaluated at the pre-map state and parameters, as for state targets, and all targets, states and parameters, are assigned at once. The motivating case is EqWeFiC’s surface layer, which reads its previous step’s friction velocity and fluxes (ust_prev,hfx, …) held over a WRF step and updated at its end. An adjoint through such a map is refused (the tape does not yet carry the parameter’s history); replay reproduces it in Rust and is refused in Julia for now.
3.3 Default operators
Terms no selector matches fall into default operators, one per locality, named default_pointwise, default_column, default_stencil and default_global. Algebraic equations no selector matches fall into one default algebraic operator, default_algebraic. A default operator exists only if it has terms or algebraic equations. It may be named in the schedule like any other.
3.4 Step limits
A step limit (in step.limits or subcycle.limits) is a qualified observed whose value is the largest admissible step in seconds, such as a CFL bound, or {"max": duration}. The planner compiles each observed limit as a limit operator (architecture §3.2 pass 1).
A limit may also be an expression limit (D182), {"name": N, "expr": E}: $E$ is an esm expression over the flattened model’s qualified names (states, parameters, observeds; t; index and faq as in a model), its value the largest admissible step in seconds. $N$ is an identifier without a dot (^[A-Za-z_][A-Za-z0-9_]*$) other than auto, used by no other expression limit of the run config; it names the limit’s document (spec/plan.md §6.8) and is the reason a step it sizes records. $E$ is a scalar when it reads no array outside a faq (an array read with index, or reduced by a faq with no output indices); otherwise every array it reads outside a faq has one shape $S$, and the limit is the minimum over the cells of $S$ of $E$ read cell by cell. A faq with output indices, a makearray, or arrays of two shapes is refused (limit_expr_invalid, rule 12), and a name that does not resolve is name_unresolved (rule 2), at the entry’s expr; a repeated $N$ is limit_expr_invalid at its name. The rule that sizes a step is solver configuration, so it belongs in the run config; the quantities it reads are the model’s observeds. A NaN at any cell is a NaN limit (§5).
3.5 Assembly components: inline
"inline": ["<component>", …] names assembly components: components whose observeds only gather other components’ tendencies, by sums and by factors that do not themselves carry a tendency (D144). EqWeFiC’s EqWeatherScm sums each state’s tendency from the dynamics and physics schemes (du_dt = du_dt_dyn + pbl_dudt, du_dt_dyn = Cor.du_dt + Cur.du_dt + Ray.du_dt), and WRFMoistThetaTendency (Thm) converts the summed physics tendencies of θ and qv into one of θm, $(1 + \epsilon q_v),\dot\theta + \epsilon\theta,\dot q_v$. Without inline, every term of such a model is one summand owned by the assembly, and no schedule can split the processes.
When forming terms (spec/plan.md §5.1.1), the planner replaces each observed of a listed component (an entry covers its subcomponents, as in components selectors) that the term reads in a linear position by its definition, decomposes the result again, and distributes the factors: a summand, the operand of a negation, the one argument of a product that carries an expanding observed, or the numerator of a quotient. Each resulting term is owned by the one component, other than the dependent variable’s and the inline components, whose names it reads (spec/plan.md §5.1.2), so components selectors then split the model by process. An inline observed that expands to two or more summands, read anywhere else (inside a function, a denominator, a power, an ifelse, an index or a contraction, or as one of two or more expanding factors of a product), is refused (inline_not_linear): the term is not linear in it, and distributing would change the physics. Operator references are never expanded: an apply_operator stays one summand wherever it stands. An entry that names no component of the flattened model is inline_component_unresolved (rule 2).
The expansion is exact algebra (distribution and re-association of sums), so the sum of the operators’ right-hand sides is the model’s right-hand side; floating-point sums may differ in the last bits, within the tolerance of spec/plan.md §8.1’s sum check.
3.6 Sampling scales: sampling_scale
"sampling_scale": {"<state>": <scale>, …} gives the planner’s checks a magnitude to sample a state around (spec/plan.md §5.5.1, D152). The planner’s Jacobian validation and Gershgorin bound evaluate each operator at three states drawn around the initial state, element by element, and an element that starts at zero is drawn around 1. For a state whose physical magnitude is far from 1 and that starts at zero, such as a cloud species in kg/kg in a clear column, that draw is outside the model’s domain: 1 kg/kg of rain melting drives the temperature below 0 K. A state named here is drawn around its scale at every element instead, whatever its initial value; every other state keeps the default rule. Keys are states of the flattened model, as plan.json names them (name_unresolved, name_wrong_kind at /sampling_scale/<key> otherwise); values are positive numbers. The scale only moves the sampled states: beyond the run config’s hash, it changes a plan only through a check’s outcome or stiffness rule 4’s classification.
4. The schedule
The schedule is a tree of nodes. Every node advances the model over an interval [t, t+Δ] that its parent gives it; the root receives the macro step (§5). Exactly one combinator key identifies a node’s kind.
4.1 "auto"
"schedule": "auto" asks for the default composition (D21): a sequence of one leaf per locality in the order stencil → column → pointwise, upgraded to strang when the model’s solver.splitting hint asks for it. Each leaf’s options are chosen by architecture §3.5.
4.2 leaf
{"leaf": <operators>, "alg": ..., ...} advances the sum of its operators over [t, t+Δ] with one method.
algnames the method (architecture §5). Tableau coefficients and controller constants are OrdinaryDiffEq’s (D31).Substeps. With
dtomitted, the leaf steps adaptively undercontroland may take any number of substeps; the last substep ends exactly att+Δ. A numericdtgives fixed substeps, the last shortened to land ont+Δ."step"takes exactly one step of size Δ."accumulated"takes one step whose size is the time since this leaf last ran (equal to Δ unless the leaf sits underevery).Methods without an error estimate. Adaptive stepping needs an embedded error estimate.
ForwardEuler,SSPRK33,SSPRK104,WRF_RK3,IMEXEulerandThetahave none, so a leaf using one of them must givedt(D52). Legacy increments use"step". Analgof"auto"withdtomitted resolves to a method that has an estimate, and on a stiff leaf never to SDIRK2, Kvaerno3 or Kvaerno4, whose estimate is unreliable on stiff problems (D59).control:reltolandabstol(a number, or per variable);dt0,dtmin,dtmax;controller(PI, I or PID, with OrdinaryDiffEqCore’s constants per method);dt_scope(global,shardorcell: which DOFs share one controller, spec/partitioning.md §2; an omitted or"auto"dt_scopeiscellfor a pointwise leaf whose storage isblock_diagonaland that has nobind_dt: "leaf"parameter, andglobalotherwise, D17, D97;cellandshardare allowed only on such pointwise leaves, rule 19, and on column leaves once column lane pools are implemented, rule 16);maxiters. Omitted tolerances default to DiffEqBase’s,reltol$10^{-3}$ andabstol$10^{-6}$. An implicit leaf (SDIRK, IMEX Euler, θ-method) uses the tolerances at fixeddttoo, to scale its Newton increments (spec/methods.md §5.2). A non-finite error estimate is a reject. A step belowdtminends the run with a return code instead of hanging (architecture §5.1).jacobian:symbolic(EarthSciASTDiff band models),ad(DifferentiationInterface, Julia only, D38) orfd.linsolve: the W-matrix solver of architecture §6.1, ordense_lu, a dense LU of the whole system, for toy problems and tests only (operator-interface.md §4). The planner resolves an omitted or"auto"linsolveby spec/plan.md §5.5.3; for the hand-written toy problems of M1, which the planner does not plan, the default isblock_lufor ablock_diagonalleaf anddense_luotherwise.banded(M4b, D131) factors each column of a column leaf (operator-interface.md §4, spec/methods.md §4.2) and takes no options; it needs the leaf’s storage to becolumn, and a leaf whose storage cannot be is refused when it is built.block_lufactors each cell of ablock_diagonalleaf, or (D179) each cell block of a leaf of pointwise operators whose states have mixed shapes over the cell axes theircell_blockstructures name (cell_blockstorage, operator-interface.md §4, §8.3); a leaf with neither storage is refused when it is built.sparse_block_luuses the same cell partitions with sparse factors and partial pivoting. It takesrefine(default 0) and currently requires zero refinement sweeps. As an object it carries options:block_lu.pivot(default true),refine(iterative-refinement sweeps for low-precision factors, architecture §8), Krylovrestart,rtol,maxiter,precondandfallback(the preconditioner tried when the first fails to converge).domain:nonnegative("all"or a list of variables),on_violation(reject, the default, D19; orclip), andcheck_stages(also check Rosenbrock stage values). A state whose model variable haslb0 and noub(U18) is nonnegative whether listed or not; a state with any other bound is refused until bounds on states are specified (rule 16,unsupported_state_bounds). Bounds on parameters and observeds that are not asolvenode’s unknowns are ignored (D95).imex(§4.5),implicit_solve(§4.5; onBackwardEulertoo, where"linearized"takes one linearly implicit step, spec/methods.md §6, D166),frozen(§4.6),partition(§6; aleafonly, since acouplednode is not sharded at M2),bind_dt(§4.4) andtheta(the θ-method’s off-centring, in $[0, 1]$).thetais required whenalgisTheta, and a leaf without it is refused; it has no default.Held inputs (D165, spec/plan.md §5.4.1). An observed the leaf’s operators read that belongs to an operator the leaf does not advance (whose
componentsselector covers the observed’s component; one another node advances, or one the leaf only freezes) is held at its value at the start of each of the leaf’s steps, and the leaf’s Jacobian has no derivative through it: WRF’s boundary layer reads the radiative heating and the surface fluxes as fixed inputs. An observed of a component no operator’scomponentsselector covers is never held. The same holds for acouplednode.
4.3 coupled
{"coupled": <operators>, ...} takes the same options as leaf. Without algebraic operators it is the same as a leaf. With algebraic operators it is a semi-explicit index-1 DAE integrated monolithically (D3b, D122; architecture §6.4):
- The system. $u’ = f(u, z)$, $0 = g(u, z)$: $u$ the states the node’s term operators write, $f$ their sum, $g$ the residuals of its algebraic operators and $z$ the algebraic unknowns those residuals read (directly or through observeds), paired with the residuals by structural matching (§4.10, D120). As $M,y’ = F(y)$ with $y = (u, z)$, $M = \mathrm{diag}(I, 0)$ is never assembled (spec/methods.md §14). A
couplednode has nounknownskey: its unknowns are those its residuals read. - Methods. A stiffly accurate Rosenbrock or ESDIRK method:
Rodas3,Rodas4,Rodas5P,TRBDF2,Kvaerno3,Kvaerno4;"auto"resolves toRodas4. Any otheralg, andimex, are refused (rule 20). The error norm runs over $u$ and $z$. - Consistent initialization. At the start of every invocation the node solves $g(u, z) = 0$ for $z$ with $u$ as handed in, starting from the current $z$, since an operator split may hand it a $u$ its $z$ was not solved for.
initializeis the method, written as asolvenode’smethod(§4.10) and defaulting to{"newton": {}, "linesearch": "backtracking", "converged": {"residual": 1e-10}, "maxiter": 100}. A failure ends the node withInitialFailure(spec/methods.md §12). - A bounded unknown (§4.10) in a DAE is refused (
unsupported_dae_bounds, rule 16): a complementarity DAE is not specified. - On a node with two or more algebraic operators, an
initializewithpicard,converged.rel_change, ascalethat names a variable, or a blocklinsolveis refused (unsupported_dae_initialize, rule 16, spec/plan.md §7.1): the frozen documents and block structure they need are per operator. An omitted or"auto"linsolveisdense_luthere.
4.4 bind_dt
bind_dt maps a model parameter to a step size, set before every evaluation that reads it:
"leaf": the size of the step the leaf’s method is actually taking. Withdt: "step"andalg: "ForwardEuler", this reproduces a legacy(x_out − x_in)/dttendency exactly (architecture §4.3)."node": the Δ the enclosing node received."macro": the macro step.
A bound parameter is a constant of the adjoint’s frozen tape, so it cannot appear in adjoint.wrt (spec/adjoint.md §5.8).
4.5 IMEX partitions
imex: {"explicit": ..., "implicit": ...} splits a leaf’s terms between the explicit and implicit parts of an IMEX method. Entries are operator names, or locality names that select the leaf’s terms of that locality. Every term of the leaf must land in exactly one part; explicit may be omitted, meaning “everything not implicit”, or empty when every term is implicit (the form a resolved plan writes, spec/plan.md §7.1). implicit is required, and an empty implicit list is refused. In v1 the only IMEX method is IMEXEuler (D35). Its implicit part is solved to convergence by Newton with the leaf’s linsolve unless implicit_solve: "linearized" asks for a single linearized step (D43); the two coincide when the implicit terms are linear in the state and independent of $t$, since the linearized step evaluates $f_I$ at $(u_n, t_n)$ and the converged step at $(u_{n+1}, t_n + h)$ (for $f_I = -k u + c(t)$ they differ by $h(I - hJ)^{-1}(c(t_n + h) - c(t_n))$). Implementations run the implicit_solve the leaf asks for in every case and never substitute one for the other.
4.6 frozen
frozen: [...] on a leaf, coupled or split_explicit node lists operators whose tendency is evaluated once, at the start of each step of that node, and added as a constant to every stage of that step (WRF rk_addtend_dry). An entry {"every": op, "period": ..., "hold": "tendency"} is re-evaluated only on steps where every fires (§4.9) and held in between (WRF radt).
frozen is an option of the node whose stages it feeds, not a standalone node (D47). Alone in a sequence, a frozen tendency would just be a forward Euler step.
Runtime semantics (D145). On a leaf, at the start of each of its steps (fixed or adaptive, the first step’s size estimate included) the runtime evaluates the sum $c$ of the frozen operators’ right-hand sides at the step’s start state, parameters (with the step’s bindings) and time, and every right-hand side of that step’s stages is the leaf’s own sum plus $c$; its Jacobian is the leaf’s own (a constant has none). A frozen operator’s writes belong to the leaf’s state: a state that only a frozen operator writes is advanced by $c$ alone. In an IMEX leaf $c$ belongs to the explicit part. Since $c$ changes from step to step, a first-same-as-last method does not reuse the previous step’s last stage. An entry {"every": op, "period": P, "phase": φ, "hold": "tendency"} is re-evaluated on a step $[t, t+h)$ that contains a firing time $\phi + kP$ (§4.9’s rule applied to the step), and on the run’s first step of the leaf, and otherwise contributes the tendency of its last firing, held across steps and invocations. A firing on a step attempt the controller rejects is discarded: only an accepted step’s firing becomes the held tendency, and a firing before the leaf’s first accepted step does not count as its first. Replay carries the held tendency across invocations as the forward run does. An adjoint through a leaf with frozen operators is refused (the derivative of $c$ with respect to the step’s start state is not implemented), as are frozen on a coupled or split_explicit node and on a cell or shard scoped leaf, and the every node’s own hold: "tendency" (§4.9); these are the M7 increments still to come.
4.7 sequence and strang
sequence: the children in order, each over the whole[t, t+Δ](Lie–Trotter). With maps and solves among the children this is PISM’s ordered step.strang: for childrena, b:a(Δ/2) b(Δ) a(Δ/2). Fornchildrenc₁ … cₙ:c₁(Δ/2) … cₙ₋₁(Δ/2) cₙ(Δ) cₙ₋₁(Δ/2) … c₁(Δ/2). Each half is a separate invocation with its own step sequence.
4.8 subcycle
{"subcycle": node, "n": k} runs the child k times with Δ/k: substep $i$ starts at $t + i,(Δ/k)$, and the last ends at $t + Δ$ exactly. {"subcycle": node, "limits": [...]} runs it adaptively: each substep is the minimum of the limits evaluated at the substep’s start state and the time remaining, floored at the subcycle’s own resolution when it gives one (a duration, or "none" for no floor, D142), else at step.resolution. The substep sequence is recorded on the tape.
With after (D182), the id of a child of the subcycle’s child sequence that, with every child before it, is a solve node, each substep from $a$ runs those leading solves first, at time $a$, then evaluates the limits on the state they leave, and then runs the sequence’s remaining children over $[a, a + h]$; the leading solves belong to the substep (their tape records carry its $h$). This is step.after (§5, D138) for one subcycle: a model whose step size follows from quantities a solve gives (MOSAIC’s ASTEM sub-step from the uptake rates after the surface equilibrium) sizes each substep from the solved state, not the previous substep’s. after needs limits; naming anything else is step_after_invalid (rule 12), at the subcycle’s after.
4.9 every
{"every": node, "period": P, "phase": φ, "hold": ...}.
- The node fires in an invocation over
[t, t+Δ]when someφ + kP,k ≥ 0, lies in[t, t+Δ). - Under
step.limits, firing times are tstops (§5), so a firing time is always the start of a macro step. - Under a fixed
step.dt, firing times are not tstops, andPandφneed not be multiples ofdt(D50). The node fires on the macro step that contains the firing time, as WRF fires radiation everyradtand chemistry everychemdton whichever step crosses the period. If one macro step contains several firing times, the node fires once. - When it fires, the child runs over an interval of length Δₑ ending at
t+Δ, where Δₑ is the time since the end of the previous firing (or since the start of the run). This is how WRF-Chem advances chemistry bychemdtand how PISM’s bed deformation accumulates its step (D48). Bindings with"node"see Δₑ. - When it does not fire, it is the identity.
hold: "tendency": at a firing, the child’s tendency is evaluated and then added as a constant to the right-hand side of every leaf among the enclosing node’s other descendants, until the next firing. The child itself is not advanced. Its child must then be a singleleaf.
4.10 map and solve
{"map": op}applies a map operator (§3.2): its sources are evaluated at the state, parameters and time at the start of the node’s interval, with the parameters itsbind_dtbinds set (node: the node’s Δ), and then every target is assigned at once. A plan writes the operator’sbind_dton the node (spec/plan.md §7.1).{"solve": op, "unknowns": [...], "method": {...}, "warm_start": ...}solves the algebraic operatoropfor the listed unknowns with everything else frozen (architecture §6.3).methodholds exactly one ofnewton(withinexact: truefor an inexact Newton–Krylov step with Eisenstat–Walker forcing, preconditioned by the node’slinsolve; spec/methods.md §15.3, D126),picard(with itsfreezelist, the observeds treated as constants when differentiating the residual for the iteration; this is the only place freezing is written, D25, D51)ptc(pseudo-transient continuation) orrelax(explicit per-element relaxation, MOSAIC’smesa_ptc, with itscapacity,measure,snapandstopobserveds; spec/methods.md §15.9, D173), pluslinsolve,linesearch,anderson(memory depth),converged(residualtolerance, orrel_changeof a named observed withtoland optionallynorm:"l2", the default, or{"l1_by": X}withXone of the observed’s index sets, PISM’s Picard test, spec/methods.md §15.2, D137),maxiter,on_maxiter(fail, the default, oraccept,relaxonly: an attempt that reachesmaxiterkeeps its last iterate, D173),scaleandrecover.ptctakesdt0andgrowth, a number above 1 or"uncapped"(spec/methods.md §15.4).recoveris a ladder tried in order on failure: under-relaxation, scaling a regularization parameter by a factor up tomaxtimes,revert_warm_start, and{"method": M}, an attempt with another method (newtonorptcwith its options,linesearch,maxiter; spec/methods.md §15.7).warm_startisprevious(the last converged value, the default) orinitial.- Bounded unknowns (D95). An unknown whose model variable carries
lborub(U18) makes the solve bound-constrained; the run config does not state bounds, since a bound is part of the model’s physics: the model’s0 ~ gholds only off the bound. Either bound may be absent. A bound is a number, applied to every element of an array unknown, or a reference to another variable, parameter or observed of the model, one bound per element. EarthSciAST (esm 2.1.0) checks that a reference resolves, is a scalar or of the unknown’s shape, and does not depend on the bounded variable itself through observeds; a bound that is, or depends through observeds on, another unknown of the samesolvenode passes those checks but would move during the solve, so the planner refuses it (rule 18). A referenced bound is evaluated once per invocation, from the frozen state and parameters (and again after arecoverscale_paramaction changes a parameter, from the scaled ones, spec/methods.md §15.7): a parameter, or an observed (its value reaches the runtime through the operator’s frozen residual document, spec/plan.md §6.5). An observed bound may read states (D171), since every state other than the node’s unknowns is frozen during the solve, as a scale may (D169): MOSAIC’s MESA caps each solid salt at the most the bin’s totals can form, which move with the particle composition from one invocation to the next. A bound that is a state itself is refused (unsupported_bound_reference, rule 16; a model states it as an observed), and so is an observed bound that depends on a state, directly or through other observeds, in a run withadjoint: the reverse pass carries a bound’s cotangent to the parameters only (spec/adjoint.md §4.6), and its derivative with respect to the state is a later addition. An observed that depends on no state is a state-free observed (D125). An element whose lower bound exceeds its upper bound fails the invocation, naming the node, the unknown and the element, and norecoveraction applies. With $g$ the operator’s residual, its component $g_i$ paired with the unknown’s component $z_i$ asptcpairs them (the pseudo-time rate of $z_i$ is $g_i$, below), the solution is the solution of the mixed complementarity problem $$l_i \le z_i \le u_i, \qquad g_i(z) = 0 \text{ if } l_i < z_i < u_i, \qquad g_i(z) \le 0 \text{ if } z_i = l_i, \qquad g_i(z) \ge 0 \text{ if } z_i = u_i,$$ equivalently $z = \Pi_{[l,u]}\big(z + g(z)\big)$, the steady state of the projected pseudo-time flow $dz/d\tau = g(z)$. Unbounded unknowns of the same node keep $g_i = 0$. The motivating case is a solid phase that cannot be negative: MOSAIC’s MESA solid salts (EqWeFiC), whose rate $S_s - 1$ dissolves an undersaturated salt until none is left, so the equilibrium is $E_s \ge 0$, $S_s \le 1$, $E_s (S_s - 1) = 0$; an upper cap (a salt’s solid amount cannot exceed what the bin’s totals can form) is a referenced bound that reads the state (D171), as EqWeFiC’s document states it. A leaf’sdomain.nonnegative(§4.2) does not express this: it keeps a time integration’s states nonnegative, and asolvenode has no states.- Scale (D125). A method’s
scalemaps unknowns of the node to a positive scale: a number, applied to every element, or the name of a parameter or of an observed that does not depend on an unknown of the node, a scalar or of the unknown’s shape, one scale per element; an unknown it does not name has scale 1. The iteration works on the scaled residual $D g$ (spec/methods.md §15.1), so the complementarity reformulation $z - \operatorname{mid}(l, z + D g, u)$ compares $z$ with a rate of the same units: MOSAIC’s MESA solid salts $E_s$ (amounts) with $S_s - 1$ (dimensionless), scaled by each salt’s amount in the bin, the time scale MOSAIC’s ownmesa_ptcsteps each salt by. The convergence test and the active set use the unscaled residual, so a scale changes the path, never the solution or the tolerance. A referenced scale is evaluated once per invocation, as a referenced bound is, at the node’s frozen state: an observed scale may read states (D169), since every state other than the node’s unknowns is frozen during the solve, as MOSAIC’s MESA scale reads each salt’s total electrolyte amount, which moves with the particle composition from one invocation to the next; an element that is not positive and finite fails the invocation, naming the node, the unknown and the element (a model states a floor itself if a scale can vanish). A key that is not an unknown of the node (asolvenode’sunknowns, acouplednode’s algebraic unknowns forinitialize) isname_wrong_kind(rule 2), a value that names neither a parameter nor an observed likewise; a value that is an observed depending, directly or through other observeds, on an unknown of the node (it would move during the solve), or whose shape is neither scalar nor the unknown’s, issolve_scale_invalid(rule 18). Acouplednode’sinitializetakes no referenced scale (unsupported_dae_initialize). - The sign of $g$. A bound makes the residual’s sign part of the problem (at a lower bound $g_i \le 0$), so it is fixed: the residual of an algebraic equation
lhs ~ rhsis $g = \text{rhs} - \text{lhs}$, and a model states a bounded unknown’s rate $g$ as the constraint0 ~ g(EqWeFiC’scouplings/mosaic_mesa_equilibrium.esmwrites0 ~ gwith $g_s = S_s - 1$).ptcuses the same sign with or without bounds: it integrates $dz/d\tau = g(z)$ by linearly implicit Euler pseudo-steps of size $\delta$, $(\delta^{-1} I - g_z), s = g$, $z \leftarrow z + s$, which settles only where the flow is stable. Without bounds,newtonandpicardfind the same zeros whatever the sign; with bounds, a residual of the wrong sign flips the complementarity conditions and gives a different, wrong solution. Which component of $g$ pairs with which component of $z$ is the node’s pairing: a perfect structural matching of its residual blocks with its unknown blocks, chosen by spec/plan.md §5.9’s canonical rule (D120), element $i$ of a residual with element $i$ of its unknown; the planner MUST NOT pair a bounded unknown with an equation it has negated or rearranged, and refuses a node whose bounded unknowns could be paired more than one way (solve_pairing_ambiguous, rule 20). The planner also checks the sign (rule 18,solve_bounds_sign): at each state the operator’s band check samples (spec/plan.md §8.1), every bounded component’s diagonal Jacobian entry $\partial g_i / \partial z_i$, $g_i$ the residual element paired with $z_i$, MUST NOT be positive. A problem with a unique solution for every box ($-g_z$ a P-matrix) has a negative diagonal, so the check refuses no correctly signed model of that kind; it does not catch every wrong sign. Informative: a component whose $g_i$ is identically zero over the region a solve visits (a salt the model does not let exchange) has a zero Jacobian row:ptcleaves it at its warm start, andnewtonneeds it removed from the unknowns or regularized. - Relaxation (D173, D174).
relaxsteps each element by a fraction of itscapacity, adapted from itsmeasure, stops each block (the groups of itsgroupindex sets, D174, else the operator’s block structure) on itsstopobserved or when its measure is withinconverged.residual, and withon_maxiter: "accept"keeps the iteratemaxiterpasses reach (spec/methods.md §15.9): MOSAIC’s MESA, whose 80-pass iteration ends unconverged in about one call in twenty and whose result is the iterate it reaches, not the equilibrium. Its observeds may read the unknowns. A map key that is not an unknown of the node isname_wrong_kindand a value that is not an observed likewise (rule 2); a value whose shape is neither scalar nor the unknown’s, acapacitythat leaves an unknown out, agroupindex set named twice or not in the shape of every unknown of the node (a name that is not an index set isname_unresolved),relaxwithscale,step_scopeorconverged.rel_changeor in acouplednode’sinitialize, andon_maxiter: "accept"with another method aresolve_relax_invalid(rule 18); a run withadjointis refused (unsupported_relax_adjoint, rule 16). - Step scope (D172).
step_scopeon asolvenode’s method (global, the default, orblock) sets whether the step control is one for the whole node or one per block of the node’s linear solve: underblock,newton’s backtracking line search chooses a step length per block, andptckeeps a pseudo-time step per block (spec/methods.md §15.3, §15.4). The blocks are the plan’s (block_lu,sparse_block_lu), else one block of every unknown, which isglobal. Arecoverstep{"method": M}keeps the node’sstep_scope, as it keeps itsscale. The motivating case is MOSAIC’s MESA on a column (EqWeFiC): 472 independent section blocks, where one step length for all lets the slowest section set every section’s step. - Methods. Every method first projects its starting iterate (the warm start, or the model’s initial value under
warm_start: initial) onto the box, so every iterate lies in it.ptcprojects every pseudo-time step onto the box;newtonsolves the semismooth reformulation $r(z) = z - \operatorname{mid}\big(l,, z + g(z),, u\big) = 0$ with an element of its generalized Jacobian (the rows of components wheremidtakes a bound replaced by the identity’s);picardprojects every iterate. - Convergence. A bounded solve converges on
converged.residual, measured on $r$ in the norm an unbounded solve’s residual uses; on a component strictly inside its box $r_i = -g_i$.converged.rel_changeis refused for a solve with a bounded unknown (rule 18): a small change in an observed does not show that the complementarity conditions hold. - The active set. With $\epsilon$ the
converged.residualtolerance, a component of the converged iterate is at its lower bound when $z_i + g_i \le l_i$ (the branchmidtakes) or when $z_i - l_i \le \epsilon$ and $|g_i| \le \epsilon$; at its upper bound likewise, $z_i + g_i \ge u_i$, or $u_i - z_i \le \epsilon$ and $|g_i| \le \epsilon$ (the lower bound wins when both hold); otherwise it is free. A component at a bound is set to the bound exactly, which moves it by at most $\epsilon$ since $|r_i| \le \epsilon$, and the converged $z$ is stored so. A component at a bound with $|g_i| \le \epsilon$ is degenerate (not strictly complementary, to tolerance): the solution map has a kink there. The tape records, per bounded unknown, the elements at each bound and the degenerate ones (spec/tape.md §2), and the adjoint differentiates on them (spec/adjoint.md §4.6). Whether an element is degenerate can differ between implementations at the last bits; a degenerate element’s derivative is one-sided either way, and cross-language comparison of a gradient that depends on one is not required.
- Scale (D125). A method’s
4.11 split_explicit
WRF’s RK3 (Wicker–Skamarock: Δ/3, Δ/2, Δ) on slow, with fast advanced by substeps forward–backward substeps inside each stage, vertically implicit with epssm off-centring, and frozen tendencies added to every stage (architecture §4.3). The arithmetic is spec/methods.md §17 (D175); the Rust runtime runs it, its adjoint (spec/adjoint.md §5.9) is not implemented, and the Julia planner and runtime refuse the node (unsupported_split_explicit, rule 16).
{"split_explicit": {"slow": ["advection", "coriolis"], "fast": ["acoustic_uv", "acoustic_wp"],
"alg": "WRF_RK3", "substeps": 6,
"fast_alg": {"forward_backward": {"vertical": "implicit", "epssm": 0.1}},
"frozen": ["pbl", {"every": "radiation", "period": "10 min", "hold": "tendency"}],
"hold": ["Dyn.c2a", "Dyn.alt", "Dyn.mut"],
"lag": ["Dyn.p_m1"], "carry": ["Dyn.mudf"],
"scalar": ["moisture"], "average": ["Dyn.ru_m", "Dyn.ww_m"],
"scalar_last": ["moisture_pd"], "step_start": ["Dyn.q_n", "Dyn.mu_n"]}}
sloware the operators evaluated once per stage, at the stage’s predictor state;fastthe operators each substep advances, in the order listed. That order is the forward–backward order: each fast operator advances its own states from the state the fast operators before it in the list left in the same substep, so a model writes WRF’s acoustic step as an operator for the horizontal momentum (forward, reading the old pressure), then one for the mass, potential temperature, vertical velocity and geopotential (backward, reading the new momentum). No operator is both slow and fast, and no state is written by two fast operators (rule 22). The model decides what is fast: the integrator reads no variable names.substepsis WRF’stime_step_sound$n_s$, the substeps of a whole step Δ. It is even (rule 22): the second stage takes $n_s/2$ substeps of $Δ/n_s$, which span $Δ/2$ only when $n_s$ is even. (WRF itself computes an even count when it chooses one, and with an oddtime_step_soundits second stage spans $(n_s-1)Δ/(2n_s)$.)fast_alg.forward_backward: withvertical: "implicit"(the default), a fast operator that reads one of its own states takes a θ-step with $θ = (1 + \texttt{epssm})/2$ over its own states, the other fast states held;epssmdefaults to WRF’s 0.1. A fast operator that reads none of its own states takes a forward step, which is what its θ-step is. Withvertical: "explicit"every fast operator takes a forward step. The θ-step is implicit in whatever couples an operator to its own states; for WRF’s acoustic step that is the column (w–φ), so the operator is column-local and its Jacobian banded.frozen(§4.6): evaluated once at the step’s start state $y^n$ and added to the slow tendency of every stage.hold(D176): observeds, by qualified name, that the fast operators reading them take at each stage’s predictor $y^*$, once per stage, as WRF’ssmall_step_prepandcalc_coef_wtake the acoustic coefficients: each is a held input (spec/plan.md §5.4.1) of every fast operator whose terms read it, directly or through observeds, and is a constant of the stage’s substeps and of the fast operators’ Jacobians (spec/methods.md §17). Each entry is an observed, and some fast operator reads it (rule 22). The fast operators read any observed absent fromhold,lagandcarryat the substep’s state. The node holds nothing by the ownership rule of spec/plan.md §5.4.1.lag(D177): observeds, by qualified name, that the fast operators reading them take a substep late: at substep $s > 1$ of a stage, the value the observed had at the start of substep $s-1$; at a stage’s first substep, its value at that substep’s own start. This is WRF’s divergence damping and external-mode filter:calc_p_rhoforms $p’’ + \texttt{smdiv}(p’’ - p_{m1})$ with $p_{m1}$ the pressure it computed one substep before (and $p_{m1} = p’’$ when it initializes the small steps,step == 0), whileadvance_uv’s external-mode filter readsmudf, which is not lagged in this sense (seecarry). A model writes the lagged quantity as an observed that equals the current one (p_m1 = p''), so that withoutlag, or under any other schedule, the difference vanishes and the term is off. Each is a held input (spec/plan.md §5.4.1) of every fast operator whose terms read it, ashold’s are, and is computed with that operator’sholdvalues of the stage: a lagged observed that reads aholdentry reads it at the stage’s predictor, as WRF’sp_m1is formed with the stage’sc2aandalt. Each entry is an observed, some fast operator reads it, andholddoes not also name it (rule 22).carry(D177): observeds, by qualified name, that the fast operators reading them take from the end of the step’s previous substep: at every substep but the step’s first, the value the observed had at the end of the substep before it, across the step’s stages (the first substep of stages 2 and 3 reads the last substep of the stage before, although the stage restarted from $y^n$); in the step’s first substep, 0. This is WRF’smudf:advance_mu_tsets it to the column mass’s tendency in each substep,advance_uvfilters with $-\texttt{emdiv},Δx,∂_x(\texttt{mudf})$ in the next one, andsmall_step_prepzeroes it only whenrk_step == 1. A model writes the carried quantity as an observed equal to the current tendency (mudf = dmu_dt); withoutcarrythe filter reads the substep’s own tendency, a different scheme. A carried observed is a held input of the fast operators reading it and is computed with theirholdvalues of the stage, as a lagged one is. Each entry is an observed, some fast operator reads it, and neitherholdnorlagalso names it (rule 22).scalar(D178): operators evaluated once per stage, after the stage’s substeps, at the stage’s predictor $y^*$, whose states are then updated as the slow-only states are, $y_i \leftarrow y^n_i + Δ_k R_i$ (spec/methods.md §17, step 2.3). This is WRF’s moist and passive scalar transport:rk_scalar_tendruns after the acoustic loop, on the stage’smoistat its predictor, with the mass fluxes the acoustic substeps averaged. A scalar operator is neither slow nor fast, and writes no state a fast operator writes (rule 22). Withoutaveragea scalar operator is the same as a slow one evaluated after the substeps, which it equals in value.average(D178): observeds, by qualified name, that the scalar operators reading them take at their mean over the stage’s substeps: the observed is evaluated at the end of each substep, at the fast states the substep left and every other state at the stage’s predictor $y^*$ (where WRF’s moist scalars stand through the acoustic loop), with nothing held, and the $m_k$ values’ mean is handed to the scalar operators as a held input. This is WRF’ssumflux:ru_m,rv_mandww_maccumulate the coupled momentum and the vertical mass flux after each substep and are divided by the substep count, so that the scalars are carried by the same mean mass flux as the column mass, which keeps them consistent with it (a constant mixing ratio stays constant). A flux that is nonlinear in the velocity (upwinding, a limiter) is not its substeps’ sum, so the mean must be formed before the scalar operator reads it, not after. Each entry is an observed, some scalar or last-stage operator reads it, none ofhold,lagandcarryalso names it, and its definition reads none of their entries, directly or through observeds (rule 22): it would read such an entry’s current value, not the one the fast operators took.scalar_last(D181): operators evaluated in place of thescalaroperators on the step’s last stage (the stage of Δ from $y^n$), and nowhere else; they write exactly the states thescalaroperators write (rule 22), and are evaluated as those are, after the substeps, at the stage’s predictor, with theaveraged inputs. This is WRF’s positive-definite transport (moist_adv_opt = 1):rk_scalar_tendcallsadvect_scalar_pdinstead ofadvect_scalarwhenrk_step == rk_order. The list may namescalaroperators too: the last stage evaluates exactly the operatorsscalar_lastlists. That lets a model write the last stage’s scheme as a correction to the scalar one, authored by its own component (anoperator_composewith atranslatemakes it a contribution to the same state): withscalar_last= the scalar operators plus the correction’s, the last stage evaluates the corrected tendency, and a plain (unsplit) run of the model integrates the corrected one throughout (EqWeFiC’s moist document writes WRF’s positive-definite advection as its correction toadvect_scalar).step_start(D181): observeds, by qualified name, that the scalar and last-stage operators reading them take at the step’s start state $y^n$, evaluated once when the step begins, with nothing held, and the same in every stage. WRF’s positive-definite limiter reads the step’s starting mixing ratio and column mass (scalar_old,mub + mu_1), and so do the outflow terms of its open boundaries inadvect_scalar_pd. Each entry is an observed, some scalar or last-stage operator reads it, and none ofhold,lag,carryandaveragealso names it (rule 22). Each scalar operator’sbind_dt(§4.4) applies only to that operator. The node’sbind_dtsets defaults for its scalar operators, and the operator’s own binding overrides a default for the same parameter. Forleafandnode, the scalar tendency and average samples use the stage’s $Δ_k$, while a step-start sample uses the split invocation’s full Δ. Amacrobinding uses the macro step in every sample and tendency.finish_last(D183): operators evaluated once, at the last stage’s predictor $y^_3$ (the stage of Δ from $y^n$), whose increment over that stage, $Δ,F(y^3)$, is added to the states they write after the stage’s substeps (and after its scalar update), and nowhere else; they may write fast states. This is where WRF’ssmall_step_finishtakes the previous step’s microphysics heating back out of θ onrk_step == rk_order:rk_addtend_dryadds $(c_1μ_t + c_2),h\text{diabatic}$ to θ’s tendency in every stage, so the acoustic substeps feel last step’s heating, andsmall_step_finishsubtracts $Δ,(c_1μ_t + c_2),h_\text{diabatic}$ at the end of the last stage, $μ_t$ the column mass of that stage’s start, so θ itself gains it only once (from the microphysics). Amapafter the node can only read the step’s end state, whose column mass is not that one. Afinish_lastoperator is a term operator and must be exclusive of the node’sslow,fast,frozen,scalarandscalar_lastlists (rules 20 and 22). It reads the predictor $y^*_3$ directly. Its ownbind_dt(§4.4) gives the split invocation’s full Δ forleafandnode, or the macro step formacro.- The node takes one step per invocation, of the invocation’s Δ; it has no error estimate.
4.12 Reading a preceding node’s increment
A leaf, coupled, map, or solve that is a child of a sequence may give uses_increment:
{
"map": "move_sections",
"uses_increment": [
{"from": "condensation", "states": {"Remap.growth": "Aerosol.mass"}}
]
}
Each entry names an earlier child of the same sequence by its resolved id. Its states object maps model parameters to model states. A parameter must have the same ordered index sets as its source state (or both must be scalars). Several entries can refer to different children. Each parameter can be bound once per consumer and must be neither data-fed nor bound by bind_dt in that consumer. A consumer’s recover ladder cannot name an increment-bound parameter in scale_param, including the ladder in a coupled node’s initialize method.
For each element, the runtime subtracts the state just before the source child from the state just after it, in binary64. The difference is the amount changed over that child’s invocation, including all of its inner steps. An unchanged element gives zero. Intervening children do not contribute. The binding is held fixed throughout the consumer’s invocation, including all of its substeps, stages and solves. The consumer uses the bound value in its document evaluations and in any solve bounds or scales that reference the parameter directly. The parameter’s ordinary value still applies elsewhere, including during model initialization, evaluation of step limits outside the consumer and checkpointing. A subsequent invocation of the sequence, including one inside a subcycle, computes its own increments. A solve executed in the leading prefix of step.after is part of the same root sequence invocation.
For example, a remap can consume the mass gained or lost across the entire condensation operator, even when that operator uses adaptive substeps. An adjoint for any schedule using these bindings is refused with unsupported_increment_adjoint.
5. The macro step: step
At most one of:
dt: a fixed macro step. The macro steps start at $t_0, t_0 + \texttt{dt}, \ldots$, and every tstop must fall on one of them (§8 rule 9), except inside the macro step of a root leaf orcouplednode that lands on stops itself.limits: Δ is the minimum of the limits evaluated at the macro step’s start state, and the distance to the next tstop. Withafter(D138), the id of a child of the rootsequencethat, with every child before it, is asolvenode, the limits are evaluated instead after those leading solve nodes have run, at the macro step’s start time, on the state they leave (PISM computes its step after the stress balance, from the new velocities); the macro step then runs its remaining children over $[t_a, t_a + Δ]$, and the leading solves count as part of it (their tape records carry its Δ).afternaming anything else isstep_after_invalid(rule 12). An observed limit is evaluated from its limit document (spec/plan.md §6.8) at the macro step’s start state, parameters and time;+Infrestricts nothing; a limit that is NaN ends the run withDtNaN, and one that is zero or negative withDtLessThanMin(spec/methods.md §12). So does a step under limits (the macro step’s, or an adaptive subcycle’s substep) that is not a stop step and is too small to move the clock, $t + h = t$ in floating point: it would never advance $t$.- Neither: allowed only when the schedule’s root is a single adaptive
leaforcouplednode (D49). That node’s accepted steps are the macro steps; it steps adaptively under its owncontroland lands exactly on every tstop. Omittingstepentirely is the same as{}.
Then, for both:
tstops are the times named by
hit:forcing_refresh: the times any forcing provider’s two-record bracket changes, which start forcing epochs (architecture §7.5). For a provider that brackets consecutive records these are its record timestamps. This is the only forcing hit source (D46);output,restart: the output and restart times;events: preset and periodic event times of the model.
The observation times of the adjoint functional (spec/adjoint.md §2.1) are always tstops, whether or not
hitnames their source. Underlimitsor with neither key,everyfiring times (§4.9) are tstops too. The interval is(t₀, t_f], from §1.1, so a boundary att_fis hit (architecture §7.5).hit_multiplesadditionally makes every multiple of a duration a tstop.resolutionfloors Δ to a multiple of it, and Δ is never less than oneresolutionunless a tstop is closer.The step under
limits, exactly (D132). From the macro step’s start $t_a$: $L$ is the smallest value among thelimitsentries (an observed’s value, or a{"max": d}’s $d$), compared in written order with<so the first entry achieving it is its source; withresolution$r$, $L \leftarrow \max(r,\ r \cdot \lfloor L / r \rfloor)$ in binary64. $\tau$ is the first tstop after $t_a$ ($t_f$ included). The step is $h = \min(L, \tau - t_a)$, its reason $L$’s source (the observed’s qualified name, or"max") when $L \le \tau - t_a$, else"tstop"; then spec/methods.md §10’s stop rule with $h$ and $t_{\text{stop}} = \tau$ decides whether the step lands on $\tau$ (it ends at $\tau$ exactly, the reason unchanged when it was not"tstop"). An adaptivesubcyclesubstep (§4.8) is the same with the subcycle’slimits,step.resolution, and the end of the subcycle’s interval in place of $\tau$, its reason"remaining"in place of"tstop".Ties. Each macro step records the reason for its size: the first source achieving the minimum, taking the entries of
limitsin the order listed (a{"max": ...}entry counts at its own position in the list), then the next tstop. The reason is deterministic, so two implementations agree on it (PISM bugs.md #11). Adaptivesubcyclesubsteps (§4.8) record their reason by the same rule over the subcycle’slimits, then the time remaining.Fixed boundaries. Under
dt, macro step $k$ runs over $[t_0 + k,\texttt{dt},\ t_0 + (k+1),\texttt{dt}]$, each end computed by multiplication, and the last ends at $t_f$. A tstop $\tau$ falls on a boundary $b$ when $|\tau - b| \le 100,\epsilon(\max(|\tau|, |b|))$, the landing tolerance of spec/methods.md §10; that boundary is then $\tau$ exactly (the earlier, if two fall on it). So withdt0.1 an output at 0.3 falls on $3 \times 0.1 = 0.30000000000000004$, and the state is reported at 0.3. A macro step is the last when, from its start $t_a$, the stop rule of spec/methods.md §10 with $h = \texttt{dt}$ and $t_{\text{stop}} = t_f$ makes it a stop step; the number of macro steps is never computed by dividing. Sodt0.1 on $[0, 0.3]$ takes three macro steps, although $(0.3 - 0)/0.1 = 2.9999999999999996$.The macro step has no error control of its own (D49). Leaves adapt inside it. A schedule whose root is a single adaptive leaf behaves like an ordinary adaptive integration, because the planner then gives that leaf’s accepted steps the role of macro steps.
6. Partition
6.1 Axes
axes: {"horizontal": [h_1, h_2], "vertical": v, "faces": {f: a, …}} names the roles of the model’s index sets (D67). faces (optional, D105) maps each face index set to the horizontal or vertical axis it staggers off, cell $i$ owning face $i$, its low face, so a face set has one element more than its axis; locality analysis pairs a face set with its axis (spec/plan.md §5.2.1, §5.2.3), and the planner warns about an undeclared index set one element longer than an axis. Locality analysis (architecture §3.2 pass 2) reads offsets on the vertical axis as column reach and offsets on horizontal axes as stencil reach; an index set a state uses that axes names neither horizontal nor vertical lies inside a cell, and a coupling along it, an offset or a sum over the whole axis, keeps the class (D123; MOSAIC’s salts inside a size bin); ranks and tiles divide h_1 by their first entry and h_2 by their second. Defaults: no vertical axis, and every index set that shapes a state variable, other than the vertical one and the face sets faces names (D148), horizontal in the model’s index_sets order. horizontal: [] declares that the model has no horizontal axis (a single column, D148); every index set other than the vertical one and the face sets then lies inside a cell. A model without a vertical axis has no column operators. The planner refuses an index set that does not exist, one named twice, or more than two horizontal axes after defaults (spec/plan.md §5.2.1).
6.2 Decomposition
ranks: the 2-D grid of MPI ranks over the horizontal axes. Decomposition is horizontal only (D20).tiles: the 2-D grid of thread tiles within each rank.shards: shard counts per operator or node id, for pointwise and column leaves. A leaf’s ownpartition(shards, orshard_sizein lanes) overrides it. An entry for acouplednode, or for an operator acouplednode names, is refused (spec/plan.md §7.4).- A leaf’s own
partitionalso takeslanes, the lane capacity of its lane pools (omitted: the runtime chooses; it changes no result; ignored on a stencil or global leaf, which has no lanes), andreshard,"none"(the default) or{"every": k}, which re-composes adt_scope: shardleaf’s shards every $k$ macro steps (spec/partitioning.md §6.2, §10.1). - The number of threads is not a run-config key: it is a run-time option of the runtime, since no result depends on it (spec/partitioning.md §4, D99).
The planner derives halo widths and shard sizing (architecture §3.2 pass 7). Results are bitwise identical for a fixed decomposition (D10); under dt_scope cell and global they are bitwise identical for every shard, tile and thread count within a rank (spec/partitioning.md §9.1, D97).
7. Precision, adjoint, output, restart
7.1 precision
Precision roles per leaf (architecture §8, D18, D29). Keys are default, operator names or node ids (default is never either, §2.1); a more specific key overrides default role by role.
| Role | Allowed |
|---|---|
state, rhs | f32, f64. Must equal a declared element_type; free where the document leaves it unspecified (U14). rhs ≥ state. |
jacobian, factors, tables | f16, bf16, f32, f64, under any declaration. |
Time, dt, error norms, reductions and adjoint accumulators are always f64 and are not configurable. The planner refuses a low-precision jacobian or factors with a classical Rosenbrock method (Rodas) unless overridden (architecture §8).
7.2 adjoint
functional: the reduction (meanorsum) of one quantity, restricted bywhere(index-set name → 1-based index or inclusive range),overthe run:time(the integral term, spec/adjoint.md §2.1),final(the end state), orsaveat(a point term at each output time after $t_0$). Fortime,integrate_innames the leaf, by node id, that integrates the term; the default is the last leaf of the macro-step schedule (D39).wrt: what to differentiate with respect to.params:numericis every numeric scalar parameter;params:<pattern>,fields:<pattern>(gridded array parameters) andforcing:<pattern>(forcing fields, accumulated per provider record, D5) take a glob over qualified names, where*matches any characters including dots;u0is the initial state. A parameter bound bybind_dtis not differentiated: a pattern such asparams:numericorparams:*that matches one gives it a zero entry, while an entry that names it is refused (§8 rule 11).checkpoint:every(macro_stepor a count of macro steps),storelevels, and theschedulethe planner computes (D34):all,revolveormultilevel, withsnapshotsslots.
The math is in adjoint.md
.
7.3 output and restart
- Each
output.sinksentry selects a local Zarr v3 append stream withpath,format: "zarr"(the default), an optional relativegroup, optional qualifiedvariables, and optionalsaveat. Omitgroupto write at the store root. Group names are slash-separated components matching[A-Za-z0-9_-][A-Za-z0-9._-]*, excluding names beginning with__and names reserved by the writer. Sinks sharing a store need distinct groups. Relative store paths resolve against the run config’s directory. - A grid is the set of spatial index axes in a prognostic state’s shape, with declared face axes mapped to their cell axis when comparing grids. Scalars belong to the single spatial grid when there is one and otherwise use the empty grid. A model with one grid defaults to all prognostic states. A model with multiple grids requires a variable selection per sink, and every selection must belong to one grid.
- Each sink writes the initial state and accepted samples at its own
saveat, falling back tooutput.saveatthen to the final time. When a sink has a configured cadence,step.hitmust includeoutput. All output times are tstops and follow the fixed-step alignment rule (§5, §8 rule 9). A cadence is a duration $d$. Its times are the binary64 products $k,d$ ($k$ an integer), counted from model time zero (§1.1, D74), in $(t_0, t_f]$. A multiple within the landing tolerance of $t_f$ uses $t_f$ exactly. A multiple within the tolerance of $t_0$ is excluded. If no multiple lands on $t_f$, the cadence omits $t_f$. For example, $d = 0.1$ on $[0, 0.3]$ gives 0.1, 0.2 and 0.3. Sink times within the landing tolerance of a shared stop use its accepted time. The planner refuses a cadence whose successive records fall within one landing tolerance. At runtime each stream’s resolved stops must be distinct. - A planned run with sinks reports
output.saveatin memory by default, with the same final-time fallback and the initial state. Sink-specific samples are streamed. Setoutput.stream_only: trueto retain only the initial and final states in the forward trajectory. Adjoint observations oversaveatkeep theiroutput.saveatcadence, excluding the initial state. Tape and checkpoint storage follow their own lifetimes. output.accumulators: name → observed. The planner adds each as an integrated state (D26).restart:path, cadenceevery, andfrom, a restart store to start from. Restart is bitwise for the same decomposition (architecture §11).
7.4 Data
The run config names no data: where the data is, which records a parameter receives and how they are read are the model’s own declarations (its data_sources and each data-fed parameter’s update.from; spec/plan.md §4.1). The runtime’s cache directory, offline mode and URL overrides are run-time options, not run-config keys (spec/operator-interface.md §8.4.2). A model with an operator that reads a time-varying data-fed parameter must name forcing_refresh in step.hit (§5; spec/plan.md §7.3).
8. Rules the planner checks
The schema checks structure. The planner additionally refuses, naming the offending key:
- a
modelthat does not load, or asolver.externalthat does not name this file back (§1); - a qualified name that does not resolve in the flattened model, or resolves to the wrong kind (a map target that is not a state variable or parameter, a map source that is not an observed or has another shape than its target (
map_shape_mismatch), a limit that is not a scalar observed, abind_dtkey that is not a parameter, a per-variableabstolkey,domain.nonnegativeentry orsampling_scalekey that is not a state), or aprecisionkey that is notdefault, an operator name or a node id; - an operator name used in the schedule (a
leaforcoupledlist, asplit_explicitnode’ssloworfast, afrozenentry, animexentry, or amapnode) that is neither defined nor an existing default operator; - a term selected by two operators, an operator whose selector matches nothing, or a term with no owner that no selector matches while some selector uses
components(§3.1); - an operator that the schedule never advances, or advances twice in one invocation outside
strang: an operator named by twoleaf,coupled,split_explicitorsolvenodes (astrangrunning a child twice is one place). Afrozenentry counts as advancing for “never advances” but not for “twice” (spec/plan.md §7.1, D84); - an
imexpartition that leaves a term in neither part or in both, or anIMEXEulerleaf with noimex; checked only on leaves whose writtenalgisIMEXEuler, and animexkey on any other leaf is ignored (spec/plan.md §7.1); - duplicate node ids, or a path-form id on a node whose path it is not (§2.1);
- a
hold: "tendency"everywhose child is not a single leaf; - a tstop that is not $t_0$ plus a multiple of a fixed
step.dt(everyfiring times are not tstops then, §4.9), unless the schedule’s root is a singleleaforcouplednode withdtomitted or numeric, which lands on such tstops inside the macro step; a root leaf withdt"step"or"accumulated"takes one step per macro step and cannot; - a precision role that contradicts a declared
element_type, orrhsbelowstate; - a
wrtentry that matches nothing, or names a parameter bound bybind_dt; - a
stepwith neitherdtnorlimitswhose schedule root is not a single adaptiveleaforcouplednode (§5) (step_control_missing); astep.afterthat is not a child of the rootsequencewith onlysolvenodes at or before it, or a subcycle’safterthat is not a child of itssequencewith onlysolvenodes at or before it (step_after_invalid, D138, D182); an expression limit whose name another expression limit uses, or whose expression has afaqwith output indices, amakearray, or arrays of two shapes (limit_expr_invalid, §3.4, D182); - a leaf with
dtomitted whose method has no error estimate (§4.2), aBackwardEulerleaf withimplicit_solve: "linearized"included (D166); - no run interval from any source; one whose end is not after its start; a timestamp naming a day its month does not have, or a malformed timestamp in the caller’s interval or the model’s
solver.time_span(a malformed run-config timestamp fails the run-config schema instead and isrun_config_invalid; spec/plan.md §7.2); or a timestamp from any source when the model’s time-origin field is present but unreadable (§1.1); - a leaf with
dtomitted that has abind_dt: "leaf"parameter but nocontrol.dt0, since the first-step algorithm evaluates the right-hand side before any step size exists (spec/methods.md §9); split_explicitin a run config withadjoint(the Rust planner) or at all (the Julia planner, D175),crossingparameter-update rules (D22;unsupported_crossing_updatewins over the generalunsupported_parameter_update), or any other construct this version specifies but no implementation yet supports, with a refusal that says so (among them arelaxnode in a run withadjoint,unsupported_relax_adjoint, D173).- a data-fed parameter that receives two records (its record shape begins with a record axis,
"records": true) but whose source’stemporalblock does not make it time-varying (what EarthSciAST checks itself, a record axis on a source withouttemporal.startor a record axis not of size 2, is refused at load); a used data-fed parameter without a nonzerodefaultat every element; a model in which an operator reads a time-varying data-fed parameter but whosestep.hitlacksforcing_refresh; an operator whose stiffness would be classified by the Gershgorin bound although its Jacobian reads a data-fed parameter (spec/plan.md §4.1, §5.5.2, §7.3; D87). - a
solvenode with a bounded unknown (§4.10) whoseconvergedcriterion isrel_change, or whose referenced bound is, or depends through observeds on, one of the node’s unknowns (solve_bounds_invalid), and a bounded component whose diagonal Jacobian entry $\partial g_i/\partial z_i$ is positive at a sampled state (solve_bounds_sign) (§4.10, D95); and a method’sscalethat names a state-dependent observed or has the wrong shape (solve_scale_invalid, §4.10, D125); and arelaxmethod used against §4.10’s rules (solve_relax_invalid, D173). Whether a bound’s reference resolves, its shape, its independence of the bounded variable and a numericlbaboveubare EarthSciAST’s checks at load (model_load_failed). Each case has a refusal fixture (spec/plan.md §0.1). - a
control.dt_scopeofcellorshardon a node whose cells cannot step alone: a leaf whose class is stencil or global, a pointwise leaf whose Jacobian storage is notblock_diagonal, a leaf in whose model some array state is not over the index sets of the leaf’s state variables (D135), or acouplednode (dt_scope_not_local);cellorshardon a leaf with abind_dt: "leaf"parameter (dt_scope_bind_dt); a leafpartition.reshardother than"none"on a leaf whose resolveddt_scopeis notshard(reshard_without_shard_scope) (spec/partitioning.md §2.1, §6.2; D97, D104). - algebraic structure (spec/plan.md §5.9, D120, D122): an operator whose selector matches both terms and algebraic equations (
operator_mixes_kinds); asolvenode naming an operator that is not algebraic, or aleaforfinish_lastnaming an algebraic operator (operator_kind_mismatch); asolveunknown that is not an algebraic unknown of the flattened model (name_wrong_kind, rule 2); an algebraic unknown that an algebraic equation reads and nosolveorcouplednode solves (algebraic_unknown_unsolved), or that two nodes solve (algebraic_unknown_solved_twice); a node whose residuals and unknowns admit no perfect structural matching (solve_structurally_singular); a node whose bounded unknowns have more than one canonical pairing (solve_pairing_ambiguous); acouplednode with algebraic operators whosealgis not a stiffly accurate method of §4.3, or that hasimex(dae_method_invalid). - an increment whose source is not an earlier child of the same sequence (
increment_source_invalid), whose state or parameter name is missing or of the wrong kind (name_unresolvedorname_wrong_kind), or whose parameter has a different shape, is data-fed, is bound bybind_dtin the consumer, is bound more than once in the consumer or is named in the consumer’srecover.scale_param(increment_binding_invalid, §4.12). - a
split_explicitnode with an oddsubsteps, an operator named bothslowandfast, a state two of itsfastoperators write (D175), ahold,lagorcarryentry that is not an observed of the model or that no fast operator of the node reads (D176, D177), anaverageentry that is not an observed, that no scalar or last-stage operator reads, or whose definition reads ahold,lagorcarryentry, ascalaroperator that is also slow or fast or that writes a state a fast operator writes (D178), astep_startentry that is not an observed or that no scalar or last-stage operator reads, ascalar_lastoperator that is also slow or fast, orscalar_lastoperators that write other states than thescalarones (D181), afinish_lastoperator that is also slow, fast, frozen, scalar or last-stage scalar (D183), or an observed two ofhold,lag,carry,averageandstep_startname (D177, D178, D181) (split_explicit_invalid, §4.11).
Each refusal has a code, listed with the rule it implements in planner-errors.json
(D79); a refusal reports its code and the run-config pointer, which conformance fixtures check, and a message, which they do not. Where the cause has no run-config key of its own, or the key is not obvious, the pointer is fixed, and spec/planner-errors.json gives it in the code’s description; that file is the one list of these pointers. They include "" for a schema failure and for refusals about the caller’s interval, /model for refusals about the model alone, /schedule for a default operator no node advances, and the precision entry that set the role for precision refusals. At M2, rule 16 also covers events, every parameter update rule other than a data-fed parameter’s single data rule, a loader_fields entry that names no parameter, map operators and nodes, and observed step limits (spec/plan.md §0.1, D75, amended by D87), and a state whose model variable has a bound other than lb 0 alone (unsupported_state_bounds, §4.2, D95). From M3, rule 16 also covers a control.dt_scope of cell or shard on a column leaf (unsupported_dt_scope, spec/partitioning.md §2.5); the M2 refusals of cell and shard on every leaf and of a Rosenbrock leaf on an operator that depends on $t$ (D94) are withdrawn (D97, D102). From M4b it also covers a node whose pairing needs an element-level matching (unsupported_solve_pairing, D120), a bounded unknown in a DAE (unsupported_dae_bounds, D122), an initialize that needs per-operator frozen documents or blocks on a DAE with two or more algebraic operators (unsupported_dae_initialize) and the solve options spec/methods.md §15.6 leaves unspecified (unsupported_solve_option). Data-fed parameters themselves are planned, and their refusals are rule 17’s.