- I tried to recreate the ocTree mesh data file used in the Joint PGI of Gravity and Magnetic without petrophysical information code. However, I was unable to create the precise ocTree mesh file. Please specify the exact parameters for reproducing the Octree mesh data file.
I have attached the code for creating an ocTree mesh file and cross-sections and XY plots of the ocTree mesh.
####### create octree mesh file
Import Modules
import numpy as np
from scipy.interpolate import LinearNDInterpolator
import matplotlib as mpl
import matplotlib.pyplot as plt
from discretize import TreeMesh
from discretize.utils import mkvc, refine_tree_xyz
from SimPEG.utils import plot2Ddata, model_builder, surface2ind_topo
from SimPEG import maps
from SimPEG.potential_fields import gravity
######### load topogaphy data #########################
data1 = np.genfromtxt('TOPO_AOI_KIMBERLITE_CANADA_15JUL21.dat')
x_topo1=data1[:, 0]
x_topo2= np.transpose(x_topo1)
y_topo1=data1[:, 1]
y_topo2= np.transpose(y_topo1)
z_topo1=data1[:, 2]
z_topo2= np.transpose(z_topo1)
x_topo, y_topo, z_topo = mkvc(x_topo2), mkvc(y_topo2), mkvc(z_topo2)
xyz_topo = np.c_[x_topo, y_topo, z_topo ]
#Defining an OcTree Mesh
dx = 25 # minimum cell width (base mesh cell width) in x
dy = 25 # minimum cell width (base mesh cell width) in y
dz = 25 # minimum cell width (base mesh cell width) in z
x_length = 800.0 # domain width in x
y_length = 800.0 # domain width in y
z_length = 800.0 # domain width in z
Compute number of base mesh cells required in x and y
nbcx = 2 ** int(np.round(np.log(x_length / dx) / np.log(2.0)))
nbcy = 2 ** int(np.round(np.log(y_length / dy) / np.log(2.0)))
nbcz = 2 ** int(np.round(np.log(z_length / dz) / np.log(2.0)))
Define the base mesh
hx = [(dx, nbcx)]
hy = [(dy, nbcy)]
hz = [(dz, nbcz)]
#mesh = TreeMesh([hx, hy, hz])
mesh = TreeMesh([hx, hy, hz], x0="CCN")
xc = 400 + 556900
yc = 400 + 7133200
zc = 440.9
x0_new = np.r_[mesh.x0[0] + xc, mesh.x0[1] + yc, mesh.x0[2] + zc]
mesh.x0 = x0_new
Refine based on surface topography
mesh = refine_tree_xyz(
mesh, xyz_topo, octree_levels=[2, 2], method="surface", finalize=False
)
Refine box based on region of interest
xp, yp, zp = np.meshgrid([557000.0, 557600.0], [7133300.0, 7133900.0], [50.0, 400.0])
xyz = np.c_[mkvc(xp), mkvc(yp), mkvc(zp)]
mesh = refine_tree_xyz(mesh, xyz, octree_levels=[2, 2], method="box", finalize=False)
mesh.finalize()
mesh.writeUBC('mesh_file1.ubc')
-
I was unable to construct correct output quasi-geological model or density/susceptibility contrast on cross-sections and XY plots, and 2D density probability plot using the Joint PGI of Gravity and Magnetic without petrophysical information code with the ocTree mesh file that I created using the preceding script (remaining input files and settings are the same). Please find the attached figures.
-
I noticed no quasi-geological model or density/susceptibility contrast on cross-sections and XY plots, and the points on the density probability plot are scattered, I am not sure why.