anchor.diff:    ! the barotropic pressure contribution. Force consistency
     ! between layer thicknesses and ocean depth by scaling
     ! thicknesses to agree with free surface.
  -  call enforce_moderate_free_surface(hnew, etanew, depth, &
  +  call enforce_depth_thickness_consistency(hnew, etanew, depth, &
         freesurfFac, thickness_error, nx, ny, layers)
   
     ! Apply the boundary conditions
  
positive.code: ! ---------------------------------------------------------------------------
  !> Check that the free surface anomaly and layer thicknesses are consistent
  
  subroutine enforce_moderate_free_surface(h, eta, depth, &
      freesurfFac, thickness_error, nx, ny, layers)
    implicit none
  
  
negative.code:   end if
  
    return
  end subroutine enforce_depth_thickness_consistency
  
  ! ---------------------------------------------------------------------------
  !> Ensure that layer heights do not fall below the prescribed minimum
  