**Appendix**

%Semi-Inversion\_Finite\_Slab\_Model % the method is depending on the concepts of Walther's Law of deposition % and the Steno's Law of superposition of the juxtaposed columns of deposition clc; % Clear the command window. close all; % Close all figures (except those of in tool.) clear; % Erase all existing variables. Or clear it if you want. workspace; % Make sure the workspace panel is showing. G = 6.67e-3; % universal gravitational constant (6.67e-3); pi = (22/7); % circle D/R ratio or solid angle. format long % for accurate decimal values % gz in m. Gal//G = 6.67e-11//density contrast in (kg/m.^3)// (x, z, R) in (m) %===========================================================% % Modeling Parameters %===========================================================% N = 5 ; % the number of stacked H. layers = the number of stacked H. layers % (The maximum columns will contain the 5-Formations) %===========================================================% % Reading Data File %===========================================================% data = xlsread('Abu Roach\_aa\_slab.xlsx'); xc = data(:,1); % the observed points for digitized profile (km) gB = data(:,2); % digitized Bouguer anomaly data (profile) (m. Gal) %i = 202; x = 0: N-1; %===========================================================% % Borehole depths (km) %===========================================================% z1 =0.092; % Surface of Earth z2 =0.161; % Cenomanian Fm. z3 =0.607; % L. Cret. Fm. z4 =0.759; % Jurassic Fm. z5 =1.566; % Paleozoic Fm. z6 = 1.902; % T. Depth Fm. z = [z1, z2, z3, z4 z5] ; % measuring depths from datum sea level (L.S.(z=0) ) %===========================================================% % Borehole thicknesses (km) %===========================================================% h1 = z2-z1; h2 = z3-z2; % Cenomanian Fm. h3 = z4-z3; % L. Cret. Fm. h4 = z5-z4; % Jurassic Fm. h5 = z6-z5; % Paleozoic Fm. h= [h1, h2, h3, h4 h5] ; % ok

*New Semi-Inversion Method of Bouguer Gravity Anomalies Separation DOI: http://dx.doi.org/10.5772/intechopen.101593*

%===========================================================% % Borehole vertical accumulated thickness %===========================================================% h\_v1 = h1; h\_v2 = h1+h2; h\_v3 = h1+h2+h3; h\_v4 = h1+h2+h3+h4; h\_v5 = h1+h2+h3+h4+h5; h\_v = [h\_v1 h\_v2 h\_v3 h\_v4 h\_v5]; % measuring depths from datum surface level (L.S.(z=0.092) ) % the depth to the central bottom z2(j)(km) % h(i) are the thicknesses of formations (km) %===========================================================% % Borehole Densities (gm/cm^3) %===========================================================% rho(N-4)= 1.980; % Pleistocene Fm. 1 (gm/cm^3) rho(N-3)= 2.480; % Cenomanian Fm. 2 (gm/cm^3) rho(N-2)= 2.610; % L.Cret. Fm. 3 (gm/cm^3) rho(N-1)= 2.430; % Jurassic Fm. 4 (gm/cm^3) rho(N) = 2.380; % Paleozoic Fm. 5 (gm/cm^3) rho\_basement = 2.67; % basement rock 6 (gm/cm^3) %===========================================================% rho\_v1(N-4)= (rho(N-4))/(N-4); rho\_v1(N-3)= (rho(N-4)+ rho(N-3))/(N-3); rho\_v1(N-2)= (rho(N-4)+ rho(N-3)+ rho(N-2))/(N-2); rho\_v1(N-1)= (rho(N-4)+ rho(N-3)+ rho(N-2)+ rho(N-1))/(N-1); rho\_v1(N) = (rho(N-4)+ rho(N-3)+ rho(N-2)+ rho(N-1)+ rho(N))/(N); rho\_v1 = [rho\_v1(N-4) rho\_v1(N-3) rho\_v1(N-2) rho\_v1(N-1) rho\_v1(N)];%ok delta\_rho1 = rho\_v1 - rho\_basement; %ok %===========================================================% rho\_v2(N-4)= (rho(N-4))/(N-4); rho\_v2(N-3)= (rho(N-4)+ rho(N-3))/(N-3); rho\_v2(N-2)= (rho(N-4)+ rho(N-3)+ rho(N-2))/(N-2); rho\_v2(N-1)= (rho(N-4)+ rho(N-3)+ rho(N-2)+ rho(N-1))/(N-1); rho\_v2(N) = (rho(N-4)+ rho(N-3)+ rho(N-2)+ rho(N-1)+ rho(N))/(N); %=============================================% rho\_v2 = [rho\_v2(N-4) rho\_v2(N-3) rho\_v2(N-2) rho\_v2(N-1) rho\_v2(N)];%ok delta\_rho2 = rho\_v2 - rho\_basement; %ok %===========================================================% % conditions for calculations %===========================================================% % Theoritical\_Salb calculations %===========================================================% i = zeros(); for i = 1: N; %===========================================================% % Model (1) Historical Concept %===========================================================% gB\_M1(:,i)= 2\*pi()\*G\*delta\_rho1(i)\*h(i); % gravity effect of slab\_model (1) ok z\_M1(i)= abs(gB\_M1(i)/(2\*pi()\*G\*delta\_rho1(i))); % thicknesses of formation (km) ok h\_calM1(:,i) = sum(z\_M1(i)); % depth of formation

