This code performs the inversion using magnetic and gravity anomaly data jointly, and reveals the subsurface magnetic and gravity structures, i.e., the subsurface distribution of magnetization and density. It is well known that since the magnetic and gravity inverse problems are ill-posed problems, there are a number of models that equivalently recover the observed data, which may lead to arbitrariness in the derived model. Therefore, previous studies have jointly used magnetic and gravity data, and performed joint inversion by applying structural coupling, which forces to derive highly correlated magnetic and gravity structure, to compensate for the weak constraint of each data on the model.
In our code, we use the group lasso regularization. The group lasso is a type of sparse regularization method that achieves variable selection based on the groups of model elements. This method can be used when the model elements have inherent groups or clusters, and the model elements of each group together take zero or nonzero values through this regularization.
Generally, to derive the subsurface magnetic and gravity structure, the subsurface space is divided into small grid cells, and the magnetization and density are assigned to each cell, and an attempt is made to estimate these parameters to recover the observed anomalies. In this code, the magnetization and density of each cell are grouped and a group lasso is applied. In this way, the magnetization and density of each cell together take on a zero or non-zero value. As a result, the magnetization and density structure become similar, and a highly correlated model is expected to be derived.
Now, denote the subsurface magnetization distribution as
where
Thus, the problem treated by this code is a mixed
To compile this program, edit "make.config" and run make.
make.config specifies some compilation options. You will need to edit and modify this file according to the C and C++ compiler you are using. In particular, you will need to modify the BLAS_LIB and BLAS_CFLAGS flags, which specify the BLAS library and its compiler options according to the BLAS library you are using. The sample make.config included in this repository assumes the use of Intel OneApi 2024 (icx and icpx compilers and BLAS from MKL).
After running "make", "make install" creates the inversion program "jinv", the
USAGE: jinv
-f <magnetic anomaly filename>
-g <gravitic anomaly filename>
-l <log10(lambda1):log10(lambda2)>
-a <alpha:log10(lambda)>
[optional]
-t <terrain filename>
-s <setting filename:default is settings.par>
-v (verbos mode)
-h (show this message)
The -l and -a options specify the regularization parameters
The -l option specifies
-l
while -a specifies
-a
where
These options -l and -a cannot be used together.
The format of the input magnetic and gravity anomaly data file is
xobs(km) yobs(km) zobs(km) anomaly(A/m or mgal)
where the delimiter must be Tab (\t). The terrain file specified by the -t option is the gridded terrain elevation file. The format is
x(km) y(km) z(elevation, km)
If no terrain file is specified, the surface topography of the study area is assumed to be a flat plane. The terrain grid must be the same as that of the subsurface space specified in the settings file described below.
The output is the following files:
model.data: derived model. format is x(km) y(km) z(km) beta(A/m) rho(g/cc)
recover_mag.data: recovered magnetic anomaly
recover_rho.data: recovered gravity anomaly
The file specified by the -p option is the settings file for the joint inversion, which must contain the following 6 fields:
1. number of grid cells: nx, ny, nz
2. area of analysis: west-edge, east-edge, south-edge, north-edge, z-top, z-bottom (km)
3. altitude of observations: zobs (km)
4. inclination and declination of geomagnetic field and magnetization vector: exf_inc, exf_dec, mgz_inc, mgz_dec (deg)
5. penaltyn parameter: mu
6. lower bounds: penalty parameter nu, magnetization lower (A/m), density lower (g/cc)
The format of the settings file is
identifier(1-6). explanations: VALUES, VALUES,...
ex.
1. nx, ny, nz: 50, 50, 25
2. x, y, zrange (km): -2., 2., -2., 2., 0., -2.
3. exf_inc, exf_dec, mgz_inc, mgz_dec(deg.): 45., -7., 45., -7.
4. tol, maxiter: 1.e-5, 100000
5. mu: 1.0
6. nu, beta0, rho0: 1.0, 0., 0.
Lines starting with # are considered comments.
In the case of the above example, the subsurface space
If terrain file is spesicied, zrange of 2., z-top, z-bottom (km) indicates that, the vertical range of the study area is from (surface (topography) + z-bottom) km to (surface + z-top) km.
In the case of the above example,