Overview of the typical MARE2DEM workflow for forward and inverse modeling.

The diagram above gives an overview of the typical MARE2DEM workflow. Here's a brief summary step-by-step run through:

**Inputs**include any EM data, a topography profile and any other*a priori*geologic information you wish to incorporate into the forward or inverse model.**Create the model and data files.**On your laptop or desktop, you create the model domain using the MATLAB code*Mamba2D.m,*which outputs a few files describing the model geometry, resistivity parameters and the inversion penalty matrix. Real data can be written to the MARE2DEM data format using the routine*writeEMData2DFile.m*. For forward modeling, you can use this routine to create a dummy data file that lists the desired sources, receivers and frequencies.**Run MARE2DEM on your laptop, desktop or cluster.**If running on a cluster, you will first need to upload the model and data files created in step 2. MARE2DEM will output a bunch of text to the screen informing you of its progress. For inversions, there will also be an output .logfile detailing Occam's performance; at the end of each successful iteration, the new inversion model and its response will be written to a files.**View the results on your laptop or desktop.**The inversion model files can be viewed using the MATLAB routine*plotMARE2DEM.m.*Model responses (as well as data) can be viewed and interacted with using*plotMARE2DEM_MT.m*and*plotMARE2DEM_CSEM.m*. At this point you may decide you want to change the forward model and recompute results, or you may want to eliminate some noisy data from an inversion; if so, carry our some quality control inspections and head back to step 2.

#### Summary of the main MATLAB routines

*Mamba2D.m*- creates forward and inverse models*plotMARE2DEM.m*- for viewing for forward and inverse models*plotMARE2DEM_MT.m*- for viewing and interacting with MT data and model responses*plotMARE2DEM_CSEM.m*- for viewing and interacting with CSEM data and model responses*writeEMData2DFile.m*- routine that will write a MARE2DEM format data file. If you can already import your data into MATLAB, then interfacing with this routine is all you need to get your data ready for MARE2DEM inversion.*readEMData2DFile.m*- routine that will read a MARE2DEM format data file. This may be useful if you want to write your own custom plotting utility.- There are a bunch of other helper functions in the MATLAB folder that these routines rely upon.