cape.pycart.options.archiveopts
: Cart3D archiving options¶
This module provides Cart3D-specific modifications to the base archiving options module.
- See also:
- class cape.pycart.options.archiveopts.ArchiveOpts(*args, **kw)¶
Archiving options interface
- Call:
>>> opts = ArchiveOpts(**kw)
- Versions:
2015-09-28
@ddalle
: Version 1.02016-03-01
@ddalle
: Version 1.1; custom settings2022-10-21
@ddalle
: Version 2.0; usecape.optdict
- get_NCheckPoint(j=None, i=None, **kw)¶
Get number of check point files to keep
- Call:
>>> NCheckPoint = opts.get_NCheckPoint(j=None, i=None, **kw)
- Inputs:
- opts: ArchiveOpts
options interface
- j: {
None
} |int
Phase index; use
None
to 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
list
ordict
- Outputs:
- NCheckPoint: {
2
} |int
number of check point files to keep
- NCheckPoint: {
- get_TarAdapt(j=None, i=None, **kw)¶
Get archive option for adapt folders
- Call:
>>> TarAdapt = opts.get_TarAdapt(j=None, i=None, **kw)
- Inputs:
- opts: ArchiveOpts
options interface
- j: {
None
} |int
Phase index; use
None
to 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
list
ordict
- Outputs:
- TarAdapt:
'full'
|'none'
| {'restart'
} archive option for adapt folders
- TarAdapt:
- get_TarViz(j=None, i=None, **kw)¶
Get archive option for visualization files
- Call:
>>> TarViz = opts.get_TarViz(j=None, i=None, **kw)
- Inputs:
- opts: ArchiveOpts
options interface
- j: {
None
} |int
Phase index; use
None
to 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
list
ordict
- Outputs:
- TarViz:
'full'
|'none'
| {'restart'
} archive option for visualization files
- TarViz:
- set_NCheckPoint(v, j=None, mode=None)¶
Get number of check point files to keep
- Call:
>>> opts.set_NCheckPoint(NCheckPoint, j=None, i=None, **kw)
- Inputs:
- opts: ArchiveOpts
options interface
- NCheckPoint: {
2
} |int
number of check point files to keep
- j: {
None
} |int
Phase index; use
None
to 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_TarAdapt(v, j=None, mode=None)¶
Get archive option for adapt folders
- Call:
>>> opts.set_TarAdapt(TarAdapt, j=None, i=None, **kw)
- Inputs:
- opts: ArchiveOpts
options interface
- TarAdapt:
'full'
|'none'
| {'restart'
} archive option for adapt folders
- j: {
None
} |int
Phase index; use
None
to 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_TarViz(v, j=None, mode=None)¶
Get archive option for visualization files
- Call:
>>> opts.set_TarViz(TarViz, j=None, i=None, **kw)
- Inputs:
- opts: ArchiveOpts
options interface
- TarViz:
'full'
|'none'
| {'restart'
} archive option for visualization files
- j: {
None
} |int
Phase index; use
None
to 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.pycart.options.archiveopts.auto_Archive(opts)¶
Automatically convert dict to pyover
ArchiveOpts
- Call:
>>> opts = auto_Archive(opts)
- Inputs:
- opts:
dict
Dict of either global, “RunControl” or “Archive” options
- opts:
- Outputs:
- opts:
ArchiveOpts
Instance of archiving options
- opts:
- Versions:
2016-02-29
@ddalle
: Version 1.02022-10-21
@ddalle
: Version 2.0; generic call