Obtaining and confining water by means of wells