Optimizing Solar Microgrid Locations in Morocco Using Geospatial Analysis and Random Forest Machine Learning Techniques
DOI:
https://doi.org/10.13021/jssr2025.5305Abstract
Expanding access to renewable energy in rural regions is critical for sustainable green development and equitable access to electricity. Morocco, one of Africa’s leading countries in renewable energy development, has invested in large-scale electric grids/projects such as the Noor Ouarzazate Solar Complex and national energy plans targeting 52% renewable electricity by 2030 (El Hafdaoui et al., 2025). However, rural Moroccan communities remain disadvantaged and dependent on fossil fuels. This study aims to address this gap by combining geospatial data analysis with machine learning in order to identify the optimal regions for solar microgrid development. Five key monthly datasets were obtained: net downward shortwave solar radiation (FLDAS) and cloud fraction/cover from NASA’s Moderate Resolution Imaging Spectroradiometer (MODIS) data on NASA Giovanni, as well as terrain elevation (SRTM), land cover classification (MODIS), and night-time light intensity (VIIRS) from Google Earth Engine. Each dataset was processed, normalized, and visualized using Python in Google Colab. A weighted composite suitability map was generated using matplotlib, emphasizing solar irradiance and terrain (weighted at 0.35 each), along with cloud cover and urban proximity via night lights (0.15 each), and land cover as a binary suitability mask. 100 labeled data points (50 suitable, 50 unsuitable) were manually selected using QGIS. A Random Forest ML classifier was trained and tested on these layers to predict suitability across the map of Morocco and yielded a classification map consistent with the composite map. This study demonstrates the potential of a data-driven approach for solar microgrid siting to support effective planning and equitable energy access in rural regions and serves as a foundation that can be further refined and adapted for broader applications.
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.