The resulting huge black bogs are threatening the river and the precious groundwater in the region , which is dotted with villages and crisscrossed by itinerant sheep herders , but also contains Iraq 's great northern refinery complex at Baiji .