Optimal rainfall threshold for monsoon rice production in India varies across space and time

Climate change affects Indian agriculture, which depends heavily on the spatiotemporal distribution of monsoon rainfall. Despite the nonlinear relationship between crop yield and rainfall, little is known about the optimal rainfall threshold, particularly for monsoon rice. Here, we investigate the responses of rice yield to monsoon rainfall in India by analyzing historical rice production statistics and climate data from 1990 to 2017. Results show that excessive and de ﬁ cit rainfall reduces rice yield by 33.7% and 19%, respectively. The overall optimal rainfall threshold nationwide is 1621 ± 34 mm beyond which rice yield declines by 6.4 kg per hectare per 100 mm of rainfall, while the identi ﬁ able thresholds vary spatially across 14 states. The temporal variations in rice yield are in ﬂ uenced by rainfall anomalies featured by El Niño-Southern Oscillation events

Climate change affects Indian agriculture, which depends heavily on the spatiotemporal distribution of monsoon rainfall.Despite the nonlinear relationship between crop yield and rainfall, little is known about the optimal rainfall threshold, particularly for monsoon rice.Here, we investigate the responses of rice yield to monsoon rainfall in India by analyzing historical rice production statistics and climate data from 1990 to 2017.Results show that excessive and deficit rainfall reduces rice yield by 33.7% and 19%, respectively.The overall optimal rainfall threshold nationwide is 1621 ± 34 mm beyond which rice yield declines by 6.4 kg per hectare per 100 mm of rainfall, while the identifiable thresholds vary spatially across 14 states.The temporal variations in rice yield are influenced by rainfall anomalies featured by El Niño-Southern Oscillation events.
More than 50% of the world's population obtain their prime calories from rice 1 .India's rice production is pivotal not only for its agriculture-based economy but also for global food security.Ranking second following China, India contributes to nearly 20% of the total rice production of the world annually 2 .Harvesting Kharif rice (i.e., Kharif monsoon rice) accounts for 85% of total rice production nationwide.During 2021-2022, India produced 127.93 million tons (MT) of rice; nearly 1.2 billion people depend on domestically produced food and approximately 150 countries rely on rice exports from India 3 .During the global food price crisis in 2007-2008 when the world's wheat production failed, India banned rice exports due to food security concerns, triggering a cascade of global export bans and food riots 3 .Understanding Kharif monsoon rice yield during the monsoon season (June-November) in India thus is of global relevance to food provision and sustainable development.
Rice production, particularly in tropical regions, is critically dependent on climate variability.Extreme climate events alone can contribute 32-39% of the crop yield variability at the planetary scale 4 .The increasing level of extreme climate events is evident across climate zones, disrupting the historical crop seasonal patterns and agricultural productivity [5][6][7][8] .Unprecedented greenhouse gas emission has exacerbated global warming accompanied with more frequent extreme events, including heavy rainfall causing floods, severe tropical cyclones, droughts, and desertification 6,7,9,10 .Research shows that, among meteorological variables, rainfall and air temperature explain the maximum variability of crop production 11 .
In India, Kharif monsoon rice yield declined in 65% of its regions due to climate variability 12 .Among the major crops in the country, monsoondependent crops are more sensitive to changes in and variability of rainfall 13 , compared to other crops such as winter crops 14 .Rainfall variability can cause a wide range of rice production fluctuation (+2% ~−11%) over the country, with negative impacts potentially outweighing the benefits of the increased total rainfall 13 .Meanwhile, studies suggest that excessive rainfall during the monsoon months has adversely affected crop yield in India 15 .Such negative effects are more evident and prominent in the northeast regions of India where heavy rainfall dominates the wet season 16 .The Indian monsoon is sensitive to the El Niño Southern Oscillation (ENSO), which can have profound impacts on rice production in India and global food supply [17][18][19] .
ENSO features climate modes involving changes in sea surface temperature in the central and eastern-central Pacific Ocean, which can cause global climate variation 20,21 and modify rainfall distribution in India.
Sensitivity assessment and quantification of the effect of climate variability on crop yield is of utmost importance for adopting resilient agricultural strategies and improving food security 9,10,22 .Precipitation, especially rainfall during the growing season, is a critical factor affecting the growth and yield of crops, particularly Kharif monsoon rice 11 .The amount and distribution of rainfall throughout the growing season are vital for healthy plant growth, development, and ultimately successful crop production.The Kharif monsoon rice plant can generate high yield when it receives an adequate amount of rainfall (1200-1400 mm) during the growing season 23 .Existing literature suggests that rice yield responds nonlinearly to rainfall, which manifests declining rice yield when rainfall deviates from an optimal threshold for rice growth 3,[24][25][26] .
Despite the recognition of such a nonlinear relationship, most previous efforts have focused merely on quantifying the decline of rice yield under excessive rainfall, but there is lack of knowledge about the response of rice yield to rainfall anomalies, including both deficit and excessive extremes, as well as the optimum threshold of rainfall for crop yield.A few studies have examined wheat production in the United States 27,28 , but the threshold, beyond which more rainfall starts to adversely affects Kharif monsoon rice yield, remains unknown, especially when compared with the impact of drought 11 .A thorough assessment to delimit the rainfall threshold is critical to understand the negative impact of heavy rainfall on rice yield.This study aims to investigate the impact of rainfall on Kharif monsoon rice across all districts of India from 1990 to 2017, seeking to identify the optimal rainfall threshold (ORT) over the entire country and across regions where crop productivity is more susceptible to excess rainfall.Furthermore, this study provides key information for food security management in the world with an uncertain climate.

