1 
\chapter{Gravity Inversion}\label{Chp:cook:gravity inversion} 
2 

3 
This instrument is designed to prepare practical and obvious information to apply gravity and magnetic inversion packages which have joint application in magnetic and gravity inversion. This codes were written in 2012 at the department of Earth science , University of Queensland.\\ 
4 
It enables geologists and geophysicists, but who is not necessarily versed in the details of inverse theory, to process, visualize and interpret multivolume geophysical data using attributes and modern visualization techniques.This is not only a functional interpretation system, it is also a research and development environment for geophysics analysis.\\ 
5 
We present a package for inverting ground or airborn surveys gravity and magnetic data to generate a 2D or 3D distribution of density and susceptibility contrast. In this approach, the earth is clearly modeled by using a large number of rectangular cells of constant value such as density or susceptibility, and the final distribution is obtained by minimizing a model objective function subject to fitting the observed data.\\ 
6 

7 
This package could be used to provide a model which introduce density and susceptibility together to fit a given set of magnetic and gravity anomalies. The given data might contain negative and positive in value for both onshore and offshore region. However the model is a 3dimentional that any cross or depth sections are extracted from. Being the result of big region as well as small area is one of the advantages of this package.\\ 
8 
Data type should be prepared attentively to have all corrections and processing. Model is described as a big volume which has changed in density and susceptibility smoothly in all directions. The apparent characteristics of the topography are very sophisticated.\\ 
9 
\newpage 
10 

11 
\begin{figure} 
12 
\centering 
13 
\includegraphics[width=\textwidth]{pasted1.png} 
14 
\caption{Depth image trough a 3 dimensional gravity inversion which presents discrepancy in density. Its surrounded area is before the padding with uncertainty function. The gravity of padding area of the 
15 
model is not defined. Increasing and decreasing in density are indicated 
16 
with red color and blue color respectively.} 
17 
\end{figure} 
18 

19 
Such inversion calculations invariably depend on assumptions about the characteristic of the forward modeling. From this point of view, we can say that traditional inversion is fundamentally based on a model of the subsurface which have used as a prior knowledge.\\ 
20 
This inversion method is contained iteration inversion approach which use a series of improvement on a basic model in order to fit the result with the input data. Eventually the result after desirable iterations and error factor provide satisfactory fitting to given data, is as a final model.\\ 
21 

22 

23 
\textbf{Gravity Data} \\ 
24 

25 
Theoretically weighs depends on the force of gravity at that position and the force of gravity varies with elevation, rock densities, latitude and topography. Mass, however, does not depend on gravity but is a constitutive quantity throughout the earth. So the spring stretch in mass suspension is related to the gravity force. In addition with a constant mass, difference in spring stretch illustrate the changes in acceleration of gravity. The principal of gravity exploration is based on the topography of the basement, thickness of the sedimentary section with various density and porosity of the layer and elevation.\\ 
26 

27 
The amount of $g$ at sea level is about 980 $kg/s^2$ or 980,000 $mgal$. Gravity acceleration is measured in two types. The first correspondes to specify the absolute magnitude of gravity at any place and the second refers to the alteration in garavity from one place to another. In gravity stuty variation of this value which is caused by underground structure, is plotted as a residual gravity. Closed variation in residual gravity indicates subsurface geological structure.\\ 
28 
The Gravity data are taken from onshore and offshore observation recorded at many gravity stations with high precision of determination in elevation and position (latitude and longitude). All Raw reading gravity observations require to process with many corrections.\\ 
29 

30 
The sun and moon gravitational forces make curvature in Earth's shape. These tide effects change figure of oceans, atmosphere and even solid body of the Earth, which impress gravity measurement and it is necessary to compensate it, which vary with location, date and time of the day.\\ 
31 
The surface of the Earth is lumpy on land and water. However for Geophysical and Geological study, a smooth closed surface is assumed. The main one is a spheroid flattened at the poles which is called ellipsoid. The new data are used to defined a bestfitting obtained ellipsoid. The second suggestion is geoid which is really mathematical convenience. There is a uniform mass between gravity stations and ellipsoid, that's effect must be removed with corrections.\\ 
32 
Also the level of topography for hilly and valley measurements is important. The gravity amount which is made up by that equal the mass of hill or valley must be added as a terrian correction to have a measurement on a level surface.\\ 
33 
Because gravity descend towards the poles the latitude correction must be added to the observed gravity.\\ 
34 
Freeair correction that must be added to observation, ignores the effects of material between the measurement and refrence level which is positive for above sealevel station and is negetive for station below sealeve.\\ 
35 
The gravitational accelaration or Bouguer correction is calculated for known thickness (between measurements station and ellipsoid) and density (depends on local rock) which must be subtracted from the measurements garavity if station is above sealevel. and the station is below sealevel this must be added.\\ 
36 

37 
For this adjustment first of all Tidal correction apply based on tidal table or calculated tidal effect for given time and location of gravity data. The second one is Terrian correction. Then Latitude, Free air and Bouguer correction have applied. The standard Bouguer density is 2670 $kg/m^3$.\\ 
38 

39 
(in the input file, bouguer anomaly is used as residual gravity which have to be gridded )\\ 
40 

41 
\textbf{Input File} \\ 
42 

43 
For starting up the inversion 2 files are needed. Each of the two files contains a series of parameters which must appear in the correct order, as described in the next paragraph. Each parameter is marked by a keyword, which is followed either on the same line or the next line by one or more parameter values. \\ 
44 
The first file is contained the gravity anomaly, including number of points, the accurate location (latitude and longitude) of the observed position and the value of the anomaly after all gravity corrections.\\ 
45 
The other is run_gravity with py extension which is related to the codes though it needs some constraints to have a good results in inversion.\\ 
46 

