cape.pyover.options: Options interface for pyOver/OVERFLOW¶
cape.pyover.options: Options interface for cape,pyover¶
This is the OVERFLOW-specific implementation of the CAPE options package, based on
- class cape.pyover.options.Options(*args, **kw)¶
Options interface for
cape.pyover- Call:
>>> opts = Options(fname=None, **kw)
- Inputs:
- Outputs:
- opts:
cape.pyover.options.Options Options interface
- opts:
- Versions:
2014-07-28
@ddalle: Version 1.02022-11-03
@ddalle: Version 2.0
- get_ALL(j=None, **kw)¶
Return the
ALLnamelist of settings applied to all grids- Call:
>>> d = opts.get_ALL(i=None)
- Inputs:
- opts:
pyOver.options.Options Options interface
- i:
intorNone Phase number
- opts:
- Outputs:
- d:
pyOver.options.odict ALL namelist
- d:
- Versions:
2016-02-01
@ddalle: v1.0
- get_DataBook_QIn(comp=None, j=None, i=None, **kw)¶
Get input
qfile
- get_DataBook_QOut(comp=None, j=None, i=None, **kw)¶
Get preprocessed
qfile for a databook component
- get_DataBook_QSurf(comp=None, j=None, i=None, **kw)¶
Get preprocessed
q.srffile name
- get_DataBook_XIn(comp=None, j=None, i=None, **kw)¶
Get input
xfile
- get_DataBook_XOut(comp=None, j=None, i=None, **kw)¶
Get preprocessed
xfile for a databook component
- get_DataBook_XSurf(comp=None, j=None, i=None, **kw)¶
Get preprocessed
x.srffile name
- get_DataBook_fomo(comp=None, j=None, i=None, **kw)¶
Get path to
mixsuroutput filesIf each of the following files is found, there is no need to run
mixsur, and files are linked instead.grid.i.trigrid.bndgrid.ibgrid.ibigrid.mapgrid.nsfgrid.ptvmixsur.fmp
- Call:
>>> fomo = opts.get_DataBook_fomo(comp=None, i=None, **kw)
- Inputs:
- Outputs:
- fomo: {
None} |str path to
mixsuroutput files
- fomo: {
If each of the following files is found, there is no need to run
mixsur, and files are linked instead.grid.i.trigrid.bndgrid.ibgrid.ibigrid.mapgrid.nsfgrid.ptvmixsur.fmp
- get_DataBook_mixsur(comp=None, j=None, i=None, **kw)¶
Get input file for
mixsur,overint, orusurp
- get_DataBook_splitmq(comp=None, j=None, i=None, **kw)¶
Get input file for
splitmq
- get_DataBook_usurp(comp=None, j=None, i=None, **kw)¶
Get input file for
usurp
- get_GridByName(grdnam, j=None, **kw)¶
Return a dictionary of options for a specific grid
- get_MeshConfigDir(j=None, i=None, **kw)¶
Get folder from which to copy/link mesh files
- Call:
>>> ConfigDir = opts.get_MeshConfigDir(j=None, i=None, **kw)
- Inputs:
- opts: MeshOpts
options interface
- j: {
None} |int Phase index; use
Noneto just return v- i: {
None} |int|np.ndarray opts.x index(es) to use with
@expr,@map, etc.- vdef: {
None} |object Manual default
- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- ring: {opts._optring[key]} |
True|False Override option to loop through phase inputs
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- x: {
None} |dict Ref conditions to use with
@expr,@map, etc.; often a run matrix; used in combination with i- sample: {
True} |False Apply j, i, and other settings recursively if output is a
listordict
- Outputs:
- ConfigDir: {
None} |str folder from which to copy/link mesh files
- ConfigDir: {
- get_MeshCopyFiles(j=None, i=None, **kw)¶
Get list of files to copy into case folder
- Call:
>>> CopyFiles = opts.get_MeshCopyFiles(j=None, i=None, **kw)
- Inputs:
- opts: MeshOpts
options interface
- j: {
None} |int Phase index; use
Noneto just return v- i: {
None} |int|np.ndarray opts.x index(es) to use with
@expr,@map, etc.- vdef: {
None} |object Manual default
- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- ring: {opts._optring[key]} |
True|False Override option to loop through phase inputs
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- x: {
None} |dict Ref conditions to use with
@expr,@map, etc.; often a run matrix; used in combination with i- sample: {
True} |False Apply j, i, and other settings recursively if output is a
listordict
- Outputs:
- get_MeshFiles(**kw)¶
Return full list of mesh file names
- Call:
>>> fnames = opts.get_MeshFiles(**kw)
- Inputs:
- opts:
cape.pyover.options.Options Options interface
- opts:
- Outputs:
- Versions:
2015-12-29
@ddalle: v1.02023-03-17
@ddalle: v2.0; useOptionsDict
- get_MeshLinkFiles(j=None, i=None, **kw)¶
Get list of files to link into case folder
- Call:
>>> LinkFiles = opts.get_MeshLinkFiles(j=None, i=None, **kw)
- Inputs:
- opts: MeshOpts
options interface
- j: {
None} |int Phase index; use
Noneto just return v- i: {
None} |int|np.ndarray opts.x index(es) to use with
@expr,@map, etc.- vdef: {
None} |object Manual default
- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- ring: {opts._optring[key]} |
True|False Override option to loop through phase inputs
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- x: {
None} |dict Ref conditions to use with
@expr,@map, etc.; often a run matrix; used in combination with i- sample: {
True} |False Apply j, i, and other settings recursively if output is a
listordict
- Outputs:
- get_MeshType(j=None, i=None, **kw)¶
Get overall meshing stragety
- Call:
>>> Type = opts.get_MeshType(j=None, i=None, **kw)
- Inputs:
- opts: MeshOpts
options interface
- j: {
None} |int Phase index; use
Noneto just return v- i: {
None} |int|np.ndarray opts.x index(es) to use with
@expr,@map, etc.- vdef: {
None} |object Manual default
- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- ring: {opts._optring[key]} |
True|False Override option to loop through phase inputs
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- x: {
None} |dict Ref conditions to use with
@expr,@map, etc.; often a run matrix; used in combination with i- sample: {
True} |False Apply j, i, and other settings recursively if output is a
listordict
- Outputs:
- Type:
'dcf'|'peg5' overall meshing stragety
- Type:
- get_OverNamelist(j=None, i=None, **kw)¶
Get name of template
overflow.inpfile- Call:
>>> OverNamelist = opts.get_OverNamelist(j=None, i=None, **kw)
- Inputs:
- opts: Options
options interface
- j: {
None} |int Phase index; use
Noneto just return v- i: {
None} |int|np.ndarray opts.x index(es) to use with
@expr,@map, etc.- vdef: {
None} |object Manual default
- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- ring: {opts._optring[key]} |
True|False Override option to loop through phase inputs
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- x: {
None} |dict Ref conditions to use with
@expr,@map, etc.; often a run matrix; used in combination with i- sample: {
True} |False Apply j, i, and other settings recursively if output is a
listordict
- Outputs:
- OverNamelist: {
'overflow.inp'} |str name of template
overflow.inpfile
- OverNamelist: {
- get_Prefix(j=None, i=None, **kw)¶
Get project root name, or file prefix
- Call:
>>> Prefix = opts.get_Prefix(j=None, i=None, **kw)
- Inputs:
- opts: RunControlOpts
options interface
- j: {
None} |int Phase index; use
Noneto just return v- i: {
None} |int|np.ndarray opts.x index(es) to use with
@expr,@map, etc.- vdef: {
None} |object Manual default
- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- ring: {opts._optring[key]} |
True|False Override option to loop through phase inputs
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- x: {
None} |dict Ref conditions to use with
@expr,@map, etc.; often a run matrix; used in combination with i- sample: {
True} |False Apply j, i, and other settings recursively if output is a
listordict
- Outputs:
- Prefix: {
'run'} |str project root name, or file prefix
- Prefix: {
- get_namelist_var(sec, key, j=None, **kw)¶
Select a namelist key from a specified section
Roughly, this returns
opts[sec][key].- Call:
>>> val = opts.get_namelist_var(sec, key, j=None, **kw)
- Inputs:
- Outputs:
- val:
object Value from JSON options
- val:
- Versions:
2016-02-01
@ddalle: v1.02023-05-16
@ddalle: v2.0; useOptionsDict
- get_overrun(j=None, i=None, **kw)¶
Get value of option “overrun”
- Call:
>>> overrun = opts.get_overrun(j=None, i=None, **kw)
- Inputs:
- opts: RunControlOpts
options interface
- j: {
None} |int Phase index; use
Noneto just return v- i: {
None} |int|np.ndarray opts.x index(es) to use with
@expr,@map, etc.- vdef: {
None} |object Manual default
- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- ring: {opts._optring[key]} |
True|False Override option to loop through phase inputs
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- x: {
None} |dict Ref conditions to use with
@expr,@map, etc.; often a run matrix; used in combination with i- sample: {
True} |False Apply j, i, and other settings recursively if output is a
listordict
- Outputs:
- overrun: {
None} |object value of option “overrun”
- overrun: {
- get_overrun_args(j=None, i=None, **kw)¶
Get string of extra args to
overrun- Call:
>>> args = opts.get_overrun_args(j=None, i=None, **kw)
- Inputs:
- opts: OverrunOpts
options interface
- j: {
None} |int Phase index; use
Noneto just return v- i: {
None} |int|np.ndarray opts.x index(es) to use with
@expr,@map, etc.- vdef: {
None} |object Manual default
- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- ring: {opts._optring[key]} |
True|False Override option to loop through phase inputs
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- x: {
None} |dict Ref conditions to use with
@expr,@map, etc.; often a run matrix; used in combination with i- sample: {
True} |False Apply j, i, and other settings recursively if output is a
listordict
- Outputs:
- args: {
''} |str string of extra args to
overrun
- args: {
- get_overrun_aux(j=None, i=None, **kw)¶
Get auxiliary CLI args to
overrun- Call:
>>> aux = opts.get_overrun_aux(j=None, i=None, **kw)
- Inputs:
- opts: OverrunOpts
options interface
- j: {
None} |int Phase index; use
Noneto just return v- i: {
None} |int|np.ndarray opts.x index(es) to use with
@expr,@map, etc.- vdef: {
None} |object Manual default
- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- ring: {opts._optring[key]} |
True|False Override option to loop through phase inputs
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- x: {
None} |dict Ref conditions to use with
@expr,@map, etc.; often a run matrix; used in combination with i- sample: {
True} |False Apply j, i, and other settings recursively if output is a
listordict
- Outputs:
- aux: {
'"-v pcachem -- dplace -s1"'} |str auxiliary CLI args to
overrun
- aux: {
- get_overrun_cmd(j=None, i=None, **kw)¶
Get name of OVERFLOW executable to use
- Call:
>>> cmd = opts.get_overrun_cmd(j=None, i=None, **kw)
- Inputs:
- opts: OverrunOpts
options interface
- j: {
None} |int Phase index; use
Noneto just return v- i: {
None} |int|np.ndarray opts.x index(es) to use with
@expr,@map, etc.- vdef: {
None} |object Manual default
- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- ring: {opts._optring[key]} |
True|False Override option to loop through phase inputs
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- x: {
None} |dict Ref conditions to use with
@expr,@map, etc.; often a run matrix; used in combination with i- sample: {
True} |False Apply j, i, and other settings recursively if output is a
listordict
- Outputs:
- cmd: {
'overrunmpi'} |str name of OVERFLOW executable to use
- cmd: {
- get_overrun_kw(j=None, **kw)¶
Get other inputs to
overrun- Call:
>>> kw = opts.get_overrun_kw(i=None)
- Inputs:
- opts:
cape.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: Version 1.02022-11-03
@ddalle: Version 2.0;OptionsDict
- get_overrun_nthreads(j=None, i=None, **kw)¶
Get number of OpenMP threads
- Call:
>>> nthreads = opts.get_overrun_nthreads(j=None, i=None, **kw)
- Inputs:
- opts: OverrunOpts
options interface
- j: {
None} |int Phase index; use
Noneto just return v- i: {
None} |int|np.ndarray opts.x index(es) to use with
@expr,@map, etc.- vdef: {
None} |object Manual default
- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- ring: {opts._optring[key]} |
True|False Override option to loop through phase inputs
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- x: {
None} |dict Ref conditions to use with
@expr,@map, etc.; often a run matrix; used in combination with i- sample: {
True} |False Apply j, i, and other settings recursively if output is a
listordict
- Outputs:
- nthreads: {
None} |int number of OpenMP threads
- nthreads: {
- get_overrun_v(j=None, i=None, **kw)¶
Get overrun verbosity option
- Call:
>>> v = opts.get_overrun_v(j=None, i=None, **kw)
- Inputs:
- opts: OverrunOpts
options interface
- j: {
None} |int Phase index; use
Noneto just return v- i: {
None} |int|np.ndarray opts.x index(es) to use with
@expr,@map, etc.- vdef: {
None} |object Manual default
- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- ring: {opts._optring[key]} |
True|False Override option to loop through phase inputs
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- x: {
None} |dict Ref conditions to use with
@expr,@map, etc.; often a run matrix; used in combination with i- sample: {
True} |False Apply j, i, and other settings recursively if output is a
listordict
- Outputs:
- v: {
None} |True|False overrun verbosity option
- v: {
- init_post()¶
Initialization hook for
Options- Call:
>>> opts.init_post()
- Inputs:
- opts:
Options Options interface
- opts:
- Versions:
2022-10-23
@ddalle: Version 1.0
- select_namelist(j=0, **kw)¶
Sample namelist at particular conditions
- set_MeshConfigDir(v, j=None, mode=None)¶
Get folder from which to copy/link mesh files
- Call:
>>> opts.set_MeshConfigDir(ConfigDir, j=None, i=None, **kw)
- Inputs:
- opts: MeshOpts
options interface
- ConfigDir: {
None} |str folder from which to copy/link mesh files
- j: {
None} |int Phase index; use
Noneto just return v- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- set_MeshCopyFiles(v, j=None, mode=None)¶
Get list of files to copy into case folder
- Call:
>>> opts.set_MeshCopyFiles(CopyFiles, j=None, i=None, **kw)
- Inputs:
- opts: MeshOpts
options interface
- CopyFiles: {
[]} |list[str] list of files to copy into case folder
- j: {
None} |int Phase index; use
Noneto just return v- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- set_MeshLinkFiles(v, j=None, mode=None)¶
Get list of files to link into case folder
- Call:
>>> opts.set_MeshLinkFiles(LinkFiles, j=None, i=None, **kw)
- Inputs:
- opts: MeshOpts
options interface
- LinkFiles: {
['grid.in', 'xrays.in', 'fomo/grid.ibi', 'fomo/grid.nsf', 'fomo/grid.ptv', 'fomo/mixsur.fmp']} |list[str] list of files to link into case folder
- j: {
None} |int Phase index; use
Noneto just return v- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- set_MeshType(v, j=None, mode=None)¶
Get overall meshing stragety
- Call:
>>> opts.set_MeshType(Type, j=None, i=None, **kw)
- Inputs:
- opts: MeshOpts
options interface
- Type:
'dcf'|'peg5' overall meshing stragety
- j: {
None} |int Phase index; use
Noneto just return v- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- set_OverNamelist(v, j=None, mode=None)¶
Get name of template
overflow.inpfile- Call:
>>> opts.set_OverNamelist(OverNamelist, j=None, i=None, **kw)
- Inputs:
- opts: Options
options interface
- OverNamelist: {
'overflow.inp'} |str name of template
overflow.inpfile- j: {
None} |int Phase index; use
Noneto just return v- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- set_Prefix(v, j=None, mode=None)¶
Get project root name, or file prefix
- Call:
>>> opts.set_Prefix(Prefix, j=None, i=None, **kw)
- Inputs:
- opts: RunControlOpts
options interface
- Prefix: {
'run'} |str project root name, or file prefix
- j: {
None} |int Phase index; use
Noneto just return v- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- set_overrun(v, j=None, mode=None)¶
Get value of option “overrun”
- Call:
>>> opts.set_overrun(overrun, j=None, i=None, **kw)
- Inputs:
- opts: RunControlOpts
options interface
- overrun: {
None} |object value of option “overrun”
- j: {
None} |int Phase index; use
Noneto just return v- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- set_overrun_args(v, j=None, mode=None)¶
Get string of extra args to
overrun- Call:
>>> opts.set_overrun_args(args, j=None, i=None, **kw)
- Inputs:
- opts: OverrunOpts
options interface
- args: {
''} |str string of extra args to
overrun- j: {
None} |int Phase index; use
Noneto just return v- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- set_overrun_aux(v, j=None, mode=None)¶
Get auxiliary CLI args to
overrun- Call:
>>> opts.set_overrun_aux(aux, j=None, i=None, **kw)
- Inputs:
- opts: OverrunOpts
options interface
- aux: {
'"-v pcachem -- dplace -s1"'} |str auxiliary CLI args to
overrun- j: {
None} |int Phase index; use
Noneto just return v- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- set_overrun_cmd(v, j=None, mode=None)¶
Get name of OVERFLOW executable to use
- Call:
>>> opts.set_overrun_cmd(cmd, j=None, i=None, **kw)
- Inputs:
- opts: OverrunOpts
options interface
- cmd: {
'overrunmpi'} |str name of OVERFLOW executable to use
- j: {
None} |int Phase index; use
Noneto just return v- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- set_overrun_nthreads(v, j=None, mode=None)¶
Get number of OpenMP threads
- Call:
>>> opts.set_overrun_nthreads(nthreads, j=None, i=None, **kw)
- Inputs:
- opts: OverrunOpts
options interface
- nthreads: {
None} |int number of OpenMP threads
- j: {
None} |int Phase index; use
Noneto just return v- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
- set_overrun_v(v, j=None, mode=None)¶
Get overrun verbosity option
- Call:
>>> opts.set_overrun_v(v, j=None, i=None, **kw)
- Inputs:
- opts: OverrunOpts
options interface
- v: {
None} |True|False overrun verbosity option
- j: {
None} |int Phase index; use
Noneto just return v- mode: {
None} |0|1|2|3 Warning mode code
0:no checks
1:validate silently
2:validate and show warnings
3:raise an exception if invalid
- listdepth: {
0} |int> 0 Depth of list to treat as a scalar
cape.pyover.options.archiveopts: OVERFLOW archiving optionscape.pyover.options.runctlopts: OVERFLOW run control optionscape.pyover.options.overnml: OVERFLOW namelist optionscape.pyover.options.gridSystem: OVERFLOW grid namelist optionscape.pyover.options.util: Utilities for pyOver options module