Version: dev

output_meta

Stable type · Runtime I/O

Tier: stable · Kind: type · Topic: Runtime I/O

JuliaTypeScriptPythonRustGo
OutputMetaoutside profilenot exportedOutputMetaoutside profile

Julia

struct OutputMeta
OutputMeta(model_name::String, index_sets::Dict{String, Int64}, var_dims::Dict{String, Vector{String}}, var_attrs::Dict{String, Dict{String, Any}}, var_types::Dict{String, String}, coordinates::Dict{String, Any}, time_dim::String)
OutputMeta(model_name, index_sets, var_dims, var_attrs, var_types, coordinates, time_dim)
OutputMeta

The document-derived output metadata carried by an EsmProblem so a streaming sink can name axes and emit CF coordinates (RFC §7–§8). Distilled from the flattened run document by derive_output_meta .

  • model_name::String — the first flattened model’s key (namespacing prefix of the var_map’s base names).
  • index_sets::Dict{String,Int} — index-set name → axis length (interval size; categorical member count).
  • var_dims::Dict{String,Vector{String}} — base variable name → its declared shape (ordered index-set / dim names). Absent for scalars. Keyed by BOTH the bare name and its Model.-qualified form, because a flat state’s element names are namespaced on the coupled/flattened path and bare on the single-model path; a bare name two models would make ambiguous is dropped, so an ambiguous lookup falls back to positional axis names rather than guessing.
  • var_attrs::Dict{String,Dict{String,Any}} — base variable name → CF variable attributes retained from the doc (units, standard_name, description when present). Keyed like var_dims.
  • var_types::Dict{String,String} — base variable name → its DERIVED kind ("observed" for an unknown a bare-variable-LHS equation defines, else the declared "unknown" / "parameter"), so observed fields can be gated on the caller’s request list (RFC decision 8). Derived rather than read off the declaration because esm 1.0.0 declares only two types (esm-spec §6.3.1). Keyed like var_dims.
  • coordinates::Dict{String,Any} — the additive coordinates registry (§8.3), verbatim: entry name → {values|source, standard_name, units, axis}. Empty when the document declares none.
  • time_dim::String — the record-axis name: the document’s domain.independent_variable (RFC §7), falling back to "time".

Source

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 type.

Rust

pub struct OutputMeta {
    pub model_names: Vec<String>,
    pub index_sets: BTreeMap<String, usize>,
    pub var_dims: BTreeMap<String, Vec<String>>,
    pub var_attrs: BTreeMap<String, Map<String, Value>>,
    pub var_types: BTreeMap<String, VariableType>,
    pub observed_unknowns: BTreeSet<String>,
    pub coordinates: BTreeMap<String, Coordinate>,
    pub time_dim: String,
}

impl OutputMeta { pub fn dims_of(&self, base: &str) -> Option<&Vec<String>> }

impl OutputMeta { pub fn type_of(&self, base: &str) -> Option<&VariableType> }

impl OutputMeta { pub fn is_observed(&self, base: &str) -> bool }

impl OutputMeta { pub fn attrs_of(&self, base: &str) -> Option<&JsonMap<String, JsonValue>> }

The document slice a streaming writer needs so it can name axes and emit CF coordinates (RFC §7–§8) without importing the document model. Distilled from an EsmFile by derive_output_meta ; the Rust mirror of Julia’s OutputMeta.

The var_* maps are keyed by BOTH the bare variable name and its Model.-qualified form, because a flat state’s element names are namespaced on the coupled/flattened path and bare on the single-model path. A bare key that two models would make ambiguous is dropped, so an ambiguous lookup falls back to positional axis names rather than guessing.

Source · Rust docs

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.