Results
Trends and spatial variability of Kharif monsoon rice and rainfall During 1990-2017, the annual average crop area and production of Kharif monsoon rice in India was 41.17 million hectares (Mha) and 87.66 MT, respectively (Supplementary Table 1).Overall, rice production increased from 71.37 MT in 1990 (based on a total cultivated area of 40.83 Mha) to 113.28 MT in 2017 (based on a total cultivated area of 42.49Mha), representing a growth rate of approximately 58.7% (52.5% on the unit area basis) over the 28-year period.Spatially, the western states including Maharashtra, Madhya Pradesh, Gujrat, Rajasthan held smaller rice areas and generated lower yield than the eastern states (Supplementary Fig. 1a, b, d, e).Regarding the percentage change of rice area, rice growing areas in the northern states expanded more rapidly in recent years, compared to the southern states (Supplementary Fig. 1c, f).In this study, we focus on 20 states that hold more than 95% of national Kharif monsoon rice production (Supplementary Table 2), including Andhra Pradesh, Assam, Bihar, Chhattisgarh, Gujrat, Haryana, Himachal Pradesh, Jharkhand, Karnataka, Kerala, Madhya Pradesh, Maharashtra, Odisha, Punjab, Rajasthan, Tamil Nadu, Telangana, Uttar Pradesh, Uttarakhand, and West Bengal (Supplementary Fig. 2).Notably, West Bengal (14.5%),Uttar Pradesh (13.38%), and Punjab (10.89%) contribute the highest accumulated total Kharif monsoon rice production during 1990 to 2017.
To spatially explore the strength and direction of the relationship between rice yield and rainfall, we quantified the correlation coefficient over space and time at the district level during 1990-2017 (Supplementary Fig. 5).Among the 384 samples (i.e., districts of India), 238 (63.3%) revealed positive correlations between rice yield and rainfall and 138 (36.7%) negative correlations.A broader region in central India exhibited the strongest positive correlation, covering regions in Chhattisgarh, Odisha, Madhya Pradesh, Telangana, and the western part of Karnataka (r ≥ 0.4, p < 0.05).However, negative correlations (r ≥ 0.4, p < 0.05) were observed in Andhra Pradesh, Assam, Haryana, Himachal Pradesh, Kerala, North Uttar Pradesh, Punjab, Tamil Nadu, West Bengal, and West Maharashtra.

