Linking water and permafrost dynamics