Introduction

Climate change poses significant threats to global food security, emerging as one of the biggest challenges of the twenty-first century1,2,3,4,5. The necessity to feed an ever-growing population while preserving fragile ecosystems is becoming increasingly challenging, and associated threats are projected to intensify in future decades6,7,8,9,10,11. The future projections indicate that agricultural production systems would be negatively affected more in Sub-Saharan Africa, South Asia, and Southeast Asia, where farming communities are disproportionately poor and vulnerable6,12,13,14,15,16,17,18,19,20. Rising temperatures and unpredictable weather patterns disrupt traditional farming practices, leading to reduced crop yields and increased food insecurity in many regions6,21,22,23,24. Changes in climatic patterns such as elevated temperatures, erratic rainfall, and increasing frequency of extreme events (droughts and floods), pose serious challenges to agricultural productivity and sustainability25,26,27,28,29 These shifts in weather patterns affect crop growth cycles, water availability, soil conditions, and crop management practices, ultimately lead to reduced crop yields, and diminished food quality particularly in vulnerable regions30,31,32,33,34,35. Addressing these issues requires innovative solutions to ensure that the global food production and supply meets the needs of future generations. Projections indicate that the global mean temperature may rise 1.8 to 4.0 °C by the end of this century in South Asia36. Additionally, global agricultural productivity is projected to decrease by 3–16% by 2080 that affect food security24,37,38,39,40.

The global demand for food continues to rise with future projections indicating the need of production increases by ca. 70% to feed the world by 205041. Food growing demand further intensifies the challenges for food production and food security, particularly in the context of climate change and limited natural resources. For instance, staple crops like wheat, rice, and maize have experienced declining productivity due to heat stress and changing precipitation patterns, particularly in vulnerable areas12,25,32,42,43. In almost 40 nations worldwide, wheat is regarded as the main staple crop, providing essential calories and protein to around 85% and 82% of the global population, respectively44. However, maize is extensively utilized by industries for feed (especially for poultry and livestock), and for food. Global wheat yield in 2021 amounted to about 220 million hectares, yielding 770 million tons of grain (3.5 t ha-1); in contrast, t ha- 1global maize yield in 2021 is estimated to be 205 million hectares, giving 1210 million tons of grain (5.90 t ha-1)45,46. In Bangladesh, however, wheat is the second most important cereals which was cultivated in 316 thousand ha and contributed 1.17 million MT of grains (3.70 t ha- 1) in 2022-23 (BBS, 2023). Unlike, winter and summer maize covered 1031 thousand ha and 195 thousand ha areas and produced about 4 million MT and 0.55 million MT (3.87 and 2.82 t ha- 1), respectively at the same time. These trends demonstrate the existing scenario of wheat and maize yield in the country and call for urgent research. Furthermore, the Northwestern part (Rajshahi division) is the most important wheat and maize-growing region in Bangladesh, contributing 36% of the total wheat yield of Bangladesh and a significant amount of maize47,48,49.

