I have a bathymetry raster, and I am trying to use it to calculate a parameter called the "contour index". This parameter is calculated using the max and min values from a moving window of cells (let's say, 9x9). It's defined as "(max depth - min depth)/max depth * 100". Once calculated, the values should range from 0-100.
To try to calculate the contour index, I first used ArcMap-->Spatial Analyst-->Neighbourhood-->Focal Statistics to create a new layer for the min water depth and max water depth in each 9x9 window. I then tried to use the "raster calculator" to calculate the contour index value for each cell.
However, the resulting layer is definitely wrong, with values ranging from -70,000 - 180,000. I honestly am at a loss for what I am doing wrong. Could it be related to NA values in my raster (eg. coastlines and edges of the raster)?