The Impact of Glaciation and Permafrost on Groundwater Flow