module_variable
Find a SWAT+ module-level variable by name and optional module, returning its declaring module, type, declaration, line, units, and meaning. Resolves duplicate names and falls back to meaning search.
Instructions
A variable declared in a module body -- its declaring module, type, full declaration (so an allocatable array is distinguishable from a scalar), line, units and meaning. This is the program's global state: a state object like aqu_d is a module-level instance, which describe_type cannot confirm exists. Where a bare name is declared in more than one module, every candidate is returned rather than one being chosen. Falls back to a name and documented-meaning search when there is no exact match. Exhaustive, not truncated.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Variable name, e.g. aqu_d | |
| module | No | Optional declaring module, to disambiguate |