There are a few ways you can merge GRD or DEM files.
Method 1. Overlay separate maps.
The first is to create separate contour layers for each grid and overlay them in the same map. This works well for most files:
- Click Home | New Map | Contour, select the first GRD or DEM file and click Open. That creates the map with the first contour layer.
- Select the map and click Home | Add to Map | Layer | Contour, select the next GRD or DEM file and click Open. That creates a new contour layer and adds it to the map. Now the map has two contour layers.
- Repeat for all GRD or DEM files you have so that all the contour layers are combined and displayed in the same map.
Method 2. Mosaic the grids.
The next method is to use the Grid Mosaic command to merge two (or more) grid or DEM files together into a single grid. You would create the map from this one combined grid file:
- Click Grids | Resize | Mosaic, select the first grid file and click Open.
- In the Grid Mosaic dialog click the Add button, select the second DEM and click Open.
- You have a choice of the Resample Method and the Overlap Method (what to do when the grids overlay and there are multiple sets of data in a specific area).
- Specify an Output Grid file name and location and click OK.
Method 3. Convert the grid to data, merge the data, and regrid.
If overlaying maps or mosaicking is not working as you expect, or the contact/seam just isn't looking right (perhaps due to NoData values), the third method is to convert the grids/DEMs to data files, merge the data files and remove the NoData values, and regrid the data. The exact steps are:
- Click Grids | Edit | Convert.
- Select the first grid or DEM file, in the Grid Info section note the Size (rows and columns) of the grid file, and click Open.
- In the Save Grid As dialog, select DAT XYZ (*.dat) as the Save as type, give the file a name and click Save.
- Repeat steps 1-3 for the other grid file, so you have two DAT files.
- Click File | Open, select one DAT and click Open. It will open in the Surfer worksheet.
- Scroll to the bottom of the file and click in the first empty cell in Column A.
- Click Data | Edit | Merge.
- Select the second DAT file and click Open. The new data will be appended to the bottom of the first file.
- Select all three columns (A, B and C) and click Data | Data | Sort.
- Choose Sort First By: Column C, Descending, and click OK.
- Now we want to get rid of the blanked nodes. The values could be the Surfer blanking value, 1.70141e+38, or I've also seen them in DEM files as -32767. Select the first row with the blanking value in Column C, scroll to the last row that has the blanking value it in, hold the SHIFT key down and select the last row with the blanking value in Column C. That will select all the intervening rows.
- Click Data | Edit | Delete.
- Once all the blanking values are deleted from the data file, click File | Save (or File | Save As) and save the file to a DAT file.
- Click Home | Grid Data | Grid Data, select the DAT file and click Open.
- In the Grid Data dialog, choose the Nearest Neighbor gridding method and set the # of Nodes equal to that of the original grid file (noted in Step 2 above). Set the file path and file name for the output grid file and click OK.
Updated February 9, 2017