Resolve Error "Grids must be the same size" In Surfer
The error messages "Grids must be the same size" or "All grids must have the same number of rows and columns" occurs when the two (or more) grids are used in the Grids | Calculate | Math or Grids | Calculate | Volume commands and they do not have the exact same grid geometry. This can occur in Surfer 21 and previous versions, or in Surfer 22 and newer when aligning the grids using Node position.
In Surfer 21 and previous, or Surfer 22 and newer when aligning the grids using Node position, the Grids | Calculate | Math or Grids | Calculate | Volume commands perform their operations on a node-by-node basis. This requires that any grids involved in the operation have exactly the same grid geometry (same number of rows and columns, and the same grid spacing). If you are trying to use two grid files from the same location, they must also have the exact same XY extents so that the grid nodes match up and give you an expected result.
In Surfer 22 and newer, you can choose how the grids aligned. If you have two (or more) grids that do not have the same grid geometry, this is not a problem. You can simply choose to align the grids using XY coordinates instead of by grid nodes. This aligns the grids by their coordinates, performs the operation, and uses the grid nodes of a "master grid" for the resulting grid's geometry. See Surfer's Help for more information on the Align Grids field.
In Surfer 21 and previous, or Surfer 22 and newer when aligning the grids using Node position, the Grids | Calculate | Math or Grids | Calculate | Volume commands perform their operations on a node-by-node basis. This requires that any grids involved in the operation have exactly the same grid geometry (same number of rows and columns, and the same grid spacing). If you are trying to use two grid files from the same location, they must also have the exact same XY extents so that the grid nodes match up and give you an expected result.
In Surfer 22 and newer, you can choose how the grids aligned. If you have two (or more) grids that do not have the same grid geometry, this is not a problem. You can simply choose to align the grids using XY coordinates instead of by grid nodes. This aligns the grids by their coordinates, performs the operation, and uses the grid nodes of a "master grid" for the resulting grid's geometry. See Surfer's Help for more information on the Align Grids field.
In Surfer 21 and previous, you can correct this problem by changing one grid to match the XY extents and grid size of the other grid. You can do this a couple different ways:
Method 1: If you have the original XYZ data, you can regrid one (or both) of the grids by:
- Clicking Home | Grid Data | Grid Data.
- In the Grid Data - Select Data dialog, click Browse and select the data file, or, if the data file is open, click None and select the file. Ensure the X, Y, Z columns are assigned correctly.
- Click Skip to End
- On the Grid Data - <gridding method> - Output dialog, enter the X and Y minimum and maximum values and spacing to match the other grid. Alternatively, click None next to Copy geometry from and either select an open grid whose extents you'd like to match from the list, or click Browse to browse to a grid file.
- Click OK to create the grid.
Method 2: You can resample one or both grids using the Grids | Resize | Mosaic command:
- Click Grids | Resize | Mosaic, select one of the grid files and click Open.
- In the Grid Mosaic dialog, specify the # of Nodes, the Minimum, and the Maximum in the X and Y directions (X is columns, Y is rows) so it matches that of the other grid.
- Click OK to create the grid
Once the two grid files match in XY extents and grid size, then you can use them together in Grid Math or Grid Volume.
Updated October, 2021
Comments
0 comments
Please sign in to leave a comment.