Skip to content

Control file reference ​

Every key of every control file, with the settings of the mesh tools and of the 3D VFSA configuration. The user pages show only the keys that are changed most often.

1D inversion (InvCtrl.GN, InvCtrl.VFSA) ​

KeyMeaning
AlgorithmGN or VFSA
Modefitted impedance: XY (Zxy), YX (Zyx = −Z), XYYX (both) or DET (√det Z)
Exit search when rms is less thantarget rms
Maximum number of iterationsiterations (per chain for VFSA)
Initial damping factor lambdaGN only: regularisation weight
Log10 resistivity boundsVFSA only: the search box; GN is unbounded
Number of chainsVFSA only: independent chains, and ensemble size

Everything else is fixed in the code:

  • GN: vertical smoothing with smallness 0.01, Levenberg–Marquardt damping 0.01, and a step of at most 0.5 in log10 ρ.

  • VFSA: every layer is a parameter (no sparse parameterisation), a fifth of them moved per proposal; temperature 0.03, cooling ratio 0.001, step scale 0.11. model.rho is the ensemble mean, and vfsa/data.best.pred holds the best chain's response.

The 1D mesh settings (first layer δ(f_max)/5, growth 1.1, depth 4 δ(f_min)) are constants at the top of examples/run_inv1D.jl.

2D forward (fwd.ctrl) ​

KeyDefaultMeaning
ModeTETMTE, TM or TETM
Strike (deg)autoauto or degrees clockwise from north (see 2D solver notes)
Air layers10number of air layers
Air thickness (m)50000total air thickness
Air growth factor2growth of the air layers upwards
Air resistivity (ohm m)1e9resistivity given to all air cells, topographic air included
Write Frechet derivativenoyes also writes G = ∂d/∂m as data.frechet
Dipole length (m)100TM electric dipole length, only used next to topographic steps

fwd.ctrl is required: it defines the air.

2D Gauss–Newton and NLCG (inv.ctrl) ​

KeyMeaning
AlgorithmGN or NLCG
Initial damping factor lambdaβ, the regularisation weight, fixed through the run
Exit search when rms is less thantarget rms
Maximum number of iterationsiteration cap
ModeTE, TM or TETM
Max log10 steplargest change of any cell in one step, in log10 ρ
Max line search stepsbacktracking steps before a step is rejected
Smallness weightweight of the smallness term in the regulariser
Smoothing weight y, Smoothing weight zweights of the horizontal and vertical first differences
GN dampingGN only: initial Levenberg–Marquardt λ
NLCG restartNLCG only: restart to steepest descent every N iterations
NLCG preconditionNLCG only: yes uses the regulariser as preconditioner

GN and NLCG are unbounded: Log10 resistivity bounds belongs to VFSA and is an error in inv.ctrl.

2D VFSA (vfsa.ctrl) ​

KeyMeaning
Maximum number of iterationsiterations per chain
Exit search when rms is less thana chain stops once its best rms reaches it
ModeTE, TM or TETM
Log10 resistivity boundsthe search box
Number of chainsindependent chains (and ensemble size)
Control pointsRBF controls per chain, drawn among the free core cells
Trials per iterationproposals per iteration; the best takes one Metropolis test
Share of controls movedcontrols perturbed per proposal (3D frac_update_controls)
Step scaleproposal width as a share of the box
Starting temperature, Cooling ratiostart temperature, on the scale of a typical relative uphill change of rms², and its ratio at the last iteration
RBF width top (cells), RBF width bottom (cells)kernel widths at the top and bottom of the core, linear in depth between (3D sigma_scale, sigma_scale_deep)
Control depth powercontrol placement weight (depth + z₁)^(−p), 0 = uniform (3D ctrl_depth_power)
Core depth (skin depths)core depth in skin depths of the data: median off-diagonal ρa, longest period
Core depth (layers)core depth as the top N layers instead, when N > 0
Core expansion (cells)cells added to each side of the uniform lateral core (3D core_expand_cells)
Padding decay (core cells)e-fold of the blend from the core edge back to the start model
Random seedchain k uses seed + 1000(k−1)
Snapshot intervalwrite each chain's best model every N iterations (0 = off)

ReadVFSACtrl2D and WriteVFSACtrl2D read and write the file, and VFSA2DConfig(ctrl) turns it into the in-memory configuration.

mask.ctrl ​

Our own format: a first line ny nz, then nz rows of ny integers, top row first. The values are those of the covariance mask: 0 = air or fixed, 9 = water, others free. cov.ctrl keeps the ModEM covariance layout, but only its mask is read.

MakeMesh2D ​

SettingDefaultMeaning
cell_width_frac0.5core cell width as a fraction of the median station spacing
core_margin_cells4core cells beyond the outer stations
n_pad, pad_factor12, 1.3lateral padding cells each side and their growth
first_layer_div5first layer = δ(f_max) / this
vertical_factor1.1layer growth with depth
depth_mult4model depth = this × δ(f_min)
background_resistivity00 = median apparent resistivity of the data
air_layers, air_thickness, air_growth, air_resistivity10, 50 km, 2, 1e9the air in fwd.ctrl
dipole_length100TM dipole averaging next to topographic steps
cov_smoothing, n_smooth0.3, 1smoothing values kept in the ModEM covariance layout
fixed_below_mInffix cells below this depth (mask 0)
water_resistivity100lakes and sea
strikenothingnothing = auto from the data, or degrees clockwise from north; written to fwd.ctrl
inv_ctrlexamples/ctrl/2D/InvCtrl.GNcopied as inv.ctrl
vfsa_ctrlexamples/ctrl/2D/InvCtrl.VFSAcopied as vfsa.ctrl

The core is centred on y = 0 (the data's origin), as ModEM expects.

VFSA3DMTConfig ​

Fields without a default must be given; examples/run_vfsa3D.jl sets all of them.

FieldDefaultMeaning
nprocsMPI processes for each ModEM forward call
mpirun_cmdMPI launcher, e.g. "mpirun" or "srun"
modem_exeModEM executable
fwd_ctrl""ModEM forward control file; "" uses the binary's compiled-in solver defaults
out_rootrun folder base name; _<timestamp> is appended, relative paths sit next to the start model
n_ctrlGaussian RBF control points in the core
frac_update_controlsshare of controls perturbed per trial
log_boundssearch box in log10 Ω·m
step_scalelargest control jump, as a share of the box width
max_iteriteration cap; also sets the cooling timescale
n_trialstrials per iteration; the best takes one Metropolis test (1 = classic VFSA)
T0, cool_ratiostart temperature, and the final temperature as a share of it
target_rmsearly-stop rms
seedrandom seed
pad_toltolerance of the core/padding detection
core_expand_cells0grow the lateral core by N cells per side
padding_decay_lengthlateral padding blend e-fold, in core cells
z_core_skin_depths1.0core depth in data skin depths (Inf = full column)
z_core_cells0core depth as the top N layers instead, when N > 0
keep_models, keep_dpredkeep every trial model and predicted data file
model_save_every> 0 keeps the winning trial model every N iterations
sigma_scale, sigma_scale_deepRBF 1σ in cells at the top and bottom of the core
trunc_sigmasRBF kernels are cut beyond this many σ
ctrl_depth_powercontrol placement weight (depth + z₁)^(−p)
water_log10start-model cells below this log10 ρ are frozen water (NaN = off)
bathymetry_filefrozen water from a bathymetry file instead ("" = off)
distortion_mode:off:on fits a per-site 2 × 2 galvanic distortion matrix at every misfit evaluation
distortion_damping0.01pull of that matrix towards the identity; Inf = correction off