xbudget.nodes.Term¶
- class xbudget.nodes.Term(name, path, operations, explicit_var=None, optional=False)[source]¶
Bases:
objectA node in a budget tree: a named quantity defined by its operations.
- path¶
Full path of term names from the budget root, e.g.
("heat", "rhs", "diffusion", "lateral"). Used as the canonical identity and to derive output variable names.
- operations¶
One or more of Sum/Product/Difference. The first sum/product operation provides the term’s primary value.
- Type:
tuple of Operation
- optional¶
Declares this term’s diagnostics as expected to be absent on some datasets. When they are, the term is dropped silently — no warning, no
on_missing="raise"error, and noxbudget_incompleteflag on the parent — instead of the loud “unexpectedly missing” treatment. This is the honest, self-documenting alternative to deleting the term from the recipe to quiet the warning. It suppresses missing-diagnostic alarms for the whole subtree rooted at this term.- Type:
Methods
Attributes