In some cases, you may be able to simply use the minimum depths as the Z value for that point. You could grid the data and create your map. In other cases, you might not want to use the minimum depths as the Z value because the minimum depth value could be very different from the correct value for those points and you may not want the incorrect Z values influencing the interpolation of the known points. In these cases you can grid the known data and adjust the grid file so that it meets the criteria for the unknown conditional data. To apply the conditions to the grid file, you can use a combination of Grids | Calculate | Residuals and Grids | Calculate | Math by following these steps:
- These steps assume you have a data file of X, Y and Z data, where the known Z values are entered numerically (i.e. 25) and the unknown Z values are entered with a condition (i.e. >25).
Create a data file of XYZ data, including the
conditional data. There are four points in this data
file with conditional Z values.
- Either in the Surfer worksheet or in Excel, create a separate column where the conditional values are entered as a number without the conditional argument (<,<=, =>, > , etc).
Create a new column and enter just the conditional value as a number
without the argument.
- Open Surfer or go to File | New | Plot Document from within Surfer to open a new plot window.
- Grid the known XYZ data by going to Home | Grid Data | Grid Data.
- In the Grid Data dialog:
- Click Browse, select the data file of XYZ points and click Open.
- Select the appropriate X, Y and Z columns. Use the original Z column with conditional values.
- Choose the gridding method and parameters you wish.
- Note the values in the Grid Line Geometry section on the Output page.
- Click Finish. All the known points in the data file are gridded, the points with conditions in the Z column are ignored.
When just the known points are gridded, the point
locations with the conditional Z values may not meet the
conditional criteria. In this case, the conditions of three
of the four points are not met.
- Click Grids | Calculate | Residuals, and in the Grid Residuals dialog:
- Click Browse in the Input Grid field, select the grid file just created and click Open.
- Click Browse in the XYZ Data field, select the data file you used to create the grid and click Open.
- Select the appropriate X and Y columns.
- Choose the column with only the numeric conditional values as the Z column
- Select a column to save the residuals in and click OK.
Calculate the residuals between the conditional value
and the Z value in the grid file, storing the results in a
new column.
- The data file with the residuals column opens in the Surfer worksheet. Most likely, some of the residuals will be positive and some will be negative.
The difference between the conditional value and the Z value in the grid file are
entered in Column F. The Residuals are the difference between the Z value in the data
file (the conditional value) and the interpolated Z value for that location in the grid
file. If the residual value is negative, then that means that the interpolated Z value is
greater than the Z value in the data file. If the residual value is positive, then the
interpolated Z value is less than the Z value in the data file.
- Since the conditional data in our data file are all minimum values, we want the residuals to be negative (we want the interpolated value to be greater than the data value). Only one of the residuals in this example is already negative, so that is the only “good” residual value. The next step is to convert the “good” residuals to 0 and populate the empty cells with 0.
- Select the Residuals column by clicking on the column header letter.
- Click Data | Data | Transform.
- In the Transform dialog, enter the function F= IF (F<0, 0, F) (where F is the column letter of the residuals column), you may need to change the First row value to 2.
Convert all the negative residuals to 0 using Data | Data | Transform.
- Click OK. Now all the negative values are converted to 0.
- Next we want to fill in all the empty cells with 0. Click in a cell in the Residuals column
- Click Data | Find | Replace, leave the Find field empty, enter 0 for Replace with, and select The column where the active cell is for In.
Populate all the empty cells in the Residuals column with 0.
- Click Replace All and then Close. Now all the values are 0 except the positive residuals. The remaining positive residual values represent the difference between the Z value in the grid file and the minimum Z value requested. We want to add these values to the interpolated data in the grid file.
All the values are 0 except the positive residuals.
- Click File | Save to save the data file, and File | Close to close the worksheet.
- Now we want to create the correcting grid based on the residual data. Click Home | Grid Data | Grid Data.
- In the Grid Data dialog:
- Click Browse, select the data file of XYZ points and click Open.
- Select the appropriate X, Y and Z columns. For the Z column, choose the new Residuals column.
- Choose Inverse Distance to a Power as the Gridding Method and click Skip to End. This will most closely honor the correcting residual values and still produce a nice looking map.
- On the Output page, click Browse in the Copy geometry from field, select the original grid file, and click Open.
- Change the Output Grid File to a new name by clicking on the yellow open folder icon, giving the file a new name or location and clicking Save.
- Click Finish.
This residual map shows the distribution of the positive
residual data. This data will be added to the original
map so that all points meet their conditions. - Go to Grids | Calculate | Math.
- In the Grid Math dialog:
- Click the Add Grids button.
- Select the original grid created in Step 5 above, hold the CTRL button down, select the correcting grid created in Step 18 above, and click Open. Both grids are added.
- Enter the function A+B to add the correcting grid to the original grid.
- Change the Output Grid File if desired by clicking on the yellow open folder icon, giving the file a new name or location and clicking Save.
- Click OK. This is the final grid with the conditions met.
- Plot the newly created GRD as a contour layer.
Add the positive residuals grid file to the original grid file
to create the final grid, where all conditional points meet
their conditions.
Acknowledgements go to Sergei Beda.
Updated September 3, 2020
Comments
Please sign in to leave a comment.