Assessing the Impact of Climate Change on Seasonal Variation in Agricultural Land Use Using Sentinel-2 and Machine Learning †

: The Fez region in Morocco has experienced changes in agricultural land use as a result of climate change. These changes include erratic rainfall, rising temperatures, and evapotranspiration. The objective of this research is to investigate the impact of these changes on agricultural land use between 2018 and 2022 using remote sensing data (sentinel-2 and MODIS), climate data, drought index (Vegetation Condition Index (VCI)) and two machine learning algorithms (Random Forest (RF) and Gradient Tree Boost (GTB). The RF and GTB algorithms were trained and tested, and their performance was analyzed, revealing that the GTB algorithm is more efficient than the RF, with a Kaffa coefficient of 91% and overall accuracy of 93%. The analysis of climate change on land use and land cover (LULC) variations revealed a significant (54%) reduction in rainfall. Furthermore, agricultural land use and water were reduced by 41% and 17%, respectively. Conversely, barren land and built-up areas increased by 58% and 4%, respectively, and the annual mean VCI decreased from 39.72 in 2018 to 19.9 in 2022. The study concluded that climate change had a significant impact on the region’s agricultural land cover, and decreases in rainfall directly affect agricultural land use.


Introduction
Agriculture plays a crucial role in the Moroccan economy, contributing between 14 and 20% to the nation's Gross Domestic Product (GDP) [1].It serves as a major source of employment, accounting for 43% of job opportunities, particularly in rural areas, while maintaining food security [1,2].In addition, agriculture acts as a source of raw materials for both domestic and international industries.In recent times, the agricultural sectors in the Middle East and North Africa (MENA) region have encountered a range of challenges, notably the impact of climate change on rainfall patterns and the depletion of groundwater resources [3,4].Furthermore, salinization in soils and groundwater causes a detrimental impact on agricultural product growth and quality [5].Incorporating decision-making tools in Moroccan agriculture can significantly assist with evaluating and tackling climaterelated shifts.Employing remote sensing technology offers a quantitative approach to comprehending environmental changes, resulting in reduced expenses and time spent analyzing land use and cover.This can be a useful tool in assessing and addressing the impact of climate change on agriculture in Morocco [6,7].The popularity of machine learning (ML) methods for remote sensing has significantly increased, especially in the classification of land use and land cover (LULC).ML techniques have shown remarkable effectiveness in reducing processing time and improving accuracy, enabling the efficient detection of changes in LULC.
When collecting remote sensing data for LULC classification, two main satellite platforms are utilized: Sentinel-2 and Landsat.Although both have their advantages, Landsat provides a more extensive dataset that goes back to 1972.However, Sentinel-2's spatial resolution is significantly higher, at 10 meters, compared to Landsat's 60 meters.Therefore, it is preferred to use Sentinel-2 for analyzing LULC changes from 2016 to the present.Additionally, Sentinel-2 offers 13 spectral bands, while Landsat 9 has only 9 bands that cover the visible, near-infrared (NIR) and shortwave infrared (SWIR) wavelengths.To extract relevant information on surface features such as vegetation, urban areas, soil or water, spectral indices (SI) are utilized, significantly enhancing the accuracy of LULC classification.[9].The findings suggest that urban development has had an adverse impact on groundwater, soil quality and natural ecosystems.The study also highlights the importance of remote sensing in detecting hydrological droughts and aiding in the conservation of land and water resources.
The objective of this research was to analyze the effects of temperature, drought and rainfall patterns on agricultural land located in the Fez prefecture of Morocco during the rainy seasons of 2018 and 2022.To classify the land-use/land-cover (LULC) map into four categories, namely builtup, agriculture, water and bareland, machine learning models were employed based on Sentinel-2 satellite data.The LULC changes were compared with climate and drought changes using MODIS, CHIRPS and AgERA5 databases.The results indicate that machine learning methods can efficiently be employed to monitor changes in agricultural land.

Study Overview
Figure 1 depicts the study flowchart, which delineates the sequential procedures involved in LULC classification and change analysis.Remote sensing data were initially collected from the Sentinel-2 satellite.Following that, spatial and temporal filtering techniques were used to obtain cloud-free imagery while also limiting the selection of dates within the scope of the investigation.After that, the spectral indices listed in Table 1 were computed using ground truth data.Next, Random Forest and Gradient Tree Boosting were trained with the training set.The validation set was used to evaluate the models' performance using a variety of performance metrics.The LULC results and climate data from the CHIRPS dataset were used to analyze the changes.

Site Description
Fez is one of the oldest cities, with origins dating back to the 14th century.It is situated in the northern part of Morocco as depicted in Figure 2. Fez is renowned for its prominence in the fields of tourism and agriculture.The climate of the region is classified as semi-arid, featuring an annual precipitation of approximately 500 mm and an average temperature of 18 degrees Celsius.

Data Collection 2.3.1. Sentinel-2 and MODIS Data
Using the Google Earth Engine platform, Remote sensing imagery data from the Sentinel-2 satellite and MODIS sensor were processed for the years 2018 and 2022.The data underwent cloud filtration to ensure clarity and accuracy, and were further limited to a specific study area.This process enabled the collection of high-quality, relevant data for analysis and research purposes.

Ground Truth Data
We collected primary data from the field by conducting on-site visits.During these visits, we carefully recorded the geographical coordinates and assigned appropriate labels corresponding to the LULC classes (water, land, agriculture and bare land) for each specific location.Using the Google Earth Engine platform, ground data were subsequently utilized to accurately pinpoint places within the study area and generated 1126 samples (908 training and 218 validation sets).

Spectral Indices (SI)
Spectral indices refer to linear combinations of multiple spectral bands from remote sensing satellites, which are utilized to extract additional information and enhance the identification and differentiation of specific features on the Earth's surface.In this study, we employed four spectral indices presented in Table 1 to augment the feature set.The RF algorithm is a supervised machine-learning technique that is utilized for both classification and regression tasks [17].It falls under the category of controlled nonparametric methods.The RF algorithm utilizes an ensemble of decision trees and combines their predictions through a majority voting technique.RF has been utilized in numerous studies to address various LULC classification problems [18], consistently demonstrating superior performance and yielding optimal outcomes.The fundamental components of random forests encompass the number of trees, variables per split, bag fraction (BF), maximum nodes and minimum tree leaves.

Gradient Tree Boost (GTB)
The GTB model is a supervised algorithm that is commonly used to solve classification and regression problems [19].GTB aggregates and produces a more precise final result by using an ensemble of weak individual decision trees.GTB can avoid overfitting by fitting the residuals of the regression tree at each iteration with negative gradient loss values.Several authors have reported on the use of GTB for LULC classification, revealing that the algorithm also produces good results [20,21].

Performance Evaluation Metrics
The evaluation of the machine learning algorithm's accuracy for the classification of LULC was conducted using a confusion matrix.This assessment included metrics such as overall accuracy (OA), producer's accuracy (PA), consumer's accuracy (CA), and kappa coefficient.

Classification Accuracy
The classification performance of the RF and GTB algorithms for LULC is presented in Table 2.Both algorithms demonstrated exceptional performance in generating accurate LULC maps for the study, with an Overall Accuracy and kappa coefficient exceeding 80%.
The assessment of the classification models' performance was based on the metrics outlined in Section 2.5.The GTB model outperformed RF in terms of overall accuracy, achieving a score of 93% and a kappa coefficient of 91%.In contrast, RF achieved an accuracy rate of 92% and a kappa coefficient of 89%, which is comparatively lower.The best technique for examining land-cover changes and comprehend how changes occur within classes is to compare classification results in detail.Figure 3A and Table 3 provide the LULC map comparison results for 2018 and 2022.Figure 3B displays the VCI for the month of March in both 2018 and 2022.The graph clearly illustrates the noticeable effect of drought in 2022.Figure 4 illustrates the VCI time-series plot for the years 2018 and 2022, with a noticeable decrease in the trend observed in 2022.As indicated in Section 2.3.2,meteorological data for the specified period were acquired and are presented in Table 4.It is observed that there was a significant increase in rainfall of 392 mm/year (46%) between the years 2018 and 2022.Furthermore, there was a subsequent increase in evapotranspiration of 173 mm (11.5%).The minimum and maximum temperatures both experienced increases of 0.5 and 1.4 degrees Celsius, respectively.Based on these findings, it is evident that a reduction in rainfall has a direct impact on the decline in agricultural land coverage and VCI.Additionally, the drop in rainfall contributes to an increase in the rate of evapotranspiration and VCI.Consequently, there exists an inverse correlation between rainfall and evapotranspiration.Secondly, there exists a classification overlap between the built-up region and bareland class as a result of the resemblance in their features.The bareland class encompasses terrains such as mountains and rocks, which are utilized to produce construction materials like marble and tiles.

Conclusions
In this research, two classifiers, namely RF and GTB, were utilized for the purpose of LULC classification.The findings of the study indicated that the GTB model had superior performance compared to the RF model in terms of both overall accuracy and the Kaffa coefficient.Based on our findings, it can be inferred that climate change has a direct influence on agricultural land cover.Therefore, it is of utmost importance to monitor changes in agricultural land cover to identify factors contributing to degradation, particularly with regard to climate and food security.The scope of this research is limited to the analysis of LULC changes specifically during the rainfed season.Further investigation of the irrigation season is essential to extrapolate the results and assess the broader changes in agricultural land and the state of food security within the region.

Table 1 .
List of spectral indices used for LULC classification.

Table 2 .
Validation accuracies of GTB and RF algorithm.

Table 3 .
The percentage of LULC-changes for each thematic class in 2018 and 2022.

Table 4 .
Climate and VCI changes between 2018 and 2022.