Effects of temperature on population dynamics