cape.pyus.options.util: Utilities for pyUS options module¶
This module provides tools to read, access, modify, and write settings for
cape.pyfun. It is based off of the cape.cfdx.options.util module and
provides a special class cape.cfdx.options.odict that is subclassed from
the Python built-in dict. Behavior, such as opts['Namelist'] or
opts.get('Namelist') are also present. In addition, many convenience
methods such as opts.get_InputInp() are provided.
In addition, this module controls default values of each pyFun parameter in a three-step process. The precedence used to determine what the value of a given parameter should be is below.
Values directly specified in the input file,
pyFun.jsonValues specified in the default control file,
$CAPE/settings/pyUS.default.jsonHard-coded defaults from this module
- See Also:
- cape.pyus.options.util.getPyUSDefaults()¶
Read
pyUS.default.jsondefault settings file- Call:
>>> defs = getPyUS()
- Outputs:
- defs:
dict Dictionary of settings read from JSON file
- defs:
- Versions:
2019-06-27
@ddalle: Version 1.0 (US3D)2021-03-01
@ddalle: Version 2.0; local JSON file
- cape.pyus.options.util.getUS3DTemplate(fname)¶
Get full path to template with file name fname
- cape.pyus.options.util.get_template(fname)¶
Get the absolute path to a template file by name