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);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).
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).
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. 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),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.
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.
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.
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) orptc(pseudo-transient continuation), 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,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 that depends on no state, directly or through other observeds (a state-free observed, D125; its value reaches the runtime through the operator’s frozen residual document, spec/plan.md §6.5). A reference to a state, or to an observed that depends on one, is refused (unsupported_bound_reference, rule 16; a bound that moves with the state is a later addition); 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 its total) would be a referenced bound, though EqWeFiC’s document states onlylb0. 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 a state-free observed, 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; 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 a state-dependent observed, or whose shape is neither scalar nor the unknown’s, issolve_scale_invalid(rule 18). - 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. - 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). Specified in v1, implemented at M7.
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, horizontal in the model’s index_sets order. 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
output.sinks: EarthSciIO sinks bypath, withvariablesand their ownsaveat;output.saveatis the default. Output times are tstops, sosaveatnever needs dense output in v1.saveatis a duration $d$, and the output times are its multiples $k,d$ ($k$ an integer, each the binary64 product), counted from model time zero (the model’s time origin, §1.1, D74) likehit_multiples, that lie in $(t_0, t_f]$, with the landing tolerance of §5 “Fixed boundaries” at both ends: a multiple within it of $t_f$ is the output time $t_f$, written as $t_f$, and a multiple within it of $t_0$ is excluded, like $t_0$. $t_f$ is not added when no multiple lands on it (D83). So $d = 0.1$ on $[0, 0.3]$ gives 0.1, 0.2 and 0.3, although $3 \times 0.1$ is 0.30000000000000004. With nosaveatthe output time is $t_f$ alone. The initial state is always reported, and a functional oversaveathas no term at $t_0$.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 ordomain.nonnegativeentry 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, 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,coupledorsolvenodes (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 (step_after_invalid, D138); - a leaf with
dtomitted whose method has no error estimate (§4.2); - 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_explicit,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.- 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). 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 aleafnaming 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).
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.