What Surfer gridding method should I use? Gridding for non-geostatisticians

Interpolation is a vital part of the day-to-day workflow for many of you. Since it's often impossible to take measurements everywhere in your area-of-interest, gridding takes your discrete data set and accurately represent what happens between these measurement locations, so you get the complete picture. As such, it's imperative that you can rely on Surfer's gridding methods to produce an accurate and understandable result. For many of you though, your background is not in geostatistics, so choosing the right gridding method and settings for your data is downright confusing. No longer! In this newsletter article, I'll take a web-generated data set (this XLSX file of the topmost Triassic zone in various wells, modified from http://dbforms.ga.gov.au/www/npm.well.search) and walk through how I would go about choosing the gridding method and setting the proper grid settings to produce a professional-looking and accurate output.


Step 1: Visually narrow down the gridding methods

Assuming that I don't have enough time or information to determine my optimal gridding method using the various Help and online resources available (like the Gridding Method Comparison or General Gridding Recommendations help pages, or the What Surfer gridding method is best for my data file? knowledge base article), the first step I perform is running a script to plot a contour map of my data using each of the gridding methods. To do so:

  1. Download this script to compare all 12 single variable gridding methods, this script to compare just the 4 single variable gridding methods that support faults if you have a BLN fault file, or this script to compare the 8 single variable gridding methods that support breaklines if you have a BLN breakline file.
  2. In Windows Explorer, navigate to C:\Program Files\Golden Software\Surfer\Scripter.
  3. Double click on Scripter.exe to open the Scripter program.
  4. Click File | Open, choose the downloaded BAS file, and click Open.
  5. Click Script | Run.
  6. When prompted to, choose your data file, x,y,z columns, and BLN file (if you're using the fault or breakline script).
gridding comparison
Running the first of the attached scripts quickly generates a comparison of all twelve gridding methods for easy side-by-side comparison.

With this visual representation, you can choose a few of the gridding method that look the best using these default parameters. The goal here is to obtain a grid that produces smooth, realistic contours. In our example, I have eliminated seven of the twelve gridding methods that have very angular contours or otherwise unrealistic interpretations, so we just have five left to evaluate.

gridding comparison
After doing a cursory visual check of the output contour maps, it was easy to narrow down the gridding methods to five that produced fairly realistic-looking interpretations.


Step 2: Use Grid Residuals to narrow the gridding methods to those that fit the data best

At the point where you can no longer tell visually which method is best, you can use the grid residuals to tell which grid values are closest to the original data values. You'll use the grid file for each of the best gridding methods (located by default in the same folder as your data file), along with the original data file.

  1. Click Grids | Calculate | Residuals.
  2. In the Grid Residuals dialog, choose your grid file in the Input Grid drop-down menu.
  3. In the XYZ Data drop-down menu, choose your data file.
  4. Set your X, Y, and Z data columns, select the data column to store your residuals in, and click OK.
  5. The residuals will appear in the Worksheet window and are the z value in the data file minus the z value in the grid file for the same x,y pair, so the values can be positive or negative.
  6. Since we just want an indication of how far the grid values are from the original values, and we don't care whether that distance is positive or negative, we'll take the absolute value of the column by clicking Data | Data | Transform and then:
    1. Make sure the Transformwith dropdown list is set to Column variables (e.g., C = A + B).
    2. In the Transform equation box, type L = If (L<0, L*-1, L) (where L is the column storing the residual values).
    3. Verify the First row is 2 and the Last row is the last row containing residuals.
    4. Click OK.
  7. Repeat steps 1-6 for the other grids.
  8. Finally we'll sum the values. Click on cell L2, hold Shift, and click on cell Q35.
    1. Click Data | Data | Statistics.
    2. In the Statistics dialog, verify all of the boxes are unchecked except Sum.
    3. Toggle Copy to worksheet in the Results section.
    4. Change the Starting in cell to K37.
    5. Click OK.
  9. Now we have one value quantifying how well each grid matches the data. The lowest value is the best fit for the data, so in this example, Local Polynomial (sum >17000) and Inverse Distance (sum >10000) are not good fits. Additionally, Natural Neighbor doesn't have residuals for many of the x,y pairs, meaning there is no grid node at that location, so that's not a good fit either, despite the low residual sum (the sum is around 6500, but it is low because there are not many residual values to sum).
worksheet grid residuals gridding

Using Grid Residuals and then summing the absolute value of all of the residuals is a simple way of seeing which gridding methods actually fit the data the best.


Step 3: Adjust the gridding settings to tweak the best grid to be even better

Now that we're down to just two options, we can try out some of the advanced options to see if we can get a better result for either of the two. Each gridding method has different advanced options. It's a trial-and-error process adjusting these to get the desired output, so I will only tell you how to get to these options, and you can try them out for yourself. For help with specific advanced options, see the knowledge base article A Basic Understanding of Surfer Gridding Methods - Part 1.

  1. Click Home | Grid Data | Grid Data.
  2. In the Grid Data - Select Data dialog, choose the desired Gridding Method.
  3. Choose your data file in the Dataset 1 drop-down menu.
  4. Set the X, Y, and Z Data Columns to the correct columns from your data file and click Next.
  5. In the Grid Data - Kriging - Variogram dialog, you can include the option to load a custom variogram, which would need to be created first outside of this dialog by clicking Grids | New Grid | Variogram.
  6. Click Skip to End.
  7. In the Grid Data - Kriging - Output dialog, set the Output Grid Geometry parameters, name the file, and click Finish to create the grid file.
  8. To check the accuracy of the grid, you can create a contour map using the Home | New Map | Contour Map command to visually check the results, as we did in Step 1, or you can use the Grids | Calculate | Residuals command to calculate the grid residuals, as we did in Step 2.


In our example, I've tried out various options and nothing looked as good as the defaults. As such, per a slightly better residual sum from Step 2, I've decided to use the Kriging grid for my map.


Once you've decided on the right gridding method for you, you can create your map and move on to the really fun part: making your map look pretty!

kriging contour map gridding
After choosing the gridding method, it takes just a few enjoyable minutes to choose the fill color gradient, add a post map of the original well locations, download a map of the larger region for context, and perform a few other commands to create a breath-taking map like this one.


Whether you're a geostatistician by profession, or someone who isn't aware of the geostatistician term, Surfer has the tools for you to create a visually striking map that will wow any audience!


Updated November 26, 2019

Was this article helpful?
22 out of 26 found this helpful



Please sign in to leave a comment.