Virtual pruning of 3D trees as a tool for managing shading effects in agroforestry systems

Light is a limiting resource for crops within integrated land use systems especially those including woody perennials. The amount of available light at ground level can be modified by artificially pruning the overstory. Aiming to increase the understanding of light management strategies, we simulated the pruning of wild cherry trees and compared the shading effects of the resulting tree structures over a complete growing season, with fine spatiotemporal resolution. Original 3D-tree structures were retrieved employing terrestrial laser scanning and quantitative structure models, and subjected to two pruning treatments at low and high intensities. By using the ‘shadow model’, the analogous tree structures created diverse shaded scenarios varying in size and intensity of insolation reduction. Conventional pruning treatments reduced the crown structure to the uppermost portion of the tree bole, reducing the shading effects, and thus, shrinking the shaded area on the ground by up to 38%, together with the shading intensity. As an alternative, the selective removal of branches reduced the shading effects, while keeping a more similar spatial distribution compared to the unpruned tree. Hence, the virtual pruning of tree structures can support designing and selecting adequate tending operations for the management of light distribution in agroforestry systems. The evidence assembled in this study is highly relevant for agroecosystems and can be strategically used for maintaining, planning and designing integrated tree-crop agricultural systems.


Introduction
Pruning is observed as a natural phenomenon specifically the shedding of suppressed or dead branches, and as a manmade management intervention, for the selective removal of woody and non-woody plant parts. Following a forester's perspective, pruning is a silvicultural practice aimed at improved timber quality, however, pruning could mean much more for an agroforestry practitioner such as maintenance of plant health, regulation of fruit production (Kumar et al. 2010), fuelwood provision (Pérez Arévalo and Velázquez Martí 2020), source of fodder, animal bedding, mulch and green manure (Kang et al. 1981;Kang and Wilson 1987), the lifting of tree crowns for machinery access, and control of shading effects (Niether et al. 2018). Pruning has been reported to increase the quantity and improve the distribution of light at the ground level, triggering modifications in the shaded habitats, which can be especially important in mixed cropping systems (Dupraz and Liagre 2011;Kang et al. 1981Kang et al. , 1985Kumar et al. 2010;Miah et al. 1994;Springmann et al. 2011).
Within agroforestry systems (AFS), an understanding of the nature of interactions is key for increasing productivity, as plants compete for light, water, nutrients and other limited resources (Ranganathan and Wit 1996). The availability of light is perhaps the most important limitation on the performance of food crops (Miah et al. 1994). To this end, established woody perennials have an advantage over annual crops, due to their long-lasting and dynamically evolving structures, often leading to an uneven light competition over the systems' productive cycle. On one hand, a significant reduction of the incoming solar radiation for the agricultural crops growing around trees can result in a drastic reduction of the crop productivity, as in the case of light-demanding C 4species (Nair 1993). While on the other hand, shadetolerant crops may even react positively to shading, for example, tobacco (Waggoner et al. 1959), coffee (Muschler 2001), and American ginseng (Stathers and Bailey 1986). Moreover, in the context of a changing climate, the shade cast by trees might play a significant role in mitigating negative effects towards crop vitality and production losses (Valladares et al. 2016).
The shading effects of trees are governed by their physical dimensions and temporal state of development (e.g. foliage conditions). The evolving tree structure is described by its height, stem diameter, volume, and also by crown length, crown width, and crown transparency. Final tree architecture is a manifestation of species-specific and individual genetic traits, site and growing conditions (e.g. competition), and the tending operations applied to the tree and immediate neighbours.
Pruning reshapes trees to improve the timber quality (Balandier 1997;Springmann et al. 2011), particularly for tree species that do not self-prune well (Röhrig et al. 2006), and its application often focuses on selected individuals with aggregated economic value. In many European AFS with open-growing conditions, trees experience less natural pruning and artificial tending is highly recommended (Balandier and Dupraz 1999) to achieve a healthy, valuable and functional system. The application of pruning treatments affects the tree and its growth in several ways. Diameter growth has been frequently reported to be negatively affected by pruning operations (Erkan et al. 2016;Kupka 2007;Spiecker 1994;Takiya et al. 2010), a factor of reduced growth capacity, but can be minimised by pruning at a suitable time of year. Height growth is generally accepted not to be affected by pruning, as found for Prunus avium (Springmann et al. 2011) or Cryptomeria japonica and Chamaecyparis obtusa, although, pruning may reduce height growth in plantations with lower tree densities (Takeuchi and Hatiya 1977).
Taking a central European perspective, two types of qualitative pruning approaches are the conventional and selective pruning methods. In the first, all branches from the bottom up to a certain height are removed, while in the second, certain criteria are used for branch selection and removal. Investigating this selective methodology, Springmann et al. (2011) removed all branches that exceed a branch collar diameter of above 3 cm and steeply-angled branches (Fig. S1, Online Resource 1), since those are known to be strong growth competitors within the crown.
Wild cherry is a tree species that do not self-prune well (Pryor 1988). Shaded branches quickly die and remain on the tree for an extended period, resulting in the formation of dead knots in the wood. Therefore, to obtain high-quality butt logs, artificial pruning is necessary. A whorlwise branching pattern is typical for wild cherry, as opposed to the alternate or opposite branching pattern observed in many other deciduous tree species.
Terrestrial laser scanning (TLS, or terrestrial LiDAR) has been proven as a reliable method for the 3D digitisation of landscapes and quantification of landscape components such as trees. This effective, precise and non-invasive, technology is ideal for monitoring and assessing the structural composition and temporal dynamics of individuals within evolving systems, such as forests (Aschoff et al. 2004;Hackenberg et al. 2014;Sheppard et al. 2017). The derived point cloud data is the basis for measuring the aboveground volume and assessing the 3D structure of trees, from which more quantitative and qualitative information can be combined or derived. For example, TLS data analysis enables an exact quantification of the amount of wood between different tree compartments (cf. Grau et al. 2017;Hu et al. 2021;Kunz et al. 2017;Stängle et al. 2013;van der Zande et al. 2010). One approach is to scan trees from multiple positions, and then, separate the resultant point cloud into individual tree point clouds, which become input data for cylinder-fitting algorithms. Tree models constructed in this way are called quantitative structure models (QSMs). QSMs present the opportunity for manipulating tree structures as, for example, database queries based on the QSMs' properties. TreeQSM (Calders et al. 2015;Raumonen et al. 2013) has been repeatedly applied and trusted as a stable approach.
The assessment of below canopy light intensity has traditionally been carried out using photosynthetic active radiation (PAR) photosensors, leaf-area-index (LAI) equipment, or hemispherical photography techniques. Efforts are now underway to transfer this knowledge towards individual open-grown trees in AFS (Talbot and Dupraz 2012). Recently, TLS derived point clouds coupled with QSMs have been used for modelling the shade cast at fine spatiotemporal resolutions, thus improving the understanding of the role of trees as physical light obstacles. Initial works by Rosskopf et al. (2017), Bohn Reckziegel et al. (2021, have demonstrated the potential of applying these approaches. Within this paper, we aim to quantify the magnitude of changes in insolation reduction caused by tree structures reshaped by different pruning treatments. We use field-tested pruning approaches (Springmann et al. 2011) as guidance for our computer-based pruning methods to derive variants of tree structures represented by QSMs. The innovation of our research lies within the application of these analogous tree structures, for creating shading scenarios, and by doing so, supporting the design and choice of adequate tending operations. Pruned and unpruned tree structures are fed into a shadow model (Bohn Reckziegel et al. 2021) with a fine spatiotemporal resolution, to simulate the shade cast over twelve months and to estimate the insolation reduction on the ground as a result. We hypothesise that conventional and selective pruning methods with comparable branch volume removal differ markedly in both retained tree structures and the shading effects.
The trees belong to a widely spaced tree plantation (area: 2.5 ha) established in 1997, on former agricultural land to investigate valuable timber production. The initial spacings were 1.5 m 9 7.5 m and 1.5 m 9 15.0 m in a mixture comprising other broadleaves species including European ash (Fraxinus excelsior L.), pedunculate oak (Quercus robur L.), sycamore (Acer pseudoplatanus L.), small-leaved lime (Tilia cordata Mill.) and European hornbeam (Carpinus betulus L.). The studied trees have received no pruning during their lifespan, thus, the observed tree structure can be considered a result of genetic expression, site and growing conditions. At the time of data acquisition, the trees had heights ranging between 7.8 and 10.6 m, displayed diameters at breast height (DBH) of 9.1 to 14.6 cm, and with a crown radius varying from 1.2 to 3.3 m. Wild cherry has deciduous character, leafing out in early spring (ca. April), and defoliating by the end of the summer/early autumn (ca. October).
Acquisition and processing of 3D data Trees were scanned in winter 2013 using a terrestrial laser scanner Z ? F IMAGER Ò 5010 (Zoller ? Fröhlich GmbH, Wangen, Germany), under leaf-off and windless conditions. A multiple-scan approach with a minimum of four scan positions around each tree was utilised to minimise occlusion (Wilkes et al. 2017). Detailed information about the equipment's technical specifications, sampling campaign and data acquisition parameters are given in Sheppard et al. (2017) and Hackenberg et al. (2014). Point cloud registration was carried out using the software LaserControlÒ (Zoller ? Fröhlich GmbH, Wangen, Germany). Trees were manually segmented from the project point clouds and noise and outlier points were removed using CloudCompare v2.10.2 (CloudCompare 2019). The resulting single-tree point clouds are displayed in Fig. 1.

3D Trees
The 3D structures of the four wild cherry trees were retrieved with the MATLAB (version R2019a Update 5; The MathWorks Inc., Natick, Massachusetts, USA) implementation of TreeQSM (Raumonen 2017) using the individual tree point clouds. The method is a modelling approach fitting cylinders to local details of the point clouds in a hierarchical manner (Disney et al. 2018;Raumonen 2020). We optimised the QSM reconstruction by testing 24 combinations of key input parameters (cover patch diameters d at the first and second segmentation) and producing 25 models for each possible combination, using the mean pointcylinder distance as optimisation metric for model selection (Raumonen 2020) and to assess the robustness of the method. The best model defined the optimised parameters: d was 8.0 cm in the first cover set, while in the second cover set, minimum and maximum d were 2.0 cm and 3.5 cm, respectively. All QSMs were reconstructed with these parameters. The QSM-derived tree parameters had coefficients of variation below 2%, with exception of branch volume (\ 3%); these are displayed in Table S1 (Online Resource 1). Differences in tree height and DBH between trees are minor, however, trees differ largely in total tree and branch volume. In volumetric terms, the order of more complex structures was T2 \ T1 \ T4 \ T3. In addition, the number of branches and accumulated branch length are important parameters as they influence the total leaf area and the tree shading effect. In order to improve the performance of the shadow model, we reduced the number of cylinders of the QSMs of trees by using the simplify_qsm function of TreeQSM, with 1 or 2 replacement iterations.

Pruning treatments
The QSMs of the four unpruned trees were used to produce modified tree structures by simulated pruning treatments in the computer environment. The pruning treatments were defined according to Springmann et al. (2011): by removing complete whorls, as a conventional approach (p5w and p3w), and; by removing branches according to branch collar diameter or angle in relation to the stem, as a selective approach (p3d and p2d). The initial QSMs were referred to as control treatment (N), where no pruning was carried out. Details of the pruning treatments are displayed in Table 1.
Two pruning algorithms were written in the opensource language R version 3.5.3 (R Core Team 2019) as independent functions, to retrieve QSM-cylinders matching the specific database queries. The pruning functions have different input parameters and the following outputs: the pruned tree structure, the branch residuals, a summary and visualisation of the performed intervention. For each tree, four pruning variants were simulated, totalling 20 tree structures (Fig. 2). For demonstration purposes, animations of the three-dimensional pruned and unpruned structures of T2 are available in Online Resource 2.
The conventional pruning function worked based on a 30 cm height step increment in a bottom-up search (i.e. tree base to tip) to define the number of whorls, by grouping the branches in the vicinity in terms of tree height. Starting from the tree's lowest branch, adjacent branches would belong to the same whorl if categorised within this height interval. Once the height threshold was surpassed, a newly defined whorl was formed. If no adjacent branch was found in the height interval, the actual branch was considered to be a false whorl. Moreover, branches with a collar diameter lower than 1.0 cm were disregarded; a strategy to negate the presence of epicormic/secondary shoots. The search query was continued until the top of the tree was reached. The number of retained whorls (function input parameter) in a top-down manner, set the final tree structure.
The selective pruning function retrieved the directional axis of the stem by taking the first and last stem-cylinders. The vector was used to calculate the angle between stem and branches, while the first cylindersegment of each branch (at the insertion to tree stem) was used as a reference. Function inputs were the branch collar diameter of 3 cm and 2 cm (low and high intensity, respectively), and the derived branch angle to stem (fixed at 40°). A database query requested branches falling within these thresholds, while the topological information is used to keep track of cylinders belonging to each branch.

Modelling shading effects of trees
Leaf-on conditions were created for each QSM with the leaf creation algorithm (LCA) presented in Bohn Reckziegel et al. (2021). The LCA is specific for P. avium and was calibrated with leaves of trees from the same study region. The parameter leaf spacing was 2 cm. We modified the LCA to account for the seasonal dynamics of crown foliage, by applying: in April, only the leaf classes 'extra-small' and 'small'; in May, the third leaf classes ('middle'); in June, the 'large' leaves, and; in July, August and September, the 'extra-large' classes (implying maximum crown expansion). The probability of each leaf class was adjusted to the proportion of the leaf classes considered in each case (see Table S2 in Online Resource 1).
The shadow model by Bohn Reckziegel et al. (2021) was used to model the monthly shading effects of the unpruned and pruned tree structures, together with their specific leaf datasets, for the period of 1 st October 2013 until 30 th September 2014 (a complete growing season). For the autumn and winter months (October to March), the QSMs were computed under leaf-off conditions. For the spring and summer months Table 1 Pruning treatments applied and their criteria (Springmann et al. 2011) Pruning system Intensity Abbr Conventional: whole whorls removed (whorlwise pruning, from below) Five whorls remain in a top-down approach (low-intensity) p5w Three whorls remain in a top-down approach (high-intensity) p3w Selective: branches with large diameter and/or steeplyangled branches removed Branches with collar diameter [ 3 cm or branches with an angle to the stem \ 40°are removed (low-intensity) p3d Branches with collar diameter [ 2 cm or branches with an angle to the stem \ 40°are removed (high-intensity) p2d Control No branch removal. Initial QSMs are used N (April to September), QSMs were under leaf-on conditions. The model was fed with solar irradiance data derived from a meteorological station 15 km from the tree's location (48°01 0 12.0 00 N 7°49 0 48.0 00 E, 237 m a.s.l.), with temporal steps of 10 min, provided by the German Meteorological Service (Deutscher Wetterdienst). For each time interval, the shadow projection was simulated on a ground surface of 0.25 ha, with a grid cell size of 10 cm 9 10 cm, and centralised on the tree's position. Shaded grid cells received the actual diffuse radiation value, while unshaded cells the global radiation. The grid-cells with less than 98% of the maximum possible insolation, monthly and yearly, were defined as shaded area; the remaining cells were at ''full light conditions''. Insolation reduction was estimated according to the grid-wise-comparison of the solar energy found, compared to the maximum possible insolation.

Comparison and analysis of shading effects
The data processing, analysis and visualisation were conducted using the software R, version 3.5.3 (R Core Team 2019). The shadow model is based on functions of the ''sp'' (Bivand et al. 2013;Pebesma and Bivand 2005) and ''insol'' packages (Corripio 2019). The 3D visualisation of tree structures was based on the package ''rgl'' (Adler et al. 2019).
We analysed the spatial distribution and compared the heterogeneity of the resulting shading effects as annual insolation reduction. Shade intensity classes (Bohn Reckziegel et al. 2021) were defined to explore the intensity of shading effects. The five shade intensity classes were: 2-5%; 5-10%; 10-15%; 15-20%, and; [ 20% reduction of the yearly insolation.
We used the bivariate association measure L (Lee 2001(Lee , 2004 to parameterise the spatial dependence and to test the similarity of the spatial patterns of the shading effects. For the pairwise tests, taking N as reference (control trees against pruned structures), subset-ground-areas of 336 m 2 (24 m 9 14 m) were used, encompassing the core area of the annual insolation reduction on the ground, from the tree trunk 4 m to the south, 10 m to the north, and 12 m towards west and east directions. For the estimation of the measure L, its correlation coefficients and associated univariate measures, we used the 'spdep' library (Bivand et al. 2013). We replicated the parameterisation applied in (Bohn Reckziegel et al. 2021), and tested L for 1000 random permutations.

Tree structures and pruning treatments
The effect of individual pruning treatments on tree structures is summarised in Table S3 (Online Resource 1), in terms of retained and removed woody volume, together with the total leaf area at full crown expansion. Pruned and unpruned tree structures differed between trees in terms of total wood volume and leaf area. The simulated silvicultural interventions removed from 32 to 59% of the tree's total volume. Low-intensity pruning treatments varied for each tree both in relative and absolute terms. Pruning waste varied between p5w and p3d from 1.2 L (T3) to a maximum difference of 5.5 L (T4). The high-intensity selective pruning p2d was less invasive than the highintensity conventional pruning p3w. The maximum absolute difference of the high-intensity approach was 6.4 L (T1). The final branch volume reflected the total leaf area of each tree. Total leaf area for the unpruned tree structures varied between 36.74 m 2 and 121.25 m 2 . For all trees, the relative leaf area of pruned trees stayed between 2 and 46% in comparison to the control trees.
A tree-based comparison of the branches eliminated by the pruning methods is presented in Fig. 3. Branches removed by the low-intensity approaches were also removed in the high-intensity interventions (branches with a collar diameter of [ 3 cm or a branch insertion angle of \ 40°), while those branches with a branch collar diameter of 2-3 cm were uniquely removed in the high-intensity interventions. Conventional pruning is distinguished by a height limit on each tree, which is an indication of the height threshold separating the whorls. The low-intensity whorl pruning removed branches inserted between 4.5 and 5 m of the trees' total height, while high-intensity interventions reached a height above 6 m. Whorlwise pruning in T3 removed branches up to 6.2 and 8 m, at low and high intensity, respectively. In contrast, the selective pruning removed branches throughout the whole tree height. Steeply angled branches were additionally labelled with a dot in the centre of the pruning symbology (Fig. 3). The angle threshold of 40°expressively contributed to the number of branches removed in T3 and T2, though it contributed less on T1 and T4. Moreover, the 'dot' assured the pruning function worked, as it allowed separating branches not falling in the diameter threshold, but in the angle threshold. The disparity between the diameter thresholds of 2 cm and 3 cm is more easily visualised by T1 and T4.

Shading effects of trees
The summary of the simulated shading effects of the 3D tree structures for the whole period of October 2013 to September 2014 is displayed in Table 2, and additional information is found in Table S4 (Online Resource 1). These results are directly related to the retained tree volume and leaf area. The shaded area ranged from 136.8 m 2 (T1p3w) to 460.8 m 2 (T3N), while total insolation reduction ranged from 13,148 MJ to 80,220 MJ, for the same structures. Control trees had unarguably the greatest shading effects; these were greater in area, and consequently, in insolation reduction than any of the pruned variants. Furthermore, low-intensity pruning intervened less drastically than high intensity approaches. Although the shaded area varied throughout trees and treatments, selectively pruned trees had greater insolation reduction (0.30-0.40 MJ m 2 day -1 ) than conventional pruning (0.26-0.32 MJ m 2 day -1 ).
The spatial distribution of the yearly shading effects of the unpruned and pruned T1 is shown in Fig. 4, at a far observation point (left), and enlarged to the details (right). We found similar arrangements and trends for T2, T3 and T4, and the results agreed with the findings of Rosskopf et al. (2017). Overall, we noticed the smooth insolation reduction spreading more than 20 m from SW towards N and SE, but without reaching S. At a closer viewpoint, the grid-cells with more intensive insolation reduction can be seen. The control trees had a greater shade centre, which showed a centralised higher insolation reduction four to eight metres from the tree position towards N. Selectively pruned trees displayed similar spatial distribution than unpruned trees, although with a lower shaded area and less intense shading at its core.
Conventional pruning softened the shading effects of all trees, withxception of a condensed semicircle arc band area spreading approximately 4 m away from the tree trunk, which is a clear manifestation of the reduced crowns. Additionally, there was a clear influence of the tree trunk creating a semi-isolated zone of higher insolation reduction of approximately 1 m 2 towards the north.
The monthly shading effects of T4 and the low intensity pruned structures are visualised in Fig. S2 (Online Resource 1). We reinforced the similarity of spatial spread of the control and selective pruning throughout the whole growing season, while the Fig. 3 Pruned branches of trees (T1 to T4) in the four tending interventions: branches removed in the low-intensity approaches (p5w and p3d) were also removed in the high-intensity interventions (p3w and p2d). For the selective pruning, branches with angle \ 40°are represented with a dot in the centre of the symbol conventional pruning approach is distinguished by the smoother shading effects contrasted with a semicircle arc band at its core during the summer months.
The intensity variation of the modelled shading effects for all tree structures is reported in Table 3 (also Table S5 in Online Resource 1). We found a maximum insolation reduction of up to 60% but reduced to one or few grid cells. For all trees, over 80% of the shaded area experiences 2% to 5% insolation reduction, whereas roughly 99% of the area fell into this category for the conventional pruning. Grid-cells with insolation reduction of over 20% were scarce and limited to few locations near the base of the tree. Control trees produced the greatest shading heterogeneity of intensities within classes from 5v% to 20% insolation reduction. The attenuation of shading effects provoked by the selective pruning was observed throughout the proportions of all shading intensity classes, and the number of grids under 15-20% insolation reduction was not evident. For the conventional pruning, apart from the lowest reduction class, the share of most shade intensity classes was marginal.
The spatial heterogeneity of shading effects is demonstrated by comparing the L measure for the paired observations of N with the pruning treatments (Fig. 5). Selective pruning produced shading effects with a spatial pattern more similar to the control treatment than conventional pruning. The strong correlation found between the insolation reduction of selective pruning and control treatment confirmed the previous visual findings (see Table S6 in Online Resource 1). Spatial autocorrelation was revealed by the permutation test, and we accepted the alternative hypothesis that the variability in the shadows is not explained by the spatial similarities of the shading pattern.

Discussion
This simulation study investigated the shading effects of trees brought about by the different simulated 123 pruning treatments. The undertaking of this work provided the opportunity to increase our knowledge related to the capacity of silvicultural interventions mediating light, which is a limiting resource for crops in AFS. The chosen trees suited this scope by representing woody structures that have not previously undergone any pruning treatments. Likewise, trees were of suitable size and habitus, as they presented both large and steeply-angled branches, as well as distinguishable whorls. In actively managed AFS, trees would likely have previously undergone at least one formative pruning treatment (Kerr and Morgan 2006) to shape the trees at an earlier stage to conform with the desired tree/site functions or system outputs. Regardless of the pruning treatments applied, the silvicultural goal remained the same: a way of retaining high diameter growth while improving bole quality (Springmann et al. 2011). We found contrasting effects of the conventional and selective pruning approaches, in terms of the resulting tree structures and pruned residues (though with some overlap on cut branches). The high-intensity variants produced harsh interventions (e.g. removed up to 60% tree volume), which could make these treatments inapplicable in field reality. The low-intensity treatments were closely tuned to our expectations in terms of an appropriate woody volume removal (& 40% of tree volume). Still, the application of generic pruning treatments was subjected to the characteristics of the individual trees and crown structures, producing unequal branch  removal (e.g. T3). A change in the parameterisation of the pruning functions could be required for applying these same treatments to other trees, where species' traits, growing conditions and/or development stage, would have facilitated the growth of divergent woody structures. Although whorlwise pruning in this study removed branches up to 6 m in tree height, whorls are not recognisable in many tree species, and so a conventional height pruning would be preferred and easier to parameterise. Considering selective pruning, the parameter ''branch angle'' became important depending on the crown characteristics. Additionally, few branches close to the treetop were removed, which is unrealistic in practical terms. The implementation of pruning tends to get harder towards the top of mature trees and is often constrained by vegetative obstacles (access to the branches), the identification of branches following certain thresholds (e.g. collar diameter and angle), the expertise of the practitioner, and the features of the pruning tools. Nevertheless, our results paint only a limited picture: while following a set of pruning rules, a practitioner would make exceptions and examine trees on a case-by-case basis. The virtual pruning functions utilised could have included the growth of new shoots and branch ramification, also including new leaves, such implementation would require specific parameterisation and new algorithm capabilities, representing an outlook for upcoming developments. We acknowledge that the tree's responses to the pruning interventions will influence future tree and crown development, consequently, the shading effects provoked by pruning treatments could be highly varied in the following years after the applied intervention. Springmann et al. (2011) found that trees subjected to conventional pruning and left with less than 50% of the original tree crown had a significant growth increase of epicormic shoots, which would hinder the formation of veneer quality timber, and would increase shading effects in the long term.
In our study, trees had simulated pruning applied to the detected structure of the previous growing season. We acknowledge that the correct time for the application of a pruning intervention varies between species and site. The pruning of wild cherry is recommended to be carried out during the growing season , in the period of fastest growth, to allow rapid wound occlusion (e.g. beginning of June), and for phytosanitary reasons. This situation is likely to reduce the accuracy of our method, but it is in order with the challenges imposed by the collection of LiDAR data, the processing time of the points clouds, and the acquisition of tree structures. Furthermore, there is a goal-orientated trade-off imposed by the combination of food crops and woody perennials in AFS, which will define the priorities for each productive area, as well as the degree of shading, and thus, the intensity and style of pruning required.
The assessment and comparison of the insolation reduction of the unpruned and pruned tree structures showed that selective pruning may be an opportunity to attenuate the shading effect of trees, while conventional pruning would radically minimise shading. The same was reaffirmed by the temporal changes in monthly solar radiation interception. Applying lowintensity pruning approaches, tree structures differed severely in the shading effects at a branch removal less than 3 L (T1, T2 and T3). The low-intensity selective pruning (p3d) reduced the shaded area by 20-40%, while smoothing out the zone under higher shade intensity values (classes with insolation reduction above 5%). This silvicultural intervention might be of high importance in areas where shading intensity is relevant for crop production and/or quality (Schulz et al. 2019), but also for attenuation of climatic extremes (Valladares et al. 2016).
Conventional whorlwise pruning at low intensity reduced the shaded area by about 30% to 50%, but was notably restraining more in terms of shading intensity, as over 95% of the area was found with less than 5% insolation reduction, and circa 1% of the area with a 5-10% reduction, while the area under greater energy loss was negligible. Conventional pruning is an option either where shedding light back to the agricultural crops becomes a priority, or the timber quality is of importance. Similarly, Dupraz and Liagre (2011) were able to show that light regimes can be influenced by pruning intensities. The authors applied two different pruning intensities, pruning to a height of 25% and 50% of total tree height, and calculated the shading effect. The measured light availability indicated a strong influence of the tree height and the alley width. Taking a comparable height of trees akin to trees in our study, the results of Dupraz and Liagre (2011) range between 80 (alley width 10 m, pruning height 50%) and 100% (alley width 40 m, pruning height 50%) which can be seen as comparable to our results, considering that the exact position of the measurement is not given in this work.
The shadow model (Bohn Reckziegel et al. 2021) supported the fine resolution of the temporal and spatial assessment of the shading effects of the produced tree structures (every 10 min at grids of 100 cm 2 ). Though the method is rich in details, differing from other frequently used approaches (Cifuentes et al. 2017;Schmidt et al. 2019;van der Zande et al. 2010), drawbacks are mainly the required computational resources and extensive time for simulations. As single-processes, the simulations run over two thousand hours (* 100 days; Table S7 in Online Resource 1), a process shortened by parallel computing. These limitations could be overcome by improving the shadow algorithm for efficient performance, or by statistical inference (e.g. reducing the simulation period). The number of objects to iterate (treecylinders and virtual leaves) is another topic to be addressed. While the simplification of QSMs aided faster simulations, foliage could be replaced by ellipsoidal leaf clusters (Rosskopf et al. 2017) at the cost of lowering the total shading effect (Bohn Reckziegel et al. 2021). However, for an offline scenario planning, the processing time is not a major factor as the continued increase in speed of modern processors will make this issue less relevant in the future. For a broader application of the shadow model, we see an emerging accessibility to terrestrial LiDAR and point clouds, as well as QSM data, while localised weather data are already common for many regions and study sites.
The modification of tree structures in a computer environment through database queries or dedicated algorithms provides a unique opportunity for increased realism in the planning of AFS. It has an infinite range of pruning possibilities that can be designed to suit the structural characteristics of any tree, directly or indirectly aiming the production of certain goods and/or environmental services, also specific to certain AFS. In addition, we are not aware of detailed studies touching this issue in the presented fashion.
Future work may focus on the implementation of such methodologies for a wider species set and AFS, also defining associated food crops to optimise the desired shading intensity. The coupling of virtual pruning methods with dynamic growth models would be attractive, as 3D evolving tree structures could be pruned many times along their lifespan. Finally, virtual pruning could be tested at stand or landscape level, for planning and evaluating the production of woody biomass and its assortments. Additionally, maximum pruning diameters could be introduced for handling the fact that pruning large branches leads to slow branch wound occlusion ), a major cause of stem rot and deterioration for highquality wood veneers (Seifert et al. 2010). Further applications could arise in urban environments where the influence of energy balances on buildings and pavements is of interest (Meili et al. 2021).

Conclusions
In this study, we exemplified pruning as a silvicultural intervention capable of modifying the light regime in the field. Thus, the combined approach facilitates the tree-based management of the light resource in AFS, also taking steps to demystify the presence of trees in agricultural systems. Tested trees responded differently to the simulated conventional and selective pruning treatments, and the pruned tree structures provided options for shading scenarios of individual trees. Though a difference in the number of branches removed by low-and high-intensity interventions, treatments trends on shading effects remained: conventional pruning was an option lessening shading intensity drastically, and; selective pruning alleviated zones of too high shading intensity.
It will be important to adjust the simulations to other field realities when targeting specific outputs of certain crop species in each AFS. Finally, virtual pruning alone has the potential to become a tool for evaluating wood procurement and supply chains from forests and agroforestry systems.
H-PK wrote the publication. RBR, JS, CM, EL, TS, H-PK, and HS made editorial contributions to the publication.
Funding Open Access funding enabled and organized by Projekt DEAL.

Declarations
Conflict of interest The authors declare no conflict of interest. The founding sponsors had no role in the design of the study; in the collection; analyses; or interpretation of data; in the writing of the manuscript, and; in the decision to publish it.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.