The RANGRID Control File

The RANGRID control file is used to set the parameters that control the minimum curvature gridding process. It is a five-line text file that can be created and modified with any text file editor. A blank control file template named "rangrid.con" can be found in the ...\Geosoft\Desktop Applications \etc directory.

Following is a summary of the parameters:

line 1: cs

line 2: xmin,ymin,xmax,ymax, bclip

line 3: chan,zb,zm,logopt,logmin

line 4: idsf,bkd,srd,iwt,edgclp,wtslp

line 5: tol,pastol,itrmax,ti,icgr

The file is free-format, which means that the positioning of data within a line is not important. Each line must end with a slash character (/), after which any user comments may be entered on the same line. Most parameters will assume a default value if not specified. If more than one value is to be placed on any line the values must be separated by a blank or comma. For example, if a line of the control file accepts three parameters, the first and third parameters can be set using the following format:

Param1,,Param3 /

If all parameters of a line are to have their default values, just enter a slash (/) to indicate the end of the line. Remember that each line of the control file must end with a slash character.

A self-documented blank control file named RANGRID.CON is supplied with RANGRID and can be copied from the \Geosoft\Desktop Applications \etc directory into the local working directory and edited to set the parameters as desired.

The following sections describe the parameters on each control file line:

Line 1: cs

The required grid cell size in units of your standard reference system. The choice of cell size is also related to the de-sampling factor (idsf) and the coarse grid ratio (icgr).

Specify the grid cell size. This should normally be ¼ to ½ the nominal data sample interval. If not specified, the data points are assumed to be evenly distributed and the default cell size will be set to:

A smaller cell size may be required if the data is to be contoured (we recommend 2 mm. or 1/10 inch at plot scale for contouring). This can be achieved by specifying a smaller cell size and larger desampling factor (desamp), or by regridding the grid using BIGRID.

Line 2: xmin,ymin,xmax,ymax,bclip

The limits of the area to be gridded.

xmin,ymin

The position coordinates of the bottom left corner of a rectangular area of the user's standard reference system which defines the area to be gridded. By default, the minimum limits of the input XYZ data are used.

xmax,ymax

The position coordinates of the right corner of a rectangular area of the user's standard reference system which defines the maximum limit of the area to be gridded. By default, the maximum limits of the input XYZ data are used.

Entering a range of 0,0,0,0 will cause the grid to cover the maximum limits of the data plus the blanking distance.

bclip

Controls use of all data or boundary clipped data from a *.gdb file. The options are:

  • 0 - use all the data (default)
  • 1 - only use data within boundary clip region

Line 3: chan,zb,zm,logopt,logmin

Data selection and output grid values

chan

Selects the channel to be gridded. By default the first Z channel (the first two columns are assumed to be the X and Y position coordinates) is gridded.

zb

The output grid node values by default and for minimizing space usage are stored as 2-byte integers. The 2-byte dynamic range spans from -32766 to 32767 (-32767 is reserved as the grid dummy value). In order to take maximum advantage of this range, a base level is removed from the actual real values and a multiplier is applied to expand or compress the data optimally in this range.

Stored_grid_value = (real_Z- zb) * zm

You actually can control what the base and multiplier will be.

The base level removed from the gridded data before conversion to the output grid value in integers. By default, an appropriate value is determined from the data.

zm

A multiplication factor that is applied to the gridded data after removal of the base level (zb) in order to convert the data to output grid values in integer format. By default an appropriate value is determined.

To set either zb or zm, values must be entered for both. If an improper base or multiplier is chosen, RANGRID will issue an error message stating that grid values are out of range. The out of range values will be replaced by dummy values in the grid.

The base level and multiplier that are used to convert the final grid values to integer grid values. The default values will be acceptable unless sharp peaks are present in the data, in which case the multiplier should be decreased by a factor of 2.

This warning can happen even when RANGRID has chosen the values by default, in which case the interpolated minimum curvature surface extends significantly beyond the data range. This is usually not a problem since only a small number of points are blanked out in the grid. If not acceptable, reduce the multiplier.

The multiplier determines the precision of the data in the grid. If the data is to be contoured, the multiplier should be at least 10 times the lowest contour interval. The minimum contour interval must always be a multiple of the grid multiplier.

The logarithm (base 10) of the data can be gridded rather than the original data. Once gridded, RANGRID can store either the logarithmic data in the output grid, or rescale the data to the original units before storing in the final grid. Gridding the log of the data can be a very effective way to reduce distortion due to highly skewed data such as geochemical data.

logopt

0

1

2

Logarithmic Gridding option (log base 10):

grid the data as is (the default)

grid log(Z), where any Z-value less than logmin is replaced by logmin.

grid log(Z) outside the range ±1, and use the original Z in the range ±1.

With logopt set to +1 or +2, the output grid will be logarithmic. This means that, if an original Z value was 100, the value in the grid will be 2. Grids produced with logopt = 1 can be contoured and labelled correctly by setting the logopt value in CONTOUR to 1.

Options -1 and -2 will cause RANGRID to place 10Z-value (ten to the power of the gridded Z values) in the output grid. This can be an effective way to reduce the effect of extreme values in highly skewed data, i.e. it converts the data back to a more linear form.

