Supporting Information Notes S1 Code transcript for System Dynamics model of CAM 1. Dynamic input variables (01) "<NORMALISED PAR INPUT>": = GET XLS DATA ('Circadian inputs.xlsx', 'Circ', 'b', 'd4') Units: Dmnl Comment: Idealised curve imported from excel. (02) "<TEMPERATURE INPUT NORMALISED>": = GET XLS DATA ('Circadian inputs.xlsx', 'Circ', 'b', 'c4') Units: Dmnl Comment: Idealised sinusoidal curve imported from excel. (03) <fp> PEPC activation state = INTEG (PEPC activation - PEPC deactivation, 0.2) Units: Dmnl Comment: Input was modelled from measured activation state (see txt). (03a) PEPC activation = PEPC activation rate * Trigger variable Units: 1/Second Comment: Input was modelled from measured activation state (see txt). (03b) PEPC activation rate = 2.6e-05 Units: 1/Second Comment: Input was modelled from measured activation state (see txt). (03c) PEPC deactivation = IF THEN ELSE (Time > "SWITCH A: PEPC off time", <fp> PEPC activation state * PEPC deactivation rate * (1 - (Kid PEPC deactivated Dmnl / <fp> PEPC activation state)), 0) Units: 1/Second Comment: Input was modelled from measured activation state (see txt). (03d) PEPC deactivation rate = 0.0008 Units: 1/Second Comment: Input was modelled from measured activation state (see txt). (03e) Trigger variable = IF THEN ELSE(Time < "SWITCH A: PEPC off time", IF THEN ELSE (<fp> PEPC activation state fp >= 1, 0, 1), 0) Units: Dmnl (04) <fc> Rubisco activation state = INTEG (Rubisco rate on-Rubisco rate off, 0) Units: Dmnl Comment: Input was modelled from measured activation state (see txt). (04a) Rubisco rate = IF THEN ELSE(<fc > Rubisco activation state < 0.35, 0.0008, 2.5e05) Units: 1/Second Comment: Input was modelled from measured activation state (see txt). (04b) Rubisco rate off = IF THEN ELSE (Time > Rubisco time switch off, 1/(86400(Rubisco time switch off)),0) Units: 1/Second Comment: Input was modelled from measured activation state (see txt). (04c) Rubisco rate on = IF THEN ELSE (PAR lookup switch > "SWITCH B: Rubisco on PAR", Rubisco rate, 0) * trigger Units: 1/Second Comment: Input was modelled from measured activation state (see txt). (04d) Rubisco time switch off = 75000 Units: Second Comment: Input was modelled from measured activation state (see txt). (04e) trigger = IF THEN ELSE (Time < Rubisco time switch off, IF THEN ELSE( <fc> Rubisco activation state >= 1, 0, 1), 0) Units: Dmnl Comment: Input was modelled from measured activation state (see txt). 2. Input constants (05) Acc INITIAL CONDITION = 34.73 Units: umol/m2 Comment: recalibrate after changing inputs, re-run simulation. (06) Aci INITIAL CONDITION =11498 Units: umol/m2 Comment: recalibrate after changing inputs, re-run simulation. (07) Asymptote1 = 100 Units: umol/m2 Comment: For Amv to approach 0 the model requires an arbitrarily small number so as not to return error, hence 100 umol m-2 (08) Asymptote2 = 10000 Units: umol/m2 Comment: Total malic acid levels approach this value at the end of Phase 4. Input determind from titratable acidity measurements. (09) Cca pp CO2 ATMOSPHERE = 400 Units: ubar Comment: Partial pressure of CO2 in atmosphere, 400 ubar = 400 ppm = 40.53 Pa (10) Conversion 1 = 0.025 Units: ubar*m2/umol Comment: Conversion factor required to adjust for error arising from numerical integration methodology. (11) Cwa pp H2O atmosphere = 13340 Units: ubar Comment: Assumes constant atmospheric pressure 13,340 ubar = approx.. 10 g/m3 (12) GLUCAN BUFFER 1Cs = 30000 Units: umol/m2 Comment: Reserve glucan/starch in 1Cs, approx. equal to 10000 G3Ps (13) gm MESOPHYLL CONDUCTANCE = 0.053 Units: umol/m2/Second/ubar (14) gsmax STOMATAL CONDUCTANCE = 0.06 Units: umol/m2/Second/ubar (15) Henrys law constant for CO2 solubility in water = 0.03445 Units: uM/ubar Comment: Henry's Law: concentration = solubility * partial pressure Henry's Law constant for CO2 solubility in water, s = 0.034 M Atm-1 = 0.03445 uM ubar1 (16) Kc KCO2 RUBISCO = 10.8 Units: uM. (17) Kia activated K for malic acid inhibition of PEPC = 8000 Units: uM (18) Kid PEPC deactivated Dmnl = 0.05 Units: Dmnl Comment: Kid is given as a fraction of Kia in dimensionless units (Dmnl) (19) Kp KCO2 PEPC = 12 Units: uM (20) Malic acid efflux = 40 Units: umol/(m2*Second) Comment: Rapid efflux of 40 umol m-2 s-1 such that not rate limiting to decarboxylase activity (21) MAXIMUM PAR = 2000 Units: umol/m2/Second (22) SUCCULENCE = 3.4 Units: umol/m2/uM Comment: Succulence, assume mass is water so kg/m2 = L/m2 uM = umol/L, therefore conversion from umol/m2 leaf area to uM concentration is = 1/ succulence (23) Tmax TEMPERATURE MAX = 30 Units: deg C (24) Tmin TEMPERATURE MIN = 15 Units: deg C (25) Vcmax VMAX RUBISCO = 19 Units: umol/m2/Second (26) Vdmax MAX DECARBOXYLATION RATE = 9 Units: umol/m2/Second Comment: Estimated from the maximum gradient of ‘de-acidification’ during PII and PIII. (27) Vm MITOCHONDRIAL RESPIRATION RATE = 0.6 Units: umol/m2/Second (28) Vpmax VMAX PEPC = 23 Units: umol/m2/Second (29) Xvmax MAX C4 and VACUOLE CAPACITY = 150000 Units: umol/m2 Comment: Estimated from maximum measured titratable acidity. 3. Switch Inputs (30) SWITCH A: PEPC off time = 43200 Units: Second (31) SWITCH B: Rubisco on PAR = 300 Units: umol/m2/Second (32) SWITCH C tonoplast decarboxylation PAR = 1000 Units: umol/m2/Second 4. Flow variables (33) Je rate carbohydrate exported = IF THEN ELSE (G3Ps in 1Cs Ac > (3 * Xvmax MAX C4 and VACUOLE CAPACITY) + Glucan buffer, (Vg Gluconeogenesis of PEP1 + Vc C3 carboxylase activity - Vm CO2 mitochondrial respiration - Vh Hydrolysis for PEP1), 0) Units: umol/(m2*Second) Comment: This expression allows the export of carbohydrate to occur only when reserves for the maintenance of CAM are met. All parameters are in 1Cs. (34) Jm Mesophyll CO2 flux = gm MESOPHYLL CONDUCTANCE * (Cci ppCO2 intercellular space - Ccc ppCO2 cytosol ubar) Units: umol/m2/Second (35) Jme tonoplast malic acid efflux = IF THEN ELSE (PAR lookup switch > SWITCH C tonoplast decarboxylation PAR, Malic acid efflux * (1 - (Asymptote1 / Amv Accumulation malic acid vacuole)),0) Units: umol/m2/Second (36) Jmi Tonoplast malic acid influx = IF THEN ELSE (PAR lookup switch < SWITCH C tonoplast decarboxylation PAR, Vp C4 carboxylase activity * (1 - (Amv Accumulation malic acid vacuole / (Xvmax MAX C4 and VACUOLE CAPACITY))), 0) Units: umol/m2/Second (37) Js Stomatal CO2 flux = gs CO2 Stomatal conductance * (Cca pp CO2 atmosphere Cci ppCO2 intercellular space) Units: umol/m2/Second (38) Jmt Rate total malic acid accumulation = Vp C4 carboxylase activity - Vd Decarboxylation rate Units: umol/m2/Second (39) Vc C3 carboxylase activity = (Vcmax VMAX RUBISCO * (Ccc concCO2 cytosol umol)) / (Kc KCO2 RUBISCO + (Ccc concCO2 cytosol umol)) * <fc> Rubisco activation state Units: umol/m2/Second Comment: Vc is the product of Michaelis-Menten enzyme kinetics and Rubisco activation state. (40) Vd Decarboxylation rate = IF THEN ELSE (PAR lookup switch > SWITCH C tonoplast decarboxylation PAR, Vdmax MAX DECARBOXYLATION RATE * (1(Asymptote2/Amc Accumulation malic acid cytosol)), 0) Units: umol/m2/Second (41) Vg Gluconeogenesis of PEP = IF THEN ELSE (Agc Accumulation glucan cytosol from pyruvate < Xvmax MAX C4 and VACUOLE CAPACITY + 1, Vd Decarboxylation rate, 0) Units: umol/(m2*Second) (42) Vg Gluconeogenesis of PEP1 = Vg Gluconeogenesis of PEP*3 Units: umol/(m2*Second) Comment: Multiplied by 3 to get PEP gluconeogenesis in 1Cs Malic acid --> pyruvate + CO2 (decarboxylated) CO2 + RuBP --> 2 G3P, or 3 CO2 + 3 RuBP --> 6 G3P, of which 5 are recycled as RuBP, leaving 1 net. G3P FOR PYRUVATE: pyruvate --> PEP in chloroplast - PEP in chloroplast transported to cytosol - PEP cytosol --> (gluconeogenesis) --> G6P - G6P transported to chloroplast for glucan synthesis. (43) Vh Hydrolysis for PEP = Vh Hydrolysis for PEP1/3 Units: umol/(m2*Second) (44) Vh Hydrolysis for PEP1 = IF THEN ELSE (Agc Accumulation glucan cytosol from pyruvate > 0, Vp C4 carboxylase activity * 3, 0) Units: umol/(m2*Second) Comment: Vp * 3 because 1 3C substrate PEP is require to fix 1 CO2 (45) Vm CO2 mitochondrial respiration = Vm MITOCHONDRIAL RESPIRATION RATE Units: umol/(m2*Second) (46) Vp C4 carboxylase activity = IF THEN ELSE (Agc Accumulation glucan cytosol from pyruvate > 0, (Vpmax VMAX PEPC * (Ccc concCO2 cytosol umol)) / ((Ccc concCO2 cytosol umol) + Kp KCO2 PEPC) * im malic acid inhibition of PEPC, 0) Units: umol/m2/Second Comment: If, then, else statement only allows C4 carboxylase activity when is sufficient carbohydrate for hydrolysis is available. Vp is a function of MichaelisMenten enzyme kinetics and malic acid induced inhibition of PEPC. 3. State variables (47) Acc Accumulation CO2 cytosol = INTEG (Jm Mesophyll CO2 flux + Vm CO2 mitochondrial respiration + Vd Decarboxylation rate - Vc C3 carboxylase activity - Vp C4 carboxylase activity, Acc INITIAL CONDITION) Units: umol/m2 (48) Aci Accumulation CO2 intercellular = INTEG (Js Stomatal CO2 flux - Jm Mesophyll CO2 flux, Aci INITIAL CONDITION) Units: umol/m2 Comment: This is a proxy due to limitations of numerical integration methodology over time-step of 1 second. Values generated should not be considered for analysis. (49) Ac G3Ps in 1Cs = INTEG (Vg Gluconeogenesis of PEP1 + Vc C3 carboxylase activity - Vm CO2 mitochondrial respiration - Je rate carbohydrate exported - Vh Hydrolysis for PEP1, (3*Xvmax MAX C4 and VACUOLE CAPACITY) + Glucan buffer) Units: umol/m2 Comment: The initial condition requires 3 x Xvmax for 1Cs + glucan in 1Cs. Note that ‘Vg Gluconeogenesis of PEP1 is also in 1Cs. (50) Ae Accumulation exported carbohydrate 3Cs = INTEG (Je rate carbohydrate exported/3, 0) Units: umol/m2 Comment: Je / 3 for carbohydrate in G3Ps, initial value = 0. (51) Agc Accumulation glucan cytosol from pyruvate = INTEG (Vg Gluconeogenesis of PEP - Vh Hydrolysis for PEP, Xvmax MAX C4 and VACUOLE CAPACITY) Units: umol/m2 (52) Am malate accumulation = INTEG ("v.p - D", Asymptote2) Units: umol/m2 (53) Amc Accumulation malic acid cytosol = INTEG (Vp C4 carboxylase activity + Jme tonoplast malic acid efflux - Jmi Tonoplast malic acid influx - Vd Decarboxylation rate, 10000) Units: umol/m2 Comment: initial value = 10,000 from measured titratable acidity level at beginning of PI (54) Amv Accumulation malic acid vacuole = INTEG (Jmi Tonoplast malic acid influxJme tonoplast malic acid efflux, 0) Units: umol/m2 Comment: initial value = 0 4. Ancilliary parameters (55) Actual PAR profile = MAXIMUM PAR*"<NORMALISED PAR INPUT>" Units: umol/m2/Second (56) Ccc concCO2 cytosol umol = Acc Accumulation CO2 cytosol/succulence Units: uM Comment: To estimate the molar concentration of CO2, chlorenchyma tissue is assumed aqueous. Succulence (kg/m2 leaf area) is therefore considered equivalent to (L/m2) (57) Ccc ppCO2 cytosol ubar = Ccc concCO2 cytosol umol/Henrys law constant for CO2 solubility in water Units: ubar Comment: Partial pressure = Concentration (umol/L) / Henrys Law solubility constant for CO2 in H2O (58) Cci ppCO2 intecellular space = Aci Accumulation CO2 intercellular * Conversion 1 Units: ubar Comment: Calculating Cci partial pressure required a conversion factor due to error arising from numerical integration methodology used by VenSim software. (59) "CHECK ci/ca"= Cci ppCO2 intecellular space / Cca pp CO2 atmosphere Units: Dmnl Comment: Included to validate output. (60) Cmc conc malic acid cytosol = Amc Accumulation malic acid cytosol/succulence Units: uM (61) Cwi Intercellular pp H2O = (6107.8 * EXP((17.2694 * T 24 hour temperature profile)/(T 24 hour temperature profile + 238.3))) Units: ubar Comment: Assumes the intercellular space remains saturated levels. (62) gs CO2 Stomatal conductance = (gsmax STOMATAL CONDUCTANCE * sa Stomatal aperture)+0.001 Units: umol/m2/Second/ubar Comment: The ‘+.001’ was required so simulaitons do not crash with a divide 0 (63) gsH2O Stomatal conductance = gs CO2 Stomatal conductance * 1.6 Units: umol/m2/Second/ubar Comment Assume molecular mass inversely proportional to conductance, conversion factor of 1.6 (Nobel 1988) (64) im malic acid inhibition of PEPC = 1 - (Cmc conc malic acid cytosol / (Ki PEPC inhibition malic acid + Cmc conc malic acid cytosol)) Units: Dmnl (65) Ki PEPC inhibition malic acid = Kia activated K for malic acid inhibition of PEPC * PEPC activation state fp Units: uM (66) sa Stomatal aperture = IF THEN ELSE (Cca pp CO2 atmosphere < Cci ppCO2 intecellular space, 0.001, SQRT ((1 -(Cci ppCO2 intecellular space / Cca pp CO2 atmosphere))^2) * (Cwa pp H2O atmosphere / Cwi Intercellular pp H2O)) Units: Dmnl Comment: If Cca < Cci this statement specifies minimum stomatal aperture of 0.001 Dmnl. Otherwise, sa is given by the gradient of ppCO2 in divided by gradient of ppH2O out. (67) T 24 hour temperature profile = (((Tmax TEMPERATURE MAX - Tmin TEMPERATURE MIN)) * " < TEMPERATURE INPUT NORMALISED>") + Tmin TEMPERATURE MIN Units: deg C