Follow

My Surfer grid file has negative Z values (or a Z range that goes beyond the Z limits in my data file). How do I change this?

When you are gridding data, the gridding algorithm can calculate a Z range for the grid that extends beyond the Z range for the original data file.  However, you have control over this using the Grid Z Limits section in the Grid Data dialog.

You can allow the gridding method to determine the Z range in the grid, you can tell Surfer to match the Z range in the grid to the Z range in the data file, or you can enter a custom value for the grid Z range.

For example:

  1. Click Grids | New Grid | Grid Data.
  2. Select the data file to grid and click Open.
  3. In the Grid Data dialog, select the gridding method and the gridding parameters you wish.
  4. Under the Grid Z Limits section, you can choose how you want Surfer to calculate the grid's Minimum and Maximum Z value. You can use different selections for the Minimum and Maximum (e.g. you can set Minimum to Custom and leave Maximum set to None). The options are:
    1. None. This allows the gridding method full control over calculating the Z minimum or maximum.
    2. Data min or Data max. This tells Surfer to use the minimum or maximum Z value in the data file as the maximum and minimum Z value in the resulting grid file.
    3. Custom. This allows you to specify a custom minimum or maximum Z value for the grid file. For example, if you know that there should be no negative values in the grid file, you can enter 0 as the Custom value for the Minimum.
    GridZ
  5. Click OK and the grid is created with the Z range specified.

 


 

If you are using Surfer 12 or an older version that does not have the Grid Z Limits option , there are several methods to eliminate this effect.

 

  1. Use a different gridding method.
    The default Kriging method creates trends in your data and can extrapolate the Z values in the grid file to extend past the limits of the Z data in your original file. Some gridding methods do not extrapolate the Z range in the grid beyond the range of the data. These methods include: Inverse Distance to a Power, Natural Neighbor, Nearest Neighbor, and Triangulation with Linear Interpolation. If you are getting Z values in the grids produced with these gridding methods outside the range of the original data, please check the original data file to be sure there are no negative values.
  2. Use Grid Math to clamp the Z range in the grid file.
    Another method to clamp the grid values to the Z range of the original data (or any range you wish) is to use Grid | Math.
    For example, to remove negative data you can convert all data less than 0 to 0 (or whatever the minimum Z value is in the original data). To do this, follow these steps:
    1. Click Grid | Math.
    2. In the Grid Math dialog, click the Add Grids button, select your existing grid file and click Open. This grid is the input grid file A.
    3. Specify a new name for the Output Grid File.
    4. Enter the formula max(A,0). This formula converts all negative Z values to 0 in the new grid file.
    5. Click OK and the new grid file is created.
    6. To clamp the upper Z value, repeat above using the function min(A,100); where 100 is the maximum value in the original data.
  3. Transform your original Z values to logarithmic values.
    If your data range over several orders of magnitude, it may be beneficial to grid the logarithm of your data. Click Grid | Data, select your data file and click Open.  In the Grid Data dialog, choose the Z Transform of Log, save as linear. Enter any other gridding parameters you wish and click OK.

    In Surfer 11 or previous, you can do this by transforming your Z values in the worksheet to logarithmic values. To do this:

    1. Click File | Open and open the data file in the worksheet.
    2. Click Data | Transform.
    3. If your data are in column C, and column D is blank, use the formula D = log10(C) to calculate the log base 10 of the Z values.
    4. Click File | Save to save the worksheet.
    5. Click Grid | Data, select your data file and click Open.
    6. In the Grid Data dialog, select column D as the Z column.
    7. Enter any other gridding parameters you wish and click OK to create the grid file with logarithmic Z values.
    8. You can convert your grid back to linear values by cicking Grid | Math.
    9. Click the Add Grids button, select your existing grid file and click Open. This grid is the input grid file A.
    10. Specify a new name for the Output Grid File.
    11. Enter the formula POW(10,A). This formula takes the antilog of the Z values in the grid file.
    12. Click OK and the new grid is created.

 

Updated February 3, 2017

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.