# Invalid or unexpected results for Grid Calculus functions (e.g. Terrain Slope) in Surfer

Surfer uses the X, Y and Z values proportionally when using any **Grid Calculus** operations, including calculating the terrain slope values. Therefore, the X, Y and Z values must be in the same units, and the units must be linear (e.g. feet or meters) for the calculations to be correct.

If the X and Y units in the grid file are in lat/lon units, then the results will not have meaning. The slope calculated for each node will be almost vertical (90°) because the X and Y extents (the lat/lon ranges) are so small compared to the difference in Z values.

When your XY units are latitude and longitude, convert the coordinate system of your data or grid file to a system with linear units (e.g. UTM with meters) prior to calculating the slope. Use a projected system with units that match the units of your Z values. For instructions on converting the coordinate system of raw data or grid files, please see these related articles:

- How can I convert the coordinate system of a grid file (e.g. form Lat/Long into feet or meters) using Surfer?
- Convert the Coordinate System of Data, Image, Vector, and Grid Files in Surfer

*Updated November, 2021*

## Comments

0 comments

Please sign in to leave a comment.