The cold temperatures also come from the cold water on the coast. You would only see warm temperatures if there would be a wind coming down from the nearby Andes mountain range. The situation of Lima in Peru is basically similar to what affects cities such as San Diego, USA and Tijuana, Mexico.