A thermodynamic nonequilibrium model for preferential infiltration and refreezing of melt in snow