Skip to content

1D forward modelling ​

In 1D the earth is a stack of flat layers, each with its own resistivity. For such an earth the MT response can be computed exactly, layer by layer from the bottom up, without a mesh. In this section we compute the 1D response of a model and write it to a data file.

Run the example ​

bash
julia --project=. helpers/benchmarks_1D.jl    # writes examples/data/1D-I
julia --project=. examples/run_fwd1D.jl       # model.true -> data.pred and a plot

The example model, 1D-I, has five layers (100, 20, 350, 40 and 800 Ω·m) under one station, with 23 frequencies from 0.003 to 1000 Hz.

From Julia ​

julia
using MTGeophysics

pred = ForwardSolve1D("model.rho", "data.dat"; mode = :XYYX)   # writes data.pred

ForwardSolve1D computes the response of model.rho at the stations and frequencies of data.dat and writes it next to the data. mode chooses which impedance is written: :XY, :YX, both (:XYYX) or the determinant (:DET).

The model file ​

A 1D model uses the 2D model layout with a single column. It lists the layer thicknesses from the surface down, then ln ρ for each layer. The last layer is the halfspace. See Data and model files.

Working in memory ​

In memory a 1D model is just two vectors: the layer thicknesses h and the resistivities ρ.

julia
h = mt1d_layers(frequencies; background_resistivity = 100, first_layer_div = 5)
ρ = fill(100.0, length(h))
Z = mt1d_impedance(frequencies, ρ, h)    # Zxy; Zyx = -Zxy
G = mt1d_frechet(frequencies, ρ, h)      # sensitivity ∂Z/∂log10 ρ

Here mt1d_layers builds layers from skin depths, and mt1d_frechet gives the sensitivity of the response to each layer, which the 1D inversion uses.