Impacts of Rainfall on Kharif monsoon rice yield
We draw two scenarios to estimate the impact of rainfall on rice yield (Fig. 1), with one excluding long-run trends (baseline/counterfactual model, Supplementary Table 3) and the other including rainfall variables (full model, Supplementary Table 4).The rainfall had a significant positive effect (p ≤ 0.001), but its extreme had a negative effect (p ≤ 0.001) on rice yield (Supplementary Table 4).The proportion of the variance explained by fixed effects in total variance is 6.8% (marginal R 2 ), and the share of the variance explained by both fixed and random effects in total variance is 77.2% (conditional R 2 ).A high level of variance explained by the model (R 2 = 0.77, p < 0.001) and accurate historical yield predictions indicate that the model is relatively reliable for predicting rice yield (Supplementary Fig. 6).After including temperature, another main climate variable, the effects remain robust, demonstrating that rainfall plays a critically important role in rice production in India (Table 1).Relative yield change (RYC) represents the percentage change in crop yield compared to a reference or baseline yield.The average yearly RYC from 1990 to 2017 over India is summarized in Fig. 1b.Across the country, yield losses were more than 3% in the years of 2003 (−5.22%), 2009 (−3.12%), and 2014 (−3.24%), and the most yield gains were observed in the years of 2008 (3.74%), 2012 (3.44%), and 2014 (4.85%).The spatial distribution of the model-derived total net production at the district level from 1990 to 2017 is depicted in Supplementary Fig. 7.In comparison to the eastern and southern parts of India, the western region (including Haryana, Rajasthan, Gujrat, Madhya Pradesh, Maharashtra, Himachal Pradesh) and eastern Assam tend to experience lost production due to rainfall.

Optimal rainfall thresholds on relative yield change
The overall optimal rainfall threshold (ORT) value for rice yield for India is estimated to be 1621 ± 34 mm (Confidence Interval: 1587-1655 mm) based on the modeled relationship between the growing-season rainfall and the overall response of RYC (R 2 = 0.34, p < 0.001) across the whole country (Fig. 2a).The most severe yield reduction under extreme wet conditions (−33.74%) was much higher than under extreme dry condition (−19%) (Fig. 2a).The yield declines at a rate of 6.41 kg ha −1 for an increase of every 100 mm in rainfall when the level of rainfall exceeds ORT (Supplementary Table 5).Conversely, the yield drops at a rate of 17 kg ha −1 with a decrease of every 100 mm in rainfall below the ORT.This suggests that there is a nonlinear relationship between rainfall and Kharif monsoon rice yield in India with diminishing returns away the ORT.The ORT gradually increased with the increasing rainfall (r = 0.87, p < 0.001) (Fig. 2b).Specifically, the average rainfall in the states of Kerala, West Bengal, and Assam are much higher, and their ORTs are greater than the other states.This observation underscores the adaptability of current rice cultivars (e.g., use of fertilizer) to elevated moisture levels to achieve the highest yield capacity 27 .
By state, for the 14 states with successfully identified thresholds (e.g., Maharashtra), the ORT values exhibit substantial heterogeneity over space, covering a wide range of 544 mm (i.e., Haryana) to 2775 mm (i.e., Kerala) (Supplementary Fig. 8, Supplementary Fig. 9).Above the ORT, rice yield tends to fall by more than 15% in some states.Beyond the ORT, an increase of 100 mm of rainfall caused yield losses in the following states in India, including Kerala (−17.5 kg ha −1 ), Maharashtra (−38.1 kg ha −1 ), Karnataka (−2.4 kg ha −1 ), Uttarakhand (−5.5 kg ha −1 ), and West Bengal (−9.9 kg ha −1 ).Additionally, some states are not directly negatively impacted but their rate of yield has decreased compared to the left side of the inverted-U slope which indicates the positive impact of rainfall at relatively slower rates (e.g., Assam).Both excessive rainfall and extremely dry conditions lead to yield losses in various states.A decrease of every 100 mm in rainfall below the ORT results in a significant reduction in yield for several states, such as Haryana, Karnataka, Tamil Nadu, and West Bengal.The rate of yield loss is more than 50 kg ha −1 in some states, and ranges 20-50 kg ha −1 in others (e.g., Andhra Pradesh).
Overall, the sensitivity of RYC to rainfall between the two sides of ORT is −145.45%(which is over 100% in magnitude), suggesting that increasing rainfall beyond the ORT flip the impact on rice yield from positive to negative with an extent of more than 45%.By state, the most sensitive negative impacts of high rainfall are observed in Kerala, with the number achieving −290%.Among the 14 states with identified ORT (i.e., invert U-Shape relationship), four experience stronger impacts of wetter conditions than drier conditions, including Karnataka (−105%), Kerala (−290%), Maharashtra (−159%), and West Bengal (−145%), while the other states exhibit relatively low levels of sensitivity for wetter conditions.
To further explore ORTs through time, we divided the 28 years into 3-year intervals.Every three years, both the slopes of the regression line on the left and the right sides of the inverse-U shaped relationship were estimated, and the mean values of all the variables, including yield change and the percentage of samples over the ORT between the upper and lower CI of the ORT were collected (Supplementary Table 6).The results from linear regression show that with a rise in ORT of 100 mm, yield area grows at a rate of 102 kg ha −1 (RYC = 0.3%), with a strong association (R 2 = 0.75, p < 0.01)  (Supplementary Fig. 10a, b).Additionally, as ORT rises, the proportion of samples above ORT (loss of yield) decreases (R 2 = 0.56, p < 0.05) (Supplementary Fig. S10c).The amplitudes of the left slope and right slope of inverted-U exhibit an inverse correlation with ORT.This suggests that the intensity of yield loss (right slope) increases as ORT level increases.Moreover, as ORT grows, yield loss intensity (left slope) decreases (Supplementary Fig. S10d).
ENSO and its impact on Indian summer monsoon and rice production From both sides of the ORT, Kharif monsoon rice yield loss in India is not limited to just excess rainfall (wetter conditions), but also due to lack of rainfall (drier conditions).The Indian monsoon is directly linked to the El Niño Southern Oscillation (ENSO) 29 , and thus El Niño events can lead to reduced Kharif monsoon rice production in India due to low rainfall or drought conditions.The El Niño phases that caused such conditions in India include 1991, 1997, 2002, 2009, and 2015, which were years with drought conditions; The La Niña phases include years of 1998, 1999, 2007, and 2010 (Fig. 3a).There is prominently negative relationship between the mean rainfall and the ONI values, indicating the drought conditions under El Niño and wetter conditions under La Niña (r = 0.49, p < 0.01) (Fig. 3b).Rice yield change has been improved during the La Niña years, which are characterized by adequate rainfall in the years 1999, 2007, 2008, and 2010 [30][31][32] .These relationships also reflect the high association between the Oceanic Nino Index values and the estimated RYC (r = −0.61,p < 0.001) (Fig. 3a, c).

