# Using Stochastic Ray Tracing to Simulate a Dense Time Series of Gross Primary Productivity
## 2 Methods
### Photosynthesis Modeling  
A leaf-level photosynthesis model was developed based on a non-rectangular hyperbolic relationship between \(P_{gl}\) and \(E_{al}\), following [55]. This model is parameterized by photosynthetic capacity (\(P_{max}\)) that defines the asymptote, the quantum yield (\(\alpha\)) that defines the initial slope when photosynthesis is electron transport limited, and the duration of the initial linear response (\(\chi\)) that is larger for cells than for leaves and larger for leaves than for canopies (e.g., [55]):  
\[P_{gl}\left(P_{max},\alpha,\chi,\ E_{al}\right)=\frac{\alpha\cdot E_{al}+P_{ max}-\sqrt{\left(\alpha\cdot E_{al}+P_{max}\right)^{2}-\left(4\cdot\chi\cdot \alpha\cdot E_{al}\cdot P_{max}\right)}}{2\cdot\chi} \tag{2}\]  
Down-regulation of photosynthesis is expected when the leaf is light saturated and when photosynthesis is limited, for example, by water availability or when the carboxylation rate of the Calvin cycle due to temperature or nutrient supplies is suboptimal. This effect of down-regulation was added to the photosynthesis model using air temperature (\(T\)) and relative humidity (\(h\)) modifiers that, for this purpose, were modelled as symmetric bell-shaped functions, acknowledging that investigations into asymmetry and alternative function shapes are outside the scope of this paper:  
\[T_{mod}\left(T_{lag},\ T_{opt},\beta_{T}\right)=e^{-\left(\frac{\left|T_{opt}- T_{lag}(t)\right|}{\beta_{T}}\right)^{2}} \tag{3}\]\[h_{mad}\left(h_{tag},\beta_{h}\right)=e^{-\left(\frac{100\%-h_{tag}\left(t\right)}{ \beta_{h}}\right)^{2}} \tag{4}\]  
where \(T_{opt}\) is the optimal temperature for photosynthesis, and \(T_{tag}\) and \(h_{tag}\) are the temporally lagged temperature and relative humidity conditions that were derived following [56]. For temperature, this equation has the form:  
\[T_{tag}\left(t\right)=\left(1-\gamma_{T}\right)\cdot T\left(t\right)+\gamma_{T }\cdot T_{tag}\left(t-1\right) \tag{5}\]  
where \(T\left(t\right)\) represents the temperature at time \(t\), and \(\gamma_{T}\) defines the lag (\(\gamma_{T}\in\)R, 0\(\leqslant\gamma_{T}\leqslant\) 1). The relative humidity modifier is analogous to that for temperature.  
Two additional modifier functions were tested to include a seasonal adjustment of photosynthetic capacity that corresponds to different phenological stages of tree growth and the effects of acclimation of the photosynthetic capacity to prevalent PAR [21, 57]:  
\[E_{mad}\left(p,\ k_{n}\right)=e^{-k_{rub}\cdot LAI\left(p\right)} \tag{6}\]  
\[D_{mod}\left(D,D_{opt},\beta_{D}\right)=e^{-\left(\frac{D_{opt}-D\left(t \right)}{\beta_{D}}\right)^{2}} \tag{7}\]  
\(k_{rub}\) defines the decrease of nitrogen content with canopy depth and LAI is the cumulative leaf area index at facet \(p\) and is zero at the top of the canopy, \(D\) is growing degree days and was for this study computed as the mean daytime temperature minus 10 \({}^{\circ}\)C accumulated over days, starting from 1 May 2009. The down-regulation of \(P_{max}\) and \(\alpha\) was modeled as the product of an optimal value for conditions when photosynthesis is not limited and modifier functions:  
\[P_{max}=P_{opt}\cdot T_{mod}\cdot h_{mod} \tag{8}\]  
\[\alpha=\alpha_{opt}\cdot T_{mod}\cdot h_{mod}\]  
The resulting leaf model has at most eleven parameters (\(\chi,P_{opt},\alpha_{opt},T_{opt},D_{opt},\beta_{h},\beta_{T},\beta_{D}, \gamma_{h},\gamma_{T},k_{rub}\)). Stand-level \(P_{gs}\) for a specific moment in time \(t\) was computed through integration over all canopy elements \(n\):  
\[P_{gs}\left(\Theta;E_{ic},\ T,\ h;t\right)=\sum_{p=1}^{n}P_{gl}\left(\Theta;E _{ic},\ T,\ h;t\right)\cdot\frac{A_{p}}{A_{ref}} \tag{9}\]