# 4.6.2. Batch Inversion¶

With a BatchInversion object, the user can schedule to run several independent inversions (data, topography, mesh) but with common inversion parameters. This Workflow was primarily designed to reduce the processing time of DCIP2D data. Inversion objects are created and stored under a common folder structure. Recovered models can be merged for viewing in 3D.

## 4.6.2.1. Create Batch Inversion¶

Batch Inversion object can be created through the Project menu structure:

CreateWorkflowBatch Inversion

A BatchInversion folder will be created in your project directory. The following sections cover the different options available under the Batch Inversion menu structure.

## 4.6.2.2. Set Inversion (Template)¶

This option will prompt a menu for the selection of an Inversion object used as a template for all subsequent inversions. General inversion options, such as $$\alpha$$-values, reference and starting models can be set on this object.

WorkflowSet Template

## 4.6.2.3. Select Data Objects¶

This option will prompt a menu for the selection of Data objects, for which an Inversion object will be created.

WorkflowSelect Data Objects

[OPTIONAL]: For DCIP2D inversions, a second menu for the selection of TOPO2Ddata objects will follow:

If none are selected, the Batch Inversion will default to the input topography of the Template.

## 4.6.2.4. Create/Write Inversions¶

With this option, the Batch Inversion routine copies the Template and replace only the components specific to each inversions (data, mesh, topography). By default, the selected Data and TOPO2Ddata objects will be copied to the newly created inversion object.

WorkflowCreate/Write all

## 4.6.2.5. Run Inversions¶

Option to run all the inversion in series.

WorkflowRun

### 4.6.2.5.1. OPTION 1: Run locally¶

Just as for any other inversion programs, the Fortran executable can be called locally. The user has to wait for all inversions to be completed before carrying on with the project.

### 4.6.2.5.2. OPTION 2: Run Setup (Cloud)¶

This option allows the user to run the series of inversion on a remote computer (cloud). Files and directories needed for the individual inversions are stored to disk, along with a Python script for the execution. The user will need to copy the content of the inversion directory as well as the BatchInversion.py script. To run the script type in a command line:

python BatchInversion.py [Directory] [FortranCode]

where:

[Directory] is the relative path between the python script and the input files. If the same folder, use .\

[FortranCode] is name of the inversion routine to be used (e.g. dcinv2d, maginv3d)

Selecting this option triggers GIFtools to seek for results in the corresponding list of directories associated with individual inversion objects. If the inversion was run on a remote machine, the directories must be copied in the working directory of the parent BatchInversion. Only the last model and predicted will be loaded, but convergence curves can be viewed.
• For DCIP2D, geometric transformations between local coordinate and global 3D coordinates are calculated from a DCIP3Ddata object containing the LineID identifier for each 2D inversions.
• For general GIFmodel 3D objects, the Merge 3D Model menu option lets the user apply geometric transformation (Shift+Rotation) to each models used by the interpolation.