The unified namelist surface declares the problem dimension once, at the top,
in a &control group: dim = 1 | 2 | 3. This module reads ONLY that group so
the euler launcher can route to the right solver before the dimension-specific
config reader runs. A file with no &control group defaults to dim = 1, so
every pre-existing 1D namelist keeps working unchanged.
Read the problem dimension from the &control group of filename.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | filename |
path to the namelist file |
||
| integer, | intent(out) | :: | dim |
1, 2, or 3 (defaults to 1 when &control is absent) |
||
| logical, | intent(out) | :: | ok |
.true. on success; .false. on open/parse/range error |
||
| character(len=*), | intent(out) | :: | message |
human-readable error when ok is .false. |