Version: dev

Python API index

Every stable name Python exports, and its extension seams.

Package: earthsci-ast 0.6.0

Documentation extracted with griffe 2.3.2.

Capability profiles: core, classification, simulation, runtime I/O.

Extension-tier names are on the Python extension page .

Stable names

PythonCanonicalKindSummary
add_continuous_eventadd_continuous_eventfunctionAdd a continuous event to a model.
add_continuous_event_to_modeladd_continuous_eventfunctionDeprecated alias for add_continuous_event.
add_couplingadd_couplingfunctionAdd a coupling entry to an ESM file.
add_coupling_to_fileadd_couplingfunctionDeprecated alias for add_coupling.
add_discrete_eventadd_discrete_eventfunctionAdd a discrete event to a model.
add_discrete_event_to_modeladd_discrete_eventfunctionDeprecated alias for add_discrete_event.
add_equationadd_equationfunctionAdd an equation to a model.
add_equation_to_modeladd_equationfunctionDeprecated alias for add_equation.
add_reactionadd_reactionfunctionAdd a reaction to a reaction system.
add_reaction_to_systemadd_reactionfunctionDeprecated alias for add_reaction.
add_speciesadd_speciesfunctionAdd a species to a reaction system.
add_species_to_systemadd_speciesfunctionDeprecated alias for add_species.
add_variableadd_variablefunctionAdd a variable to a model.
add_variable_to_modeladd_variablefunctionDeprecated alias for add_variable.
AffectEquationaffect_equationtypeEquation that affects a variable (assignment-like).
algebraic_unknownsalgebraic_unknownsfunctionUnknowns constrained only implicitly (H*H*SO4 ~ Ksp), sorted.
apply_unit_conversionapply_unit_conversionfunctionApply conversion to values.
area_tolerance_okarea_tolerance_okfunctionCombined rel+abs area-agreement gate with a sliver floor (B.5 / §5.8.2).
brownian_parametersbrownian_parametersfunctionParameters whose update.kind is "wiener" — the SDE noise sources (esm-spec §6.3.1), sorted.
build_reference_graphbuild_reference_graphfunctionResolve the reference edges of one model dict into a graph.
CadenceErrorcadence_errorerrorA cadence-partition contract violation in a model or producer output.
callbackscallbacksfunctionThe EsmProblem’s callback set (esm-libraries-spec §2.5.4).
CallbackSetcallback_settypeAn ordered, immutable set of callbacks, declared on a EsmProblem.
can_migratecan_migratefunctionTrue when migrate would succeed for this version pair.
canonical_index_set_jsoncanonical_index_set_jsonfunctionCanonical byte form of an index set (CONFORMANCE_SPEC.md §5.5.3): the distinct rows, each tuple serialised as a JSON array, in §5.5.1 sorted order, as compact UTF-8 JSON.
CircularReferenceErrorcircular_reference_errorerrorException raised when circular subsystem references are detected.
CompilercompilertypeThe type a caller’s compiler keyword takes.
CompilerReportcompiler_reporttypePer rule, the tier it landed on and what declined on the way.
component_existscomponent_existsfunctionTrue when component_id names a model or reaction system of file.
component_graphcomponent_graphfunctionBuild the component/coupling graph of file.
ComponentNodecomponent_nodetypeA model or reaction system in the component graph.
ConflictingDerivativeErrorconflicting_derivative_errorerrorTwo systems define non-additive equations for the same dependent variable.
constant_parametersconstant_parametersfunctionParameters with neither a distribution nor an update — plain constants (esm-spec §6.3.1), sorted.
containscontainsfunctionCheck if an expression contains a specific variable.
ContinuousEventcontinuous_eventtypeAn event that occurs when a condition becomes true during continuous evolution.
ContributioncontributiontypeOne summand of a flattened equation’s right-hand side, with its authors.
convert_unitsconvert_unitsfunctionConvenience function to convert units.
CoupleMultiplicativeNoTendencyErrorcouple_multiplicative_no_tendency_errorerrorA multiplicative connector transform targets something with no tendency.
CouplingEdgecoupling_edgetypeA coupling relationship between two components.
CouplingEntrycoupling_entrytypeOne entry of a document’s coupling list (esm-spec §10): any of the coupling dataclasses, told apart by their coupling_type field (CouplingType), which is the wire type…
CouplingImportcoupling_importtypeCoupling entry that imports a coupling-library file (esm-spec §10.10).
CyclicPromotionErrorcyclic_promotion_errorerrorPromotion rules form a cycle (A→B→…→A).
DataSourcedata_sourcetypeA named external data source reduced to pure I/O: it locates, reads, decodes, slices and filters bytes on disk (esm-spec §8).
DataSourceBindingdata_source_bindingtypeBinds a parameter to ONE variable of a data_sources entry (esm-spec §8.5).
DataSourceDeterminismdata_source_determinismtypeReproducibility contract a source advertises to bindings (esm-spec §8.9.2).
DataSourceKinddata_source_kindtypeStructural kind of an external data source.
DataSourceLocationdata_source_locationtypeFile discovery configuration for a data source.
DataSourceTemporaldata_source_temporaltypeTemporal coverage and record layout for a data source.
declared_system_kinddeclared_system_kindfunctionThe model’s explicit system_kind field, or None when absent.
default_forcing_setdefault_forcing_setfunctionThe Problem’s forcing as a forcing set.
DependencyEdgedependency_edgetypeA dependency between two variables.
derive_odesderive_odesfunctionDerive ODEs from a reaction system using mass action kinetics.
desugar_pushdowndesugar_pushdownfunctionRecognise the projection-pushdown pattern in esm’s named model and, when it matches, return a NEW document with the four constructs desugared in (a kind:"derived" index set,…
DimensionPromotionErrordimension_promotion_errorerrorA variable or equation cannot be promoted given the available Interfaces.
discrete_parametersdiscrete_parametersfunctionParameters carrying any update OTHER than wiener — piecewise-constant between refreshes (esm-spec §6.3.1), sorted.
DiscreteEventdiscrete_eventtypeAn event that occurs at discrete time points.
DiscreteEventTriggerdiscrete_event_triggertypeTrigger condition for a discrete event.
distinctdistinctfunctionSet semantics over rows: sort by the §5.5.1 total order, then drop
DistributiondistributiontypeA parameter’s value drawn from a probability distribution (esm-spec §5.4 / §6.3).
DomaindomaintypeComprehensive computational domain specification.
DomainExtentMismatchErrordomain_extent_mismatch_errorerrorTwo domains coupled via identity have incompatible spatial extents.
DomainUnitMismatchErrordomain_unit_mismatch_errorerrorAn Interface coupling requires a unit conversion that was not declared.
EarthSciAstErrorearth_sci_ast_errorerrorRoot of the earthsci_ast exception hierarchy.
EdgeKindedge_kindtypeThe three kinds of reference edge (RFC §6.1 “Propagation”).
effective_system_kindeffective_system_kindfunctionThe kind a caller choosing a solver should act on: the declared system_kind field when the document states one, otherwise the §6.3.1 derivation.
emit_documentemit_documentfunctionProduce the reference-preserving, self-contained emitted document (esm-spec §9.6.4 rule 5, RFC out-of-line-expression-templates §7.5) from a source document (a fixture, or an…
emit_esm_stringemit_esm_stringfunctionCanonical byte serialization of an emitted document (esm-spec §9.6.4 rule 5): 2-space indent, object keys sorted lexicographically EXCEPT the entries of an expression_templates…
EnsembleProblemensemble_problemtypeA EsmProblem plus a per-trajectory rewrite (esm-libraries-spec §2.5.8).
EnumLoweringErrorenum_lowering_errorerrorRaised when enum lowering (esm-spec §9.3) fails.
EquationequationtypeMathematical equation with left and right hand sides.
ERROR_CODESerror_codesconstantEvery diagnostic code this binding can emit, keyed by its SCREAMING_SNAKE name: ERROR_CODES.UNDEFINED_VARIABLE == "undefined_variable".
esm_problemesm_problemfunctionBuild a document into a runnable EsmProblem (esm-libraries-spec §2.5.2).
EsmFileesm_filetypeRoot container for an ESM format file.
EsmProblemesm_problemtypeA document, built and ready to run (esm-libraries-spec §2.5.2).
evaluateevaluatefunctionEvaluate a scalar AST expression against a dict of float variable bindings.
ExpandexpandfunctionPublic alias for expand_document using the spec’s spelling (esm-spec §9.6.4 rule 2).
expand_coupling_importsexpand_coupling_importsfunctionExpand every coupling_import entry in esm_file.coupling into concrete (typed) coupling edges, splicing them in the position of the import entry (esm-spec §10.10.3).
expand_documentexpand_documentfunctionFully expand every surviving apply_expression_template reference in a document loaded by lower_expression_templates (Option B), producing the Option-A image: every…
ExprexprtypeAn expression (esm-spec §4): a numeric literal (int or float), a variable or parameter reference (str), or an operator node (ExprNode) whose args are themselves…
expression_graphexpression_graphfunctionBuild the variable-dependency graph of target.
ExpressionParseErrorexpression_parse_errorerrorRaised when an expression string cannot be parsed.
ExpressionTemplateErrorexpression_template_errorerrorRaised when expression-template expansion fails.
ExprNodeexpr_nodetypeA node in an expression tree.
extractextractfunctionExtract a single component into a standalone ESM file.
extract_component_from_fileextractfunctionDeprecated alias for extract.
flattenflattenfunctionFlatten a coupled multi-system EsmFile per spec §4.7.5.
flatten_template_registriesflatten_template_registriesfunctionThe flatten-time template-registry merge (esm-spec §9.6.4 rule 7, §10.7; esm-libraries-spec §4.7.5 step 4).
FlattenedEquationflattened_equationtypeAn equation in the flattened system, with namespaced Expr trees.
FlattenedSystemflattened_systemtypeThe result of flattening an EsmFile per spec §4.7.5.
FlattenedVariableflattened_variabletypeA single variable in the flattened system.
FlattenErrorflatten_errorerrorBase class for errors raised during flatten().
FlattenMetadataflatten_metadatatypeProvenance metadata for a FlattenedSystem.
FloatKeyErrorfloat_key_errorerrorRaised when a relational key contains a floating-point component.
forcing_setforcing_setfunctionAn epoch-stamped forcing set for prog.
free_parametersfree_parametersfunctionExtract free parameters from an expression.
free_variablesfree_variablesfunctionExtract all free variables from an expression.
FunctionalUpdatefunctional_updatetypeA registered handler computing a parameter’s new value when its update fires (esm-spec §5.4).
FunctionTablefunction_tabletypeA sampled function table referenced by table_lookup AST ops (esm-spec §9.5, v0.4.0).
FunctionTableAxisfunction_table_axistypeA single named axis inside a FunctionTable (esm-spec §9.5).
GeometryErrorgeometry_errorerrorA polygon-clip / area evaluation failed (bad operand, degenerate input).
GraphgraphtypeA directed graph with node/edge lists and adjacency lookups (§4.8).
GraphEdgegraph_edgetypeOne directed edge: node keys plus the edge payload.
group_aggregategroup_aggregatefunctionGroup-by + semiring aggregate (rule 5).
halohalofunctionThe halo report of op along dec.
initinitfunctionBuild a stepping Integrator over prob (esm-libraries-spec §2.5.6).
IntegratorintegratortypeA stepping integrator over a EsmProblem (esm-libraries-spec §2.5.6).
intersect_polygonintersect_polygonfunctionClip two lon-lat polygon rings; return the overlap ring (RFC §8.1).
is_coupling_library_docis_coupling_library_docfunctionTrue when raw has the coupling-library-file FORM (top-level coupling_roles, esm-spec §10.9).
is_ode_stateis_ode_statefunctionMembership test for ode_states — the replacement for every variable.type == "state" branch.
laneslanesfunctionop over a run-time list of cells or columns.
LIBRARY_VERSIONlibrary_versionconstantThis package’s OWN version – the cross-binding spelling of __version__.
load_documentload_documentfunctionParse an ESM document that is ALREADY a Python dict — the same document a .esm file holds, just already json.loaded.
load_pathload_pathfunctionRead and parse an ESM document from a filesystem path.
load_stringload_stringfunctionParse an ESM document from JSON TEXT.
LoaderFieldloader_fieldtypeA data-fed PARAMETER lowered to a flattened array input (esm-spec §8.5).
lower_enumslower_enumsfunctionReturn file with every enum op replaced by a const integer per the file’s enums block (esm-spec §9.3).
lower_enums_mutlower_enums_mutfunctionIn-place twin of lower_enums: lower every enum op in file itself, and return it (API_SPEC.md §8 item 15).
lower_expression_templateslower_expression_templatesfunctionRun the load-time rewrite fixpoint (esm-spec §9.6.3) over file, Option B (reference-preserving, esm-spec §9.6.4).
materialize_value_inventionmaterialize_value_inventionfunctionRun the build-time value-invention engine over a raw model document.
MAX_TEMPLATE_EXPANSION_DEPTHmax_template_expansion_depthconstantMaximum template-body reference-chain depth (counted in TEMPLATES along the longest chain, so a 33-template chain is rejected and a 32-template chain is accepted) before a file…
mergemergefunctionMerge two ESM files.
merge_esm_filesmergefunctionDeprecated alias for merge.
MetadatametadatatypeMetadata about the model or dataset.
migratemigratefunctionMigrate file to target_version.
MigrationErrormigration_errorerrorRaised when an ESM document cannot be migrated to the requested version.
ModelmodeltypeA mathematical model containing variables and equations.
ModelVariablemodel_variabletypeA variable in a mathematical model — either an unknown the solver solves for, or a parameter supplied to it.
observed_definitionsobserved_definitionsfunctionMap each observed unknown to its DEFINING equation’s RHS.
observed_fieldobserved_fieldfunctionEvaluate/read the state-free observed name at BUILD time through the EsmProblem’s own graph — the const-geometry hoist already materialized it; this resolves the name against…
observed_unknownsobserved_unknownsfunctionUnknowns defined by a bare-variable LHS (y ~ f(…)) — eliminable, materializable (esm-spec §6.3.1), sorted.
ode_statesode_statesfunctionUnknowns appearing under D(·, t) on some equation LHS (esm-spec §6.3.1), sorted.
OperatoroperatortypeA registered runtime operator (e.g., dry deposition, wet scavenging).
OperatorComposeAmbiguousBareNameErroroperator_compose_ambiguous_bare_name_errorerrorA bare-name match unified two STATES and the document did not say which survives.
OperatorComposeNoMergeErroroperator_compose_no_merge_errorerrorAn operator_compose entry merged NOTHING (esm-libraries-spec §4.7.1 step 5).
OperatorComposeRequireMatchErroroperator_compose_require_match_errorerrorAn operator_compose entry declared require_match and did not match.
ParameterparametertypeA parameter for reaction systems.
ParameterUpdateparameter_updatetypeOne rule declaring WHEN a parameter refreshes and WHAT from (esm-spec §5.4).
parse_equationparse_equationfunctionParse lhs = rhs into an Equation.
parse_expressionparse_expressionfunctionParse a single expression string into an AST expression — the inverse of to_ascii.
parse_unit_conversionparse_unit_conversionfunctionParse a loader variable’s RAW unit_conversion (esm-spec §8.5).
PartitionpartitiontypeThe result of the cadence-partition pass over one model.
polygon_areapolygon_areafunctionReference (unsigned) area of an overlap ring under manifold.
product_matrixproduct_matrixfunctionCompute the product stoichiometric matrix.
rankrankfunctionDense integer renumbering (rule 3): assign IDs by position in the sorted distinct sequence.
RankingrankingtypeResult of rank.
ReactionreactiontypeA chemical reaction.
ReactionSystemreaction_systemtypeA system of chemical reactions.
ReferencereferencetypeBibliographic reference.
ReferenceEdgereference_edgetypeA directed source → target edge: source references/depends on target.
ReferenceGraphreference_graphtypeThe resolved reference DAG for one model — the partition pass’s input.
ReferenceResolutionErrorreference_resolution_errorerrorA reference could not be resolved, or the reference graph has a cycle.
ReferenceVertexreference_vertextypeA vertex in the reference graph, addressed by a kind-namespaced key.
reject_expression_templates_pre_v04reject_expression_templates_pre_v04functionReject template constructs in files declaring esm < 0.4.0.
reject_solver_external_pre_v13reject_solver_external_pre_v13functionReject solver.external in a file declaring esm < 1.3.0.
reject_solver_pre_v11reject_solver_pre_v11functionReject a top-level solver block in a file declaring esm < 1.1.0.
reject_solver_time_span_pre_v13reject_solver_time_span_pre_v13functionReject solver.time_span in a file declaring esm < 1.3.0.
reject_template_imports_pre_v08reject_template_imports_pre_v08functionReject the §9.7 constructs in files declaring esm < 0.8.0.
remakeremakefunctionA NEW EsmProblem with the named substitutions applied, everything else shared.
remove_couplingremove_couplingfunctionRemove a coupling entry from an ESM file.
remove_coupling_from_fileremove_couplingfunctionDeprecated alias for remove_coupling.
remove_equationremove_equationfunctionRemove an equation from a model by index.
remove_equation_from_modelremove_equationfunctionDeprecated alias for remove_equation.
remove_eventremove_eventfunctionRemove an event from a model.
remove_event_from_modelremove_eventfunctionDeprecated alias for remove_event.
remove_reactionremove_reactionfunctionRemove a reaction from a reaction system.
remove_reaction_from_systemremove_reactionfunctionDeprecated alias for remove_reaction.
remove_speciesremove_speciesfunctionRemove a species from a reaction system.
remove_species_from_systemremove_speciesfunctionDeprecated alias for remove_species.
remove_variableremove_variablefunctionRemove a variable from a model.
remove_variable_from_modelremove_variablefunctionDeprecated alias for remove_variable.
rename_variablerename_variablefunctionRename a variable in a model.
rename_variable_in_modelrename_variablefunctionDeprecated alias for rename_variable.
resolve_referencesresolve_referencesfunctionResolve reference edges for every model in document.
resolve_subsystem_refsresolve_subsystem_refsfunctionResolve all subsystem references in an ESM file.
resolve_template_machineryresolve_template_machineryfunctionResolve every esm-spec §9.7 construct of the ROOT document raw (relative import refs resolve against base_path): imports recursively with per-edge instantiation, index_sets…
resolve_time_spanresolve_time_spanfunctionThe interval a run should cover, most-specific first (esm-spec §2.2.7).
resolve_tolerancesresolve_tolerancesfunctionResolve integration tolerances most-specific first (esm-spec §2.2.2).
restrictrestrictfunctionop restricted to one tile.
ReturnCodereturn_codetypeThe SciML ReturnCode vocabulary (API_SPEC §4, esm-libraries-spec §2.5.3), which is how a run reports its outcome in every simulating binding.
rhs_programrhs_programfunctionThe Problem’s right-hand side as a program value.
sampled_parameterssampled_parametersfunctionParameters with a distribution and no update — drawn once at setup (esm-spec §6.3.1), sorted.
SCHEMA_VERSIONschema_versionconstantThe .esm FORMAT version this library implements — NOT the version of the library itself, which is earthsci_ast.LIBRARY_VERSION.
SchemaValidationErrorschema_validation_errorerrorException raised when schema validation fails.
selectselectfunctionOne operator’s program, by provenance.
simplifysimplifyfunctionSimplify an expression by performing constant folding and basic algebraic simplifications.
skolemskolemfunctionCanonical-tuple Skolem key (rule 4).
skolem_edgeskolem_edgefunctionCanonical key for an undirected pair (a symmetric relation): (min(a, b), max(a, b)).
SliceOutOfDomainErrorslice_out_of_domain_errorerrorA slice mapping reaches outside the source variable’s domain.
SolutionsolutiontypeWhat earthsci_ast.problem.solve returns.
solvesolvefunctionRun prob to completion and return its Solution.
SolversolvertypeDocument-scoped, OPTIONAL solver hints (esm-spec §2.2).
solver_external_locationsolver_external_locationfunctionWhere the document’s solver.external points (esm-spec §2.2.6).
SolverTimeSpansolver_time_spantypesolver.time_span: the interval a document is meant to be simulated over.
SpeciesspeciestypeA chemical species in a reaction system.
stepstepfunctionAdvance integrator one accepted step — the spec’s step!.
stoichiometric_matrixstoichiometric_matrixfunctionCompute the net stoichiometric matrix for a reaction system.
substitutesubstitutefunctionRecursively substitute variables in an expression with their bindings.
substitute_in_modelsubstitute_in_modelfunctionApply substitutions to all expressions in a model.
substitute_in_reaction_systemsubstitute_in_reaction_systemfunctionApply substitutions to all expressions in a reaction system.
substrate_matrixsubstrate_matrixfunctionCompute the substrate (reactant) stoichiometric matrix.
SubsystemRefErrorsubsystem_ref_errorerrorException raised when a subsystem reference cannot be resolved.
supported_migration_targetssupported_migration_targetsfunctionThe schema versions from_version can migrate to.
system_kindsystem_kindfunctionDerive the model’s MTK system kind (esm-spec §6.3.1).
TemporalDomaintemporal_domaintypeTemporal domain specification.
TermOriginterm_origintypeWho authored one contribution to a flattened equation (esm-libraries-spec §4.7.5, “Per-term provenance”).
to_asciito_asciifunctionFormat target as plain ASCII mathematical notation.
to_dotto_dotfunctionRender graph as Graphviz DOT.
to_jsonto_jsonfunctionSerialize an ESM file to a JSON string.
to_json_compactto_json_compactfunctionto_json with no indentation — the single-line wire form.
to_json_graphto_json_graphfunctionRender graph as the JSON adjacency list of esm-libraries-spec §4.8.3.
to_julia_codeto_julia_codefunctionGenerate a self-contained Julia script from an ESM file.
to_latexto_latexfunctionFormat target as LaTeX mathematical notation.
to_mermaidto_mermaidfunctionRender graph as a Mermaid flowchart for Markdown embedding.
to_unicodeto_unicodefunctionFormat target as Unicode mathematical notation with chemical subscripts.
UNIT_FINDING_ANALYSISunit_finding_analysisconstantThe checker could not DETERMINE a dimension – a symbolic exponent, an operator with no dimensional rule, an unknown variable, a missing pint.
UNIT_FINDING_DIMENSIONAL_MISMATCHunit_finding_dimensional_mismatchconstantA PROVABLE inconsistency: metres added to kilograms, an equation whose sides cannot agree.
UNIT_FINDING_DIMENSIONLESS_LITERALunit_finding_dimensionless_literalconstantA check the CURRENT neutral-literal rule skips or passes fails once a bare numeric literal is read as dimensionless (esm-spec §4.8.6).
UNIT_FINDING_UNPARSEABLEunit_finding_unparseableconstantA declared unit string that denotes no real unit.
UnitConversionErrorunit_conversion_errorerrorRaised when unit_conversion cannot be applied.
UnitFindingunit_findingtypeOne coded dimensional-analysis finding.
UnitWarningunit_warningtypeA single dimensional-analysis finding.
unknownsunknownsfunctionEvery variable declared type: "unknown", sorted.
UnmappedDomainErrorunmapped_domain_errorerrorA coupling references a variable whose domain has no mapping rule.
UnsupportedMappingErrorunsupported_mapping_errorerrorA dimension-promotion mapping is not supported by this implementation tier.
validatevalidatefunctionValidate a parsed ESM document against structural and unit requirements.
validate_pathvalidate_pathfunctionValidate the ESM document stored at path (API_SPEC.md §8 item 13).
validate_textvalidate_textfunctionValidate an ESM document held as JSON text (API_SPEC.md §8 item 13).
validate_unitsvalidate_unitsfunctionConvenience function to validate units of an ESM structure.
ValidationErrorvalidation_errortypeRepresents a single validation error.
ValidationResultvalidation_resulttypeRepresents the result of validation.
ValueInventionErrorvalue_invention_errorerrorA value-invention build-time materialisation error.
ValueInventionResultvalue_invention_resulttypeResult of materialize_value_invention.
VariableNodevariable_nodetypeA variable, parameter or species in the expression graph.
VertexKindvertex_kindtypeThe three kinds of vertex in the reference graph.
write_pathwrite_pathfunctionWrite an ESM file to path as JSON.