Temperature distribution in karst systems: the role of air and water fluxes