Wave-induced oscillations in harbours of variable depth