How flooding under the ice contributes to ice melt