Integrated model simulates bigger, sweeter tomatoes under changing climate under reduced nitrogen and water input

Abstract When simulating the response of fruit growth and quality to environmental factors and cultivation practices, the interactions between the mother plant and fruit need to be considered as a whole system. Here, we developed the integrative Tomato plant and fruit Growth and Fruit Sugar metabolism (TGFS) model by coupling equations describing the biophysical processes of leaf gas exchange, water transport, carbon allocation, organ growth and fruit sugar metabolism. The model also accounts for effects of soil nitrogen and atmospheric CO2 concentration on gaseous exchange of water and carbon by the leaf. With different nitrogen and water input values, TGFS performed well at simulating the dry mass of the tomato leaf, stem, root, and fruit, and the concentrations of soluble sugar and starch in fruit. TGFS simulations showed that increasing air temperature and CO2 concentration has positive effects on fruit growth, but not on sugar concentrations. Further model-based analyses of cultivation scenarios suggest that, in the context of climate change, decreasing N by 15%–25% and decreasing irrigation by 10%–20% relative to current levels would increase tomato fresh weight by 27.8%–36.4% while increasing soluble sugar concentration by up to 10%. TGFS provides a promising tool to optimise N and water inputs for sustainable high-quality tomatoes.


Introduction
Sustainable development of tomato (Solanum lycopersicum) production aims to ensure sufficient yields of good-quality fruit.
Reconciling productivity, quality, and sustainability in the context of global climate change is a critical issue facing agriculture, especially for field-grown tomatoes the environment of which is less controlled. Marked rises in air temperatures and CO 2 concentrations will affect stomatal conductance [1], photosynthesis [2], plant growth [3], fruit development [4], and fruit sugar metabolism [5]. Modelling approaches have been widely used to forecast the impacts of climate change on future agricultural productivity and assess options for local stakeholders [6]. For example, considering water shortages and fertiliser pollution [7], farmers need to follow scientific guidance to implement suitable and sustainable agricultural practices. Currently, however, climate-change impact research mainly focuses on crop growth [8][9][10]. Few studies consider fruit quality or comprehensively link plant growth and fruit quality.
The fruit growth pattern and composition of tomato are complex traits as they result from many processes that show large genotype, environment, and agronomic management interactions [11]. The effects of several meteorological and agronomic factors on the growth and fruit quality of tomato have been evaluated, such as radiation [12], temperature [4], the difference between the saturated vapour pressure and the actual vapour pressure (VPD) [13], irrigation, nitrogen (N) application [14], CO 2 fertilization and in combination with reduced irrigation regimes [15,16]. However, the effect of CO 2 fertilization in combination with temperature, irrigation and N conditions on tomato growth and fruit quality is far less studied.
The expansive growth and sugar concentration of fruit, major quality criteria, are mainly determined by the transport and accumulation of water and carbon from the mother plant [17]. The water and carbon statuses of leaf (resp. fruit) affect the source (resp. sink) activity, thus inf luencing the overall sourcesink balance of the whole plant-fruit system [18]. Therefore, to better understand the response of fruit growth and quality to changes in environmental factors and agronomic management, it is necessary to consider the water and carbon relations at the whole-plant level.
Process-based modelling is a powerful approach to deal with the complexity of biological systems of plants, their fruit, and the relationships between them [11,19]. A virtual fruit model was developed to describe the water and carbon f luxes occurring during peach fruit expansive growth [20,21]. The model has since been successfully adapted to simulate fruit growth and sugar metabolism in tomato [17,22]. Model-assisted analyses have been conducted to assess the sensitivity of various physiological processes to water deficits and the consequence on vegetative growth and fruit quality [23], to compare sugar accumulation across different fruit species [24], and to improve the simulation of carbohydrate accumulation in tomato fruit by considering water status [25]. Fruit simulation studies have also been scaled up from the organ to the whole-plant level. For example, equations describing water transport and nutrient f luxes involved in fruit growth have been connected to the growth model to depict the coordinated distribution of water and carbon among different organs of the whole plant [26]. Such a model was applied to capture how carbon is assimilated and allocated to the main compartments and how these processes vary depending on environmental conditions, including water stress [23,27], changes in leaf-to-fruit ratios [28], and agronomic practices such as pruning and fruit thinning [29].
Tomato is an indeterminate crop, that is, vegetative and reproductive growth is inseparable [11]. Dynamic simulation of growth of both developmental phases is challenging because it requires the integration of information on the interactions between source-sink activities within the plant, cultivation practices, and environmental factors [17,28,29]. There are currently several limitations. For example, most of the existing models assume that plant water status f luctuates within a given range [26,30] and few of them consider the inf luence of N application and atmospheric CO 2 concentrations on plant growth, fruit metabolism or fruit quality, especially when excess N is applied or as the climate changes [7,31,32].
Our first aim was to develop a process-based model for tomato to simulate the dynamic growth of the plant and its fruit, while following fruit sugar metabolism at a whole-plant level (TGFS model), and representing the impacts of N and CO 2 on leaf gas exchange. The second aim was to predict how climate change will inf luence tomato organ growth and fruit sugar composition, as a way to investigate management strategies for sustainable tomato production in the future.

