derive_output_plan
Stable function · Runtime I/O
Tier: stable · Kind: function · Topic: Runtime I/O
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
derive_output_plan | outside profile | not exported | derive_output_plan | outside profile |
Julia
derive_output_plan(doc::AbstractDict, var_map::AbstractDict; observed)
derive_output_plan(var_map::AbstractDict, meta::OutputMeta; observed)
derive_output_plan(doc, var_map; observed = String[]) -> OutputPlan
derive_output_plan(var_map, meta::OutputMeta; observed = String[]) -> OutputPlan
Derive the whole output plan for a run (RFC §7–§9) — the Julia mirror of
earthsci_ast::data_output::derive_output_plan.
doc— the (flattened) run document: axis names, axis lengths, CF attributes, thecoordinatesregistry, and the record-axis name.var_map— the flat state-element name → flat index map.observed— the caller-named observed/derived fields to write alongside the state (RFC decision 8): output is the state PLUS these, not every observed field. A name selects the variable it names exactly; failing that, the ONE variable whose last dotted segment equals the name’s (sofluxselectsBox.flux). A name whose last segment several variables share is refused with codeambiguous_output_name, and a name with no slot in the flat state is refused too — silently dropping or silently choosing a requested output is worse than refusing. A name anoperator_composemerge deleted is NOT resolved here: the caller resolves it throughmerged_variable_renamesfirst (CONFORMANCE_SPEC §5.17.4).
TypeScript
Not available in TypeScript. TypeScript is outside the runtime I/O capability profile (Julia, Python, Rust): data-source providers, refresh cadence, output sinks, checkpoints.
Python
Python does not export this function.
Rust
pub fn derive_output_plan(doc: &EsmFile, slot_names: &[String], observed: &[String]) -> Result<OutputPlan, OutputError>
Derive the whole output plan for a run.
doc— the (flattened) run document: axis names, axis lengths, CF attributes, and thecoordinatesregistry.slot_names— the flat state-element names, index = flat index. This isSolution::state_variable_names/ArrayCompiled::state_variable_names, including any observed rows the runner appended.observed— the caller-named observed/derived fields to write alongside the state (RFC decision 8). Output is state PLUS these, not every observed field. A name selects the variable it names exactly; failing that, the ONE variable whose last dotted segment equals the name’s (sofluxselectsBox.flux). A name anoperator_composemerge deleted is NOT resolved here: the caller resolves it throughmerged_variable_renamesfirst (CONFORMANCE_SPEC §5.17.4).
Errors
OutputError::UnknownObserved when a requested observed field has no slot
in slot_names; OutputError::AmbiguousRequest when a request names no
variable exactly and its last segment is shared; otherwise see derive_output_gridding
,
apply_output_meta and plan_dimension_coordinates
.
Go
Not available in Go. Go is outside the runtime I/O capability profile (Julia, Python, Rust): data-source providers, refresh cadence, output sinks, checkpoints.