cape.pycart.archivist: Archiving actions specific to Cart3D¶
This module provides customizations of the generic
cape.cfdx.archivist.CaseArchivist that assist in reducing the
file count while running Cart3D, especially in adaptive mode.
- class cape.pycart.archivist.CaseArchivist(opts: ArchiveOpts, where: str | None = None, casename: str | None = None)¶
Bases:
CaseArchivistCustom case archiving class for Cart3D
- Call:
>>> a = CaseArchivist(opts, where=None, casename=None)
- Inputs:
- archivedir¶
- casename¶
- clean_checkfiles(istart: int = 0, test: bool = False)¶
Clear check files that were created since iteration istart
- Call:
>>> a.clean_checkfiles(istart=0)
- Inputs:
- a:
CaseArchivist Archive controller for one case
- istart:
int Do not delete check files prior to iteration istart
- test:
True| {False} If
True, log which files would be deleted, but don’t actually delete, copy, or tar anything
- a:
- Versions:
2016-03-04
@ddalle: v1.0 (cape.pycart.manage)2024-09-24
@ddalle: v2.0; CaseArchivist
- logger¶
- opts¶
- root_dir¶
- tar_adapt(test: bool = False)¶
Tar
adaptXXfolders except most recentNo action will be taken if the TarAdapt setting is
False.For example, if there are 3 adaptations in the current folder, the following substitutions will be made.
adapt00/–>adapt00.taradapt01/–>adapt01.taradapt02/–>adapt02.taradapt03/
The most recent adaptation is left untouched, and the old folders are deleted.
- Call:
>>> a.tar_adapt(test=False)
- Inputs:
- a:
CaseArchivist Archive controller for one case
- test:
True| {False} If
True, log which files would be deleted, but don’t actually delete, copy, or tar anything
- a:
- Versions:
2014-11-12
@ddalle: v1.0 (cape.pycart.manage)2015-01-10
@ddalle: v1.1; format as an option2015-12-02
@ddalle: v1.2; Options2024-06-24
@ddalle: v1.3; never taradapt002024-09-24
@ddalle: v2.0; CaseArchivist
- tar_viz(test: bool = False)¶
Move visualization surface and cut plane files to tar balls
This reduces file count by tarring
Components.i.*.pltandcutPlanes.*.plt.- Call:
>>> a.tar_viz(test=False)
- Inputs:
- a:
CaseArchivist Archive controller for one case
- test:
True| {False} If
True, log which files would be deleted, but don’t actually delete, copy, or tar anything
- a:
- Versions:
2014-12-18
@ddalle: v1.0 (cape.pycart.manage)2015-01-10
@ddalle: v1.1; add format option2024-09-24
@ddalle: v2.0; CaseArchivist