The solar humidification-dehumidification desalination system with a subsurface condenser is a promising and sustainable approach to providing a sustainable water supply. In this study, a comprehensive three-dimensional transient computational fluid dynamics model of the system is developed. Due to the lack of an experimental study on the thermal performance of the subsurface condenser, an experimental setup of the subsurface condenser is built, and the obtained experimental results are used to validate the developed model of the subsurface condenser. The developed numerical model is used to evaluate the effect of several involving parameters on the system performance. The optimum system parameters are determined, and the annual simulation of the optimum system is performed. The results show that condenser inlet velocity is the most influential parameter on daily water yield and Gain Output Ratio (GOR). The GOR of the system with the maximum daily water yield is very low. However, despite having 60% less daily water yield, the proposed optimum system has a 1120 % higher GOR. Moreover, it is demonstrated that about 40% of vapor produced in the humidifier leaves the condenser without being condensed into freshwater. Therefore, it is recommended that the system be designed as a closed cycle.