Production of maize and wheat is highly sensitive to abiotic stresses (elevated temperature and rainfall variability), these are significant factors affect the plant critical growth stages, development, and yield production processes50,51,52,53,54,55. Global wheat production is predicted to decline by 6% for every 1 °C increase in temperature56. Moreover, even a 1 °C increase in average temperature during the reproductive stage may result in a greater loss of grain yield (Poudel & Poudel, 2020). Depending on the location, the direct effects of climate change will result in losses in wheat yield of 1–8% due to variations in temperature and precipitation57. For Bangladesh, as one of the most vulnerable countries to the effects of climate change because of its proximity to the Bay of Bengal and its low-lying deltaic landforms; temperatures have progressively increased over the past three decades58. According to projected climate models, Bangladesh’s most extreme temperatures are predicted to rise from 1 °C to 4.1 °C by 2100, while the country’s lowest temperature is predicted to rise from 1 °C to 4.4 °C59. Wheat yield is expected to decline by 32% by 2050 due to increasing mean temperature in Bangladesh60. After all, wheat is more susceptible to heat stress during its reproductive phase than during vegetative phase, where optimum temperature for wheat growth and reproductive stages occurs at approximately 25 °C and between 15 and 20 °C respectively61,62,63. In contrast, the average ideal temperature for maize entire growth season and for germination range in between 20 and 22 °C and 25 to28°C respectively, whereas during the day and at night the optimum temperature is 25 to 33 °C and 17 to 23 °C correspondingly64. Notably, excessive temperatures exceeding 30 °C from June to August reduced maize yield. Moreover, in the pre-flowering and post-flowering stages of the maize life cycle, temperatures between 33 and 36 °C decrease the CO2 exchange rate (~ 17%), crop growth rate (17–29%), grain number (7–45%), and grain yield (10–45%)65. For maximum growth, maize needs 500 to 900 mm of rainfall during the growing season66whereas wheat requires 400 to 1100 mm67. Prior to and throughout maturity, severe rains can cause lodging, losses of yield, and quality degradation of wheat and therefore, the volume and distribution of rainfall during the season had a greater impact on yield68]– [69. These studies clearly demonstrate how these two phenomena affect wheat and maize yields, highlighting the urgent need for future research aimed at minimizing climate impacts through sustainable agronomic approaches and the development of climate-smart agricultural practices. Adjusting sowing times may serve as an effective strategy to mitigate the adverse effects of climate change on wheat and maize yield52,70. As climate change continues to intensify the frequency and severity of heatwaves and droughts, understanding their effects on crop production processes and development of adaptation management strategies are essential for improving resilience in maize and wheat production systems in the country.

Accurate crop yield prediction is crucial for resource use optimization, crop management practices, food security and effective decision making in agricultural systems71,72,73. A crop modeling study aimed at predicting the impact of climate change on crop production in Bangladesh is essential to understanding the country’s future agricultural challenges. There are different modeling approaches are being used for wheat and maize crops yield prediction such as process based crop growth models18,74,75,76,77,78,79,80,81,82,83,84. Although these crop models are widely used and offering insights to assess climate change and climate variability impacts on wheat and maize crops in different regions under contrasting climates16,85,86,87,88,89. These models use mechanistic representations of physiological and growth processes and require detailed inputs, such as weather, soil properties, and crop management data. These studies use extensive and quality data by adopting crop, and climate models to simulate how changing climatic factors (temperature, rainfall, and CO2 concentrations) will influence crop yields in different regions90,91,92,93,94,95,96. A study using a Crop Simulation Model Inter Comparison Approach by Chawdhery et al.,97 in Bangladesh recommended two major strategies for increasing the yield and enhancing profit in a rice-wheat cropping system—shifting showing time for wheat and increasing irrigation volume. Similarly, a study by Teixeira et al.,98 suggests that wheat and maize yields may also be severely impacted due to increased heat stress and altered monsoon dynamics. However, these models’ performance depends on high quality extensive input data for calibration and evaluation before application in climate change impact assessment and adaptation strategies development for sustainable crops production2,96,99,100,101,102,103,104. In contrast, machine learning (ML) modeling approaches especially Fuzzy logic models have emerged as powerful tools for yield prediction due to its ability to handle imprecise, uncertain, and nonlinear relationship between yield and wide range of input variables72,105,106,107,108. Fuzzy logic models are recently being applied for crop yield prediction and for climate change impact assessment. By providing projections under different climate scenarios, Fuzzy logic model helps inform adaptive measures, such as the adoption of climate-resilient crop varieties, improved water management, and shifts in planting seasons, crucial for safeguarding Bangladesh’s food security in the face of climate change99,109,110,111. Fuzzy logic deals with partial truth112and encompasses methods like Mamdani, Sugeno, and Tsukamoto113. Fuzzy logic’s ability to handle uncertain, imprecise, and vague data makes it valuable in various fields such as agriculture, biomedicine, and earth science, offering significant opportunities for research and development. A fuzzy inference system involves fuzzification, inference, and defuzzification, where crisp quantities are converted to fuzzy and vice versa114. This research applied one of the Fuzzy logic model approaches viz. the Mamdani method to predict the impact of climate change on winter wheat, winter maize, and summer maize yield.

To the author’s best knowledge, no modelling study has been conducted in the study area (Rajshahi, Bangladesh) to predict the impact of climate change on crop yield, particularly by fuzzy logic modeling approach based on different phenological stages (Table 1). The specific objectives for this study are (i) to create a fuzzy logic model that incorporates key climate variables (temperature, precipitation) and their non-linear effects on wheat and maize (winter and summer) yield including a comparison with global yield scale (ii) to identify critical climatic stress factors (elevated temperature and precipitation) that most significantly affect wheat and maize yields, and how these will be represented in the fuzzy logic system and (iii) to reconsider suitable sowing time based on fuzzy prediction and long-term climate data for minimizing climate change impact on wheat and maize (winter and summer) yield in the study region.

Table 1 Available literature of climate variability on wheat and maize with application of fuzzy logic modelling approach.

Materials and methods

Study area

In Bangladesh’s north-west regions, drought occurs frequently115. For this study, Rajshahi district was purposefully selected from the drought-prone agroecological zone (AEZ) of northwestern Bangladesh (Fig. 1). The area around Rajshahi town (only 22 m a.sl.) is one of the largest wheat and maize cultivating regions in north-western Bangladesh and has a (sub-) tropical monsoon climate with a distinct cool (winter) dry season from November to March, and a hot to warm (summer) wet season from April to October. The district experiences an annual mean temperature of 25.5 °C. The amount of precipitation that Rajshahi receives annually is 1466 mm116. Most (> 80%) of the precipitation in Rajshahi falls between July and early September. In Rajshahi district, the growing seasons are as follows: wheat from November to March, maize winter from November to April, and maize summer from April to July.

Fig. 1
figure 1

The study area: Rajshahi, Bangladesh (drought-prone agroecological zone (AEZ) of Northwestern Bangladesh).

Data collection

The research team collected annual yield data (2001 to 2023) for winter wheat and both winter and summer maize in Rajshahi from the Department of Agricultural Extensions (DAE), Rajshahi; and Bangladesh Bureau of Statistics (BBS). The research team collected global wheat and maize yield data, along with information on the top producing countries data, from FAOSTAT. Temperature and rainfall data of Rajshahi, covering the period from 2000 to 2024 were obtained from the Bangladesh Meteorological Department (BMD), in A summary of the data collection is provided below:

Category

Parameter

Number of samples

Collection period

Data sources

Methods of collection

Crop Yield

Wheat and maize yield (winter and summer seasons)

23 (yearly data)

2001–2023

BBS; DAE, Rajshahi

Official reports and records

Global yield data

23 (yearly data)

2001–2023

FAOstat

Official reports and records

Climate Data

Temperature

25 (yearly data)

2000–2024

BMD

Purchased data

Rainfall

25 (yearly data)

2000–2024

BMD

Purchased data

Fuzzy logic modeling approach

In fuzzy logic, linguistic variables utilize words or sentences from natural or artificial language as their values. ​These variables are very common in fuzzy models. For example, the air temperature (°C) could be defined as a linguistic variable if its values are linguistic rather than numerical, i.e., cold, warm, hot, rather than 9 °C, 22 °C and 38 °C. As in this research, the Mamdani method was employed to predict the yield of wheat crop, maize winter and maize summer . This modeling approach consisted of four primary steps to produce an output value, fuzzification, implication of function (rule) application, combination of rules (aggregation) and defuzzification, respectively. The schematic diagram illustrating the yield prediction flowchart based on fuzzy modeling is presented in Fig. 2. At the first step, input value was converted into fuzzy as linguistic value. Temperature, DAS, rainfall are the input values and yield are the output value for wheat crop, and both winter and summer maize. For each crop, six growth stages were considered (whole growing season, sowing time, germination, flowering, grain filling, and ripening, respectively) and analyzed using the Mamdani method to predict crop yields effectively. Figure 3. shows the membership function of the fuzzy input temperature, rainfall, DAS and output yield for wheat growing season as well as for sowing time. In input section temperature [9–45] °C has the linguistic form of low [9 14 20] °C, moderate [19 25 30] °C, high [28 36 45] °C; Rainfall [0-1600]mm has light [0 250 500]mm, moderate [450 700 1000]mm, heavy [950 1200 1600] mm as linguistic variables and early sowing [1 5 11] days, optimum sowing [10 15 20] days, late sowing [18 25 30] days, respectively are the linguistic form of DAS [1–30] days. And for yield, the membership function has the linguistic form as low [1 1.9 2.3] t ha− 1, average [2.1 2.8 3.5] t ha− 1 and high [3.4 4.5 5] t ha− 1 for wheat. In case of winter and summer maize yield, linguistic variables and membership functions are shown in Table S1.

Fig. 2
figure 2

Yield prediction flowchart using Fuzzy modeling approach.

Fig. 3
figure 3

Linguistic variables and memberships function for sowing time in wheat yield; (A) represents linguistic variables and membership’s function for Temperature, (B) represents for Days and (C) represents for Production (Yield).

For the second step, we used triangular membership function formula as the input and output values have the triangular form. In fuzzy logic, the formula for triangular membership function is defined as,

$$\:\mu\:\left(x\right)=\left\{\begin{array}{c}0\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:if\:x\le\:a\\\:\frac{x-a}{b-a}\:\:\:\:if\:a<x\le\:b\\\:\frac{c-x}{c-b}\:\:\:\:\:if\:b<x\le\:c\\\:0\:\:\:\:\:\:\:\:\:\:\:\:\:\:\:if\:x>c\end{array}\right.$$

Where a, b and c are the parameters of the triangle. By using this mathematical formula, we find the following membership functions for growing wheat and sowing stages input and output.

Now, we are showing only one input variable’s membership functions calculation process. For the rest of the input and output, we followed the same mathematical formula and process.

For temperature [9–45] \(\:℃\)

$$\:{\mu\:}_{Low}\left(x\right)=\left\{\begin{array}{c}0;\:\:\:\:\:x\le\:9\\\:\frac{x-9}{14-9}=\frac{x-9}{5};\:\:\:9<x\le\:14\\\:\frac{20-x}{20-14}=\frac{20-x}{6};\:\:14<x\le\:20\\\:0;\:\:\:\:\:x\ge\:20\end{array}\right.$$
$$\:{\mu\:}_{Moderate}\left(x\right)=\left\{\begin{array}{c}0;\:\:\:\:\:x\le\:19\\\:\frac{x-19}{25-19}=\frac{x-19}{6};\:\:\:19<x\le\:25\\\:\frac{30-x}{30-25}=\frac{30-x}{5};\:\:25<x\le\:30\\\:0;\:\:\:\:\:x\ge\:30\end{array}\right.$$
$$\:{\mu\:}_{High}\left(x\right)=\left\{\begin{array}{c}0;\:\:\:\:\:x\le\:28\\\:\frac{x-28}{36-28}=\frac{x-28}{8};\:\:\:28<x\le\:36\\\:\frac{45-x}{45-36}=\frac{45-x}{9};\:\:36<x\le\:45\\\:0;\:\:\:\:\:x\ge\:45\end{array}\right.$$

.

By following the same process, we obtained all of the triangular membership function for various input range including for winter and summer maize.

For the third step, combination of rules, we used IF-THEN rule which are shown in the (Table 2). Finally, for finding the output from fuzzy value to crisp or classical value we used the defuzzification process. Several approaches or techniques can be used for the defuzzification process. The used method which is known as centroid method (Centre of Gravity). The defuzzification value \(\:{Z}^{*}\) using center of gravity is defined as,

Table 2 Fuzzy IF-THEN modelling rules for wheat and maize yield prediction.
$$\:{Z}^{*}=\frac{\sum\:_{i=1}^{N}{A}_{i}\times\:{\overline{Z}}_{i}}{\sum\:_{i=1}^{N}{A}_{i}}$$

Here, the variable N denotes the total number of sub-areas, whereas the variables \(\:{A}_{i}\) and \(\:{\overline{Z}}_{i}\) represent for the area and the centroid, respectively, of the \(\:{i}^{th}\)sub-area.

Tools and software

The software R was used for descriptive analysis (confidence level of 95%) and the correlation test to compare wheat and maize yield among Rajshahi, Bangladesh and world. The MATLAB (7.0) software and fuzzy toolbox for fuzzy logic were used to estimate the wheat and maize yield in different climatic scenarios (elevated temperature and rainfall variability) and further to predict the climate impact on wheat and maize yield in the future. Furthermore, sowing time adaptation for wheat and maize crop (winter and summer seasons) was also predicted for sustainable yield prediction in future.

Result

Descriptive analysis of wheat and maize crop yield

The wheat yield in Rajshahi, Bangladesh, and globally ranged from 1.59 t ha− 1 to 3.89 t ha− 1, 1.53 t ha− 1 to 3.69 t ha− 1, and 2.65 t ha− 1 to 3.70 t ha− 1, respectively (Table S2). In Rajshahi, the highest wheat yield recorded in 2021 (3.89 t ha− 1), while the lowest 1.59 t ha− 1, was observed in 2005. In addition, wheat yield in Bangladesh peaked at 3.69 t ha− 1 in 2023, a significant increase from the minimum of 1.53 t ha− 1 in 2006. However, global wheat yield reached 3.70 t ha− 1 in the year 2022.

The winter maize yields in Rajshahi ranged from 3.17 t ha− 1 to 10.48 t ha− 1, whereas summer maize yields fluctuated between 2.26 t ha− 1 and 7.48 t ha− 1 (Table S3). The highest yield of winter maize was produced in 2021 (10.48 t ha-1) whereas lowest recorded in 2001 (3.17 t ha− 1). In contrast, summer maize yield was maximum recorded in 2020 accounted by 7.48 and minimum was obtained from the same year as winter maize (Table S3). In Bangladesh, maize yield varied from 2.06 to 9.25 t ha− 1, while global yield falls between 4.32 and 5.96 t ha− 1. In both contexts, maize yields had shown a gradual increase from the year 2000 to 2023. In 2000, the minimum maize yield in Bangladesh and globally was recorded at 2.06 t ha− 1 and 4.32 t ha− 1, respectively. Conversely, the maximum maize yield figures were 9.25 t ha− 1 for Bangladesh and 5.96 t ha− 1 for the globe

Comparative analysis of wheat and maize yields in rajshahi, bangladesh, and global

Regarding wheat crop, Rajshahi’s yield fell short of the global average until in 2007 and varied significantly between 2000 and 2009. Between 2010 and 2014, Rajshahi’s output rate outpaced both Bangladesh’s and the global average (Fig. 4). Wheat yield varied between 2015 and 2018, then again overtook Bangladesh and the global until 2021. In 2022 and 2023, the Rajshahi yield rate dropped significantly (Fig. 4). On the other hand, the yield of maize in Rajshahi was above the global yield but below Bangladesh (Fig. 4). Although the yield rate in Rajshahi fluctuated in several periods, Bangladesh showed a gradual increase from 2000 to 2023. However, the global scale showed an almost constant rate of production in those years (Fig. 4).

Fig. 4
figure 4

Wheat and maize yield comparison among Rajshahi, Bangladesh, and global.

Comparison of wheat and maize yield with top-growing countries

When it comes to wheat yield, Germany leads with constant variation, except for 2002 and 2019, whereas Rajshahi showed below-average results (Fig. 5). Australia is near the graph’s bottom line, while France exhibits significant volatility in 2016, while China has a stable yield position (Table S4). However, the USA has been the top maize-growing country for many years though the yield rate decreased substantially during 2012 (Fig. 5). When compared to other leading maize-growing nations, Bangladesh’s yield rate is likewise excellent, while Rajshahi’s output is nearly as high as Bangladesh’s (Fig. 5). In contrast to those nations that exhibit consistent yield, such as India, Mexico, Indonesia; France, Ukraine, and South Africa displayed significant fluctuations (Table S5).

Fig. 5
figure 5

Comparing the wheat and maize yield of Rajshahi and Bangladesh to the global top-growing countries (2001–2023).

Correlation analysis of wheat and maize yield with Bangladesh and global

We explored relationship between yield of wheat in Rajshahi with Bangladesh and global scale (Fig. 6B). The global wheat yield shown a highly significant and strong positive relationship with Bangladesh (0.90) and Rajshahi (0.75). Moreover, Rajshahi demonstrated a highly significant and positive relation with wheat yield of Bangladesh (0.82). On the other hand, as like wheat, yield of maize at Rajshahi had a highly significant and strong positive relationship with Bangladesh (0.94) and global scale (0.92). Similarly, the maize yield in Bangladesh had also a highly significant and positive correlation with global maize yield (0.96) (Fig. 6A).

Fig. 6
figure 6

Correlation of wheat and maize yield of Rajshahi with Bangladesh and global yield. (A) represents maize correlation and (B) represents wheat correlation. (* indicates significance level).

Correlation analysis of wheat and maize yield with rainfall and temperature

With a correlation coefficient of -0.2099 (R2 = 0.0441), a weak negative correlation is indicated between wheat yield and annual rainfall (Fig. 7). This implies that, although the association is weak, wheat yield tends to decline slightly as annual rainfall rises. On the other hand, a very modest positive correlation is indicated (R2 = 0.0108) for wheat and average maximum temperature (Fig. 7). This indicated that the link between average maximum temperature and wheat yield is essentially nonexistent.

Fig. 7
figure 7

Correlation analysis of winter wheat and maize (winter and summer) yield with temperature and rainfall. Dotted line refers to the regression line and blue-colored circle represents the annual rainfall and average maximum temperature. R2 is the square of the correlation coefficient (r).

There is a weak negative link, as indicated by the correlation coefficient of -0.1598(R2 = 0.0255) is found between annual rainfall and summer maize yield (Fig. 7). This implies that lower summer maize yields are marginally correlated with higher year rainfall. However, given R2 = 0.0093, a very modest positive correlation is indicated between summer maize yield and average maximum temperature. This implies that the yield of summer maize and average maximum temperature have virtually no correlation. However, a moderately negative correlation is shown by the R2 =0.1066 and shows that lower winter maize yields are linked to higher annual rainfall. In contrast, average maximum temperature shows a weak positive link with winter maize yield (R2=0.0243) (Fig. 7). According to this, there may be a small but weak correlation between higher average maximum temperatures and higher winter maize yields.

Climate change impact scenarios in Rajshahi

Yield of winter wheat and maize in relation to rainfall (2001–2023)

The relation between the yield of winter wheat and rainfall has shown in Fig. 8, where how the yield was affected by the minimum rainfall during each phenological stages (November-April) is demonstrated. The yield of the wheat increased gradually although the amount of rainfall fluctuated throughout the years in every season (Table S6). In 2012–2013 wheat yield increased as compared to that of previous year as the suitable rainfall occurred in the month of November (101 mm) (Fig. 8). Almost every growing year recorded a modest increase in yield, with the exception of 2015–2016, when there was less rainfall during the wheat growing season than in previous years; however, from 2020 to 2024, there is virtually no rainfall during the growing season, resulting in a lower yield than in previous years (Fig. 8).

Fig. 8
figure 8

 Yield of winter wheat and maize (winter and summer) in relation with rainfall (2001–2023) in Rajshahi, Bangladesh.

The growing season of winter maize begins from November-February whereas summer maize April to July. From Fig. 8, it is recognized that there is evidence of the effect of rainfall on winter wheat. The figure also shows the relationship between the winter and summer maize yield with the rainfall variability. The yield of winter maize was comparatively higher than the summer maize due to existing favorable temperature and rainfall during the pre-growing season (Fig. 8). During the growing season of winter maize (November-February), no significant rainfall was occurred, but the yield was about to increase with little decrease as almost 78% lands are under irrigated condition in study area117]– [118. However, summer maize yield can’t reach up to the mark though it gets enough rainfall due to the high temperature over the growing season. This finding is harmony with the findings of Asseng et al.,2015 122 stated excessive temperature above 30 °C significantly caused reduction of corn yield.

Yield of winter wheat and maize in relation to temperature (2001–2023)

It was found that the temperature had a less influence on winter wheat yield as the temperature is low during the growing season. Figure 9 showed the temperature did not vary too much over the years as well as the yield. The yield rate decreased during 2005–2006, 2008–2009, 2015–2016 and 2022–2023 as the average maximum temperature of that growing year was high compared to others (Table S7). However, without some exceptional years, there were minor effects of temperature on winter wheat are found.

Fig. 9
figure 9

Yield of winter wheat and maize (summer and winter) in Rajshahi with relation to temperature (2001–2023) in Rajshahi, Bangladesh.

A significant effect of temperature on maize yield was observed in Rajshahi from 2001 to 2023 as maize is sensitive to heat stress as shown in Fig. 9. By analyzing the figure, in general, the yield of both winter and summer maize were increased over the times. Noticeably, winter maize yield was always higher than the summer maize except 2002–2004, due to the favorable temperature prevailed during the growing season of winter maize (average 16–20 °C) whereas, high temperature reduced the summer maize yield. Because, in summer season, day temperature exceeds 30 °C in the study area (Table S7). This finding is similiar with the result of Zhang et al. (2021)120 reported that the yield of maize dropped by 1–1.7% for every degree Celsius increase (over 30 °C). However, after 2021–2022, both the winter and summer maize especially winter maize yield declined suddenly with the rising of the average maximum temperature (Table S7). Then, the yield commenced to rise again. The highest yield of winter maize (10.48) was noticed in the year 2021-22 since the growing season temperature was favorable than other years.

Climate change impact analysis through fuzzy logic modelling approach

Various logic (IF-THEN rules) for individual phenological stage of wheat and maize have been developed and presented in Table 2. The numerous phases of phenological growth (sowing, germination, flowering, grain filling, and ripening) of both wheat and maize crops have a notable effect on the ultimate grain yield of these crops. In this experiment, we used the fuzzy logic system to determine the effect of climate variability on different growth stages of wheat and maize and its ultimate impact on yield. The optimum sowing time is crucial to get successful crop yield. For both wheat and maize, there is optimum sowing time and temperatures ranges. Consequently, during this period, fuzzy shows the maximum output. However, beyond this limit, the yield declines substantially. The research team finds that in fuzzy system,  the maximum wheat yield will be 4.28 tons/ha at 27 °C and 15 DAS (days after sowing), whereas at 30 °C and 10 DAS, the yield will decline to 1.67 tons ha− 1 (Table 3).

Table 3 Modelling the effect of temperature and rainfall variability on wheat and maize yield using fuzzy logic modelling Approach.

Winter wheat emerges best between 5 to 7 days after sowing (DAS), winter maize between 12 to  17 DAS, and summer maize between 6 to  10 DAS. Both crops have optimum temperature ranges, and deliver better yields within these limits. In case the temperature goes beyond their optimum range, yield will surely be hampered. Similar trends show in case of winter and summer maize (Table 3). Similarly, during the flowering stage, wheat and maize yield will be high when the temperature lies within the optimum range and the days after sowing (DAS) are optimal. Using a fuzzy logic model, if the temperature decreases or increases with high variations from this range, then the yield will be reduced. For instance, at 10 °C and 30 °C temperature, the yield of winter wheat will be 2.8 tons/ha and 1.68 tons/ha, respectively (Table 3).

During the grain formation stage for winter wheat, the optimum temperature is below 25 °C, and the favorable time for grain formation is 105–110 days after sowing (DAS). We found that the yield of winter wheat will decrease significantly with an increase in temperature. On the other hand, for winter maize, temperatures near their optimum range will help achieve medium or high yield, but when it exceeds the optimum range, it shows low yield (Table 3). In the case of summer maize, grain formation occurs within 75–80 DAS, and the suitable temperature for grain formation is below 28 °C. Here, the fuzzy logic approach indicated that yield will be high when the temperature is below 28 °C and medium yield when the temperature is above 30 °C (Table 3).

During the ripening stage, if the temperature is lower or higher than the optimum range for wheat and maize crops, yield will be low. From the experiment, we also estimated the proper rainfall and temperature effects on wheat and maize crop yield by using a fuzzy logic model. In case of wheat, the suitable temperature for highest yield is 21–26 °C, and the favorable rainfall during this time is 400–1100 mm. It showed that at high and low temperatures outside this range, the yield will be reduced. Similarly, the yield will be decreased with a shortage of rainfall. The growing season of winter maize requires a temperature range of 21 to 27 °C whereas the temperature range for summer maize range is 25–30 °C and both require rainfall ranges form 500–900 mm. We found that rainfall has a lower effect than temperature on the growing season of winter maize (Table 3), whereas rainfall has significant effects on summer maize crop yield. The surface view of projected result from the fuzzy system are shown in (Fig. 10).

Fig. 10
figure 10

Surface view (3D) of wheat (A), winter (B) and summer (C) season maize yield prediction based on phenological stages and whole growing season; from left to right-sowing time, germination, flowering, grain formation, ripening stage, and whole growing season for each case by Fuzzy modelling system.

Estimation of optimum sowing window for wheat and maize crops

Sowing time is very crucial for getting optimum yield for both wheat and maize crops. Estimation of optimum sowing time assessed for wheat and maize based on the 24 years climate data (Table 4). Since the optimum temperature for wheat production during sowing time is 22–27 °C as well as germination and reproductive stage require 20–25 °C121 and 15–20 °C63respectively. Therefore, any delay of sowing time from November 1–7, will reduce the yield of wheat (Table 3), as beyond this limit the temperature goes outside the optimum range for proper germination and grain formation (Table 4). In case of winter maize, optimum sowing time is 1–10 November because outside of this range the seeds of winter maize can’t get proper temperature for germination and grain formation also will be hampered. As optimum temperature for germination (and early growth stages) and grain formation is 23–29 °C and 18–20 °C64 respectively. For instance, in December average temperature is about 18.37 °C which is very low than optimum range of temperature required for potential germination and early growth development (Table 4). Whereas for summer maize, suitable temperature for germination and early growth stages of maize seed is 20–28 °C and less than 28 °C temperature is favorable for grain formation stages (even temperature > 28 °C reduces yield by 10% yield). As grain formation begins 70–80 DAS, therefore, optimum planting time should be Feb 20 − 7 March which facilitates proper germination, early growth development and reproductive phases weather’s conditions (Table 4).

Table 4 Monthly weather data of Rajshahi (20 years mean).

Discussion

Climate induced yield variability in maize and wheat crops

This study evaluates the impact of climate change on two important cereal crops (wheat and maize) in Rajshahi. The result demonstrated that temperature and rainfall have a influence on wheat and maize yield. Although, the influence of extreme temperature didn’t show any upward or downward trends, however, it had clear negative impact on summer maize yield which caused lower yield over the periods with small variations. On the other hand, precipitation showed a direct relation with yield which coincides with the findings of122 where winter wheat yield increased in almost all studied year. These findings align with123who stated that winter wheat yield grew by an average of 85.6 ± 15.1 kg ha− 1 per year. In this region, winter maize yield is always higher than the summer maize due to the favorable temperatures ranges throughout the winter maize season. Singh et al., 2010 127 also reported the same findings in India. Due to the variations in temperature and rainfall, crop growth and maturation times are directly affected by various biotic and abiotic stresses125. A recent study found that 30–50% of global agricultural productivity losses are caused by these biotic and abiotic stressors126. Overall, these factors will directly affect food security, food safety and human health.

By 2050, wheat yield is projected to decrease by 36 to 40% due to climate change, whereas maize will experience minor effects than other cereals127. Climate change significantly affects both wheat and maize phenology as well as yield while Poggi et al. (2022)128 and Cann et al. (2023)129 also reported similar findings. The timing of significant phenological event has changed due to climate change, leading to shortened maturity period and reduced crop quality in terms of protein, fiber, and sugar content130]– [131. The reproductive stages of both maize and wheat crops are more sensitive to temperature than the vegetative stage132]– [133.

Significance of fuzzy logic modeling for prediction of temperature effects and rainfall variability

The fuzzy logic helps to predict yield at different temperatures ranges, phenological stages (DAS), and rainfall levels. It explains fluctuation in yield caused by changes in climatic variables and the timing of the growing season of the crops. Temperature and rainfall have a major influence on every growth stage of wheat and maize, consequently on yield. Asseng et al., 2011137 stated the same findings that throughout almost every developmental stage of the crop growth cycle, the impacts of high temperatures on growth and development are evident. The results of this study using fuzzy forecast showed that mid-November sown wheat will produce 4.25 t ha− 1 with a a temperature range of 20 °C to 22 °C (Table 3). Fuzzy logic demonstrates how variations in the combination of rainfall and temperature at particular phenological stage influence yield. This finding aligns with Tao et al. (2015)135 they stated temperature changes predominantly influence wheat phenology. During grain filling stage, high temperatures (30 °C) can lead to lower wheat yield of 1.86 t ha− 1. ShouChen et al. (2018)136 reported the same result that high temperature during grain filing stage reduced wheat yield. According to the fuzzy result, during the growing season of winter maize, if the average rainfall is 700 mm and the temperature is 22 °C, the yield will be 9.58 t ha− 1. However, yield will be decreased to 4.5t ha− 1 when the average rainfall increases to 800 mm, and temperature rises to 30 °C (Table 3). The temperature has a clearer effect than the rainfall on different growing stages of wheat and maize. In fuzzy analysis, the yield of summer maize will be 7.75 t ha− 1 at an average rainfall of 500 mm, however, the yield will fall to 7.73 t ha− 1 despite an increase of rainfall although the rainfall increased to 700 mm during the growing season (Table 3). When considering the entire growing season of wheat, winter maize, and summer maize, fuzzy predicts the most logical output based on the given logic made from the previous data. Fuzzy logic model showed that rainfall has a greater impact on summer sown crop than winter maize. The forecast of fuzzy for the growing season of winter maize showed the yield will be 7 t ha− 1 and 4.5t ha− 1 at an average rainfall of 100 mm and 150 mm, respectively while summer maize is projected to yield 7.75t ha− 1 and 4t ha− 1 at an average rainfall of 900 mm and 200 mm respectively (Table 3). Each growth stage of wheat and maize requires favorable conditions for optimal development, particularly during the reproductive phase, to produce maximum grain.

Adaptation strategies for sowing times of wheat and maize crops

To mitigate the problem of yield loss in wheat and maize induced by changes in climatic variables (temperature and rainfall variability), farmers need to adapt measure like the changes in sowing time to coincide with the climate. Agronomic strategies that assist farmers in effectively adjusting to climate shocks and reducing productivity loss are considered climate-smart strategies and adaptation. This study focused reconsidering the sowing time for winter wheat and both winter and summer sown maize crop using fuzzy logical modeling approach. The significance of choosing the ideal sowing time for increased production at no additional cost has been widely demonstrated worldwide137. The ideal planting time varies according to the local growing conditions and variety138. The optimum sowing time for winter wheat in Rajshahi is found as November 1–7. This finding is consistent with the finding of Chhokar et al. (2022)138 stated that early showing produced 16% higher grain yield than timely showing in mid-November. In contrast, Jahan et al. (2018)139 reported that optimum showing time for wheat in Bangladesh is 15–30 November based on the weather data of Gazipur district which belongs from different climate and soil condition compared to Rajshahi. In case of winter maize, ideal sowing time is November 1–10. Similar findings were reported by Choudhury et al., (2021)140 and they reported optimum showing window for winter maize yield from 5 to 20 November in Jashore district (southwestern part of Bangaldesh). However, recommended sowing window for summer maize is February 20- March 7, which is harmonic with the government record (mid-February- March) as a general guideline for the whole country141.

The significance of these measures is to lessen the negative effects of temperature extremes142. However, adjusting the planting time may also assist in avoiding heat stress during the critical stage of growth143. Many of the negative effects of climate change can be addressed through future research and plant breeding programs. However, if farmers continue to grow the same crop varieties using the same practices in the same locations, then the projected detrimental effects of climate change will persist. In this study, we didn’t assess the impact of management factors on wheat and maize yield which is also very important for the yield variation. Thus, there is an opportunity to work on those factors to give more precise prediction through fuzzy logic.

Future research can be conducted under controlled environmental conditions that will provide more precise data to understand the subtle effects of climate change on the growth and development and consequently the yield of wheat and maize cultivated in northwestern Bangladesh. More research and well-structured government policies for this area could assist in dealing with the problems that arise from climate change.

Relationship with SDGs

The 2030 Agenda for Sustainable Development, approved by all United Nations Member States in 2015, lays out a shared vision for peace and prosperity for people and the planet, both now and in the future. The 17 Sustainable Development Goals (SDGs) are at the heart of this agenda, representing an urgent call to action for all countries-, to work together globally (United Nations). As a member state of the UN, the People Republic of Bangladesh is striving to implement the SDGs by 2030. Therefore, our research work supports government policy aimed at achieving the SDGs. The study investigates the potential impacts of climate change on crop yields in northwestern Bangladesh, particularly focusing on wheat and maize yield. A fuzzy logic system was used to predict how the future climate variables, such as temperature and rainfall, affect crop yields in this region. By identifying these potential implications, the research directly contributes to several Sustainable Development Goals (SDGs) (Table 5). The findings of this study provide valuable insights for policymakers and agricultural stakeholders in Northwestern Bangladesh as they develop climate-resilient agriculture strategies, contributing to the broader agenda of sustainable development.

Table 5 Study relationship with SDGs .

Conclusion

Climate change significantly influences all growth stages of wheat and maize (winter and summer seasons), ultimately affecting yields. Prolonged exposure to elevated temperature and drought, particularly during flowering and grain filling stages, imposes significant stress on wheat and maize yield. Variations in temperature and rainfall subtly influence the phenology of wheat and maize. Temperature variations had a more pronounced effect on wheat and maize phenology than rainfall, though rainfall has a great impact on the growing season of summer maize compared to winter maize and wheat crops. Remarkably, maize yields in the winter season are consistently higher than in summer due to the detrimental effects of high summer temperatures on critical crop growth stages. Each development stage of wheat and maize requires optimal climatic conditions to produce maximum productivity; even minor deviation from these optimal ranges can lead to a significant yield reduction for both wheat and maize crops. Assessing and implementing adaptive strategies can mitigate yield losses under changing climatic conditions. To minimize climate related impacts, the recommended planting windows are 1–7 November for wheat, 1–10 November for winter maize and 20 February - 7 March for summer maize. These findings provide a valuable reference for further research and inform policymaking aligned with the Sustainable Development Goals (SDGs).