Surface refractivity is a crucial parameter that determines the bending of radio signals as they propagate within the troposphere. It is greatly influenced by the atmospheric weather conditions and changes rapidly, especially in the coastal areas. This research utilized 50 years (1974-2023) surface temperature, pressure, and humidity data from six coastal stations in South Africa to forecast radio refractivity in the Mediterranean climate. Five machine learning models: Gated Recurrent Unit (GRU), Light Gradient Boosting Machine (LightGBM), Long-Short Term Memory (LSTM), Prophet, and Random Forest were trained for future prediction of surface refractivity at any coastal area in South Africa. The stations latitude, longitude, altitude, surface refractivity and date were applied as the input parameters to train the models. The models were optimized through the randomized searchCV hyperparameter tuning to improve their efficiency. The LightGBM outperformed other models with RMSE and adjusted determination coefficients of 1.67 and 0.96, respectively. The model is recommended for future prediction of surface refractivity needed for the improvement of point-to-point wireless communication, terrestrial radio and television transmissions, and mobile communication networks in the coastal sub-tropical regions.