3.1. Radial and Directional Thermal Profiles
The analysis of radial LST gradients highlights marked differences in thermal organization among the five cities. Tangier shows the clearest decline in temperature with increasing distance from the urban core, reflecting a classical UHI configuration. Conversely, Laayoune remains consistently warm along the entire transect, indicating limited peripheral cooling and suggesting that arid-environment conditions may outweigh the urban-core effect. Béni Mellal, Ifrane, and Taza exhibit more complex radial signatures with localized increases and fluctuations in temperature at intermediate and outer distances. This interpretation is consistent with previous Moroccan UHI studies showing that SUHI structures vary according to local climate, land-cover composition, urban typology, and surrounding rural conditions; in particular, Fathi et al. [
4] identify clear UHI patterns in cities embedded in vegetated surroundings and Urban Heat Sink tendencies in arid environments, while El Ghazouani et al. [
8] demonstrate that Moroccan cities present differentiated UHI/UHS structures depending on climate, size, typology, and land-cover configuration.
Figure 2.
Average radial thermal profiles across the five studied cities
Figure 2.
Average radial thermal profiles across the five studied cities
To further investigate this issue, the analysis was extended to the annual dynamics of both land surface temperature (LST) and urban heat island intensity (UHI) over a 19-year period, as illustrated in
Figure 3 and
Figure 4. This temporal perspective enables a more robust characterization of interannual variability and supports a deeper understanding of whether urban thermal in long-term patterns.5.2. Exploratory Spatial-Temporal Analysis: LST and UHI.
The monthly LST time series from 1995 to 2024 reveals a strong and persistent seasonal signal across all five cities, marked by recurring annual maxima and minima.
Figure 4.
Monthly UHI intensity time series (1996–2024) across the five studied cities.
Figure 4.
Monthly UHI intensity time series (1996–2024) across the five studied cities.
Figure 4, in turn, presents how the monthly UHI series from 1996 to 2024 displays substantial interannual variability, but no clear evidence of generalized long-term intensification across the five cities. Tangier stands out as the city with the highest and most persistent positive UHI intensity throughout the period, with recurrent warm peaks from the late 1990s to the 2020s, indicating a consistently stronger urban–peripheral thermal contrast than in the other cities. By contrast, Béni Mellal, Ifrane, Taza, and Laayoune show alternating positive and negative anomalies and only moderate variations in amplitude over time. Ifrane records the most pronounced negative anomalies, particularly during the earlier years, reflecting occasional strong urban heat sink episodes Taken together, the comparison between the late 1990s and the 2020s reveals the temporal persistence of city-specific UHI regimes rather than a generalized intensification over the study period.
To further refine the analytical scale, the assessment was extended to the monthly mean values of UHI intensity for a more detailed characterization of seasonal thermal variability and helps identify the months during which urban–peripheral temperature contrasts are most pronounced.
Figure 5.
Mean monthly UHI cycle across the five studied cities.
Figure 5.
Mean monthly UHI cycle across the five studied cities.
The results reveal marked seasonal and inter-city variability in the mean monthly UHI cycle. Tangier records the highest UHI intensity throughout the year, with a pronounced peak in April–May. Béni Mellal exhibits positive UHI values in spring, followed by negative values indicating a seasonal reversal in the urban–peripheral thermal contrast, whereas Taza and Laayoune display relatively limited seasonal amplitudes and remain close to the zero baseline. Overall, these findings demonstrate that UHI seasonality is strongly city-specific, ranging from persistent positive UHI regimes to recurrent urban heat sink conditions.
3.2. Characterization of UHI Intensity and Urban Heat Sink Occurrence
Figure 6.
Statistical summary of UHI intensity distribution and UHS occurrence frequency across the five cities.
Figure 6.
Statistical summary of UHI intensity distribution and UHS occurrence frequency across the five cities.
The statistical characterization of urban thermal contrast, including maximum, minimum, and mean UHI intensity together with the frequency of UHS occurrence, reveals marked inter-city differences in both the magnitude and direction of urban–peripheral thermal contrasts. Tangier is the only city with a clearly positive mean UHI intensity and the highest maximum value, while also exhibiting the lowest UHS frequency, confirming the predominance of a persistent classical UHI regime. By contrast, Béni Mellal, Ifrane, Laayoune, and Taza display slightly negative mean UHI values, reflecting weak average contrasts or recurrent shifts toward UHS conditions. Among them, Ifrane stands out with the most negative minimum UHI value and the highest UHS frequency, indicating a thermal regime strongly dominated by urban cooling episodes.
These findings further substantiate the existence of two contrasted urban thermal regimes among the study cities. In Tangier, the results confirm the predominance of a classical Urban Heat Island pattern, characterized by persistently positive urban–peripheral thermal contrasts. In Ifrane, the analysis identifies a regime distinguished by recurrent Urban Heat Sink conditions. These results are consistent with the patterns previously identified by El Ghazouani et al. [
8] and Fathi et al. [
4], thereby reinforcing the temporal robustness of these city-specific thermal behaviors.
3.3. Environmental Controls on UHI Intensity
Figure 7.
Environmental correlation matrix covering LST–NDVI and LST–Humidity relationships across the five cities.
Figure 7.
Environmental correlation matrix covering LST–NDVI and LST–Humidity relationships across the five cities.
To further investigate the environmental controls shaping UHI and UHS dynamics, three key variables were analyzed:
• Land surface temperature as an indicator of surface thermal conditions,
• NDVI as a proxy for vegetation cover,
• Humidity as a measure of atmospheric moisture.
This approach is consistent with remote-sensing UHI studies, where LST is widely used to characterize surface thermal conditions, while NDVI is commonly used to capture vegetation-related cooling effects and land-cover controls on urban temperature [
18].
LST and humidity: Across most cities, the relationship between LST and humidity is strongly negative, indicating that higher humidity levels are generally associated with lower surface temperatures, pointing to a significant cooling influence of moist atmospheric conditions. The strongest inverse relationship is observed in Taza, suggesting that humidity may constitute a regulator of surface heat in this city. This interpretation is theoretically supported by urban-climate literature emphasizing the role of surface energy balance, evapotranspiration, latent heat flux, and moisture availability in regulating urban thermal conditions [
1].
LST and NDVI: The relationship between LST and NDVI is overall weak to moderate and predominantly negative, suggesting a weaker moderating role of vegetation. The correlation is nearly absent in Ifrane (−0.04) and Laayoune (+0.04), implying that vegetation cover alone does not strongly account for temperature variation in these cities. This suggests that the thermal influence of greenness is highly dependent on local urban form, vegetation density, and broader climatic conditions. Moreover, greener areas are not systematically associated with more humid conditions, coherent with broader SUHI literature showing that the effects of vegetation and moisture are context-dependent [
19].
Overall, these results highlight pronounced spatial heterogeneity in the environmental controls of urban temperature. Humidity appears to be the dominant regulating factor in most cities, whereas vegetation plays a secondary yet locally significant role, particularly in Tangier. Laayoune stands out as an exception, displaying a distinct environmental behavior. These findings are consistent with those reported by Lachir et al. [
12] and with wider Moroccan UHI studies showing that surface thermal regimes differ substantially between humid/coastal, inland, mountainous, and arid environments.
3.4. Trend Detection
The Mann–Kendall test revealed no statistically significant monotonic trend in UHI intensity across the five studied cities over the observation period, as all p-values exceeded the 0.05 significance threshold. Sen’s slope estimates were consistently close to zero, ranging from −0.0012°C/month in Ifrane to +0.0009°C/month in Taza, indicating the absence of any persistent long-term increase or decrease in urban–rural thermal contrast. Although the time series show pronounced seasonal and interannual variability, these fluctuations reflect short-term environmental and climatic controls rather than a directional long-term trend. Overall, the results suggest that UHI dynamics in these cities are primarily governed by seasonal behavior and local environmental conditions, rather than by monotonic climatic evolution.
Figure 8.
Mann–Kendall trend analysis and Sen’s slope estimates for UHI intensity across the five cities.
Figure 8.
Mann–Kendall trend analysis and Sen’s slope estimates for UHI intensity across the five cities.
3.5. Predictive Modeling Framework
3.5.1. SARIMA-Based Forecasting of Land Surface Temperature
The Seasonal Autoregressive Integrated Moving Average model (SARIMA) are widely used for environmental and climatic time series, as they combine non-seasonal autoregressive components with seasonal differencing and seasonal lag structures [
20,
21]. Within this perspective, the SARIMA approach contributes a temporal forecasting dimension, allowing the study to move beyond the description of past LST variability toward an assessment of near-future thermal behavior.
Figure 9.
SARIMA-based prediction of LST dynamics across the five studied cities (Laayoune, Taza, Ifrane, Béni Mellal, Tangier).
Figure 9.
SARIMA-based prediction of LST dynamics across the five studied cities (Laayoune, Taza, Ifrane, Béni Mellal, Tangier).
The results indicate that LST variability across the five cities is primarily governed by seasonal recurrence. The fitted SARIMA values reproduce the main temporal structure of the observed series with reasonable accuracy, especially the timing of seasonal maxima and minima. In Laayoune, the model identifies a clear seasonal thermal regime; forecasts for 2026–2027 indicate the continuation of this cyclical behavior within the historical range. Taza also presents a strongly seasonal LST regime, with the forecast indicating continuity rather than disruption. For Ifrane, the model reveals a marked seasonal structure consistent with the city’s mountainous setting. In Béni Mellal, SARIMA results similarly reveal a highly seasonal LST regime, with persistence of seasonal peaks suggesting that planning responses should prioritize heat-sensitive urban design. In Tangier, even though the SARIMA model identifies a clear annual structure, the amplitude of LST oscillations appears lower than in inland or mountainous cities, possibly reflecting the regulating influence of the coastal environment.
Overall, the SARIMA-based forecasting framework demonstrates that LST variability is dominated by seasonal recurrence and short-term fluctuations rather than by abrupt regime shifts. The forecasts consistently indicate that predicted LST values remain broadly within historical ranges, suggesting continuity of existing thermal regimes. This should not be interpreted as the absence of climate risk; rather, it highlights that near-future heat exposure is likely to remain organized around recurrent seasonal peaks. From an urban climate and planning perspective, this finding reinforces the need for adaptation strategies [
2,
9].
3.5.2. Random Forest-Based Forecasting of Land Surface Temperature
To complement the statistical time-series analysis, a Random Forest forecasting framework was applied. Random Forest is an ensemble machine-learning algorithm that combines multiple decision trees to improve predictive accuracy and reduce the risk of overfitting through bootstrap aggregation and random feature selection [
14]. Its ability to model nonlinear relationships makes it particularly relevant for environmental and remote-sensing applications [
22].
Figure 10.
Random Forest-based LST forecasting across the five studied cities.
Figure 10.
Random Forest-based LST forecasting across the five studied cities.
Across the five cities, the Random Forest results confirm that LST variability is strongly structured by seasonality. In Ifrane, the model demonstrates strong performance in reproducing seasonal oscillations consistent with the mountainous context. In Tangier, the model captures moderate thermal amplitude influenced by coastal conditions. For Laayoune, the model captures the principal temporal dynamics including irregular interannual fluctuations, demonstrating that machine-learning methods can effectively represent nonlinear thermal variability even in complex climatic settings. In Béni Mellal, the model accurately reproduces the strong seasonal structure with recurrent annual oscillations. In Taza, the model performs well in representing the strong seasonality of the LST series. Future extensions could integrate predictors such as NDVI, NDBI, humidity, land-cover change, soil moisture, and urban morphology to improve both predictive performance and interpretability.
3.5.3. XGBoost-Based Forecasting of Land Surface Temperature
Extreme Gradient Boosting (XGBoost) is an optimized gradient-boosting algorithm that builds an ensemble of decision trees sequentially, where each new tree corrects the residual errors of the previous ones. Its regularization mechanisms, scalability, and ability to capture nonlinear patterns have made it one of the most widely used algorithms for high-performance predictive modeling [
15].
Figure 11.
XGBoost-based LST forecasting across four studied cities (Ifrane, Tangier, Taza, Laayoune).
Figure 11.
XGBoost-based LST forecasting across four studied cities (Ifrane, Tangier, Taza, Laayoune).
The results indicate that XGBoost effectively captures the dominant seasonal structure of LST, particularly in Taza, Ifrane, and Tangier, where annual oscillations are more regular and clearly defined. In Laayoune, despite a more irregular observed LST series, the XGBoost model reproduces the general thermal signal and projects continuity of the existing thermal regime. Compared with the other predictive approaches, XGBoost confirms two major findings: LST variability across the studied cities remains strongly seasonal, and the short-term forecasts do not suggest abrupt regime change. This convergence between machine-learning outputs and statistical time-series results strengthens the reliability of the predictive framework.
3.5.4. LSTM-Based Forecasting of Land Surface Temperature
A Long Short-Term Memory (LSTM) model was applied to further strengthen the predictive analysis. LSTM is particularly relevant for time-series forecasting when data exhibit temporal dependence, nonlinear dynamics, and recurrent seasonal behavior. Its capacity to learn dependencies between past and future observations without requiring a strictly linear specification makes it a powerful complement to SARIMA and tree-based methods [
16].
Figure 12.
LSTM-based LST forecasting across the five studied cities.
Figure 12.
LSTM-based LST forecasting across the five studied cities.
The results show that the LSTM model demonstrates a strong ability to reproduce the seasonal dynamics of LST across all five cities. The 2026–2027 forecasts remain broadly within the historical thermal range, suggesting continuity of the existing thermal regimes rather than abrupt regime shifts. In Taza, the model reproduces high-amplitude annual oscillations. In Ifrane, regular seasonal patterns consistent with mountainous context are captured. In Béni Mellal, strong cyclical behavior is reproduced. In Tangier, the LSTM captures the main temporal pattern with lower amplitude than inland cities. Laayoune presents a more irregular LST signal, yet the model still captures the general thermal structure and projects continuity within the historical range.
The convergence between LSTM, SARIMA, Random Forest, and XGBoost strengthens the robustness of the predictive interpretation. Across the different modeling approaches, the forecasts consistently indicate persistence of the existing seasonal regimes over the 2026–2027 horizon. This does not mean that urban heat risk is insignificant; rather, it suggests that heat exposure is likely to remain organized around recurrent seasonal peaks. From an urban climate perspective, this finding reinforces the importance of adaptation strategies.
3.5.5. Model Evaluation and Comparative Analysis
Table 2.
Comparative performance of SARIMA, Random Forest, XGBoost, and LSTM models for LST forecasting across the five studied cities.
Table 2.
Comparative performance of SARIMA, Random Forest, XGBoost, and LSTM models for LST forecasting across the five studied cities.
| City |
Model |
RMSE |
MAE |
R² |
| Béni Mellal |
SARIMA |
3.47 |
2.82 |
0.88 |
| Béni Mellal |
LSTM |
3.54 |
2.94 |
0.88 |
| Béni Mellal |
Random Forest |
3.75 |
3.17 |
0.86 |
| Béni Mellal |
XGBoost |
4.08 |
3.35 |
0.84 |
| Ifrane |
SARIMA |
2.65 |
2.05 |
0.94 |
| Ifrane |
LSTM |
3.07 |
2.43 |
0.92 |
| Ifrane |
Random Forest |
3.24 |
2.61 |
0.91 |
| Ifrane |
XGBoost |
3.36 |
2.54 |
0.90 |
| Laayoune |
Random Forest |
2.61 |
2.06 |
0.79 |
| Laayoune |
XGBoost |
3.05 |
2.33 |
0.72 |
| Laayoune |
LSTM |
3.14 |
2.46 |
0.70 |
| Laayoune |
SARIMA |
3.54 |
2.79 |
0.61 |
| Tangier |
SARIMA |
1.93 |
1.45 |
0.93 |
| Tangier |
LSTM |
2.04 |
1.58 |
0.92 |
| Tangier |
Random Forest |
2.55 |
1.84 |
0.87 |
| Tangier |
XGBoost |
2.59 |
1.74 |
0.87 |
| Taza |
Random Forest |
3.44 |
2.83 |
0.90 |
| Taza |
XGBoost |
3.63 |
2.91 |
0.89 |
| Taza |
LSTM |
3.97 |
3.23 |
0.87 |
| Taza |
SARIMA |
7.90 |
6.72 |
0.48 |
The comparative evaluation reveals contrasted predictive performances across the five studied cities. Overall, SARIMA provides the best results in cities where the land surface temperature series follows a regular and stable seasonal structure. This is particularly evident in Ifrane and Tangier, where SARIMA records the lowest RMSE and MAE values and the highest coefficients of determination, with R² values of 0.94 and 0.93, respectively. In Béni Mellal, SARIMA and LSTM show comparable performance, both reaching an R² of 0.88, although SARIMA slightly outperforms LSTM in terms of RMSE and MAE. These results are consistent with the methodological strengths of seasonal autoregressive models, which are particularly suitable for time series governed by recurrent periodicity [
20,
21].
By contrast, machine-learning and deep-learning models perform better in contexts where the thermal signal is more irregular, nonlinear, or affected by complex short-term fluctuations. This is especially visible in Laayoune and Taza. In Laayoune, Random Forest achieves the best performance with the lowest RMSE of 2.61, the lowest MAE of 2.06, and the highest R² of 0.79, indicating its capacity to capture complex temporal variability. In Taza, SARIMA performs poorly with an R² of only 0.48, while Random Forest, XGBoost, and LSTM achieve substantially higher explanatory power with R² values of 0.90, 0.89, and 0.87, respectively. These results reflect the ability of ensemble-learning and deep-learning models to capture nonlinear relationships and complex temporal structures in environmental data [
14,
15,
16].
Overall, the comparison demonstrates that no single model systematically outperforms the others across all cities; rather, model performance depends on the temporal structure, seasonal regularity, and climatic specificity of each urban context. This supports the use of multi-model forecasting frameworks in urban climate studies, particularly because LST is influenced by interacting climatic, surface, and urban morphological factors [
2,
9].
3.6. Urbanization Effects on UHI Dynamics
Urbanization is widely recognized as a major driver of the Urban Heat Island effect, as the transformation of natural surfaces into built-up areas alters the surface energy balance and thermal properties of cities. In this section, we analyze both the magnitude and the direction of this effect across the five studied cities, with the aim of assessing how land-cover and urbanization dynamics influence UHI intensity under different local environmental conditions.
Figure 13.
Distribution of UHI intensity across land-cover classes (MODIS MCD12Q1 IGBP classification).
Figure 13.
Distribution of UHI intensity across land-cover classes (MODIS MCD12Q1 IGBP classification).
The distribution of UHI intensity across land-cover classes was analyzed using the MODIS MCD12Q1 IGBP classification scheme. Each box represents the interquartile range, with the median shown as a central line, whiskers extending to 1.5 × IQR, and outliers indicating extreme values. The dashed horizontal line at zero distinguishes positive UHI (urban areas warmer than surroundings) from negative values indicating UHS conditions. These results indicate that, even when considering the same land-cover class, pixels located in the urban core tend to be warmer than those in the periphery. This departure highlights the influence of urban context—such as higher building density, anthropogenic heat emissions, and reduced airflow—on LST, beyond the effect of land cover alone, particularly in the case of Tangier. Conversely, classes with median values close to zero follow the expected pattern, suggesting limited spatial influence.
Figure 14.
Relationship between urban land-cover fraction and mean UHI intensity.
Figure 14.
Relationship between urban land-cover fraction and mean UHI intensity.
The analysis of the relationship between urban land-cover fraction and mean UHI intensity reveals a weak and slightly negative relationship overall, as indicated by the nearly flat regression line. This suggests that increasing urbanization alone does not systematically lead to stronger UHI effects across the studied cities. Instead, UHI intensity appears to be more strongly influenced by local conditions than by the proportion of urban land cover itself.
Figure 15.
City-scale relationship between urban land-cover fraction and UHI intensity.
Figure 15.
City-scale relationship between urban land-cover fraction and UHI intensity.
The analysis at the city scale refines the global pattern by showing that the already weak overall relationship masks strong inter-city variability. Béni Mellal and Ifrane both display consistently negative UHI intensities with only a slight positive trend, confirming that even at high urban fractions, local cooling factors dominate. Taza follows a similar pattern, with near-zero to negative values and no clear relationship. In contrast, Laayoune shows a moderate positive relationship, indicating that urbanization begins to enhance UHI under arid conditions. The strongest effect appears in Tangier, where high urban fractions correspond to markedly positive UHI intensities and a clear upward trend.
Overall, these city-specific trends reinforce that the weak global relationship is the result of contrasting local behaviors: urbanization amplifies UHI in some contexts (Tangier, Laayoune) but is offset or reversed in others (Ifrane, Béni Mellal, Taza), confirming the dominant role of local climatic and environmental controls. These results align with existing literature showing that UHI intensity largely depends on background climate and the properties of the urban fabric, rather than urbanization level alone [
23,
24]. Studies in Moroccan coastal cities showed that UHI is driven by local climate and land-cover dynamics rather than urban extent alone [
5]. A national-scale satellite analysis found that UHI behavior depends on the surrounding environment, not just urban size or extent [
4], and other studies confirmed that in arid conditions, UHI patterns are strongly affected by vegetation, sometimes even reducing UHI intensity [
6,
12].