Discussion and conclusion
This research reveals the regional variations in the nonlinear connections between rainfall and Kharif monsoon rice yield across India.The growth, as well as the prosperity and maturation of rice yield, depends on the water availability during growing seasons regulated by climate variables, particularly rainfall.On the one hand, excessive rainfall may cause flooding 33,34 and waterlogging 35,36 , leading to loss of crops by reducing the nitrogen available for leaching 1 , and damage to the soil structure.On the other hand, insufficient rainfall can result in drought conditions, causing stress on the plant and reducing rice yield 37 .Notably, we identified the optimal rainfall thresholds (ORTs) both nationwide and by state based on the district-level data.The identification of ORT can be considered as a diagnostic tool for understanding the water demand and supply of crops under climate variability, ensuring healthy growth and maximum yield in a specific region as well as for the whole country.
In this study, we found that in areas with dry conditions where water demand is not met by rainfall, there is a positive linear relationship between rice yield and rainfall (Supplementary Fig. 8d, k, m-o, q, r).Rice yield increased as rainfall increased until it reached the optimum threshold beyond which further increase in rainfall did not result in a corresponding increase of rice yield.When exceeding this threshold, the excess rainfall becomes surplus, causing stress for crop growth and development, which on the contrary lead to a decline in yield 8 .This nonlinear relationship manifests as an inverted-U shaped scatter plot, which is observed in heavy rain areas of India (Supplementary Fig. 8b, c, e, h, I, j, l, p, s, t).
Nationwide, the collective ORT stands at 1621 ± 34 mm.Notably, 89.25% of regions experience rainfall levels below this threshold, while 10.75% witness rainfall exceeding the ORT.From region to region, the ORTs vary between 544 ± 87 mm and 2,775 ± 106 mm.Out of 20 states in India, 14 states have recognized ORTs.Specifically, for Assam, Bihar, Gujarat, Jharkhand, Karnataka, Kerala, Maharashtra, Tamil Nadu, Uttarakhand, and West Bengal, the rice crop yields experience a gradual decline beyond the ORT.During the growing season, Andhra Pradesh, Himachal Pradesh, Punjab, and Rajasthan experience rainfall levels below 1800 mm, resulting in an absence of the optimal threshold point (U-shaped slope).This suggests that rice in these regions require additional water beyond what is provided by rainfall during the growing season to meet their water needs for optimal growth and yield.ORTs states are positioned along the primary pathways of the southwest and southeast branches of the Indian summer monsoon, receiving significantly higher rainfall during the cultivation season compared to other states in the country (Supplementary Figs. 3 and 4).Generally, a total of 1200-1400 mm of water is required during the period of paddy growth 23 .The ORTs for Assam, Bihar, and Uttarakhand were 1485 mm, 1205 mm, and 1197 mm, respectively.These three states had received up to 3200 mm of rainfall during their growth period (Supplementary Fig. 8).The geographical conditions of the region, specifically the presence of the Himalayas, play a role in the heavy rainfall experienced by the states of Assam, Bihar, and Uttarakhand.The Himalayas act as a natural barrier, preventing the southwest and southeast branches of the Indian summer monsoon from crossing the boundary 38 .As a result, the states experience heavy orographic rainfall.
During the monsoon season, heavy rainfall may cause devastating floods and affect rice production 39 .Some areas, such as North Bihar, face a high risk of monsoon-related flooding owing to their geographical positioning at the convergence of multiple rivers including the Mahananda River, Koshi River, Bagmati River, Burhi Gandak River, and Gandak that originate in Nepal and flow into the state (Supplementary Fig. 7).The steep gradient of these rivers along the floodplain of the Brahmaputra River leads to a high rate of water flow and runoff, which can cause widespread flooding during heavy rainfall.The construction of over 3000 km of embankments in Bihar has been criticized for trapping sediments and hence exacerbating floods in the state 40 , despite their initial intention of protecting agricultural land.The ORT for West Bengal is 1816 mm.About 23% of observations fall above this threshold and their yield decreases up to 20% (Supplementary Fig. 8t).The southern part of West Bengal falls under the lower Gangetic plain, where there are abundant rivers and a wide floodplain.This area serves as the initial impact zone for the southeast monsoon branch 41 .This is why the maximum rainfall during the monsoon season goes above 4000 mm during the growing period and a wide area of paddy is affected by floods.Another reason is that in recent times the large area of paddy has been converted to fish farming 42 , which increases the moisture of the surrounding croplands and cannot drain excess water from the paddy lands resulting in accumulation of water in the fields, leading to loss of soil nutrients and fertilizer from the soil which harms the production 43 .
The rainfall effects on yield reflect the different physiological and environmental processes of crop growth and yield formation 27 .Typically, a lack of knowledge about the demand and supply of water in the growing season leads to a decline in crop health as well as production.This information can help farmers in making informed decisions on crop management practices and in improving crop productivity.The regional variation of the ORT for rice production in India provides new information for improving the efficiency of rice farming during monsoon seasons and helping farmers determine how to cope with climate change by managing rice cultivation under rainfall in their specific regions, leading to better yields and increased overall production.Furthermore, our analysis comes with some limitations that the production of rice will be influenced by a variety of controlling factors, such as technical advancement, international markets, and governmental regulations, which we did not consider in our model.
The ENSO cycle includes two extreme phases: 1) El Nino (warm central and eastern Pacific Ocean surface) that can weaken Indian monsoon with drought, and 2) La Nina (cool central and eastern Pacific Ocean surface) that is associated with increased rainfall.Our research demonstrated the relationships between rainfall and ENSO (Fig. 3a, b), which is further shown to be related to rice yield.Although studies suggested that there is a weakening monsoon in India due to the warm ENSO event 17 , the impacts from such events remain evident in our analysis (Fig. 3c).The detection of the event years, along with the optimal rainfall thresholds, can help better plan rice growing and harvesting practices in advance.
Climate threats are more serious in developing nations because they are more reliant on agriculture and have less access to resources and technology 44 .Between 1950 and 2015, the frequency of catastrophic climatic events (such as floods, droughts, and cyclones) in India increased, and it seems unlikely that the amount of rainfall will alter much anytime soon 45,46 .Despite an increase in irrigation infrastructure, Indian agriculture, particularly rice production, remains reliant on the monsoons 11 .The National Innovations on Climate Resilient Agriculture (NICRA) project was started by the Indian Council of Agriculture Research (ICAR) in 2011 to enhance the resilience of agriculture (including crops, livestock, and fisheries) through strategic research, technology demonstration, and collaborations with state agricultural universities, Krishi Vigyan Kendras (KVKs), and non-governmental organizations (NGOs) 45,47 .Our study on how the crops react to the timing or distribution of the monsoon can provide critical refence for farmers to manage climate risks with improvement in agricultural practices, such as the use of stress-tolerant crops, modifications to planting dates, and input applications (e.g., irrigation and fertilizer), and techniques for soil and water conservation, are typically relied upon by farmers to manage climate risks.

