A finite difference model (like ROMS) is called terrain following if the number of vertical levels is fixed and their relative position varies with the bathymetry
The stability of such models depends, among many other things, on the roughness of the bathymetry
The program availabe here gives a method for finding the bathymetry closest to the real bathymetry while satisfying to the roughness factor constraint.