3.2.1. Create OcTree Mesh Input File

OcTree meshes used in the e3d code are created using the program create_octree_mesh_e3d_v2.exe. The lines within the input file are as follows:

Line #




dx dy dz

min. cell widths in x, y and z for base mesh


min_cell_fact min_cell_size max_topo_cell

additional cell size parameters


x_pad y_pad down_pad up_pad

sets the extent padding in x, y and z direction


h1 h2 h3

sets discretization in the core mesh region


n1 n2 n3

sets thickness of cells of finest discretization near receivers



the file containing observation locations



the file defining all transmitters



the file defining all receivers



the file containing the frequencies being measured



sets topography


shift data

shift data above topography


polygon edge width

sets horizontal extent of core region for the inversion mesh


read/create mesh

read in or create global inversion mesh


Fig. 3.1 Example input file for creating octree mesh (Download ) Line Descriptions

  • dx dy dz: Minimum cell widths in x, y and z for the base mesh.

  • min_cell_fact min_cell_size_fwd max_topo_cell: These parameters determine the rate of cell expansion for regions near topography and for the local forward meshes.

    • min_cell_fact: Defines the rate of topography-based cell size increase on the global inversion mesh with respect to depth. After each layer of N cells, the cell size will increase by a factor of 2 until a maximum cell size (max_topo_cell) is reached. N must be an integer value that is a power of 2.

    • min_cell_size: For ground-based surveys, this value is redundant; leave as 1. For airborne, we may want to specify the cell size between the surface topography and the fine cells around the receivers (n1 n2 n3). Here, min_cell_size is a factor defining the size of these cells relative to the underlying mesh cell size (dx dy dz). max_topo_cell is an integer value equal or greater than 1 and must be a power of 2. DEFAULT = 1.

    • max_topo_cell: This determines the maximum cell size for which topography-based cell size increase is used on the global inversion mesh; after which typical OcTree cell expansion is used. This parameter must be an integer value that is a power of 2.

  • x_pad y_pad down_pad up_pad: Distance from the survey region in the x, y, downward and upward directions, respectively, that the inversion mesh extends.

  • h1 h2 h3: Sets the discretization for the core mesh region. Up to a depth of h1 from the surface, transmitters and receivers, the smallest cell size is used (set by dx, dy, dz). For the following h2 metres, a cell width 2 times large is used. For the following h3 metres, the cell width is doubled again. Outside of a distance of h1+h2+h3, the cells widths increase by a factor of 2 for every additional layer.

  • n1 n2 n3: This sets the thicknesses of layers of finest discretization near the receivers. n1 = 4 means that around each receiver, there is a layer 4 cells thick that uses the finest discretization. This is followed by a layer which is n2 cells thick, where the cell dimensions are increased by a factor of 2. Likewise for the 3rd layer.

  • locFile: Path to the file containing the survey information. This can be either an observed data file, or a survey index file.

  • txFile: Path to the file defining the transmitters; i.e. the transmitter file.

  • rxFile: Path to the file defining the receivers; i.e. the receiver file.

  • freqFile: Path to the file defining the frequencies used in the survey; i.e. the frequencies file.

  • topoFile: If a topography file is available, the file path to the topography file is entered; see topography file for format. In the case of flat topography, the user instead enter “TOPO_CONST”, followed by a space, then the elevation of the surface topography; for example “TOPO_CONST 125.5”.

  • shift data: If the flag “NOT_SHIFT_DATA” is used, then transmitters and receivers can lie below the surface topography. If “SHIFT_DATA” filename is entered, then new transmitter and receiver files are created such that the transmitters and receivers lie above the surface topography. NOTE: this line may be a legacy from E3D version 1 and may not be used.

  • polygon edge width: Here we define the horizontal extent of the core inversion mesh region. The user may do this by providing the path to a file containing the points for a polygon. The user may also set the horizontal extent of the core mesh region based on transmitter and receiver locations. The set of transmitter and receiver locations can be used to create a convex hull. For this option the user types “MAKE_POLYGON d”, where d is the distance outside the convex hull the user want to extend to core mesh region.

  • read/create mesh: If the global inversion mesh has already been created, then it may be loaded by typing “READ_LARGE_MESH filepath”. In this case, the global inversion mesh is used to define the local forward meshes. If the global inversion mesh needs to be created, the user types “CREATE_LARGE_MESH filename”, where the global inversion mesh is output to the file filename.


This functionality is relevant to the e3d_v2_tiled code. For e3d_v2, use “CREATE_LARGE_MESH filename