delt\_gB1 = 2\*pi()\*G\*delta\_rho1(i); % rate of anomaly change with thickness %===========================================================% % Model (2) Bouguer Concept %===========================================================% gB\_M2(:,i)= 2\*pi()\*G\*delta\_rho2(i)\*h(i); % gravity effect of slab\_model (2) ok z\_M2(i)= abs(gB\_M2(i)/(2\*pi()\*G\*delta\_rho2(i))); % thicknesses of formation (km) ok h\_calM2(:,i) = sum(z\_M2(i)); % depth of formation delt\_gB2 = 2\*pi()\*G\*delta\_rho2(i); % rate of anomaly change with thickness %===========================================================% % Profile Calculations %===========================================================% % Model (1) h\_v\_cal1= (abs((gB/2\*pi()\*G\*delta\_rho1))\*10); % thicknesses of formation (km) z\_cal1(:,i) = (sum(h\_v\_cal1, 2)); % maximum depth (depth to the basement) (km) %===========================================================% % Model (2) h\_v\_cal2= (abs((gB/2\*pi()\*G\*delta\_rho2))\*10); % thicknesses of formation (km) z\_cal2(:,i) = (sum(h\_v\_cal2, 2)); % maximum depth (depth to the basement) (km) %===========================================================% end %===========================================================% % Graphical Representations Model (1)& Model (2) %===========================================================% figure(1) plot(x,gB\_M1,'k-') hold on grid on set(gca, 'YDir','reverse') xlabel('xc -axis of measured Bouguer (km)'); ylabel('gravity anomaly gB\_Model(1) in (m.Gals)'); title('Gravity anomaly over horizontal slabs') %===========================================================% figure(2) plot(x,z\_M1,'k-') hold on grid on set(gca, 'YDir','reverse') xlabel('xc -axis of measuered Bouguer (km)'); ylabel(' calculated h\_M1 Model (1) depth in (km)'); title('calculated thickness using slab model') %===========================================================% figure(3) plot(x,h\_calM1,'k-') hold on grid on set(gca, 'YDir','reverse') xlabel('xc -axis of measuered Bouguer (km)');

*New Semi-Inversion Method of Bouguer Gravity Anomalies Separation DOI: http://dx.doi.org/10.5772/intechopen.101593*

ylabel(' calculated z\_calM1 Model (1) thickness in (km)'); title('calculated depth using slab model') %===========================================================% figure(4) plot(x,gB\_M2,'k-') hold on grid on set(gca, 'YDir','reverse') xlabel('xc -axis of measuered Bouguer (km)'); ylabel('gravity anomaly gB\_Model(2) in (m.Gals)'); title('Gravity anomaly over horizontal salbs') %===========================================================% figure(5) plot(x,z\_M2,'k-') hold on grid on set(gca, 'YDir','reverse') xlabel('xc -axis of measuered Bouguer (km)'); ylabel(' calculated h\_M1 Model (2) depth in (km)'); title('calculated thickness using slab model') %===========================================================% figure(6) plot(x,h\_calM2,'k-') hold on grid on set(gca, 'YDir','reverse') xlabel('xc -axis of measuered Bouguer (km)'); ylabel(' calculated z\_calM2 Model (2) thickness in (km)'); title('calculated depth using slab model')
