AME9.4standardFriSep04124906GMT2009node00101node00201node00601node00610node00701node01801node01806node01809truemiscanmod_v1anode00102node00204node00205node00206node00207node00208node00209node01317Inputs daily incident photosynthetically active radiation (PAR) (MJ/m2 ground) from data file and also sums it.truenonenonewhitenonephotosynthetically active radiation (PAR) INPUT0The data file is just a column (no comma at the end of each line) of daily PAR values in MJ/m2 ground with the first row holding a short descriptive heading. Each data point is one day apart starting on January 1st and ending on December 31st. The first value is for the first day after the start of the simulation and will be used by Simile as the time zero value to make calculations over the first day. The data are stored in a table (array). <worksheetref name="model" column="G" fromrow="24" torow="388" />trueReads incident daily photosynthetically active radiation (PAR) (MJ/m2 ground) from data file.2000input PAR file1Copy of data read from file but fed to this variable as the single value relevant for a given day in the simulation. <worksheetref name="model" column="G" fromrow="24" torow="388" > This variable also replaces column K in the spreadsheet which is a duplicate of column G. </worksheetref>trueDaily incident photosynthetically active radiation (PAR)(MJ/m2 ground)PARtruefn2input_PAR_file1input_PAR_file <worksheetref name="model" column="C" row="15" />trueSums PAR (MJ/m2 ground)PAR totaltruefn3010truecd1truefn4PAR1PARborder7node00202node00401node00406node01001node01101node01207node01312node01832Controls water's impact on the model. Inputs the daily rainfall and potential evaporation and uses them to estimate the potential soil moisture deficit (SMDp) which gives a measure of the water stress on the plants. The SMDp is then used to produce scaling factors used to affect the plants radiation use efficiency (RUE) and leaf area index (LAI) as needed.truenonenonewhitenonewater submodel0node00203node00304node00307node00308node00309node00310node00311node00413Reads rainfall data (mm) for each day from a data file and also sums the values.truenonenonewhitenonerainfall INPUT0Copy of data read from file but fed to this variable as the single value relevant for a given day in the simulation. <worksheetref name="model" column="H" fromrow="24" torow="388" > This variable also replaces columns P and U on the spreadsheet as these are copies of column H. </worksheetref>trueDaily rainfall (mm)rainfalltruefn1input_rainfall_file1input_rainfall_file <worksheetref name="model" column="M" row="15" />trueSums rainfall (mm)total rainfalltruefn3010truecd1truefn4rainfall1rainfallThe data file is just a column (no comma at the end of each line) of daily rainfalls in mm with the first row holding a short descriptive heading. Each data point is one day apart starting on January 1st and ending on December 31st. The first value is for the first day after the start of the simulation and will be used by Simile as the time zero value to make calculations over the first day. The data are stored in a table (array). <worksheetref name="model" column="H" fromrow="24" torow="388" />trueReads daily rainfalls (mm) from data file2000input rainfall file1border5node00402node00404node00405node00409node00411Inputs daily potential evaporation (PE) in mm/day from a data file.truenonenonewhitenonepotential evaporation (PE) INPUT0The data file is just a column (no comma at the end of each line) of daily potential evaporation (PE) in mm calculated using the Penman-Monteith formula. The first row in the file holds a short descriptive heading. Each data point is one day apart starting on January 1st and ending on December 31st. The first value is for the first day after the start of the simulation and will be used by Simile as the time zero value to make calculations over the first day. The data are stored in a table (array). <worksheetref name="model" column="O" fromrow="24" torow="388" />trueInput daily potential evaporation (PE) in mm from file200-200input PE file1Copy of data read from file but fed to this variable as the single value relevant for a given day in the simulation. <worksheetref name="model" column="O" fromrow="24" torow="388" />trueDaily potential evaporation (PE) in mm.PEtruefn2input_PE_file1input_PE_fileborder1border3node00407node00408node00410node00412node00501node00502node00503node00504node01013node01901node02002Calculates the potential soil moisture deficit (SMDp). On each day the difference between the rainfall and the evaporation (given by the Penman-Monteith equation) gives the net loss of water from the soil. Summing these values over time gives the (potential) soil moisture deficit (SMDp in mm of water). Note that rainfalls exceeding evaporation can cancel the deficit and that the evaporation is always supplied in full rather than being constrained by other factors (hence the use of "potential").truenonenonewhitenonepotential soil moisture deficit (SMDp)0If the day's rainfall (mm) is less than the potential evaporation (mm, from Penman-Monteith equation) then there is a net loss of water from the soil which is the days contribution to the potential soil mositure deficit (SMDp, in mm). <worksheetref name="model" column="Q" fromrow="24" torow="388" />trueCalculate day's potential soil moisture deficit (mm)daily deficittruefn3if (rainfall - PE) > 0 then 0 else rainfall - PE10gtrainfallPE0rainfallPEborder2border4Note that SMDp is assumed to be zero at time zero. Note that if day's rain cancels or exceeds the SMDp then the SMDp is set to zero. <worksheetref name="model" column="R" fromrow="24" torow="388" />trueTotal potential soil moisture deficit (SMDp) in mmSMDptruefn1010truecd1truefn2if time() < 1 then 0 elseif daily_deficit < 0 then rainfall elseif (SMDp + rainfall) < 0 then rainfall else -1 * SMDp10lttime11rainfallltdaily_deficit0rainfallltSMDprainfall01SMDpborder2truecd101truefn101if time() < 1 then 0 elseif daily_deficit < 0 then PE elseif (SMDp + rainfall) < 0 then 0 else 010lttime11PEltdaily_deficit00ltSMDprainfall00node01002node01003node01004node01005node01006node01007node01008node01009node01010node01011node01012node01111node01313Calculates a scaling factor (0 to 1 inclusive) that down regulates the calculation of yield using the radiation use efficiency (RUE) depending on the potential soil moisture deficit (SMDp), i.e. the degree of water stress the plants are under. See the variable "RUE down reg" for a full description.truenonenonewhitenoneregulation of radiation use efficiency (RUE)0This is the Smax value (the soil moisture holding capacity). It is given as a positive value if known or set to -9999 to show that it is unknown. <worksheetref name="model" column="I" row="2" />trueThe SMDp used as the RUE stop point.soil typetruefn11621162 <worksheetref name="model" column="I" row="6" />truePotential soil moisture deficit (SMDp) (in mm) when radiation use efficiency (RUE) scaling factor becomes zeroRUE stoptruefn2if soil_type == -9999 then 0 else -1*soil_type10eqsoil_type99991soil_typeThis down regulation point is set as a percentage of the stop value based on the value of "percent SMC RUE slow" term. <worksheetref name="model" column="H" row="6" />truePotential soil moisture deficit (SMDp) (in mm) when the radiation use efficiency (RUE) scaling factor starts to decrease below 1.RUE SMD down regtruefn3RUE_stop * (percent_SM_content__RUE_slow / 100)1RUE_stoppercent_SM_content__RUE_slow100 <worksheetref name="model" column="L" row="11" />truePercentage total soil moisture content (SMC) at which radiation use effieciency (RUE) starts to slow.percent SM content RUE slowtruefn475175This calculation uses a graph with two break-points. The y-axis is the scaling factor (0 to 1 inclusive) and the x-axis is the potential soil moisture deficit (SMDp, in mm. The more negative the value the greater the stress on the plants). Between a SMDp of zero and the value set by "RUE SMD down reg" the RUE is unaffected and the scaling factor is 1. Between this point and the value of SMDp set in "RUE stop" the scaling factor falls linearly to zero as the SMDp becomes more negative (i.e. as the water stress increases). Beyond the SMDp in "RUE stop" the scaling factor is zero. <worksheetref name="model" column="AC" fromrow="24" torow="388" />trueCalculates the scaling factor (0 to 1 inclusive) that down regulates the calculation of yield using the radiation use efficiency (RUE) depending on the potential soil moisture deficit (SMDp), i.e. the degree of water stress.RUE down regtruefn5a = abs(RUE_SMD__down_reg)/( abs(RUE_stop) - abs(RUE_SMD__down_reg) ), b = 1 /( abs(RUE_stop) + RUE_SMD__down_reg ), if (SMDp < RUE_stop) then 0 elseif (SMDp < RUE_SMD__down_reg) then 1 + a + b*SMDp else 11whereaabsRUE_SMD__down_regabsRUE_stopabsRUE_SMD__down_regb1absRUE_stopRUE_SMD__down_reg0ltSMDpRUE_stop1abSMDpltSMDpRUE_SMD__down_reg1border1border2border3node01102node01103node01104node01105node01106node01107node01108node01109node01110node01112node01208Calculates a scaling factor (0 to 1 inclusive) that down regulates the production of leaves depending on the potential soil moisture deficit (SMDp), i.e. the degree of water stress. Technically it is the leaf elongation rate (LER) that is reduced by water stress and this then effects the leaf area index (LAI)truenonenonewhitenoneregulation of leaf area index (LAI)0Set as 90% of the equivalent stop value for radiation use efficiency (RUE) (i.e. "RUE stop"). <worksheetref name="model" column="G" row="6" />truePotential soil moisture deficit (SMDp) (in mm) when leaf area index (LAI) scaling factor becomes zero.LAI stoptruefn1RUE_stop - (RUE_stop / 10)1RUE_stopRUE_stop10This down regulation point is set as a percentage of the stop value based on the value of "percent SMC LAI slow" term. <worksheetref name="model" column="F" row="6" />truePotential soil moisture deficit (SMDp) (in mm) when the leaf area index (LAI) scaling factor starts to decrease below 1.LAI SMD down regtruefn2LAI_stop * (percent_SM_content_LAI_slow / 100)1LAI_stoppercent_SM_content_LAI_slow100This calculation uses a graph with two break-points. The y-axis is the scaling factor (0 to 1 inclusive) and the x-axis is the potential soil moisture deficit (SMDp, in mm. The more negative the value the greater the stress on the plants). Between a SMDp of zero and the value set by "LAI SMD down reg" the calculations using the LAI are unaffected and the scaling factor is 1. Between this point and the value of SMDp set in "LAI stop" the scaling factor falls linearly to zero as the SMDp becomes more negative (i.e. as the water stress increases). Beyond the SMDp in "LAI stop" the scaling factor is zero. <worksheetref name="model" column="AB" fromrow="24" torow="388" />trueCalculates the scaling factor (0 to 1 inclusive) that down regulates the calculation of leaf area index (LAI) (via a reduced LER) depending on the potential soil moisture deficit (SMDp), i.e. the degree of water stress.LER down regtruefn3a = abs(LAI_SMD__down_reg) / (abs(LAI_stop) - abs(LAI_SMD__down_reg)), b = 1 / (abs(LAI_stop) + LAI_SMD__down_reg), if (SMDp < LAI_stop) then 0 elseif (SMDp < LAI_SMD__down_reg) then 1 + a + b*SMDp else 11whereaabsLAI_SMD__down_regabsLAI_stopabsLAI_SMD__down_regb1absLAI_stopLAI_SMD__down_reg0ltSMDpLAI_stop1abSMDpltSMDpLAI_SMD__down_reg1 <worksheetref name="model" column="K" row="11" />truePercentage total soil moisture content (SMC) at which leaf area index (LAI) starts to slow.percent SM content LAI slowtruefn450150border1border3border5border4border2border7node00002node00602node00603node00604node00605node00606node00607node00608node00617node00619Inputs daily mean temperatures (oC) from a file and estimates min and max values.truenonenonewhitenonetemperature INPUT0border2Copy of data read from file but fed to this variable as the single value relevant for a given day in the simulation. <worksheetref name="model" column="F" fromrow="24" torow="388" />trueMean daily temperature (oC)mean temperaturetruefn1input_temperature_file1input_temperature_file <worksheetref name="model" column="J" fromrow="24" torow="388" />trueMinimum daily temperature (oC)min temptruefn2mean_temperature-(mean_temperature*0.2)1mean_temperaturemean_temperature0.2 <worksheetref name="model" column="I" fromrow="24" torow="388" />trueMaximum daily temperature (oC)max temptruefn3mean_temperature+(mean_temperature*0.2)1mean_temperaturemean_temperature0.2The data file is just a column (no comma at the end of each line) of mean daily temperatures in oC with the first row holding a short descriptive heading. Each data point is one day apart starting on January 1st and ending on December 31st. The first value is for the first day after the start of the simulation and will be used by Simile as the time zero value to make calculations over the first day. The data are stored in a table (array). <worksheetref name="model" column="F" fromrow="24" torow="388" />trueReads mean daily temperatures (oC) from data file.80-50input temperature file1border17border19node00001node00104node00105node00106node00107node00611node00612node00613node00614node00615node00616node00618node01205node01605node01711The development of the canopy (LAI) and when anthesis occurs is based on accumulated degree days (in oC days, which acts as a physiological time) within the temperature and photoperiod controlled part of the growing season.truenonenonewhitenonedegree days (DD) physiological time0border1 <worksheetref name="model" column="G" row="15" />trueSums degree days above Tb (oC days)total DD above Tbtruefn2010truecd2truefn103normal_calc_DD1normal_calc_DD <worksheetref name="model" column="AG" fromrow="24" torow="388" />trueCalculates day's degree days above Tb contribution (in oC days).normal calc DDtruefn3if (max_temp < DD_Tb) then 0 elseif ((min_temp + max_temp)/2) < DD_Tb then (max_temp - DD_Tb)/4 elseif (min_temp < DD_Tb) then ((max_temp - DD_Tb)/2) - ((DD_Tb - min_temp)/4) else ((min_temp + max_temp)/2) - DD_Tb10ltmax_tempDD_Tbmax_tempDD_Tb4ltmin_tempmax_temp2DD_Tbmax_tempDD_Tb2DD_Tbmin_temp4ltmin_tempDD_Tbmin_tempmax_temp2DD_Tb <worksheetref name="model" column="C" row="6" />trueThreshold temperature (oC) for degree day calculationsDD Tbtruefn410110border15border16border18border2border1border4node00801node00818node00905node00907node01503node01504node01508node01701node01706node01707node01709node01808node02007Controls the plant's growing season (gs) based on temperature, photoperiod and time of anthesis. The photoperiod and temperature control of growing season ("photoperiod and temp control of gs") is switched on when temperature and photoperiod are both conducive to plant growth. Once this happens the plants can grow hence making contributions to the yield. At the same time oC days in this part of the growing season (the "temperature and photoperiod controlled growing season") are accumulated untill the value indicating anthesis has been reached. At this point the growing season is switched off (if temperature or photoperiod have not done this already).truenonenonewhitenonecontrol of growing season (gs)0node00802node00803node00806node00807node00808node00809node00812node00813node00814node00815node00816node00817node01506Given the latitude of the crop and the day of the year it is possible to calculate the photoperiod (daylight hours) for a given day. If this exceeds a threshold value then the day is conducive to plant growth, considering photoperiod on its own.truenonenonewhitenonephotoperiod control of growing season (gs)0 <worksheetref name="model" column="O" row="15" > This has been changed from the Excel version so that it now uses degrees rather than 100ths of a degree. </worksheetref>trueCrop's latitude (i.e. also latitude relevant for the radiation calculations) in degrees.radiation position latitudetruefn152.40152.4 <worksheetref name="model" column="AQ" fromrow="24" torow="388" > The formula has been changed from the Excel version so that if works directly with "radiation position latitude" which is now in degrees. </worksheetref>trueCalculate photoperiod (daylight hours) given latitude and declinationphotoperiodtruefn3a = -1 * tan( ( radiation_position__latitude*pi())/180 ), b = tan(declination), 24*( acos(a * b) / pi() )1wherea1tanradiation_position__latitude180btandeclination24acosabThis variable is a switch which is set to 0 if day allows growth and 1 if not. <worksheetref name="model" column="AR" fromrow="24" torow="388" />trueSpecifies the days of the year where the photoperiod (daylight hours), when taken alone, is conducive to growth.photoperiod control of gstruefn4if photoperiod > growth_control_start_stop then 0 else 1int0gtphotoperiodgrowth_control_start_stop1Angle between the line that joins the earth to the sun and the plane that passes through the earth's equator. <worksheetref name="model" column="AP" fromrow="24" torow="388" />trueCalculate solar declinationdeclinationtruefn60.1303*pi()* cos((2*pi()*(day_adjust + 10))/365)10.1303cos2day_adjust10365 <worksheetref name="model" column="N" row="6" />truePhotoperiod (daylight hours) threshold that allows growth when exceededgrowth control start stoptruefn7010 <worksheetref name="model" column="AO" fromrow="24" torow="388" />trueAdjusted day number needed for declination calculationsday adjusttruefn8a = time() + 183, if a > 365 then a - 365 else a1whereatime1183a365gta365aborder2node00301node00302node00303node00704node00901node00902node00903node00904node00906node00908node01501node01502node01505The temperature's control of the growing season is complicated by the need to eliminate the negative effects of frosts/cold days. Each day of the year is checked to see if it would potentially allow growth because its average temperature >= a minimum threshold temperature. On the basis of this the days that actually allow growth are a "large" group of consecutive days all of which would potentially allow growth and which are centred towards the middle of the year.truenonenonewhitenonetemperature control of growing season (gs)0trueDay number after the start of the simulation when the block of days that actually allows growth, based on temperature alone, begins (i.e. the first day in the block).gs start daytruefn201121int121trueDay number after the start of the simulation when the block of days that actually allows growth, based on temperature alone, ends (i.e. the final day in the block).gs end daytruefn202275int275 <worksheetref name="model" column="L" row="6" />trueAverage daily temperature threshold (oC) that potentially allows growth when equalled or exceeded.growing season thresholdtruefn110110 <worksheetref name="model" column="M" fromrow="24" torow="388" />trueSwitch set to 0 if day's average temperature potentially would allow plant growth and set to 1 if not.growing daystruefn2if ((max_temp + min_temp)/2) < growing_season_threshold then 1 else 0int1ltmax_tempmin_temp2growing_season_threshold0border2border4The days that actually allow plant growth based on temperature alone are a "large" block of consecutive days all of which would potentially allow growth and which are centred towards the middle of the year. The first day of this sequence is in "gs start day" and the last day in "gs end day". The use of a consecutive block of days allows the negative impact of frosts/cold days to be eliminated. This variable acts as a switch which is set to 0 if day's temperature allows growth and 1 if not. <worksheetref name="model" column="L" fromrow="24" torow="388" > This completely replaces the algorithm used in the Excel version. </worksheetref>trueSpecifys the days of the year when the temperature (taken alone) is actually (rather than potentially) conducive to plant growth.temperature control of gstruefn101today = time(), if (today >= gs_start_day) and (today <= gs_end_day) then 0 else 1intwheretodaytime10geqtodaygs_start_dayleqtodaygs_end_day1border1border1border3Switch set to 0 if day allows growth and 1 if not. <worksheetref name="model" column="AU" fromrow="24" torow="388" > Column AT on the spreadsheet is just a copy of column L and is replaced by it. </worksheetref>trueSwitch that defines the days where both the temperature and photoperiod are conducive to plant growth ("temperature and photoperiod controlled growing season").photoperiod and temp control of gstruefn102if (photoperiod__control_of_gs + temperature__control_of_gs) == 0 then 0 else 1int0eqphotoperiod__control_of_gstemperature__control_of_gs01border4node01201node01603node01604node01702node01703node01704node01705node01708node01710node01902node01903node01904node01905node01906node02008node02009Submodel that switches off plant growth (i.e. ends the growing season) once anthesis has been reached. The time to anthesis is measured in oC days accumulated in the temperature and photoperiod controlled growing season (gs).truenonenonewhitenoneanthesis control of growing season (gs)0Note that this value resets to zero if day is outside the temperature and photoperiod controlled growing season. <worksheetref name="model" column="AH" fromrow="24" torow="388" />trueAccumulated degree days (DD, in oC days) within the temperature and photoperiod controlled growing season (gs).accum DD in temp and photo gstruecd102truefn202if (photoperiod_and__temp_control_of_gs == 1) then accum_DD_in_temp__and_photo_gs else 01accum_DD_in_temp__and_photo_gseqphotoperiod_and__temp_control_of_gs10 <worksheetref name="model" column="M" row="6" />trueDegree days (in oC days) accumulated in the temperature and photoperiod controlled growing season that corresponds to max anthesis and therefore the end of the growing season.max anthesis DDtruefn11800int1800Switch set to 0 if day part of growing season and 1 if not. <worksheetref name="model" column="AS" fromrow="24" torow="388" />trueSwitch that specifies the end of the growing season because the plants have flowered.anthesis control of gstruefn2if accum_DD_in_temp__and_photo_gs > max_anthesis_DD then 1 else 0int1gtaccum_DD_in_temp__and_photo_gsmax_anthesis_DD0border1border3truefn101010truecd1truefn102if (photoperiod_and__temp_control_of_gs == 0) then normal_calc_DD else 01normal_calc_DDeqphotoperiod_and__temp_control_of_gs00Taking the maximum allows for the accumulated DD being reset to zero if days fall outside the photoperiod and temperature controlled growing season. <worksheetref name="model" column="H" row="15" />trueMaximum accumulated degree days (DD in oC days) in photoperiod and temperature controlled growing season (gs).accum gs DDtruefn103current_max = prev(1), if accum_DD_in_temp__and_photo_gs > current_max then accum_DD_in_temp__and_photo_gs else current_max1wherecurrent_maxprev1accum_DD_in_temp__and_photo_gsgtaccum_DD_in_temp__and_photo_gscurrent_maxcurrent_maxborder2border3If any of temperature, photoperiod or anthesis are outside the limits allowing growth then the growing season is terminated. This variable is a switch that is set to 0 if day part of growing season and 1 if not. <worksheetref name="model" column="AV" fromrow="24" torow="388" > Column AT on the spreadsheet is just a copy of column L and is replaced by it. </worksheetref>trueSwitch specifying the final growing season (gs) including controls exerted by temperature, photoperiod and anthesis.final growing seasontruefn3sum_of_control_switches = anthesis_control__of_gs + temperature__control_of_gs + photoperiod__control_of_gs, if sum_of_control_switches == 0 then 0 else 1intwheresum_of_control_switchesanthesis_control__of_gstemperature__control_of_gsphotoperiod__control_of_gs0eqsum_of_control_switches01border2border2border1node01202node01203node01209node01210node01211node01212node01213node01214node01301node01302node01405node01406node01601node01602node01802node01803node01804node01805The leaf area index (LAI) of the canopy is calculated directly from the degree days (DD) accumulated in the temperature and photoperiod controlled growing season. The degree days summed are in actual fact scaled down first by a factor that encapsulates the effects of water stress on the leaf elongation rate (LER). Note that the LAI in "convert LER DD to LAI" will reset to zero when the days are no longer in the temperature and photoperiod controlled growing season.truenonenonewhitenonecanopy development0 <worksheetref name="model" column="AD" fromrow="24" torow="388" />trueDay's degree days (DD, in oC days) scaled back by the effect of any water stress on leaf elongation rate (LER)LER effective daily DDtruefn1LER_down__reg * normal_calc_DD1LER_down__regnormal_calc_DDNote that the value resets to zero if the day is not in the photoperiod and temperature controlled growing season. <worksheetref name="model" column="AE" fromrow="24" torow="388" />trueSums the effective degree days (DD, in oC days) that are in the growing season as controlled by photoperiod and temperature.sum DD for LERtruefn2010truecd1truefn3if (photoperiod_and__temp_control_of_gs == 0) then LER_effective__daily_DD else 01LER_effective__daily_DDeqphotoperiod_and__temp_control_of_gs00Although leaf area index (LAI) is dimensionless it technically has units of m2 leaf area/m2 of ground. <worksheetref name="model" column="AF" fromrow="24" torow="388" />trueLeaf area index (LAI, dimensionless) calculated by direct conversion of the sum of the effective degree days (DD) in the temperature and photoperiod controlled growing season.convert LER DD to LAItruefn4DD_conversion_factor * sum_DD_for_LER1DD_conversion_factorsum_DD_for_LER <worksheetref name="model" column="D" row="6" />trueConversion factor (in /(oC day) or equivalently LAI/(oC day)) to convert effective degree days (DD) to leaf area index (LAI)DD conversion factortruefn1010.010210.0102 <worksheetref name="model" column="I" row="15" />trueMaximum leaf area index (LAI, dimensionless)max LAItruefn203current_max = prev(1), if convert_LER_DD_to_LAI > current_max then convert_LER_DD_to_LAI else current_max1wherecurrent_maxprev1convert_LER_DD_to_LAIgtconvert_LER_DD_to_LAIcurrent_maxcurrent_maxtruecd101truefn201if (photoperiod_and__temp_control_of_gs == 1) then sum_DD_for_LER else 01sum_DD_for_LEReqphotoperiod_and__temp_control_of_gs10border1border2border3border4node01215node01216node01217node01218node01219node01220node01221node01222node01223node01224node01303node01304node01305node01306node01407node01408node01409node01410node01412node01413node01414node01415node01907node01908node01909node01910Yield is estimated by first calculating the percentage of the incident photosyntheically active radiation (PAR) a canopy with the current leaf area index (LAI) would intercept. This percentage is then used along with the actual PAR value to calculate the light intercepted. The radiation use efficiency (RUE) converts the light intercepted into the equivalent dry weight produced to give the yield on that day. Note that the RUE is reduced if the plant is under water stress and that the yield calculation is only done if the day is in the final growing season.truenonenonewhitenonephotosynthesis and yield0 <worksheetref name="model" column="AJ" fromrow="24" torow="388" />trueCalculate the percentage of the incident photosynthetically active radiation (PAR) that the canopy will intercept given its current leaf area index (LAI)percent radiation interceptedtruefn5( 1 - exp(-1 * extinction_coefficient_K * convert_LER_DD_to_LAI)) * 10011exp1extinction_coefficient_Kconvert_LER_DD_to_LAI100 <worksheetref name="model" column="AK" fromrow="24" torow="388" > Column K is just a copy of column G and is replaced by it. </worksheetref>trueQuantity of photosynthetically active radiation (PAR) intercepted by the canopy on a given day (in MJ/m2 ground).light interceptedtruefn6PAR * (percent_radiation_intercepted / 100)1PARpercent_radiation_intercepted100The radiation use efficiency (RUE) is scaled-back by the scaling factor that encodes the influence of water stress on RUE. The yield is only calculated if the day is in the temperture and photoperiod controlled growing season as well as in that controlled by anthesis. <worksheetref name="model" column="AL" fromrow="24" torow="388" />trueDay's yield (in g dry matter/m2 ground) .day yieldtruefn7if final_growing__season < 1 then light_intercepted * RUE_down_reg * RUE else 01light_interceptedRUE_down_regRUEltfinal_growing__season10 <worksheetref name="model" column="AM" fromrow="24" torow="388" />trueTotal yield in the growing season (g dry matter/m2 ground)yieldtruefn8010truecd2truefn9day_yield1day_yield <worksheetref name="model" column="E" row="6" />trueExtinction coefficient Kextinction coefficient Ktruefn1020.6810.68 <worksheetref name="model" column="B" row="6" />trueRadiation use efficiency (RUE) in g dry matter/MJ of photosynthetically active radiation (PAR) intercepted.RUEtruefn1032.3512.35 <worksheetref name="model" column="E" row="15" />trueTotal photosynthetically active radiation (PAR, in MJ/m2 ground) intercepted by the canopy in the temperature and photoperiod controlled growing season.total light interceptedtruefn204010truecd101truefn205light_intercepted1light_intercepted <worksheetref name="model" column="J" row="15" > This is the max part of J15. </worksheetref>trueMax accumulated yield in g dry matter/ m2 of groundmax yieldtruefn206current_max = prev(1), if yield > current_max then yield else current_max1wherecurrent_maxprev1yieldgtyieldcurrent_maxcurrent_max <worksheetref name="model" column="J" row="15" > This is the unit conversion part of J15. </worksheetref>trueMax accumulated yield converted to t dry matter/ hectare.max yield per hectaretruefn207max_yield / 1001max_yield100border5border6border7border8node01401node01402node01810node01811node01812node01813node01814node01815node01816node01817node01818node01819node01820node01821node01822node01823node01824node01825node01826node01827node01828node01829node01830node01831truewhitetotals affected directly by final growing season (gs)truecd1truefn1if (final_growing__season == 1) then PAR_in_gs else 01PAR_in_gseqfinal_growing__season10 <worksheetref name="model" column="K" row="15" > The summation part of the calculation in K15 on the spreadsheet. </worksheetref>trueSums the number of days not in the final growing season (gs).number days not in gstruefn104010truecd2truefn105final_growing__season1final_growing__season <worksheetref name="model" column="K" row="15" > The subtraction part of the calculation in K15 on the spreadsheet. </worksheetref>trueNumber of days out of 365 that were in the final growing season (gs).length gstruefn106365 - number_days__not_in_gs1365number_days__not_in_gsborder3Note that this sum resets to zero if a particular day is not in the final growing season. <worksheetref name="model" column="AI" fromrow="24" torow="388" > Column K on the spreadsheet is just a copy of column G and is replaced by it in the calculations. </worksheetref>trueSums the photosynthetically active radiation (PAR, in MJ/ m2 ground) in the final growing season (gs).PAR in gstruefn107010truecd3truefn108if (final_growing__season == 0) then PAR else 01PAReqfinal_growing__season00 <worksheetref name="model" column="D" row="15" />trueMaximum accumulated photosynthetically active radiation (PAR, in MJ/m2 ground) in final growing season (gs).PAR gs totaltruefn109current_max = prev(1), if PAR_in_gs > current_max then PAR_in_gs else current_max1wherecurrent_maxprev1PAR_in_gsgtPAR_in_gscurrent_maxcurrent_maxborder4border5 <worksheetref name="model" column="AW" fromrow="24" torow="388" />trueSet today's contribution to the rainfall total to zero (mm) if today is not part of the final growing season (gs)in gs raintruefn110if final_growing__season == 1 then 0 else rainfall10eqfinal_growing__season1rainfall <worksheetref name="model" column="L" row="15" />trueTotal rainfall (mm) in the final growing season (gs).gs rainfall totaltruefn111010truecd4truefn112in_gs_rain1in_gs_rainborder6i2i3nonein_hierarchyinput_PAR_file1i4 <worksheetref name="model" column="C" row="15" />truePhotosynthetically active radiation to be summed (flow in units of MJ/m2 ground/day)PAR fluxi5truei7nonein_hierarchyPAR1truei218i1i3 <worksheetref name="model" column="M" row="15" />trueRainfall to be summed (flow has units of mm/day)raini4truei6nonein_hierarchyrainfall1truei8nonein_hierarchyinput_rainfall_file1truei12i2truei3nonein_hierarchyinput_PE_file1truei9truei7truei10i4truei8nonein_hierarchyPE1truei11nonein_hierarchyrainfall1i1 <worksheetref name="model" column="R" fromrow="24" torow="388" />truewater fluxi2truei3nonein_hierarchydaily_deficit1truei104nonein_hierarchyrainfall1truei101nonein_hierarchySMDp1truei13 <worksheetref name="model" column="R" fromrow="24" torow="388" />truePEi201truei202nonein_hierarchySMDp1truei203nonein_hierarchydaily_deficit1truei204nonein_hierarchyrainfall1truei205nonein_hierarchyPE1truei11i1i2i6nonein_hierarchysoil_type1i3truei7nonein_hierarchyRUE_stop1truei8nonein_hierarchypercent_SM_content__RUE_slow1i4i5i9nonein_hierarchyRUE_SMD__down_reg1truei10nonein_hierarchyRUE_stop1truei12nonein_hierarchySMDp1truei11truei212truei9truei12i1i2truei6nonein_hierarchyLAI_stop1i3i7nonein_hierarchyLAI_stop1truei8nonein_hierarchyLAI_SMD__down_reg1truei5nonein_hierarchypercent_SM_content_LAI_slow1i4truei10nonein_hierarchyRUE_stop1truei13nonein_hierarchySMDp1i108i107truei211truei231i1i2truei4nonein_hierarchymean_temperature1i3truei5nonein_hierarchymean_temperature1truei101nonein_hierarchyinput_temperature_file1truei230truei233truei228truei231i3 <worksheetref name="model" column="G" row="15" />trueDegree days to be summed (flow has units of (oC days)/day)degree daysi4truei5nonein_hierarchynormal_calc_DD1i223truei227nonein_hierarchyDD_Tb1i224truei229nonein_hierarchymax_temp1truei232nonein_hierarchymin_temp1truei104truei4truei7truei206i1i3i101nonein_hierarchyradiation_position__latitude1i4truei16nonein_hierarchyphotoperiod1truei14nonein_hierarchydeclination1i6i15nonein_hierarchygrowth_control_start_stop1i7truei13nonein_hierarchyday_adjust1i11truei107i201i202i1i2i3nonein_hierarchygrowing_season_threshold1truei6nonein_hierarchymin_temp1truei9nonein_hierarchymax_temp1i101truei203nonein_hierarchygs_start_dayinti204nonein_hierarchygs_end_dayinttruei105truei5truei8i103truei104nonein_hierarchytemperature__control_of_gsinttruei106nonein_hierarchyphotoperiod__control_of_gsinttruei210truei310trueSets compartment for summed degree days to zero if day not in photoperiod and temperature controlled growing seasonreseti305truei306nonein_hierarchyaccum_DD_in_temp__and_photo_gs1i1i2truei3nonein_hierarchymax_anthesis_DDinttruei209nonein_hierarchyaccum_DD_in_temp__and_photo_gs1truei106i101 <worksheetref name="model" column="AH" fromrow="24" torow="388" />trueSums degree days only if day is in the photoperiod and temperature controlled growing season (flow has units of (oC days)/day)gs DDi102i103truei104nonein_hierarchyaccum_DD_in_temp__and_photo_gs1truei208nonein_hierarchynormal_calc_DD1truei307nonein_hierarchyphotoperiod_and__temp_control_of_gsinttruei311nonein_hierarchyphotoperiod_and__temp_control_of_gsinti4truei105nonein_hierarchyanthesis_control__of_gsinttruei107nonein_hierarchytemperature__control_of_gsinttruei108nonein_hierarchyphotoperiod__control_of_gsinttruei208truei207truei3nonein_hierarchynormal_calc_DD1i106nonein_hierarchyLER_down__reg1truei209nonein_hierarchyphotoperiod_and__temp_control_of_gsinti1i109 <worksheetref name="model" column="AE" fromrow="24" torow="388" />trueSums the effective degree days only if day is in photoperiod and temperature controlled growing season (flow has units of (oC days)/day)DDi110truei111nonein_hierarchyLER_effective__daily_DD1i112truei118nonein_hierarchysum_DD_for_LER1i104nonein_hierarchyDD_conversion_factor1i101i205truei306nonein_hierarchyconvert_LER_DD_to_LAI1trueSets compartment for summed effective degree days to zero if day not in the photoperiod and temperature controlled growing season.reseti301truei302nonein_hierarchysum_DD_for_LER1i106nonein_hierarchyLER_down__reg1truei3nonein_hierarchynormal_calc_DD1truei304nonein_hierarchyphotoperiod_and__temp_control_of_gsinttruei209nonein_hierarchyphotoperiod_and__temp_control_of_gsinttruei119nonein_hierarchyconvert_LER_DD_to_LAI1truei119nonein_hierarchyconvert_LER_DD_to_LAI1truei210nonein_hierarchyRUE_down_reg1truei217nonein_hierarchyPAR1truei207nonein_hierarchyfinal_growing__seasoninti113i114truei120nonein_hierarchypercent_radiation_intercepted1i115truei121nonein_hierarchylight_intercepted1i116 <worksheetref name="model" column="AM" fromrow="24" torow="388" />trueDaily yield to be summed (flow has units of g dry matter/m2 ground/day)daily yieldi117truei122nonein_hierarchyday_yield1truei105nonein_hierarchyextinction_coefficient_K1i102truei206nonein_hierarchyRUE1i103i307 <worksheetref name="model" column="E" row="15" />trueIntercepted photosynthetically active radiation to be summed (flow has units of MJ/m2 ground/day)PAR fluxi308truei309nonein_hierarchylight_intercepted1i310truei312nonein_hierarchyyield1i311truei313nonein_hierarchymax_yield1truei119nonein_hierarchyconvert_LER_DD_to_LAI1truei217nonein_hierarchyPAR1truei207nonein_hierarchyfinal_growing__seasoninttruei210nonein_hierarchyRUE_down_reg1truei213truei223truei229i1i209 <worksheetref name="model" column="K" row="15" > The summation part of the calculation in K15 on the spreadsheet. </worksheetref>trueDays not in final growing season to be summed (dimensionless)daysi210i211truei212nonein_hierarchynumber_days__not_in_gs1truei3nonein_hierarchyfinal_growing__seasoninttruei214nonein_hierarchyfinal_growing__seasoninttrueSets compartment for summed PAR in final growing season to zero if day outside final growing seasonresettruei2nonein_hierarchyPAR_in_gs1i215 <worksheetref name="model" column="AI" fromrow="24" torow="388" > Column K on the spreadsheet is just a copy of column G and is replaced by it in the calculations. </worksheetref>trueSums the photosynthetically active radiation only if day is in the final growing season (flow has units of MJ/m2 ground/day)PARi216truei219nonein_hierarchyfinal_growing__seasoninti217truei218nonein_hierarchyPAR_in_gs1truei224nonein_hierarchyPAR1i225truei232nonein_hierarchyfinal_growing__seasoninti226 <worksheetref name="model" column="L" row="15" />trueRainfall in final growing season to be summed (flow has units of mm/day)gs raini227truei228nonein_hierarchyin_gs_rain1truei230nonein_hierarchyrainfall1