logmin

The minimum allowed Z value for logopt=1, or the amplitude around zero for linear gridding with logopt=2. This must be a positive non-zero number. The default is 1.0.

Any data less than LOGMIN is set to LOGMIN, then all data are divided by LOGMIN before the logarithm is calculated.

Line 4: idsf,bkd,srd,iwt,edgclp,wtslp

Initial sampling and coarse grid parameters are selected using this control file line.

idsf

The de-sampling factor as a multiple of the grid cell. This factor effectively acts as a low-pass filter by averaging all points into the nearest cell defined by this factor.

For example, a factor of 3 would first average database points into a coarse grid whose cells size is 3 times the final cell size. The default is 1, producing no pre-filtering other than de-aliasing by averaging points within a cell. If the resulting grid is too noisy around data points, increase the desampling factor.

bkd

All grid cells farther than the blanking distance from a valid point will be set to dummies in the output grid. The default is calculated as:

Preferably, this parameter should be set to just greater than the maximum distance through which interpolation is desired.  

srd

This is the maximum search radius to use for establishing the starting grid values for the coarse grid. The default is four times the coarse grid size defined by the ‘Starting coarse grid’. If no data is found within the maximum search radius, the mean of the data is used as the starting value. If the search radius is too small, the starting grid can be a poor approximation of the desired grid, resulting in excessive processing time. If too large, too much time will be consumed establishing the original coarse grid.  

The default is four times the coarse grid size defined by icgr.

iwt

The weighting power is used to generate the coarse starting grid. Values within a coarse cell are weighed by the inverse of their distance from the coarse grid nodes raised to this power.The two weighting settings, weighting power and weighting slope, can be used to reduce the high-frequency aliasing caused by gridding at too coarse an interval.

edgclp

This is the number of grid cells to extend beyond the outside limits of the data. The default is the integer value of blanking distance/grid cell size. If the X and Y range values are not defined, the grid size will be set to the actual data range plus this value.This parameter is commonly used in conjunction with the blanking distance parameter. For best results, use the blanking distance parameter to control the amount of coverage around data and this parameter to set the default grid size – with this distance generally being smaller than the blanking distance to provide clipping around the grid. Do not use this parameter in place of the blanking distance in order to fill interior regions of the grid, as results are generally poorer than using the blanking distance. This is because the blanking distance measures the true radial distance between a given location and the nearest data point while the "cells to extend" is measured only in X or in Y. The blanking distance is a true distance and the "cells to extend" is the number of cells, so you must multiply by the actual cell size to compare the two.

wtslp

The weighting can further be moderated through the use of a slope parameter. The overall weighting is established as:

Where:

  • distance is in grid distance units
  • power is applied to the distance
  • slope is in cell units, default is 0.0, where the only influence on the weight is from the nearest data points to each grid node.

To grid nonisotropic data, set the weighting slope > 1. For instance, in aeromagnetic survey data with line spacing 200 metres apart and readings every 5 metres along the line, the 50 metre cell size block will include a large number of real data points to be combined into one weighted location and z value; in such case, setting the weighting slope to 5.0 will produce a smoother non-aliased outcome relative to a setting of 0.0.

Line 5: tol,pastol,itrmax,ti,icgr

tol

Specify the tolerance required for each grid cell (absolute error, in grid data units). The default is 0.1% of the maximum range of the observed data.For a more accurate grid, decrease the tolerance value. 

When entering a number for the tolerance, it should be the absolute value, not the percentage value. For example, find the range of your data and take a percentage of that number, then enter this as your tolerance.

pastol

The required percentage of points that must pass the tolerance. The default is 99%.

For a more accurate grid, increase the percentage.

The quality of the final result is easier to control using the tol and itrmax parameters.

itrmax

Maximum number iterations allowed to solve the minimum curvature function. itrmax should be increased only if the maximum number of iterations is exceeded and a more accurate grid is desired.

  • The tol,pastol and itrmax parameters work together to control how well the final grid achieves a minimum curvature solution. If the grid cell size is too small relative to the original sample interval, many more iterations are required to achieve a suitable fit. The modelled surface moves most quickly towards a solution at the actual data points. Consequently, it is possible to end up with a surface that is within a small tolerance of the data, but is still unacceptable in the voids between data points. In these situations, you can either increase the cell size, decrease the tolerance, and/or increase the maximum number of iterations.
  • ti

    The degree of internal tension (between 0 and 1). The default is no tension (0), which produces a true minimum curvature grid. Increasing tension can be used to prevent overshooting of valid data in sparse areas; however, curvature in the vicinity of real data will increase. In general, the more sparse areas are present in the data (with localized highs and lows), the higher the tension should be set.

    icgr

    The coarse grid size relative to the final grid size. This factor can only be 16, 8, 4, 2, or 1.

    The default is 8.

    The optimum factor is close to half the nominal data spacing, although in most situations the default is fine. The icgr parameter only effects the length of time RANGRID takes to find a solution.

    Using a factor that is too low will result in significant increases in processing time while erring on the high side will only increase the processing time moderately.