Once the vertical discretization or geometry is imposed and the bathymetry is chosen, the bottom layer can yield stability problems when using shaved cells. You can have very thin bottom cell next to a very wide bottom cell. To diagnose the existence of such problematic cells, a geometry diagnostic tool was developed.
The latest source code is in the Mohid_V4 repository, inside the small tools\GeometryDiagnostic folder.
IN_MODEL : GeometryDiagnostics.dat
BATIM : Biscay_Level2__.new2 GEOMETRY : D:\Aplica\BiscayAplica\GeneralData\Ocean\Geometry\Level2\Geometry.dat OUT_FILE : geomdiag_new2.hdf5 OUT_GRIDDATA3D : geomdiag_new2.dat
The outputs are an hdf5 file and a three-dimensional grid data file.
For all horizontal cells i, j, there is one bottom layer kbottom that defines the bottom layer thickness DWZ(i, j, kbottom); where DWZ is the 3D matrix that defines the layers thickness for every water column.
LowerLayerThickness(i,j) = DWZ(i,j, kbottom)
Is the ratio of neighboring cells bottom layer thickness along the X axis.
aux = DWZ(i,j, kbottom)/DWZ(i,j-1, kbottom) LowerLayerThicknessGradU(i,j) = min( aux, 1/aux)
Is the ratio of neighboring cells bottom layer thickness along the Y axis.
aux = DWZ(i,j, kbottom)/DWZ(i-1,j, kbottom) LowerLayerThicknessGradV(i,j) = min( aux, 1/aux)