I am trying to use a flow accumulation (fac) raster and a slope (slope) raster to calculate the topographic wetness index (TWI) in raster calculator as:

Ln("fac"/Tan("slope"))

The resulting output values do not make sense relative to hand calculations. For example:

If...

fac = 6 cells, slope = 26.379343 degrees

TWI = 0.701 (ArcGIS raster calculator)

TWI = 2.493 (by hand)

Also, many of the output pixels are "no data".

Does anyone know what might be causing this discrepancy?

Ln("fac"/Tan("slope"))

The resulting output values do not make sense relative to hand calculations. For example:

If...

fac = 6 cells, slope = 26.379343 degrees

TWI = 0.701 (ArcGIS raster calculator)

TWI = 2.493 (by hand)

Also, many of the output pixels are "no data".

Does anyone know what might be causing this discrepancy?

Though, even if it were in percent it just seems that the calculation is wrong regardless of what the numbers actually represent.

Tan("slope")

The results appear to be very far off. For example:

slope = 32.998260

Tan("slope") = -86.669029 (by ArcGIS raster calculator)

Tan("slope") = 0.64915 (by hand calculator)

Tan("slope") = 0.64915 (by http://www.rapidtables.com/calc/math/Tan_Calculator.htm)

It appears that the Tan function in ArcGIS raster calculator is not working properly.

This is confirmed by the help on Tan(): http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=6412&pid=6399&topicname=Tan&.

It looks like "DEG" is a constant that equals 180/pi and so you might be able to use this equation:

Ln("fac" / Tan("slope" / DEG))

Also note that the Raster Calculator is finicky with spaces around operands. If you use the "calculator pad" in the Raster Calculator to build your equations, it makes sure all the spaces are where they should be.

DEG wasn't recognized but I replaced with 180/3.141592 and it works just fine. Thanks again.

http://forums.arcgis.com/threads/32896-from-DEM-to-CTI?highlight=CTI

http://forums.arcgis.com/threads/33824-Areas-of-No-Data-in-the-Topgraphic-Index?highlight=CTI

http://forums.arcgis.com/threads/44868-Compound-Topographic-Index-Catchment-Wetness-Index-from-DTM-data?highlight=CTI