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:
- 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.
- In Windows Explorer, navigate to C:\Program Files\Golden Software\Surfer\Scripter.
- Double click on Scripter.exe to open the Scripter program.
- Click File | Open, choose the downloaded BAS file, and click Open.
- Click Script | Run.
- When prompted to, choose your data file, x,y,z columns, and BLN file (if you're using the fault or breakline script).
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.
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.
- Click Grids | Calculate | Residuals.
- In the Grid Residuals dialog, choose your grid file in the Input Grid drop-down menu.
- In the XYZ Data drop-down menu, choose your data file.
- Set your X, Y, and Z data columns, select the data column to store your residuals in, and click OK.
- 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.
- 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:
- Make sure the Transformwith dropdown list is set to Column variables (e.g., C = A + B).
- In the Transform equation box, type L = If (L<0, L*-1, L) (where L is the column storing the residual values).
- Verify the First row is 2 and the Last row is the last row containing residuals.
- Click OK.
- Repeat steps 1-6 for the other grids.
- Finally we'll sum the values. Click on cell L2, hold Shift, and click on cell Q35.
- Click Data | Data | Statistics.
- In the Statistics dialog, verify all of the boxes are unchecked except Sum.
- Toggle Copy to worksheet in the Results section.
- Change the Starting in cell to K37.
- Click OK.
- 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).
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.
- Click Home | Grid Data | Grid Data.
- In the Grid Data - Select Data dialog, choose the desired Gridding Method.
- Choose your data file in the Dataset 1 drop-down menu.
- Set the X, Y, and Z Data Columns to the correct columns from your data file and click Next.
- 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.
- Click Skip to End.
- In the Grid Data - Kriging - Output dialog, set the Output Grid Geometry parameters, name the file, and click Finish to create the grid file.
- 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!
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