47 
A small part of sample of run_gravity:\\ 
48 
\begin{verbatim} 
49 
mu=100 
50 
n_cells_in_data=100 
51 
depth_offset=0.*U.km 
52 
l_data = 100 * U.km 
53 
l_pad=40*U.km 
54 
THICKNESS=20.*U.km 
55 
l_air=6*U.km 
56 
\end{verbatim} 
57 

58 
Run_gravity file consist many options to implement which control how inversion is performed such as padding area, depth , MU factor,\ldots. 
59 

60 
\begin{description} 
61 
\item[MAX\_ITER] 
62 
Specifying maximum iteration depends on model and the area which have been selected to have an inversion in it also your hard capacity. However the best result were built with 200 iterations. In addition all steps of inversion could be traced and the suited one selected. 
63 

64 
\item[l_data or PAD\_X, PAD\_Y] To implement the bound constraints in this file, padding area in $x$ and $y$ direction should be determined. In a rectangular area, same padding for both direction is preferable. If directional area will be fixed with elongation in one orientation it does not matter to change the padding area. In addition for 2D inversion padding just add in one direction. 
65 

66 
\item[DATASET] In run_gravity file just the location and the name of the data file have to be fixed the source of data and run_gravity must be in a folder. 
67 

68 
\item[THICKNESS] Depth of the model should be assigned to have dipper or shallower inversion also it is assigned to the layer where shows inversion in.The parameter values must be real numbers, and they represent depths in km. 
69 

70 
\item[l_air] Length of air is hight of the model above the sea level. 
71 

72 
\item[n_cells_in_data] The last important part of the inversion property is the number of elements in data of the model which shows the finer or coarser cells in the model so its delimitation have affected on resolution. 
73 

74 
\item[mu]It is defined in accordance with the noise of data and it has a wide range to select from 0.0001 to 100. 
75 

76 
\end{description} 
77 

78 
\textbf{Output File}\\ 
79 

80 
At the end of each inversion iteration, package produces a new inversion file with 'gravin.silo' name which is stored in the file. This silo file shows the inversion result which does not have the number of iterations stage.\\ 
81 
In terminal indicates the specifications of inversion iterations. In this descriptions of the paths of all inversion during stages of modeling are cleared. The format of the file will be described here as it is designed to be used directly for analysis or debugging.\\ 
82 
After final iteration the silo file is visible with some software which shows silo file format. It illuminate density distribution in the area (not in the padding) which create the gravity input data.\\ 
83 

84 
\textbf{Reference}\\ 
85 

86 
There are three examples for 2D and 3D gravity inversions with artificial input data.\\ 
87 
In first step, an area with synthetic density section is suggested. Then based on forward modeling it's gravitational data is collected. Afterwards with generated gravity data, escripts simulate a volume of inverted density. Whilst new density mass could be compared with the synthetic density section to verify the inversion.\\ 
88 

89 
Some of the presumptions are the same for all of the examples to simplify the situation to make a logical comparison between synthetic input and output. which is as followed:\\ 
90 
\begin{verbatim} 
91 
n_cells_in_data=100 
92 
depth_offset=0.*U.km 
93 
l_data = 100 * U.km 
94 
l_pad=40*U.km 
95 
THICKNESS=20.*U.km 
96 
l_air=6*U.km 
97 
\end{verbatim} 
98 
The others assumptions comes with each examples.\\ 
99 

100 
1. A 2D density section with a maximum in centre was assumed. The refrence density and inverted will be shown. The padding area is excluded. \\ 
101 
\begin{verbatim} 
102 
n_cells_in_data=100 
103 
n_humbs_h= 1 
104 
n_humbs_v=1 
105 
mu=100 
106 
\end{verbatim} 
107 

108 
\begin{figure} 
109 
\centering 
110 
\includegraphics[width=\textwidth]{grav2D1.png} 
111 
\caption{2D density model up) reference down) result} 
112 

113 
\end{figure} 
114 

115 
2. A 2D density properties with two maximun in corners and one minimum in the centre was inverted. The result have eliminated the effects in padding area. \\ 
116 
\begin{verbatim} 
117 
n_cells_in_data=100 
118 
n_humbs_h= 3 
119 
n_humbs_v=1 
120 
mu=100 
121 
\end{verbatim} 
122 

123 
\begin{figure} 
124 
\centering 
125 
\includegraphics[width=\textwidth]{grav2D3.png} 
126 
\caption{2D density model up) reference down) result} 
127 

128 
\end{figure} 
129 

130 
3. A 3D model with a maximum in the center was used as input data and the result after simulation in shown in the next image which determined a good distribution of density through the model in the main area.\\ 
131 
\begin{verbatim} 
132 
n_cells_in_data=50 
133 
n_humbs_h= 1 
134 
n_humbs_v=1 
135 
mu=10 
136 
\end{verbatim} 
137 

138 
\begin{figure} 
139 
\centering 
140 
\includegraphics[width=\textwidth]{density3Dref.png} 
141 
\caption{3D density model of reference as synthetic data} 
142 

143 
\end{figure} 
144 

145 
\begin{figure} 
146 
\centering 
147 
\includegraphics[width=\textwidth]{gravity3D.png} 
148 
\caption{3D density model of result} 
149 

150 
\end{figure} 