Calibration and validation of the integrative model
The integrative TGFS model ( Fig. 1) was calibrated against measurements of real tomato plants grown under optimal nitrogen and water conditions (N2Wck in Experiment A). Calibration results show that the observed plant growth variables, including DW leaf , LA, DW stem , and fruit development variables, such as FW, DW, and fruit soluble sugar concentration (SSc), were well simulated as the RRMSE values range from 5.57% to 18.59% ( Fig. 2A-G; Table 1). The relatively high RRMSE for fruit starch concentration can mainly be attributed to the scatter in the observations and the very low values late in fruit development. However, the dynamic trend during fruit development estimated by the model has a small MAE which is deemed satisfactory (Fig. 2H; Table 1). Additionally, the simulated C str , C ns , SS, Sta, g sNCO2 , ψ stem , Tr, Pn, Cp and respiration of the leaf, stem, root, and fruit (Fig. S1, see online supplementary material) are consistent with previously reported values [26,28,39,55,56].
To validate the model, it was tested against three independent datasets of measurements from plants treated with different amounts of N and water, namely N3Wck in Experiment A and N1Wck and N2DI in Experiment C (see Materials and Methods for details of treatments). For these three growth conditions, the dynamics of DW leaf , LA, DW stem , DW fruit , FW, DW, and SSc were simulated reasonably well (RRMSE 10.1% to 28.3%, Table 1) with the TGFS model ( Fig. 2A-G). The fruit starch concentration simulation for N3Wck conditions is acceptable, as the MAE is 0.23 g 100 g −1 FW and the RRMSE is 28.9%, similar to the values for the N2Wck condition. However, the predictions of FW, DW, SSc, and Stac during the first phase of fruit development were not completely satisfactory for stressed tomatoes (N1Wck and N2DI in Fig. 2E-H), which might be because the predicted ψ stem can't fully ref lect the deficit status of the plant-fruit system and the early deviation of the measured Stac peak. Overall, the integrative model efficiently simulated the development of the leaf, stem, root, and fruit, and the dynamics of soluble sugar and starch in the fruit, by comprehensively considering the effects of environmental factors. Thus, TGFS could be used to predict plant behaviour and fruit sugar responses under different environments.

