Transitions of flow past a row of square bars