On the anatomy of nearshore sandbars