Data acquisition
Rice in India is annually grown in three seasons, including Kharif monsoon season during August to November, Rabi season (winter rice) during December to April and, Zaid season (summer rice) with irrigation practices during May to July.Among the three types, Kharif monsoon rice is the most extensive and dominant crop, accounting for 85% of total rice production 3 .We obtained data of harvested area, crop production, and crop yield for Kharif monsoon rice at the district level for India during 1990-2017, relying on information available from the International Crops Research Institute for the Semi-Arid Tropics (ICRISAT) database (http://data.icrisat.org/dld/src/crops.html).This database compiles information from numerous sources, including Agricultural Censuses, State Directories of Agriculture, State Bureaus of Economics and Statistics, State Planning Departments, and government papers 48 .The lowest level of disaggregation, for which agricultural statistics are routinely accessible throughout the country, is a district, which is an administrative unit under the state.
We obtained observed daily gridded rainfall (mm/day) and air temperature (°C) data at the spatial resolutions of 0.25°× 0.25°and 1°× 1°, respectively, over the period of June-November from 1990 to 2017.The climate data were prepared by the India Meteorological Department (IMD) and developed based on information acquired by more than 6000 stations across the country using maps of 1993 district boundaries 49 .The gridded weather data were rescaled to the district level by calculating the areaweighted mean of grid values in each district.June and July rainfall were incorporated to extend the growing season from August to November, a duration influenced by the selected rice variety and the specific cultivation area.In the state of Kerala, for example, the monsoon season often begins in the first week of June, but rice is not planted until late July or early August.However, paddy fields must be prepared with a surface submerged in water before rice can be transplanted, and India's rainfall in June and July considerably aids in this preparation 50 .Finally, we obtained data on the Oceanic Nino Index (ONI), a widely used measure to monitor the El Niño and La Niña events in the tropical Pacific Ocean (https://ggweather.com/enso/oni.htm).

Estimating the impacts of rainfall on Kharif monsoon rice yield
To measure the impact of rainfall trends on Kharif monsoon rice yield, we used a multivariate log-linear regression mixed-effect model 3,4,24,26,51 .Mixedeffect models have several advantages over fixed-effect models, particularly when handling data with a hierarchical or clustered structure where observations are not independent within each cluster or group.Mixed-effect models can capture both within-group and between-group variances that help improve the accuracy of parameter estimation and tolerate uneven data and have greater flexibility in handling missing data.The model equation is shown as follows.

Counter factual model : logðy
Full model : Where y it is the estimated yield (kg ha −1 ) of rice for state i in year t; β 0 is the global intercept; γ i is the random intercept for all states, which controls for the time-invariant difference between locations such as soil type; f i (t) and f i (t 2 ) are the time controls, which account time-varying differences among the locations; β is the vector of coefficients and X is the vector of rainfall (R, R 2 ); ε it is the residual error that captures the unobservable random effect.As rainfall varies location-wise, we modeled location as a random-effect variable.The variables of year (Y), rainfall (R), and their squares (Y 2 , R 2 ) were modeled as fixed-effect variables.Quadratic terms of rainfall were adopted to capture the non-linear effect of extreme weather conditions, which can damage crops and hence affect the crop yield 4,24,51 .
To account for the effect of climate trends on rice yield, we calculated the percentage of relative yield change (RYC) between the predicted yields from our full regression model ðŷ F Þ with rainfall trends and predicted yield from counterfactual (i.e., baseline) scenario ðŷ B Þ without long-run rainfall 3 .
We multiplied the area of rice planted by the model-derived yield from the full model to estimate the net production balance.

Delimiting the optimum rainfall threshold for Kharif monsoon rice yield
To quantify the optimum rainfall threshold (ORT), beyond which rice yield can be negatively affected by the increasing level of rainfall, we used the segment regression method 52 .Below and above this ORT, rainfall is assumed to be suboptimal for rice production.The yield loss in both situations was due to drought conditions and wet conditions, respectively.Segment regression is a machine learning technique that aims to fit a regression model to data that can be divided into separate segments.This approach can be useful when the underlying relationship between the explanatory and response variables is not linear or is heterogeneous across the entire dataset 52 .By fitting separate regression models to different segments, the overall model can capture complex relationships and improve the accuracy of the predictions.The least squares approach was employed separately to each segment, through which two trend lines are created to fit the data as closely as possible while minimizing the sum of squares of the differences between actual (y) and predicted (ŷ) values of the observations (i.e., the response variable).Here, we assessed the effectiveness of rainfall (explanatory variable) on the RYC (response variable) when there exists a value within the range of the rainfall, where the effect of the rainfall is expected to change 53,54 .
Where y i is the response variable, which in this context is RYC for observation i, z i is the predictor variable (rainfall) for observation i; β 1 This is the slope parameter for the segment before the breakpoint ψ.It determines the effect of rainfall on the RYC before the breakpoint; β 2 is the difference in slope parameter.It represents the change in the effect of rainfall on the RYC after the breakpoint ψ; ψ is the estimated breakpoint between the different segments.It represents the value of rainfall at which the relationship between rainfall and RYC changes; (z i − ψ) + capture the positive deviation from the breakpoint ψ, ensuring that the segmented term is only active when z i > ψ, I(z i > ψ) − is an indicator function that equals 1 when z i > ψ and 0 otherwise, ensuring that the term γ is only activate when z i > ψ.This metric of sensitivity measures how much extent to which rice yield changes with increasing rainfall above the ORT relative to that with decreasing rainfall below the ORT, namely relative response of rice yields to excessive rainfall compared with rainfall deficit.The estimated sensitivity of RYC to rainfall is based on the the rising (left) slope Slope left and the decreasing (right) slope Slope right , with the equation as follows.
Relating crop yield in response to rainfall to ENSO events We calculated the ONI value as the three-month mean of the sea surface temperature (SST) anomaly in the region extending 5°S-5°N and 120°W-170°W.We defined thresholds that signal the El Niño and La Niña events and categorized their intensity level as follows.El Niño occurs when the ONI values are above +0.5σand La Niña occurs when below −0.5σ,where σ denotes the standard deviation.Here, the three-month (May-July) average values of the ONI were used to examine the impacts of El Niño and La Niña on Kharif monsoon rice yield.

Fig. 1 |
Fig. 1 | Impacts of yearly rainfall on Kharif monsoon rice yield in India.a Actual yield vs. predicted yield of Kharif monsoon rice in India based on linear mixedeffects modeling with district-level observations; b Change of yearly Kharif monsoon rice yield estimated by rainfall during 1990-2017.The error bar for each year was calculated based on bootstrap resampling with 1000 repeats, showing the 5-95% confidence intervals (CIs) for the mean estimate.

Fig. 2 |
Fig. 2 | Modeling results of response of crop yield change of Kharif monsoon rice to rainfall.a Response of Kharif monsoon rice yield to the cumulative rainfall (June-November) from 1990-2017 and identification of optimum rainfall threshold (ORT) over India.b Association between growing season rainfall and ORT over the 14 Indian states with identified thresholds.

Fig. 3 |
Fig. 3 | Relationships between ENSO events, rainfall, and crop yield of Kharif monsoon rice.a The list of El Nino, La Nina, and neutral years of ENSO from 1990 to 2017, b Correlation between growing season spatial average of rainfall over India and Oceanic Nino Index (ONI), c Correlation between crop yield change of Kharif monsoon rice and ONI values annually.

Table 1 |
Effects of rainfall and temperature on rice yield based on mixed-effects model : marginal R 2 is the variance explained by fixed variables, while conditional R 2 is the variance explained by random and fixed variables.