cape.pyover.options
: OVERFLOW and pyOver Settings¶
This module provides tools to read, access, modify, and write settings for
cape.pyover
. The class is based off of the built-int dict
class.
In addition, this module controls default values of each pyOver parameter in a two-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,
pyOver.json
Values specified in the default control file,
$PYOVER/settings/pyOver.default.json
Hard-coded defaults from this module
- class cape.pyover.options.Options(fname=None, **kw)¶
Options structure, subclass of
dict
- Call:
>>> opts = Options(fname=None, **kw)
- Inputs:
- fname:
str
File to be read as a JSON file with comments
- kw:
dict
Dictionary to be transformed into
pyCart.options.Options
- fname:
- Versions:
2014-07-28
@ddalle
: First version
- get_ALL(i=None)¶
Return the
ALL
namelist of settings applied to all grids- Call:
>>> d = opts.get_ALL(i=None)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- i:
int
orNone
Phase number
- opts:
- Outputs:
- d:
pyOver.options.odict
ALL namelist
- d:
- Versions:
2016-02-01
@ddalle
: First version
- get_ConfigDir(config=None)¶
Get configuration directory containing mesh files
- Call:
>>> fdir = opts.get_ConfigDir() >>> fdir = opts.get_ConfigDir(config)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- config:
str
Name of configuration to use (optional)
- opts:
- Outputs:
- fdir:
str
Configuration directory
- fdir:
- Versions:
2016-02-02
@ddalle
: First version
- get_DataBook_QIn(comp)¶
Get the input
q
file for a databook component- Call:
>>> fq = opts.get_DataBook_QIn(comp)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- comp:
str
Name of line load data book component
- opts:
- Outputs:
- fq: {
"q.pyover.p3d"
} |str
Name of input Overflow solution file
- fq: {
- Versions:
2017-01-10
@ddalle
: First version
- get_DataBook_QOut(comp)¶
Get the preprocessed
q
file for a databook component- Call:
>>> fq = opts.get_DataBook_QOut(comp)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- comp:
str
Name of line load data book component
- opts:
- Outputs:
- fq: {
None
} |"q.pyover.srf"
|str
Name of output Overflow solution file
- fq: {
- Versions:
2017-01-10
@ddalle
: First version
- get_DataBook_QSurf(comp)¶
Get the preprocessed
q.srf
file name for a databook component- Call:
>>> fq = opts.get_DataBook_QSurf(comp)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- comp:
str
Name of line load data book component
- opts:
- Outputs:
- fq:
None
| {"q.pyover.srf"
} |str
Name of output Overflow surface solution file
- fq:
- Versions:
2017-01-10
@ddalle
: First version
- get_DataBook_XIn(comp)¶
Get the input
x
file for a databook component- Call:
>>> fx = opts.get_DataBook_XIn(comp)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- comp:
str
Name of line load data book component
- opts:
- Outputs:
- fx: {
"x.pyover.p3d"
} |str
Name of input Overflow grid file
- fx: {
- Versions:
2017-01-10
@ddalle
: First version
- get_DataBook_XOut(comp)¶
Get the input
x
file for a databook component- Call:
>>> fx = opts.get_DataBook_XOut(comp)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- comp:
str
Name of line load data book component
- opts:
- Outputs:
- fx: {
None
} |"x.pyover.srf"
|str
Name of output Overflow grid file
- fx: {
- Versions:
2017-01-10
@ddalle
: First version
- get_DataBook_XSurf(comp)¶
Get the input
x.srf
file for a databook component- Call:
>>> fx = opts.get_DataBook_XSurf(comp)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- comp:
str
Name of line load data book component
- opts:
- Outputs:
- fx:
None
| {"x.pyover.srf"
} |str
Name of output Overflow grid file
- fx:
- Versions:
2017-01-10
@ddalle
: First version
- get_DataBook_fomo(comp)¶
Get path to
mixsur
output filesIf each of the following files is found, there is no need to run
mixsur
, and files are linked instead.grid.i.tri
grid.bnd
grid.ib
grid.ibi
grid.map
grid.nsf
grid.ptv
mixsur.fmp
- Call:
>>> fdir = opts.get_DataBook_fomo(comp)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- comp:
str
Name of line load data book component
- opts:
- Outputs:
- fdir: {
None
} |str
Path to
mixsur
output files
- fdir: {
- Versions:
2017-01-11
@ddalle
: First version
- get_DataBook_mixsur(comp)¶
Get the
mixsur
oroverint
input file for a databook component- Call:
>>> fname = opts.get_DataBook_mixsur(comp)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- comp:
str
Name of line load data book component
- opts:
- Outputs:
- fname:
str
Name of
mixsur
input file template
- fname:
- Versions:
2016-12-29
@ddalle
: First version
- get_DataBook_splitmq(comp)¶
Get the
splitmq
input file for a databook component- Call:
>>> fname = opts.get_DataBook_splitmq(comp)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- comp:
str
Name of line load data book component
- opts:
- Outputs:
- fname:
str
Name of
splitmq
input file template
- fname:
- Versions:
2016-12-29
@ddalle
: First version
- get_DataBook_usurp(comp)¶
Get the
mixsur
input file for use withusurp
- Call:
>>> fname = opts.get_DataBook_usurp(comp)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- comp:
str
Name of line load data book component
- opts:
- Outputs:
- fname:
str
Name of
mixsur
input file template
- fname:
- Versions:
2017-04-06
@ddalle
: First version
- get_FLOINP(i=None)¶
Return the
FLOINP
namelist- Call:
>>> d = opts.get_raw_grid(i=None)
- Inputs:
- opts:
pyFun.options.Options
Options interface
- i:
int
orNone
Run sequence index
- opts:
- Outputs:
- d:
pyOver.options.odict
Flow inputs namelist
- d:
- Versions:
2016-02-01
@ddalle
: First version
- get_GLOBAL(i=None)¶
Return the
GLOBAL
namelist- Call:
>>> d = opts.get_GLOBAL(i=None)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- i:
int
orNone
Run sequence index
- opts:
- Outputs:
- d:
pyOver.options.odict
GLOBAL namelist
- d:
- Versions:
2016-02-01
@ddalle
: First version
- get_GridByName(grdnam, i=None)¶
Return a dictionary of options for a specific grid
- Call:
>>> d = opts.get_GridByName(grdnam, i=None)
- Inputs:
- opts: :class;`pyOver.options.Options`
Options interface
- grdnam:
str
|int
Name or number of grid to alter
- i:
int
orNone
Phase number
- Outputs:
- d:
pyOver.options.odict
Dictionary of options for grid gridnam
- d:
- Versions:
2016-02-01
@ddalle
: First version
- get_GridKey(grdnam, sec, key, i=None)¶
Select a grid option
If the option is not found for grid gridnam, default to the value in the
"ALL"
section- Call:
>>> val = opts.get_GridKey(grdnam, sec, key, i=None)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- sec:
str
Section name
- key:
str
Variable name
- i:
int
orNone
Phase number
- opts:
- Versions:
2016-02-01
@ddalle
: First version
- get_GroupMesh()¶
Determine whether or not groups have common meshes
- Call:
>>> qGM = opts.get_GroupMesh()
- Inputs:
- opts
pyCart.options.Options
Options interface
- opts
- Outputs:
- qGM:
bool
True all cases in a group use the same (starting) mesh
- qGM:
- Versions:
2014-10-06
@ddalle
: First version
- get_MeshCopyFiles(config=None)¶
Return the names of mesh files to copy
- Call:
>>> fmsh = opts.get_MeshCopyFiles()
- Inputs:
- opts:
pyOver.options.Options
Options interface
- config:
str
Name of configuration to use (optional)
- opts:
- Outputs:
- fmsh:
list
[str
] List of mesh file names to be copied to each case folder
- fmsh:
- Versions:
2016-02-01
@ddalle
: First version
- get_MeshFiles(config=None)¶
Return the original mesh file names
- Call:
>>> fname = opts.get_MeshFiles(i=None)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- config:
str
Name of configuration to use (optional)
- opts:
- Outputs:
- fname:
str
|list
[str
] Mesh file name or list of files
- fname:
- Versions:
2015-12-29
@ddalle
: First version
- get_MeshLinkFiles(config=None)¶
Return the names of mesh files to link
- Call:
>>> fmsh = opts.get_MeshLinkFiles()
- Inputs:
- opts:
pyOver.options.Options
Options interface
- config:
str
Name of configuration to use (optional)
- opts:
- Outputs:
- fmsh:
list
[str
] List of mesh file names to be copied to each case folder
- fmsh:
- Versions:
2016-02-01
@ddalle
: First version
- get_MeshType(config=None)¶
Get configuration directory containing mesh files
- Call:
>>> ftyp = opts.get_ConfigDir() >>> ftyp = opts.get_ConfigDir(config)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- config:
str
Name of configuration to use (optional)
- opts:
- Outputs:
ftyp:
str
| {dcf} | peg5- Versions:
2016-02-02
@ddalle
: First version
- get_OverNamelist(j=None)¶
Return the name of the master
over.namelist
file- Call:
>>> fname = opts.get_OverNamelist()
- Inputs:
- opts:
pyOver.options.Options
Options interface
- opts:
- Outputs:
- fname:
str
Name of OVERFLOW namelist template file
- fname:
- Versions:
2016-02-01
@ddalle
: First version
- get_Prefix(j=None)¶
Get the project rootname, or file prefix
- Call:
>>> fpre = opts.get_Prefix()
- Inputs:
- opts:
pyOver.options.Options
Options interface
- opts:
- Outputs:
- fpre:
str
Name of OVERFLOW prefix
- fpre:
- Versions:
2016-02-01
@ddalle
: First version
- get_grid_var(grdnam, sec, key, i=None)¶
Select a namelist key from a specified section
Roughly, this returns
opts[sec][key]
.- Call:
>>> val = opts.get_grid_var0(sec, key, i=None)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- sec:
str
Section name
- key:
str
Variable name
- i:
int
orNone
Phase number
- opts:
- Outputs:
- val:
int
|float
|str
|list
Value from JSON options
- val:
- Versions:
2016-02-01
@ddalle
: First version
- get_namelist_var(sec, key, i=None)¶
Select a namelist key from a specified section
Roughly, this returns
opts[sec][key]
.- Call:
>>> val = opts.get_namelist_var(sec, key, i=None)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- sec:
str
Section name
- key:
str
Variable name
- i:
int
orNone
Phase number
- opts:
- Outputs:
- val:
int
|float
|str
|list
Value from JSON options
- val:
- Versions:
2015-10-19
@ddalle
: First version2016-02-01
@ddalle
: Copied from pyFun
- get_overrun_args(j=None)¶
Get extra arguments to overrun_cmd
- Call:
>>> fargs = opts.get_overrun_args(i)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- i:
int
|None
Phase number
- opts:
- Outputs:
- fargs:
str
Extra command-line arguments/flags
- fargs:
- Versions:
2016-02-02
@ddalle
: First version
- get_overrun_aux(j=None)¶
Get auxiliary command-line inputs to
overrun
- Call:
>>> aux = opts.get_overrun_aux(i=None)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- i:
int
Phase number
- opts:
- Outputs:
- aux:
str
String to be given with
-aux
flag
- aux:
- Versions:
2016-02-01
@ddalle
: First version
- get_overrun_cmd(j=None)¶
Get the name of the OVERFLOW binary to run
- Call:
>>> fcmd = opts.get_overrun_cmd(i)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- i:
int
|None
Phase number
- opts:
- Outputs:
- fcmd:
str
Name of the command-line function to use
- fcmd:
- Versions:
2016-02-01
@ddalle
: First version
- get_overrun_kw(j=None)¶
Get other inputs to
overrun
- Call:
>>> kw = opts.get_overrun_kw(i=None)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- i:
int
Phase number
- opts:
- Outputs:
- kw:
dict
Dictionary of additional arguments to
overrun
- kw:
- Versions:
2016-02-01
@ddalle
: First version
- get_overrun_nthreads(j=None)¶
Get number of OpenMP threads for
overrunmpi
- Call:
>>> nt = opts.get_overrun_nthreads(i=None)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- i:
int
|None
Phase number
- opts:
- Outputs:
- nt: {
None
} |int
> 0 Number of OpenMP threads
- nt: {
- Versions:
2017-04-27
@ddalle
: First version
- select_namelist(i=None)¶
Reduce namelist options to a single instance (i.e. sample lists)
- Call:
>>> d = opts.select_namelist(i)
- Inputs:
- opts:
pyOver.options.Options
Options interface
- i:
int
orNone
Phase number
- opts:
- Outputs:
- d:
pyOver.options.odict
Project namelist
- d:
- Versions:
2015-10-18
@ddalle
: First version2016-02-01
@ddalle
: Copied from pyFun
- set_GroupMesh(qGM=False)¶
Specify that groups do or do not use common meshes
- Call:
>>> opts.get_GroupMesh(qGM)
- Inputs:
- opts
pyCart.options.Options
Options interface
- qGM:
bool
True all cases in a group use the same (starting) mesh
- opts
- Versions:
2014-10-06
@ddalle
: First version
cape.pyover.options.runControl.RunControl
: Run control optionscape.pyover.options.Archive
: OVERFLOW archiving optionscape.pyover.options.Config
: pyOver configurations optionscape.pyover.options.Mesh
: OVERFLOW meshing optionscape.pyover.options.overnml
: OVERFLOW namelist optionscape.pyover.options.gridSystem
: OVERFLOW grid namelist optionscape.pyover.options.DataBook
: Data book optionscape.pyover.options.Report
: pyOver Report Optionscape.pyover.options.pbs
: pyOver PBS Job Optionscape.pyover.options.util
: Utilities for pyOver options module