In many desert places, like Iraq, summer lasts a long time, with a mean daily high temperature of 45 °C. Buildings use a lot of electricity to run the air conditioning systems, which is a big part of the total amount of electricity produced. Everywhere in the hot and dry subtropics, a passive method of cooling is a real way to save money on air conditioning. One of these methods, called earth pipe cooling uses the relatively constant temperature of the ground below to cool indoor spaces without using any mechanical equipment. This reduces or eliminates the building's overall energy use and impact on the environment. In a space that was 3 × 3 × 5.5 m, the temperature of the ground and the efficiency of a 31-m-long, 3-m-deep, 6-inch-wide ground heat exchanger were measured. The effect of weather on the temperature of the air coming out of a building depends on the strength of the sun, the temperature of the ocean, and the relative humidity, all of which change depending on where the building is located. Also, the output air temperature and thermal performance change concerning air moving from 4 to 6 m/s. Using MATLAB and ANSYS FLUENT, the researchers carried out the simulations of the cooling system and it was found that the theoretical results were within 1.3% of the actual results. The results showed that climate variables have a big effect on the ground temperature down to a depth of 0.25 m, but at a depth of 3 m, the ground temperature remains the same (21 °C) all year long. Also, the results exhibited that the temperature of the air coming out of the system increased from 23 °C to 32 °C as the air moved faster through the system. Since the geothermal heat exchanger is most effective at cooling at a speed of 4 m/s, slowing the flow speed makes it work better. By using a geothermal heat exchanger, the difference in temperature between the inside and outside air could be cut by 10–16 °C. The data also showed that the speed and diameter of the air leaving the pipe made it hotter, while length, depth, and conductivity made it cooler.