cape.pyfun.options.util
: Utilities for pyFun 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_FUN3DNamelist()
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.json
Values specified in the default control file,
$PYKES/settings/pyFun.default.json
Hard-coded defaults from this module
- See Also:
- cape.pykes.options.util.getKestrelTemplate(fname)¶
Get full path to template with file name fname
- Call:
>>> fabs = getKestrelTemplate(fname)
- Inputs:
- fname:
str
Name of file, such as
input.cntl
- fname:
- Outputs:
- fabs:
str
Full path to the template file
- fabs:
- Versions:
2016-04-27
@ddalle
: Version 1.02021-03-01
@ddalle
: Version 2.0; seeget_template()
- cape.pykes.options.util.getPyKesDefaults()¶
Read
pyKes.default.json
default JSON file- Call:
>>> defs = getPyKesDefaults()
- Outputs:
- defs:
dict
Dictionary of settings read from JSON file
- defs:
- cape.pykes.options.util.get_template(fname)¶
Get the absolute path to a template file by name
- Call:
>>> fabs = get_template(fname)
- Inputs:
- fname:
str
Name of file, such as
input.cntl
- fname:
- Outputs:
- fabs:
str
Full path to file
- fabs:
- Versions:
2021-10-18
@ddalle
: Version 1.0; fromcape.pyfun