cape.pyover.options.Archive
: OVERFLOW archiving options¶
This module provides OVERFLOW-specific modifications to the base archiving
options module in cape.cfdx.options.Archive
. Default options for which files
to delete or tar are specific to each solver, and thus a few modifications are
necessary for each solver in order to define good default values for archiving.
The following default values are copied from the source code of this module.
Default behavior for OVERFLOW case archiving is to copy several of the large files (such as mesh, solution, etc.) and create several tar bombs. The default tar bombs that are created within an archive folder are specified in two separate commands. For each dictionary, the name of the key is the name of the tar bomb and the list on the right-hand side is a list of file globs that go into the tar. These are set or modified in the ArchivePostTarGroups setting of the FUN3D archiving section.
# Plot3D files Plot3DDict = [ {"brkset.[0-9]*": 1}, {"q.[0-9]*": 1}, {"x.[0-9]*": 1}, ] # Run output files RunDict = [ {"run": "run.[0-9frtls][0-9oeup]*"}, {"out": "*.out"}, {"SurfBC": "SurfBC*.dat"}, {"pyover": [ "pyover*", "case.json", "conditions.json" ]}, {"meshinfo": [ "Config.xml", "grdwghts.save", "mixsur.save", "walldist.save" ]} ]
Grid, solution, and post-processing files that are directly copied to the
archive are set using the following code. This affects the ArchiveFiles
setting. The bewildering file glob for q
, x
, and brkset
files are
trying to capture both x.restart
and x.save
with one glob.
# Flow files CopyFiles = [ "INTOUT", "XINTOUT", "q.avg", "q.srf", "x.srf", {"q.[sr0-9][ae0-9][vs0-9][et0-9]*": 1}, {"x.[sr0-9][ae0-9][vs0-9][et0-9]*": 1}, {"brkset.[sr0-9][ae0-9][vs0-9][et0-9]*": 1} ]
Further files to be deleted upon use of the --skeleton
command are defined
using the following code. This is the SkeletonFiles and TailFiles settings.
Note that SkeletonFiles are defined in reverse order; the user specifies the
files to keep, not delete.
# Skeleton SkeletonFiles = [ "case.json", "conditions.json", "archive.log", "run.[0-9]*.inp", "run.[0-9]*.[0-9]*", "lineload/grid.i.triq", ] # Tail files TailFiles = [ {"run.resid": [1, "run.tail.resid"]}, ]
The TailFiles settings causes pyOver to run the command
$ tail -n 1 run.resid > run.tail.resid
- class cape.pyover.options.Archive.Archive(**kw)¶
Dictionary-based interfaced for options specific to folder management
- Call:
>>> opts = Archive(**kw)
- Versions:
2015-09-28
@ddalle
: Subclassed to CAPE2016-03-01
@ddalle
: Upgraded custom settings
- apply_ArchiveTemplate()¶
Apply named template to set default files to delete/archive
- Call:
>>> opts.apply_ArchiveTemplate()
- Inputs:
- opts:
pyCart.options.Options
Options interface
- opts:
- Versions:
2016-02-29
@ddalle
: First version
- cape.pyover.options.Archive.auto_Archive(opts)¶
Automatically convert dict to
cape.pycart.options.Archive.Archive
- Call:
>>> opts = auto_Archive(opts)
- Inputs:
- opts:
dict
Dict of either global, “RunControl” or “Archive” options
- opts:
- Outputs:
- opts:
pyCart.options.Archive.Archive
Instance of archiving options
- opts:
- Versions:
2016-02-29
@ddalle
: First version