A novel subgriding scheme for arbitrarily dispersive thin-layer modeling