Future climate change will improve fruit size but not sugar concentration
We applied the TGFS model to assess how tomato growth and fruit quality would respond to increasing air temperature (T a ) and increasing atmospheric CO 2 concentration (CO 2 ), characteristic of a climate change scenario for the location where the experimental data were collected, and assuming the current moderate N application and full irrigation remained the same over the predicted period (2021-2100) (Fig. 3).
With continuous rises in T a and CO 2 , the dry weights of the modelled leaf, stem and root show significant logistic upward trends (Fig. 3). Compared to the start of the simulated period (current conditions), the simulated dry weights of the leaf, stem and root increased by 36.5%, 24.9%, and 15.2% ( Fig. 3A and C), respectively, by the end of the simulation period. The simulated carbon composition in the leaf revealed that both C str and C ns (Fig. S2, see online supplementary material) showed similar trends over the period, increasing by 36.0% and 44.6%, respectively. Accordingly, the predicted plant LA increased from 0.44 m −2 to 0.59 m −2 , a 36.0% increase (Fig. 3B). The larger increases in C ns compared to C str in the leaf suggests that the tomato leaf would accumulate proportionally more non-structural carbon, potentially providing more materials and energy to support tomato growth under future climates. The enhancement of plant carbon assimilation due to enlarged leaf and higher photosynthesis rates (Fig. S3A, see online supplementary material) would improve the growth of other organs. Consistent with this, over the simulation period significant logistic increases were observed from 222.24 g to 295.95 g for the FW and from 10.62 g to 15.06 g for the DW of individual fruit (Fig. 3D). Meanwhile, the average stomatal conductance over each year (g sNCO2 _m) decreases from 0.17 to 0.13 mol H 2 O m −2 s −1 and water consumption by leaf transpiration (Tc) decreases from 84.64 to 82.98 L/plant/season with the increase in CO 2 and air temperature (Fig. S3 D, E, F, see online supplementary material).
Although beneficial climate impacts on tomato plant and fruit growth may be seen in the future, the taste quality of the ripe fruit may not improve ( Fig. 3E and F). From 2021 to 2100, the concentrations of soluble sugar in mature fruit (SSc) showed a slight downward trend at the rate of 3.7 × 10 −5 g/100 g FW/year. No obvious trends were found in the simulated starch concentration in mature fruits (Stac). Fruit SSc is related to carbon and water f luxes into and out of the fruit. For fruit, the annual net inf lux of carbon (FruitC net ) was slightly lower than that of water (FruitW net ) (  Table 1. Goodness of fit estimated by mean absolute error (MAE) and relative root mean square error (RRMSE) between the measured and simulated tomato leaf dry weight (DW leaf ), leaf area (LA), stem dry weight (DW stem ), root dry weight (DW root ), individual fruit fresh weight (FW), and dry weight (DW), as well as concentrations of soluble sugar and starch in fruit (SSc and Stac respectively) for pot-grown tomato treated with different amounts of N and water. The units MAE in the table are the same as those of the corresponding variables. is large, with a variance of 1.2%, suggesting that fruit quality variation between year may become higher. Overall, simulation results show that future increases in T a and CO 2 concentration would promote growth of tomato leaf, stems, roots, and fruit. However, there is little evidence that the bigger fruit would be better quality with more concentrated soluble sugar.

Reducing nitrogen and water application could obtain bigger and sweeter tomato fruit in the future
Considering the objective to reach carbon neutrality and dealing with the current context of water scarcity and excessive nitrogen fertilisation [7,31], sustainability scenarios were designed to reduce inputs of nitrogen and water.
To explore whether modifying N application or irrigation would produce better tomato fruit, the responses of mature tomato fruit FW and soluble sugar concentration to different N and water management practices were investigated through the validated TGFS model with inputs ref lecting future climate change. Final N and irrigation scenarios were compared to initial reference N2Wck conditions, as shown in Eqn. 1 where Δ refers to changes in the FW or SSc of mature tomato fruit in different N and water scenarios and i refers to a specific N treatment and irrigation (W). NiWi [final] is the average value of FW or SSc of mature fruit in the last five years of 2021-2100 (e.g. 2096-2100, to avoid inter-annual uncertainty) under NiWi scenarios. N2Wck [initial] is the value of FW or SSc of mature fruit in 2021 in the N2Wck condition. Fig. 4A shows the percentage difference in FW and SSc caused by different N and water treatments from 2021 to 2100. When N application is relatively high (90% to 100%), a decrease in irrigation reduces the benefit of the future climate change on the FW, limiting the FW percentage increase to between 11.7% and 35.7% in the future, with no significant increase in sugar content. When N application was at a moderate level (75% to 85%), a mild water deficit increases SSc by 10.6% while maintaining a positive effect on the FW. However, severe water deficit cancels out the positive effect of climate change on the FW. When N application is low (60% to 70%), FW and SSc fall to an unfavourable level, with water deficit becoming stressful. The 40% reduction in N and water application could reduce tomato FW by 16.3% and SSc by 3.4% by 2100.
To find N and water combinations optimal for obtaining bigger and sweeter fruits in future climate conditions, the Pareto front was considered. Five combinations were selected on this front ( Fig. 4A and B). The results indicate that by the end of this century, decreasing N application from 15% to 25% while decreasing water supply from 10% to 20% could increase the FW of mature tomato fruit from 27.8% to 36.4% and the soluble sugar content from 4.7% to 10.2%.

Discussion
The integrative TGFS model developed here provides a detailed dynamic representation of the growth of the tomato leaf, stem, root, and fruit in the post-f lowering stage, in addition to computing the soluble sugar and starch concentrations in fruit. The TGFS model was coupled to the N-CO 2 -Jarvis model to estimate tomato stomatal conductance (g sNCO2 ), which is a key factor controlling leaf gas exchange and hence water and carbon balance [36,37]. As the N-CO 2 -Jarvis model considers various environmental variables (radiation, temperature, VPD, soil water content, soil N content, and atmospheric CO 2 concentration) on leaf gas exchange, the resulting integrative model is enhanced. As demonstrated here, the model can be used to investigate the interactions of the environmental conditions with agronomic practices on tomato growth and fruit quality. The TGFS model simulates vegetative and reproductive growth and links the growth of plants and fruits through water and carbon f luxes controlled by ψ stem and Cp. According to the validation against measurements from real tomato plants, the integrative model accurately simulates tomato growth and fruit sugar concentrations.
Simulation results from the integrative model suggest that climate change over the next century would produce an overall increase in tomato growth if current water and N management was continued, which is consistent with some previous findings [5,[57][58][59]. However, under this scenario, no positive effects on fruit sugar concentrations are predicted. When CO 2 increases from 413.38 μmol mol −1 to 538.36 μmol mol −1 and T a increases from 7.41 • C to 8.83 • C, the simulated FW increases by 33.2%, which is consistent with a range of 19.65% to 43% increment of FW founded in similar combined CO 2 × T a controlled experiments [60,61]. Increases in CO 2 and T a would increase the leaf photosynthetic rate significantly ( Fig. S3B and C, see online supplementary material), providing more energy and materials for tomato growth [1][2][3]. However, future downward trends in stomatal conductance and plant transpiration accumulation (Fig. S3D, see online supplementary material), caused by the increasing CO 2 and T a ( Fig. S3E and F, see online supplementary material), indicate that stomatal and non-stomatal controls would coordinately maximise leaf photosynthesis [62] and save more water from transpiration. FruitW net values higher than FruitC net values (Fig. S3G, see online supplementary material) indicate that SSc would tend to decrease slightly in the future (Fig. 3E), which may be due to the fruit accumulating more water. No significant difference or a slight decrease of tomato fruit soluble sugar concentration were also found in the tomato fruit grown under controlled condition of CO 2 × T a [60,61].
It should be noted that other simulation results show a decrease in crop growth under future climate change ( [63]). These obvious growth reductions are partly attributed to the extreme RCP scenarios studied and to worse agronomic conditions, such as less irrigation. In [5] the impact of climate change on grape growth and quality and planting area was reviewed, highlighting the complexity of future predictions, which may be specific to the local environmental conditions, the type of crop and the crop model used [6]. Although current simulation studies focus mainly on future crop yield, evidence of the negative effects of future climate change on fruit quality can be found in a few studies [63,64]. Agronomic strategies will become a key factor for the future sustainability of crop production [8,63]. With our integrative model, several candidate strategies for soil water and nitrogen levels were identified that represent a good compromise between tomato growth and fruit quality. Reducing N and water supply would affect mature FW and SSc in the future. When the amount of N applied is at a relatively high level, inadequate water input induces an imbalance between plant N and water relations [65], limiting physiological processes such as transpiration and growth [66]. As we found (Fig. 4A), the consequence is that part of the percentage increase in FW is offset with lowers SSc under future climates. When the N is reduced to moderate levels, a mild decrease in water supply likely promotes sugar transport mechanisms and sugar accumulation in berries when carbon assimilation by leaves is slower [14,43]. As the intensity of water deficit gradually increases, the corresponding increase in SSc (Fig. 4A) could be due to dehydration because less water accumulates in the fruit [25]. Nevertheless, some positive trends in FW and SSc are found in some of our scenarios. According to our model, severe N and water deficits cannot support a continued increase in tomato FW and SSc in the future, as plant growth and sugar accumulation in fruits would be limited under such conditions [65]. It should be noted that the response of stomata and growing leaves to soil N content decreasing from supra-optimal to sufficient to deficient could be biphasic, as a previous study [67] and the coupled N-CO 2 -Jarvis model shows [35]. Therefore, in some cases, increases in FW under particular N and water management scenarios in the future could be slightly higher than those observed under the probably sub-optimal N2Wck condition. In the context of future climate change, limiting the increase in the FW of mature fruit might significantly improve SSc. For example, by reducing N and water supply by 20% in the future, the SSc of mature tomato fruits may increase by 10.2% compared to SSc values for fruit grown in 2021 conditions and a 27.8% increase in FW can be expected by 2100. Previous studies indicate that the amount of irrigation needed for tomato in the future can be reduced by 5%-40% without a significant loss in yield [9,63]. Our results show that this trade-off between tomato FW and soluble sugar concentration could be regulated by N and water input management in the future.
Overall, the TGFS model proved its ability to simulate plant growth and the fruit sugar metabolism of tomato grown in a changing environment, associated with the climate change or with varying agronomical practices. However, the model was greatly simplified as the tomato canopy and fruit were merely assumed to be a 'big leaf' and a 'big truss', respectively. Connecting our TGFS model with a dynamic structural model may be helpful for characterising the development of the tomato canopy structure under different conditions and any subsequent effects on carbon assimilation, growth, and fruit sugar metabolism. This would give a more nuanced picture of tomato growth.
In addition, the current version of the TGFS model has some shortcomings that suggest useful ideas for model improvement, mainly including the following: (i) the Jarvis-type of stomatal conductance models didn't consider the interactive effects of external factors on stomatal conductance, which could lead to inaccuracy in simulating the photosynthesis and transpiration; (ii) water and nitrogen stress could affect sink activity and the priority of plant carbon allocation; for example, sever water/nitrogen stress may affect f lowering, fruit set, and lead to a preferential carbon allocation to the root, and the current TGFS model does not account for these responses; and (iii) further studies of photosynthetic biochemical reactions can enrich plant carbon f lux modelling, as the non-structural carbon accumulated in the leaf may have a feedback effect on photosynthesis.
In summary, the whole tomato plant model TGFS we developed in this study considers the impact of nitrogen and CO 2 on interactions between the plant, the fruit, management and the environment, performed well by closely simulating the tomato leaf, stem, root, and fruit growth, as well as fruit soluble sugar and starch concentrations with different irrigation and nitrogen input values. Climate change is predicted to generally have positive effects on tomato growth but not on soluble sugar concentration in the fruit. However, reducing nitrogen input by 15%-25% and irrigation input by 10%-20% from today's baseline may produce bigger and sweeter tomatoes in the future.

Model integration
We developed an integrative model of tomato plant and fruit growth and fruit sugar metabolism, named TGFS (Fig. 1). The tomato model is based on an explicit description of plant-fruit f luxes of water and carbon that takes into account biological responses to environmental factors and agronomic practices during the post-f lowering stages of tomato. In this model, the wholeplant is conceptually divided into four compartments: leaf, stem, root, and fruit. The tomato canopy was assumed to act like a 'big leaf', carrying out transpiration and photosynthesis. Fruits were assumed to grow on a 'big truss', growing homogeneously. , climate data (R s , total solar radiation; VPD, difference in water vapor pressure of air; T a , air temperature; RH, relative humidity of air; CO 2 , atmospheric CO 2 concentration) and agronomic practice (θ, soil water content of the root zone; N, soil nitrogen content of the root zone). The tomato canopy is assumed to be a 'big leaf' whose exchange of gaseous water and CO 2 are determined by stomatal conductance (g sNCO2 ), which thus integrates the environmental data. Information on g sNCO2 feeds into the plant water module (blue dashed outline), and the plant carbon module (green dashed outline). It is assumed that the amount of carbon loaded to phloem from the leaf equals the amount of carbon unloaded to the stem, root, and fruit from phloem, and the carbon unloading rates for these organs depend on the sucrose concentration in phloem sap (Cp) and their respective sink activity. In the fruit module (orange dashed outline), water enters the fruit from phloem/xylem, driven by the water potential gradient between the stem and the fruit. Thus, the fruit module is coupled with the plant water and carbon modules by water potential gradient and Cp. Model outputs are fresh and dry weight of organs and the concentrations of soluble sugar and starch in fruit.
The TGFS model integrates a plant water module, a plant carbon module and a fruit module (Fig. 1). For the water resource, water f luxes are driven by gradients in water potential. Water enters the plant from the soil by root absorption and dissipates into the atmosphere mainly through leaf transpiration. The f lux of water to the fruit is driven by the difference in water potential between the stem and the fruit. In the plant carbon module, the Farquhar model is used to calculate the carbon assimilation by the canopy [33]. The improved N-CO 2 -Jarvis stomatal conductance model [34,35] was on the one hand used to control the leaf transpiration, and on the other hand it was coupled to the Farquhar model to ref lect the effects of weather factors, soil water and N content, and atmospheric CO 2 concentrations on leaf carbohydrate production. Carbohydrates synthesised in the leaf are loaded into the phloem as sucrose, then allocated to the stem, root and fruit. In the fruit module, the water and carbon f luxes to the fruit are related to the stem water potential (ψ stem ) and concentration of sucrose in the phloem solution (Cp), thus linking plant and fruit growth. Tomato fruit growth was simulated with the fruit growth model [22] and tomato sugar metabolism was modelled with the fruit sugar model TOM-SUGAR [25]. The details of each module are presented in more detail in the following sections.

The N-CO 2 -Jarvis stomatal conductance model
The canopy, essentially a "'big leaf', is the main site of CO 2 and water vapour exchange, which are both governed by stomatal conductance [36,37]. Therefore, stomatal conductance was considered as a breakthrough point to ref lect the effects of meteorological factors, soil water, soil N, and CO 2 concentration on gas exchange. Here, stomatal conductance was simulated using the N-CO 2 -Jarvis model adapted from [34,35].
In this expression, g smax is the maximum leaf stomatal conductance (mol H 2 O m −2 s −1 ); g sNCO2 is the actual stomatal conductance after considering the effects of net solar radiation intercepted by the canopy (R n , MJ m −2 h −1 ), air temperature (T a , • C), VPD (VPD, kPa), soil water content (θ, cm 3 cm −3 ), soil mineral N content (N, mg kg −1 ), and atmospheric CO 2 concentration (CO 2 , μmol mol −1 ). The reduction functions of the N-CO 2 -Jarvis stomatal conductance model are presented in Method S1 (see online supplementary material). Model variables are summarised in Table S1 (see online supplementary material) and the details of model parameters are shown in Table S2 (see online supplementary material).

Plant water module
The leaf transpiration rate (Tr, g h −1 ) was calculated based on g sNCO2 and related to VPD and leaf area (LA) [38] as follows: Tr is assumed to be equal to the rate of water absorption by the roots, driven by the water potential gradient between the soil and stem. Soil water potential (ψ soil , MPa) was estimated from the soil water content (hourly dynamics given as model input) according to a characteristic soil moisture curve. Thus, the stem water potential (ψ stem , MPa) was obtained as follows, where Rp was the hydraulic resistance from the soil to the tomato stem (MPa h g −1 ). Rp was estimated from sap-f low measurements ψ stem and ψ soil by [39] as presented in Fig. S4 (see online supplementary material).

Plant carbon module
To simulate the leaf photosynthesis (Pn), g sNCO2 was coupled with the Farquhar model [33,40]. Negative linear relationships between plant age and the Farquhar parameters Vcmax and Jmax were detected over the simulation period and included in the modelling (Fig. S5, see online supplementary material). The carbon in the leaf compartment (C t , g C) is composed of the structural carbon (C str , g C) and non-structural carbon (C ns , g C). The change in the C str pool is dependent on its size and on the availability of non-structural carbon [41], so the size of this carbon sink was calculated according to: dC str dt = C str × K ml × C ns C ns + C str (5) where K ml is the maximal relative accumulation of structural carbon mass in the leaf (h −1 ). The amount of the non-structural carbon pool in the leaf (C ns ) is determined by the overall carbon balance between leaf photosynthesis, carbon loaded into the phloem, consumption due to respiration, and structural growth. Thus, the change in C ns was described as: where Loadingleaf is the loading rate of carbon into phloem and Mrespleaf is the leaf respiration rate (g C h − 1). LA is calculated from Cstr and the specific leaf area of structural carbon (SLAs ,  Table S2, see online supplementary material).
The carbon consumed by leaf respiration (Mrespleaf , g C h − 1) includes maintenance respiration and growth respiration, 10 (Ta−20)/10 + q gleaf dC str dt (8) where DW leaf is the leaf dry weight (g), and Q 10 is a temperature sensitivity coefficient for maintenance respiration, while q mleaf and q gleaf are the coefficients for leaf maintenance and growth respiration, respectively (Table S2, see online supplementary material). The carbon loading rate into the phloem is related to the carbon loading capacity of the leaf itself and of the leaf non-structural carbon content [42,43]. Here we used the following equation to describe the carbon loading rate: where V maxleaf is the maximum leaf carbon loading rate per unit LA and K mleaf was the Michaelis-Menten constant for leaf carbon loading [28] (Table S2, see online supplementary material). The leaf dry weight can be calculated as: where c leaf is the carbon amount in 1 g of leaf dry mass, which has the value of 0.36 g C (g DW) −1 for tomato leaves [44]. Carbon loaded from the leaf to the phloem is then allocated to the stem, root, or fruit. Carbon unloaded from the phloem by the stem and root is used for growth and respiration. The rates of carbon unloaded by the stem and root (Uptake stem and Uptake root ) are related to the sink size (carbon content of stem C stem and carbon content of root C root , both in g C), sucrose concentration in the phloem solution (Cp), and plant developmental stage. Carbon uptake by the stem and root are expressed as: where the subscript x indicates variables related to either the stem or the root; K p is the maximum rate coefficient of stem or root growth; A p is the attenuation coefficient of the stem or root growth rate; and B p is the time coefficient of stem or root growth rate attenuation, detailed in Table S2 (see online supplementary  material). Changes in carbon amounts in the stem or root during plant growth can be expressed as follows: The dry weight of the stem or root (DW x ) can be calculated from the total amount of carbon in the organ and the amount of carbon in 1 g of the respective dry mass (c x , g C (g DW) −1 ; Table S2, see  online supplementary material).

Fruit module
The tomato fruit is mainly a carbon sink. Carbon allocated to fruit is used for fruit growth and respiration while soluble sugars and starches accumulate (Fig. 1). Thus, the tomato fruit growth model [22] and the fruit sugar model (TOM-SUGAR) [25] were coupled in the integrative TGFS model to simulate the dry weight (DW) and fresh weight (FW) of individual fruit and the concentrations of soluble sugar and starch they contain. The plant water and carbon modules simulate the fruit module inputs, which are stem water potential (ψ stem ) and sucrose concentration in the phloem solution (Cp). The carbon absorbed by the fruit can be described as follows: where U s is the rate of sucrose input from the phloem to the fruit (g h −1 ), whether by active transport, mass f low or passive diffusion (detailed in Method S2 (see online supplementary material) and [17,22]). Fn is the number of fruits on one plant. Details of how the fruit growth model is coupled to the TOM-SUGAR model are presented in Methods S2 (see online supplementary material). The parameters used in the fruit module are summarised in Table S3 (see online supplementary material). The amount of carbon loaded from the leaf was assumed to be equal to the amount of carbon unloaded by the stem, root, and fruit.
Loading leaf = Uptake stem + Uptake root + Uptake fruit (16) The sucrose concentration in phloem sap, Cp, can be obtained at the whole plant level by solving the combination of equations 5-16.

Experimental conditions
Experimental data were used to calibrate and validate the models. The data were collected from experiments where indeterminate tomato plants (Lycopersicon esculentum, cv. Jinpeng 11) were grown in pots seasonally provided with different amounts of water and N in the summer of 2015 (Experiment A), the summer of 2016 (Experiment B) and the winter of 2016-2017 (Experiment C). Experiments included low, moderate, and high N application under full irrigation (N1Wck, N2Wck, and N3Wck) and moderate N application with whole-season irrigation deficit (N2DI). Five trusses of pot-grown tomato were kept after transplantation. Plant age was expressed as days after anthesis (DAA). During the experiment, meteorological factors, soil water content, soil mineral N content, and plant variables such as leaf area, organ dry mass, leaf gas exchange, and plant transpiration were measured. Experimental design and measurements are detailed in Method S3 (see online supplementary material). Flowers on the second and third trusses were marked with their pollination date. Samples or measurements were taken from fruits marked with similar pollination dates, assuming these fruits were of the same age and constituted the 'big truss' compartment. Quality traits such as fresh and dry weight of fruit and their soluble sugar and starch contents were measured from 10 days after anthesis at intervals of 5-10 days.

Model input and initial conditions
The integrative model is driven by meteorological factors, including solar radiation (R s ), air temperature (T a ), relative humidity (RH), atmospheric CO 2 concentration (CO 2 ), and factors related to agronomic practices including soil water content (θ ) and soil mineral nitrogen content (N). To initialise the model, the dry weight of the leaf, stem, and root, the structural and non-structural carbon fractions in the leaf, individual fruit FW, DW, and total soluble sugar and starch concentrations in fruit are required as starting values for the simulation.

Model calibration and validation
The Farquhar and N-CO 2 -Jarvis models were calibrated using a dataset of meteorological factors, soil water, soil N content, leaf area, and leaf stomatal conductance obtained in Experiment C. The N-CO 2 -Jarvis model parameters were estimated with the optim function in R using the Nelder-Mead method. Farquhar model parameters Jmax and Vcmax were fitted by the fitacis function in the 'plantecophys' R package with measured A-Ci curves (photosynthesis rate at varying CO 2 concentrations) obtained from Experiment B using the bilinear method. The photosynthesis rate was calculated using the Photosyn function in the 'plantecophys' R package.
The parameters of the plant and fruit carbon modules were calibrated at the whole-plant scale, including parameters of plant growth (K ps , A ps , K pr , A pr ), fruit growth (v m , t * , τ , axp, k phi , τ s ), and fruit sugar metabolism (λ, n, k 5 , k 5m0 , u 5m , τ 5m ) using the data related to meteorological factors, soil water, soil N content, organ dry weight, and fruit sugar concentrations from N2Wck in Experiment A.
Datasets from N3Wck in Experiment A and N1Wck and N2DI in Experiment C were reserved for validation of the integrative TGFS model. A genetic algorithm was applied to search for the best parameter combination that minimised the objective criterion in Eqn. 17 [45] implemented with the ga function in the R package 'GA' [46].
y oDWl , y oDWs , y oDWr , y oDWf , y oFWf , y osol , and y osta are the experimentally observed values for leaf dry weight, stem dry weight, root dry weight, fruit dry weight, fruit fresh weight, fruit soluble sugar content, and fruit starch content, respectively. y sDWl , y sDWs , y sDWr , y sDWf , y sFWf , y ssol , and y ssta are their respective simulation values. var oDWl , var oDWs , var oDWr , var oDWf , var oFWf , var osol , and var osta are the variances of the observed values.
To solve the integrative model, the ode solver in the R package 'deSolve' [47] was applied for the numerical computation. The mean absolute error (MAE) and relative root mean squared errors (RRMSE) of plant growth and fruit sugar concentrations were calculated to evaluate the goodness of fit of the model using Eqn. 18 and 19 respectively [48]. All data analyses, parameter estimation, and model solving were performed using R software [49].

Future climate conditions and scenario simulations
To predict how plant growth and fruit quality might respond to future climate changes, we implemented the integrative TGFS model to take future climate change into account. Possible future climate situations were obtained using a statistical downscaling method on a CNRM-CM5 climate model [50,51]. Simulated future data is downscaled based on the observed data of the Shiyang River Basin meteorological station where our experiments were conducted. The predicted future climate data is in an RCP4.5 medium emission scenario [52], the most likely and representative future scenario [53,54], with CO 2 concentration at 550 ppm by 2100. Temperature data was interpolated from a day scale to an hour scale based on sinusoidal function and the occurrence time of the maximum and minimum temperature is set as 1 p.m. and 1 a.m. The future air temperatures and CO 2 concentrations are shown in Fig. S6 (see online supplementary material). Simulations were run with the integrative model using settings to ref lect future climate and to explore the possible effects of irrigation and nitrogen application on tomato growth and fruit sugars in those conditions. Given previous results [39], N2Wck was set as the reference condition for N and water application. Thus, in the sustainability scenarios, the amounts of N and water input were decreased from 100% to 60% of N2Wck levels at 5% intervals, thus giving nine levels for each variable and a total of 81 scenarios. The N and water input in these scenarios are N2Wck values multiplied by coefficients corresponding to the N and water levels. simulation results; H.Z. wrote the draft and all authors contributed to revising the paper.

Data availability
The data that supports the findings were available in the paper and the Supplementary Materials published online.

Conflicts of interest statement
The authors declare that they have no competing interests for this research.