pyradtran.schema#
libRadtran option-schema extraction.
libRadtran ships a machine-readable description of every uvspec
option in <root>/src_py/*_options.py (used by its GUI). This module
extracts that description from the locally installed libRadtran — so
validation always matches the exact binary being run — and caches it as
JSON under ~/.pyradtran/.
The extraction runs in a subprocess to keep libRadtran’s GUI modules out of the pyradtran process. Nothing from libRadtran is redistributed with pyradtran; the schema is generated on the user’s machine from their own installation.
Schema format (one entry per uvspec option):
{
"name": "wc_modify",
"group": "Water and ice clouds",
"help": "Modify water cloud optical properties.",
"doc": "...", # long documentation text
"non_unique": true, # option may appear on several lines
"mandatory": false,
"parents": ["wc_file"], # requires one of these
"childs": [...],
"tokens": [ # user-supplied tokens, in order
{"kind": "choice", "choices": ["gg", "ssa", "tau", "tau550"],
"optional": false, "file_allowed": false},
{"kind": "value", "datatype": "float", "valid_range": [0, 1],
"optional": false}
]
}
See also
pyradtran.paramsUses the schema for parameter validation.
|
Extract the option schema from |
|
Locate the libRadtran installation root from config paths. |
|
Return the option schema for the local libRadtran install, cached. |