AN ABSTRACT OF THE THESIS OF

Adam J. Bouché for the degree of Master of Science in Forest Ecosystems and Society presented on March 11, 2020.

Title: Scaling the Issue of Changing Disturbance Regimes: Implications of Novel Landscape Conditions for Black Stain Root Disease.

Abstract approved: ______Klaus J. Puettmann David C. Shaw

Changes to disturbance regimes resulting from shifts in forest management practices have created novel landscape conditions in the Pacific Northwest (PNW). I analyzed the implications of changes to landscape conditions caused by forest management for the spread of a native root disease: black stain root disease (BSRD) of Douglas-fir. BSRD spreads via root and vectors and causes rapid decline and mortality in young Douglas-fir (below age 30-40). Management practices including thinnings, clear-cut harvests, soil compaction, and roadside disturbance, e.g., tree damage from traffic and machinery, are associated with increased BSRD infection. In western

Oregon and Washington, decreases in rotation lengths are altering Douglas-fir age class distributions, and the associated increased prominence of younger stands and harvest frequency have created concern about BSRD leading to increased Douglas-fir mortality. Management changes are influencing patterns of disturbance and Douglas-fir age distribution at both the stand and landscape scale. Therefore, for my research efforts, the probability of BSRD infection for each stand was hypothesized to be influenced by drivers at multiple scales, within and beyond stand boundaries. I used a spatially explicit model to simulate BSRD transmission in forest landscapes to evaluate whether forest management and the resulting stand and landscape conditions influence BSRD spread. Factors affecting the probability of infection, including their variability and uncertainty, were determined and quantified from literature, verified by expert opinion, and used to develop and parameterize the model. By comparing BSRD spread in different landscape scenarios, I analyzed the influence of management disturbances and stand age class distributions on BSRD infection, mortality, and spatial distribution at the stand and landscape scale. Critical knowledge gaps were identified regarding BSRD spread and impacts and highlighted as priorities for future research. In the simulations, infection spread was found to be highest in landscapes dominated by extensively managed stands, driven in part by higher tree densities and longer rotations. In contrast, infections were lowest in a landscape with all stands managed intensively. In landscapes with 50% intensively managed and 50% extensively managed stands, infection increased in intensively managed stands and decreased in extensively managed stands relative to the 100% intensive and extensive management scenarios, respectively, suggesting drivers of infection spread operate at the stand and landscape scales. Simulation results also suggested the hypothesis that the Pissodes fasciatus and Hylastes nigrinus account for the highest proportion of infections. This model was intended as a first step to connect management scenarios with disease outcomes and generate hypotheses to be examined in future research. The model also aims to serve as a tool to inform forest management practices regarding the impact of

BSRD and stimulate future research on this disease.

©Copyright by Adam J. Bouché March 11, 2020 CC-BY-SA 4.0 Scaling the Issue of Changing Disturbance Regimes: Implications of Novel Landscape Conditions for Black Stain Root Disease

by Adam J. Bouché

A THESIS

submitted to

Oregon State University

in partial fulfillment of the requirements for the degree of

Master of Science

Presented March 11, 2020 Commencement June 2020

Master of Science thesis of Adam J. Bouché presented on March 11, 2020.

APPROVED:

Co-Major Professor, representing Forest Ecosystems and Society

Co-Major Professor, representing Forest Ecosystems and Society

Head of the Department of Forest Ecosystems and Society

Dean of the Graduate School

I understand that my thesis will become part of the permanent collection of Oregon State University libraries. My signature below authorizes release of my thesis to any reader upon request.

Adam J. Bouché, Author

ACKNOWLEDGEMENTS

Thank you to all of those who have assisted me during this journey and whose support has contributed to this achievement. First, thank you to my major professors. We struggled through these complex ideas and challenges together, and I have learned much under your guidance. Thank you to my committee, who helped improve my work. I want to express my appreciation for all the foresters and scientists who participated in the development of this project, especially Dr. Paul Hessburg and Dr. Rick Kelsey, whose experience and insight helped guide my decisions and understanding of this ecological system. Thank you to Mario Vega, whose wit, creativity, and dedication helped me move this project forward. I send my appreciation to Terralyn Vandetta and College of Forestry

Computing Helpdesk as well as the Center for Genome Research and Biocomputing

(CGRB) at Oregon State University for helping to make my research possible. I also express my thanks to Ariel Muldoon for her help through statistical consultation.

During this as with every step in my life, I have deep appreciation for my family, whose love and commitment to my education throughout my life have helped me reach this height. A mi pareja, que me aseguró que tenía la capacidad de terminar este proyecto y hacerlo con calidad, que nos seguimos acompañando, retando, y construyendo. To all of my friends and loved ones, new and old, thank you for sharing this life with me, and let us work towards a better world.

TABLE OF CONTENTS

Page

Chapter 1. Introduction ...... 1

Context ...... 1

Research questions and hypotheses ...... 2

Chapter 2. Literature Review ...... 6

Background information ...... 6

The BSRD-management connection ...... 8

BSRD as a current forest health issue ...... 9

Chapter 3. Methods...... 12

Study area ...... 12

Literature review and data collection ...... 13

Model development and implementation ...... 14

Modeling environment and description ...... 14

Spatial scale ...... 15

Temporal scale...... 16

Forest management approaches ...... 16

Model scheduling ...... 17

Infection processes ...... 18

Other factors ...... 31

Simulations ...... 31

Landscape scenarios ...... 31

TABLE OF CONTENTS (Continued)

Infection variants ...... 32

Analysis ...... 32

Verification ...... 33

Chapter 4. Results ...... 48

Infection ...... 48

Stand-scale infection incidence ...... 49

Infection spread as influenced by stand and landscape management ...... 49

Infection cause by vector ...... 51

Infection spread over time ...... 52

Mortality ...... 53

Sensitivity to select factors ...... 53

Dead host viability duration ...... 53

Sensitivity to initial conditions ...... 53

Chapter 5. Discussion ...... 74

Insights on the BSRD system ...... 74

Comparison of simulated versus observed patterns of BSRD ...... 74

Tree density and rotation length regulate infection spread...... 74

Implications of shifts in landscape management practices for BSRD ...... 79

Trends towards shorter rotations ...... 79

Interactions between management approaches and infection across scales ...... 80

TABLE OF CONTENTS (Continued)

Mismatches between the scales of social and ecological processes ...... 82

Potential interactions between BSRD and climate ...... 83

Chapter 6. Conclusion ...... 84

Summary...... 84

Novel scientific contribution ...... 84

Implications for forest management ...... 85

Large-scale forest management planning ...... 85

Bibliography ...... 87

Appendix ...... 95

Appendix A: Plots of Infection parameters ...... 96

Host parameters ...... 96

Root-vector parameters ...... 98

Insect-vector parameters ...... 101

Appendix B. Model code ...... 104

LIST OF FIGURES

Figure Page

3.1. Probability of infection calculation, including parameters relating the influence of management (gray), tree and stand conditions (green), infection spread via root (orange) and insect vectors (blue), and the events of infection and mortality...... 39

3.2. Example simulated landscape with equal proportions of intensively and extensively managed stands showing how management influenced susceptibility. Intensively managed stands have high BSRD-mortality susceptibility during most of their rotation, while trees in extensively managed stands passed through periods of high and low susceptibility during each rotation...... 40

4.1. Infection incidence for each infection variant and landscape scenarios for all years (after year 25)...... 54

4.2. Landscape-scale infection incidence over time for each landscape scenario and infection variant...... 58

4.3. Distribution of stand-scale BSRD infection incidence for all years (after year 25)...... 58

4.4. Infection incidence by stand management approach, grouped by infection variant and landscape scenario for all years (after year 25)...... 59

4.5. Map of infected trees in a portion of one 50-50% landscape simulation, with shades of blue and green indicating stands managed with extensive or intensive management, respectively. Inset shows a close-up view of an infection center at the boundary between an intensively managed and extensively managed stand. Infected trees shown are those from 30-year intervals starting with year 30 and ending with year 300...... 61

4.6. Stand infection incidences in the five years before (pre) and after (post) each management disturbance for all years (after simulation years 15 for thinnings and 80 for harvest to exclude data from stands initialized at ages. Intensively managed stands were excluded from the thinning plots...... 62

LIST OF FIGURES (Continued)

4.7. Infection incidence for one intensively managed stand (A) and one extensively managed stand (B) showing the effect of thinning and harvest disturbance on stand infection incidence over time. Solid vertical lines represent regeneration harvest, and dashed vertical lines represent thinning. Changes in the percentages of trees infected are shown for the 50-50% landscape with the intermediate infection variant but represent effects observed in many stands across landscape scenarios and infection variants...... 63

4.8. Infection cause by mechanism as a percentage of infections for infection variants and landscape scenarios for all years (after year 25)...... 64

4.9. Percent of BSRD-killed trees for each infection variant and landscape scenario for all years (after year 25)...... 70

4.10. Ratio of the percent of trees killed by BSRD to the percent of trees for each infection variant and landscape scenario for all years (after year 25). Ratios exceed one because BSRD-killed trees persist after the year that they die...... 71

4.11. Sensitivity to dead host viability duration (left) and initial infection conditions (right)...... 73

LIST OF TABLES

Table Page

3.1. Forest management approaches simulated, with tree densities represented as trees per hectare (tpha) or trees per acre (tpa), the latter being more commonly used in forest management in the study region...... 34

3.2. Important state variables for trees in the model...... 35

3.3. Infection parameters related to host response to infection that probability of infection and infection spread in the model simulations...... 41

3.4. Infection parameters related probability of root-vector infection...... 42

3.5. Infection parameters related probability of insect-vector infection...... 43

3.6. Infection variants simulated to account for the uncertainty in parameter values and the relative importance of the different mechanisms for BSRD transmission...... 47

4.1. Summary statistics for landscape infection incidence shown by landscape scenario and infection variant for all years (after year 25)...... 55

4.2. Summary statistics for landscape infection incidence shown by unique combinations of landscape scenarios and infection variants for all years (after year 25)...... 56

4.3. Summary statistics for infection showing interaction between infection variants, landscape scenarios, and management approaches for all years (after year 25)...... 60

4.4. Summary statistics for the percent of BSRD infections by causal mechanism, variant, and landscape scenario for all years (after year 25)...... 65

4.5 Summary statistics for the percent of trees killed by BSRD shows by infection variant and landscape scenario for all years (after year 25)...... 72

LIST OF APPENDIX FIGURES

Figure Page

A.1. Density plot for BSRD-infection susceptibility, a binomial probability distribution, with the mean represented as a dashed line...... 96

A.2. Probability of mortality at a function of tree age and time-since-infection. Probability of mortality during the year the tree becomes infected by BSRD is lower than in subsequent years...... 97

A.3. Maximum radial extent of tree root systems as a function of tree age by data source...... 98

A.4. Maximum radial extent of tree root systems as a function of tree age. The regression fit is plotted (line) with the prediction interval (shaded blue), literature data (black diamonds), and random parameter values drawn from a normal distribution with a mean that falls along the fit line...... 99

A.5. Density plot of probability of root-vector transmission, a binomial probability distribution, with the mean represented as a dashed line...... 100

A.6. Density plot of the probability that an insect vector is infested by pathogen spores for each insect species, binomial probability distributions with the mean for each species represented as a dashed line...... 101

A.7. Density plot of the probability of insect-vector transmission for each insect species, binomial probability distributions with the mean for each species represented as a dashed line...... 102

A.8. Probability of insect-vector dispersal for the walking insect S. carinatus (sea green) and the flying insects P. fasciatus and H. nigrinus (royal blue), modeled with exponential decay functions...... 103

Scaling the Issue of Changing Disturbance Regimes: Implications of Novel Landscape Conditions for Black Stain Root Disease

CHAPTER 1. INTRODUCTION

CONTEXT

Black stain root disease of Douglas-fir (BSRD), caused by Leptographium wageneri

(Kendrick, 1962; Wingfield, 1985) var. pseudotsugae (Harrington and Cobb, 1983, 1986) is an agent of mortality in young Douglas-fir (Pseudotsuga menziesii [Mirb.] Franco) trees (under 30-40 years old) in the Pacific Northwest. Some forest managers suggest that BSRD impacts are increasing, evidenced by anecdotal observation of increased young tree mortality. The intensification of management of Douglas-fir plantations with shifts towards shorter rotations is feared to be increasing BSRD impacts because young trees are highly susceptible to BSRD-caused mortality and insects that vector the disease are attracted by stumps from more frequent harvest disturbance. The purpose of this thesis is to investigate the influence of the changes to management at the landscape scale on this forest disease system.

I analyzed the behavior of the BSRD system and the influence of forest management practices on the spread of BSRD by simulating spread of the disease using a spatially explicit

Agent-Based Model (ABM). I synthesized a mechanistic understanding of the disease system from available literature, data, and consultation with experts and integrated this understanding to model the spread of BSRD at the tree, stand, and landscape scales. In this model, as with other

ABM, the patterns of infection and disease-induced mortality at different spatial and temporal scales emerge through a bottom-up approach, resulting from localized individual interactions.

The interactions between trees and insect vectors of BSRD generate the dynamics of disease transmission in the model simulations. I used the model to evaluate the influence of stand and landscape conditions created by forest management approaches as drivers of BSRD spread. A primary objective was to address whether the shift from an extensive management approach with thinnings and longer rotations towards an intensive management approach with short rotations

2 will act as a driver of BSRD impact because of the resulting increase in harvest disturbance frequency, higher attractiveness to the insect vectors, and a greater extent of trees highly susceptible to mortality by BSRD To test this hypothesis, I simulated infection spread and management across a gradient of landscape management scenarios, varying the proportion of stands with intensive versus extensive management in the landscape. This approach allowed me to analyze the impacts of forest management on infestations of BSRD at the landscape level and assess the threat posed by BSRD in realistic present and future landscape management scenarios.

Another central question I addressed is whether there are complex emergent behaviors driven by management in the disease system. Specifically, I investigated non-linear responses in

BSRD infection probabilities as the proportion of stands with intensive management in the landscape increases, i.e., whether the landscape crosses a threshold in terms of BSRD incidence as intensive management becomes more prominent. By examining infection probabilities within each management class in relation to the overall landscape-scale management, I examined whether there is a point where the scale of management as a driver of the system shifts from the stand to the landscape. In other words, I assessed whether the BSRD resistance of a stand managed with the approach that most reduces BSRD susceptibility is overwhelmed when high

BSRD risk management dominates the landscape. This analysis adds to our knowledge of ecological spillover effects as well as cross-scale feedbacks in ecological systems. It also improves upon understanding of scale mismatches between ecological processes, e.g., if the scales at which management acts does not match scales relevant to BSRD (Cumming et al., 2006).

RESEARCH QUESTIONS AND HYPOTHESES

1. How do factors in the host-vector-pathogen system influence the incidence and probability of BSRD infection spread and mortality at the stand and landscape scale?

I hypothesized that the factors in the BSRD system that varied with distance would exert the strongest effects on infection spread and mortality. I hypothesized that the model would be highly sensitive to changes in the probability of root contact between neighboring trees as

3 compared to the probability of root-vector transmission of infection because root contact is a necessary condition for transmission to occur. While root contact can occur without transmission, transmission cannot occur without root contact. Based on the literature, I also hypothesized that there would be interaction between stand density and probability of root contact because distance between trees determines the number of root contacts and grafts that form between them. I predicted that higher values of probability of root-vector infection in denser stands would increase infection spread via roots relative to lower density stands. I also hypothesized that dispersal probability for insect vectors would exert a strong influence on infection spread and mortality throughout the landscape because of its effect in connecting the landscape, providing a mechanism for long-distance spread beyond infection center and stand boundaries. Increasing the probability of insect-vector dispersal would therefore increase the spread of BSRD at the landscape scale, with increased infection in stands with lower BSRD spread and mortality due to their management. There is likely to be interaction between the numerical values associated with factors in the disease system and different landscape management scenarios because of the influence of management disturbance on infection spread via root and insect vectors because of how management changes tree density and creates insect-vector attraction.

2. Do forest management in the Pacific Northwest and the resulting stand and landscape conditions act as drivers of stand- and landscape-scale BSRD spread and mortality?

a. What are the effects of forest age class distribution, specifically, the proportion of young Douglas-fir plantations in the landscape, on infection spread and morality at the stand and landscape scales?

I hypothesized that BSRD mortality would increase with increasing proportion of the landscape managed with young, short-rotation plantations (intensive management). Increasing the proportion of young stands increases the proportion of the landscape with high mortality susceptibility to BSRD. Decreasing rotation lengths also increases the harvest disturbance frequency and results in a greater proportion of the landscape disturbed at all times. This increase in the area and frequency of disturbance attracts insect vectors that carry pathogen spores and provides stumps and slash that serve as habitat, further boosting insect-vector populations and

4 providing a positive feedback that could accelerate infection spread in disturbed portions of the landscape. In addition, the greater the area of disturbance, the greater the potential for development of infection centers that provide nuclei for further disease spread throughout the landscape. However, under current management regimes in the PNW, short-rotation Douglas-fir plantations are not necessarily thinned, which may counteract at least partially the effect of increased harvest frequency. As an alternative hypothesis, landscapes with higher proportion of extensively managed stands could increase infection spread because extensively managed stands are thinned while intensively managed stands are not, and thinning has been associated with the spread of BSRD (Witcosky et al., 1986a). The homogeneity of the distribution of susceptible stands will likely affect disease spread as well. If a highly heterogeneous distribution of susceptible stands leads to connectivity bottlenecks in the landscape, infection may not spread to geographically isolated but potentially susceptible stands throughout the landscape.

Implementation of thinning throughout the landscape is likely to affect BSRD spread by providing centers of insect-vector attraction and stress-induced infection susceptibility within the landscape. The spatial distribution of thinning thus will affect the spatial distribution of stand infection probabilities, with highest infection probabilities in and around stands where thinning is implemented. For both management approaches, I hypothesized that infection would increase when and where thinning and clear-cut harvest are implemented, influencing disturbed stands and their neighbors.

b. What, if any, are the non-linear responses of BSRD infection spread and mortality to forest management disturbance at the stand and landscape scales

I hypothesized that non-linear patterns in infection spread and mortality would emerge because of the many interacting feedbacks between spatial and temporal patterns of Douglas-fir, insect vectors, pathogen and disturbance occurring at multiple spatial and temporal scales.

Increasing the proportion of the landscape managed with conditions that promote infection spread and/or mortality could result in positive feedbacks to the probability of infection and spread of BSRD. Management approaches that mitigate the probability of infection and mortality

5 in a stand (e.g., avoid thinning, plant mixed-species plantations, extend rotations) may be effective when BSRD exists at low, background levels in the landscape. However, when management practices that promote BSRD spread are the most prevalent practices in the landscape (e.g., short rotations, thinning, and frequent harvest), it is possible that individual- stand management decisions could be insufficient to mitigate BSRD infection or mortality. At some critical level of one or multiple conditions favoring spread, positive feedbacks could cause the system to cross a threshold where infection probability is high throughout the landscape. At such a point, management practices at the stand scale could be overridden by the broader landscape context, and efforts to prevent BSRD in individual stands may not be effective. In this scenario, the crossing of this threshold would represent a shift in the scale of infection spread and mortality drivers from the individual stand scale to the landscape scale.

6

CHAPTER 2. LITERATURE REVIEW

BACKGROUND INFORMATION

Black stain root disease of Douglas-fir (BSRD) is a native, fungal root disease in the Pacific

Northwest (PNW) of North America. BSRD is caused by the fungal pathogen Leptographium wageneri (Kendrick, 1962; Wingfield, 1985) var. pseudotsugae (Harrington and Cobb, 1983, 1986), the subspecies that affects Douglas-fir (Pseudotsuga menziesii) trees. BSRD is a vascular wilt disease. The pathogen colonizes the xylem of infected tree hosts, preventing water transport

(Hessburg, 1984; Hessburg and Hansen, 1987). BSRD is a concern for forest management because most young, infected trees (below age 30 to 40) experience decline and mortality within two years of becoming infected (Witcosky and Hansen, 1985). Older Douglas-fir are less susceptible to mortality caused by BSRD, and mortality in infection centers decrease as trees age (Hansen and

Goheen, 1988; Hessburg et al., 2001). Older trees are apparently able to survive infection through more effective defenses that isolate the pathogen within their root systems (P. Hessburg, personal communication, 2019).

BSRD infection spreads through roots and three known insect vectors. Infection spread via roots occurs as the pathogen grows across root contacts and grafts between adjacent host trees and is independent of tree vigor (Hessburg, 1984; Hessburg and Hansen, 1986; Goheen and

Hansen, 1993). Infection spread via insect vectors results from the weevils carinatus and Pissodes fasciatus (Coleoptera: ) and the bark Hylastes nigrinus

(Coleoptera: Curculionidae: Scolytinae) transporting pathogen spores during dispersal, feeding, and reproduction activities (Witcosky and Hansen, 1985; Witcosky et al., 1986a). The insect vectors facilitate infection by introducing the pathogen to the xylem of trees that they wound

(Harrington et al., 1985, Witcosky et al., 1986b). S. carinatus is a walking insect vector capable of shorter-distance dispersal, while P. fasciatus and H. nigrinus have life stages with flight (Zethner-

Møller and Rudinsky, 1967; Condrashoff, 1968; Witcosky, 1981; Witcosky et al., 1986b). All three insect vectors are attracted to volatiles produced by infected, dead, and stressed host trees

7

(Rudinsky and Zethner-Møller, 1967; Witcosky et al., 1986b, 1987; Kelsey and Joseph, 1998) and primarily attack low-vigor trees. Insect-vector attraction is imprecise, and healthy trees in the vicinity of stressed and infected trees and stumps are also wounded (Jantz and Rudinsky, 1965;

Jantz and Rudinsky, 1966; Rudinsky and Zethner-Møller, 1967; Raffa and Berryman, 1980;

Witcosky et al., 1986a). BSRD typically occurs clustered in infection centers with distinct boundaries, trees in various stages of decline, and some trees that escape infection (Hansen and

Goheen, 1988). Infection centers have been hypothesized to initiate through long-distance dispersal of flying insect vectors and expand through spread via root and insect vectors. Once established, infection centers expand with mean radial growth rates from 0.4 to 0.9 m/year, and areas from 0.001 (single trees) to 4 ha (several hundred trees), though most infection centers measure between 0.01 and 0.3 ha (Hansen and Goheen, 1988).

Though multiple sources, experts, and forest managers have stated the assumption that younger Douglas-fir are also more susceptible to becoming infected by BSRD than older Douglas- fir, there are scant data to support that claim. Douglas-fir at least 150-years-old have been found to be infected by BSRD (Goheen and Hansen, 1978; P. Hessburg, personal communication, 2019).

In experimental inoculation trials, 70-100% of young, apparently healthy trees (12 years old) experimentally inoculated with the BSRD pathogen were infected, but there have been no known inoculation experiments testing whether infection susceptibility changes with age. Only a small fraction of infection mortality centers has been identified in older stands, likely because BSRD- induced mortality is rare in older trees and thus BSRD infection may go undetected (Goheen and

Hansen, 1978; Hansen and Goheen, 1988; P. Hessburg, personal communication, 2019).

Contributing to this assumption is the bias in BSRD research towards surveying 10-to-30-year- old plantations where mortality is visible and obvious. There is a need to resolve whether lower incidence of BSRD has been found in older stands because (i) older trees are less susceptible to infection, (ii) the resistance of older, infected Douglas-fir to exhibiting symptoms and mortality has reduced detection in older stands, (iii) absence or reduced frequency of management

8 disturbance limits BSRD spread in older stands, (iv) disease surveys have been biased towards younger stands, or (v) some combination of the aforementioned factors.

THE BSRD-MANAGEMENT CONNECTION

Natural and human disturbance, including forest management practices, influence the spread of BSRD. Infection spread via roots is hypothesized to be enhanced by single-species

Douglas-fir plantations and higher planting densities that promote spread by increasing root proximity and thus probability of root contacts and grafts between trees (Reynolds and

Bloomberg, 1982; Hessburg and Hansen, 1986; Witcosky, 1989). Thinning, regeneration harvest, roads, and skid trails are positively associated with BSRD, with up to 80% of identified infection centers found on sites with management disturbances (Goheen and Hansen, 1978; Witcosky et al., 1986a, 1986b; Hessburg et al., 2001). Disturbances create suitable feeding and breeding habitat for insect-vector colonization, including slash, stressed trees, dead trees, and fresh stumps

(Witcosky et al., 1986a, 1986b). In addition, stumps and trees stressed by soil compaction, drought, flooding, root disease, and other factors produce volatile chemical compounds including ethanol and terpenes that attract insect vectors. BSRD-infected trees also produce the same chemical attractants, creating a positive feedback loop to the spread of the disease

(Rudinsky and Zethner-Møller, 1967; Zethner-Møller and Rudinsky, 1967; Harrington et al., 1985;

Witcosky et al., 1986a, 1986b; Kelsey and Joseph, 1998). In addition to insect-vector activity, host wounds created by machinery during management may provide the pathogen access to xylem and allow for infection (Hessburg, 1984). Furthermore, wounded trees also release volatile insect- vector attractants. Thinning in young stands is thought to be a primary management driver of infection spread in in plantations because stumps are a major attractant and habitat source for insect vectors. BSRD researchers have consistently recommended against thinning in areas with known incidence of BSRD.

Rotation length likely influences stand mortality susceptibility because BSRD disproportionately kills younger Douglas-fir, under 30-40 years old. Decreasing rotation lengths

9 also increases the frequency of regeneration harvest disturbance. Currently in the PNW, intensive, short-rotation Douglas-fir plantations are not typically thinned, which may counteract at least partially the effect of increased harvest frequency. Timing of artificial regeneration is likely important for the probability of infection for trees in the next stand because there is a limited window during which BSRD persists in stumps on the site. The pathogen requires a live host for survival, remaining viable in dead Douglas-fir trees and stumps for at least seven months

(Witcosky et al., 1986a) and up to 24 months (Adams and Cobb, 1986).

BSRD AS A CURRENT FOREST HEALTH ISSUE

There is a high degree of variability in the impact of BSRD, and detailed landscape- or region-wide surveys are lacking (Kearns and Lockman, 2016). A survey of 700, 10-to-25-year-old plantations (over 400,000 hectares) in southwest Oregon, an area where BSRD is prevalent, found

21.3% of plantations were infected with BSRD. In this survey, BSRD affected a greater proportion of stands than either laminated root rot or Armillaria root disease (Hessburg et al., 2001). On average, BSRD affected <2% of trees in infected stands, however, some stands in the region had

>10% of trees infected and presented 10 to 50% mortality due to BSRD (Goheen and Hansen,

1993). Recent anecdotal evidence from forest managers suggests that BSRD incidence may be increasing, at least in Oregon. Additionally, a 2017 survey of 20 randomly selected, 2-to-8-year- old stands in the Coast Range of Oregon found 75% of those stands were infected with BSRD, though incidence was estimated at around 1% of trees (LeBoldus et al., unpublished data).

In the “Douglas-fir region” of western Oregon and Washington, the age class distribution and disturbance regimes in forested landscapes have changed dramatically with implications for

BSRD. A legacy of old-growth timber harvest, industrial logging, and the emergence of forest management as the primary disturbance agent (Cohen et al., 2002; Berner et al., 2017) have created a landscape where Douglas-fir-dominated forest under 50 years old is the most prevalent forest type (Agne et al., 2018). Rotation lengths in plantations have decreased from 60-80 years in the late twentieth century to 40-50 years by 2005 (Briggs, 2007). In 2019, typical rotation length for

10

Douglas-fir in Oregon ranged from 35 to 50 years, and some managers have set targets for rotations as short as 30 years (D. Shaw, personal communication, 2019). This trend towards shorter rotations is expected to continue, driven in part by a combination of Douglas-fir market prices, changes in mill capacity towards smaller logs, and structural changes in the timber industry changing investment strategies and increasing the rate of turnover in land ownership

(Gunnoe et al., 2018).

The prevalence of intensively managed stands, those managed as even-aged Douglas-fir plantations with 30-to-40-year rotations, is increasing the extent of young Douglas-fir plantations with high susceptibility to BSRD impacts and is coupled with higher frequency and annual area of clear-cut harvest disturbance. This disturbance creates suitable hosts that serve as insect-vector habitat and likely attract insect vectors and increase their populations (Agne et al., 2018). In contrast, extensive forest management, with 60-to-80-year rotations, may limit BSRD impacts because stands surpass the ages of highest disease susceptibility, though thinning practiced with extensive management is a concern for insect vectors as well. As the tendency towards shorter rotations continues, management at the stand scale is creating potentially favorable conditions for BSRD across the landscape.

Forests are complex systems with emergent properties, non-linearity, and cross-scale feedbacks (Messier et al., 2013, 2015). In these systems, pattern and scale can influence ecological processes (Levin, 1992, Turner, 2013). Landscape-scale spatial and temporal patterns have been shown to affect spread in processes relevant to BSRD, including bark beetle and plant disease systems (Holdenrieder et al., 2004; Condeso and Meentemeyer, 2007; Dillon et al., 2014; North and Godfray 2017) and specifically in the Pacific Northwest (Hansen and Goheen, 2000; Jules et al., 2008). There are interactions occurring across spatial scales that influence the behavior of these systems. BSRD infection happens at the individual tree scale, management happens at the stand scale, and management trends and ecological processes including insect-vector dispersal happen at the landscape scale. In addition, feedbacks exist between the spatial and temporal relationships between the host, insect vector, and pathogen populations and management and disturbance.

11

The complex interactions between the components and processes in this system implies that landscape-scale patterns resulting from shifts in management practices in the PNW could have implications for the spread of BSRD.

12

CHAPTER 3. METHODS

STUDY AREA

This research focuses on the behavior of BSRD in Douglas-fir (Pseudotsuga menziesii [Mirb.]

Franco) forests in the moist, temperate “Douglas-fir region” of the Pacific Northwest of North

America (Jensen, 1955; Franklin, 1979). The geographic extent of the study includes western

Oregon and Washington State, from west of the Cascade Range to the Coast Range and the Pacific

Ocean. This region has a climate with wet, mild winters and dry summers. Precipitation ranges from 1,500 to 3,000 mm per year. Douglas-fir is the predominant tree species throughout much of this region and is naturally found with western hemlock (Tsuga heterophylla), Sitka spruce (Picea sitchensis), western red-cedar (), and grand fir (Abies grandis), depending on elevation and ecoregion (Franklin and Dyrness, 1988). As of 2018, 41% of forests in this region were under

50 years old, with only 7% of forests exceeding 250 years old (Agne et al., 2018).

Land ownership in this region is a combination of public and large and small private holdings, which influences the management and characteristics of forests. Plantation forests are dominant forest in the study region. Almost 50% of land in this region is under private ownership, including industrial timber management (Agne et al., 2018). Forests managed by industry typically consist of even-aged, Douglas-fir monocultures, originating after clear-cut harvests and reforestation. These forests are typically managed to maximize timber production under a single- good or single-objective management paradigm (Messier et al., 2013). Thinning is becoming less common on private lands (Ohmann et al., 2007). Forests managed on private land are also younger, containing nearly 70% of forests under 50 years old, and rotation lengths are decreasing

(Briggs, 2007; Agne et al., 2018). Stands are often artificially regenerated with tree seedlings sourced from improved genetic stock (Agne et al., 2018). Public land owned by local, state, and federal agencies accounts for 50.8% of this region and contain most forests with older age classes.

Disturbance regimes on public lands are more variable than those on private lands because they are managed with timber production as one of multiple uses and objectives (Agne et al., 2018).

13

LITERATURE REVIEW AND DATA COLLECTION

I performed a literature review to use the best present understanding of BSRD for model development. I consulted peer-reviewed publications, reports, surveys from federal and state land management agencies, and data collected by collaborators. Literature and data primarily covered BSRD in western Oregon, especially the Coast Range and southwestern Oregon, with less information available for western Washington, British Columbia, and northern California. I developed the structure of a mechanistic, conceptual model of the disease system by identifying processes governing infection spread. Primary components of the disease system include the

Douglas-fir trees (host) and their roots (vector), three species of insects (vectors), and the fungal pathogen. I collected quantitative data from the literature where available to develop equation forms and select parameter values to characterize the interactions between disease system components. Parameters were selected to be interpretable, such as transition rates and probabilities. Equations were then linked to simulate disease spread for a set of landscape conditions. To reflect the limited available information, I incorporated uncertainty and error and accounted for sample size where possible using probability distributions and incorporating stochasticity into model events using probabilities.

Expert opinion was woven throughout the review and model development process. I consulted experts in entomology, plant pathology, forest health, landscape ecology, silviculture, statistics, and forest management. I convened a two-day field meeting to discuss hypotheses and assumptions and identify limitations given the present state of knowledge of BSRD. I developed a simulation model through an iterative process of presenting and critiquing the data and its synthesis with the experts. Therefore, experts provided one means of verification for the model by confirming correct understanding of the disease system, consulting on parameter values, and verifying that the conceptual model was accurately implemented as the computer simulation.

14

MODEL DEVELOPMENT AND IMPLEMENTATION

I synthesized the results of the literature review to produce a model that simulates infection spread over space and time and accounts for the influence of forest management disturbance on BSRD infection probabilities. Models are frequently applied in landscape ecology and epidemiology (Holdenrieder et al., 2004), and studies of complex systems (Levin et al., 2013), because of their ability to simulate ecological processes in a wide range of possible conditions and to relate patterns and processes occurring at distinct spatial and temporal scales. The BSRD system is complex and data poor. A modeling approach provided an effective means of answering my research questions because of the flexibility to simulate and compare a multitude of management scenarios, relationships between variables and hypotheses regarding the disease system and infection vectors.

MODELING ENVIRONMENT AND DESCRIPTION

I developed the black-stain-landscape-management-disturbance model as an agent-based model in the NetLogo modeling environment (v. 6.0.4) (Wilensky, 1999). NetLogo is a widely used tool for agent-based modeling in ecology and other disciplines. It is a powerful yet user- friendly, open-source, programmable platform that facilitates transparency in the development, use, and sharing of models. The main advantages of NetLogo for my work are that the model is mechanistic, stochastic, and spatially explicit.

• Mechanistic: The model structure and calculations are based on a process-based

understanding of the disease system at the individual-tree, stand, and landscape scale.

We developed the model structure and parameters used in the simulations through a

qualitative analysis of the literature and expert opinion. Therefore, infection spread

throughout stands and thus the landscape is an emergent property derived from the

tree, stand, and landscape conditions and how they interact with the infection process

mediated by root contacts, insect vectors, and disturbance.

15

• Stochastic: Parameters in the model are drawn randomly from probability distributions.

This allowed me to account for variability and incorporate underlying uncertainties and

knowledge gaps in our understanding of the disease system.

• Spatially explicit: Infection spread is fundamentally a spatial process, and any model

simulating the process must reflect the role and importance of space. By tracking tree

and stand coordinates, the model simulates distance-dependent processes, including

root contact and insect-vector dispersal, and effects of spatial heterogeneity.

Additional components of the model, including the process of simulating and projecting insect-vector dispersal probability, were performed using a program developed in Go (The Go programming language; Vega, 2020), R (R Core Team 2019), and the R NetLogo extension (Thiele and Grimm, 2010).

SPATIAL SCALE

This model functions in discrete space with a grid of hexagon “cells” (“turtles” in

NetLogo) based on a modified “Hex Cell Aggregation” model in NetLogo (Wilensky, 2007). A hexagonal grid allows for two-dimensional uniformity with distance; each cell has six neighbors treated as equidistant, which I considered necessary to perform calculations for infection spread.

The spatial resolution or grain of the model is 1.52 m (5 ft), the distance between the centers of adjacent grid cells. Each cell can be occupied by a single Douglas-fir. The spatial resolution was chosen to allow simulation of tree spacings commonly used in the study region. The landscape consists of 60 stands with an average area of 12.1 ha (30 acres) for a total extent of 728.4 ha (1,800 acres). The landscape functions as a torus to avoid a boundary problem (Fotheringham and

Rogerson, 1993) that would produce differences in probability of infection at the center versus the edge of the landscape as an artifact of model design. Computational limits hindered simulation of larger landscapes, but initial testing suggested that general patterns of infection spread were consistent for ranges of landscape sizes from 60 to 80 stands and 30 to 40 acres.

16

TEMPORAL SCALE

The model is a discrete time model with a temporal resolution of one year per time step

(“tick” in NetLogo). A one-year time step realistically represents tree and pathogen growth and insect-vector dispersal cycles that depend on life history traits of the organisms and the annual seasonality of the Pacific Northwest climate. The temporal extent of the model is the length of each simulation, set to 300 years to allow for multiple rotations to occur in each stand.

FOREST MANAGEMENT APPROACHES

The two forest management approaches simulated, intensive and extensive management, were chosen to represent contrasting approaches to management focused on timber production in the Douglas-fir region. The management approaches differ in rotation length, thinning entries, and tree densities. Though the labels “intensive” and “extensive” can have different meanings within forestry, I defined intensive and extensive management approaches as listed in Table 3.1.

Intensive management reflects the current trend in the study region towards shorter rotation lengths on industrial or investor-owned lands with the aim of selling products to the small-sized timber market. In contrast, extensive management reflects management aimed at the high quality, large wood market. It includes thinning operations and longer rotations (Table 3.1) and is applied by small woodland owners and some industrial landowners in the region. The model included the effects of roads in terms of insect-vector attraction, reflecting the higher probability of insect vectors dispersing to trees along roads. Road densities were consistent between the two management approaches. By changing the proportion of the landscape managed by each of these management approaches between simulations, I substituted space for time, using different landscapes to represent the progressive change in management practices over time following the current and expected future management trends.

17

MODEL SCHEDULING SETUP

The model generated a landscape composed of stands that were randomly assigned to one of the two management approaches at user-defined proportions. Random assignment of management approaches for the simulations used in this study was chosen as a simplification to isolate the effects of management practices from the effect of the spatial pattern, i.e., spatially dispersed versus clustered, of management approaches. For model initiation, each stand was randomly assigned an age between one and the respective rotation age. Trees were generated as

“agents” at the appropriate spacing for their management class, with densities reflecting previous thinning operations in extensively managed, older stands (Table 3.1). Each tree data set stored state variables relevant to management, infection spread, and mortality as displayed in Table 3.2.

Roads were generated along stand boundaries at a density representative of average road densities for Douglas-fir plantations in the study region (John Sessions, personal communication)

(Table 3.1). Trees close enough to roads to attract insect vectors were assigned a road attraction multiplier (Table 3.2). The model also initialized and stored all variables, equations, and parameter distributions necessary for management, infection spread, data output, and all other procedures.

GO

The “go” procedure, not to be confused with the program written in the Go programming language, included all events that occurred during each year in the following order:

1. Manage stands: Previously harvested stands were regenerated. Stands were thinned or clear-cut harvested based on their age.

2. Project infection: Infected trees projected infection probabilities to trees within the possible distances for spread. Parameters used in probability of infection calculations for the tree hosts are presented in Table 3.3, for root-vector infection in Table 3.4, and insect- vector infection in Table 3.5.

3. Project attraction: Trees becoming attractive to insect vectors, i.e., those trees infected or killed by BSRD and stumps in thinned and harvested stands, projected the relevant attraction multipliers onto all trees within the attraction distance (Table 3.5).

18

4. Infection and mortality: Infection and BSRD-induced mortality occurred.

a. Live, infected trees experienced mortality based on BSRD mortality susceptibility (Figure 3.1, Table 3.3).

b. Infected dead trees and stumps lost infection potential based on time since mortality and dead host viability duration (Figure 3.1, Table 3.3).

c. Dead trees and stumps lost attraction based on time since mortality and attraction duration for dead hosts (Figure 3.1, Table 3.3).

d. Viable tree hosts became infected based on probability of infection via root and insect vectors (Figure 3.1, Table 3.3).

5. Aging: Tree age increased by one year.

INFECTION PROCESSES

PROBABILITY OF INFECTION CALCULATIONS

Probability of infection by the four vectors causing infection, i.e., root vectors and three species of insect vectors, was simulated as shown in Figure 3.1. The model calculated probability of infection for each tree during every year of every simulation. Infected trees radially projected a probability of infection onto all trees within the root-contact and insect-vector dispersal distances, which varied by infection vector. Therefore, the probabilities of infection for each tree and time step were determined by the present state of the tree and its surrounding stand and landscape conditions, including the number of infected trees and stumps, the distance to these infection sources, and attraction multipliers. Whether or not a tree became infected was determined through a stochastic process using a Monte Carlo method. Trees became infected if a random number drawn from a uniform distribution between zero and one was higher than each vector’s probability of infection. Because the vectors are not mutually exclusive, the probability of infection for each vector was treated independently, and trees could become infected by multiple vectors. Infection by each vector was tracked in the data table associated with each tree.

Based on present understanding of the disease, live, infected trees remained infective and thus able to spread the disease. Dead trees became uninfected and lost susceptibility to future infection

19 when time-since-mortality (Table 3.2) exceeded dead-host-viability-duration (Table 3.3), the time until dead trees and stumps are too old and decayed to host the pathogen (Adams and Cobb 1986,

Witcosky et al., 1986a). Infected trees died depending on age and BSRD-mortality-susceptibility.

Infection, thinning and harvest entry were the only causes of tree mortality in the model.

The equations and probability distributions predicting the probability of infection formalize the interactions between the disease system factors (Table 3.3, Table 3.4, Table 3.5). I chose probability distributions to fit the type of data available. For discrete count data, I used the binomial probability distribution, which is a discrete distribution used to describe the probability of events with binary outcomes. The binomial distribution accounts for uncertainty related to sampling because sample size determines spread, with wider spread for lower sample sizes. The beta distribution was used for continuous proportions to randomly draw probability values bounded between 0 and 1. The normal distribution was used for parameters, for which information about means and standard deviations was available. Uniform distributions were used when available data were insufficient to select another distribution. Definitions, equations and parameter probability distributions are described in detail in Table 3.3, with additional details for some parameters in this section. Host susceptibility

BSRD-infection susceptibility

BSRD-infection susceptibility (푆inf) is defined as the probability that the pathogen infects the tree when the tree is exposed to inoculum and all other conditions necessary for infection are met. BSRD-infection susceptibility was assumed to remain constant with tree age. The probability distribution for infection susceptibility is based on the data published by Witcosky et al., (1986a) and Hessburg and Hansen (1986). Figure 3.2 shows stand-scale infection (age-dependent scenario) and mortality susceptibility as influenced by rotation length in the model. BSRD- infection susceptibility was drawn from a binomial probability distribution using data from studies that artificially inoculated roots of Douglas-fir (Table 3.3).

20

BSRD-mortality susceptibility

BSRD-mortality susceptibility is defined as the probability that an infected tree will die as a function of its age and time since infection. Mortality for young, Douglas-fir occurs between one and four years of infection, with most mortality in the second year of infection but some trees surviving as many as 10 years (Hansen and Goheen 1988). Mortality for old Douglas-fir has not been rigorously quantified but, given that live trees as old as 150 have been found to be infected with BSRD and BSRD-caused mortality has not been reported in older trees, the BSRD-mortality- susceptibility in older trees is potentially as less than 0.01. I chose to use a beta distribution with a mean of 0.05 and a range from 0 to 5% for mortality in older trees.

Probability of root-vector infection

Every infected tree has the potential to infect other trees within root contact distance through direct root-root transmissions (Table 3.4). Therefore, probability of root-vector infection (푃inf,r) was calculated as the probability that a tree be infected by any neighboring trees through root infection using Equation 1, 푛 푃inf,r = 푆inf ∗ ∑𝑖=0( 푃rc,𝑖 ∗ 푃rt) (1) where 푆inf is BSRD-infection susceptibility, 푃rc,𝑖 is probability of root contact with a given tree 𝑖, 푃rt is probability of root-vector transmission, and 푛 is the number of infected trees close enough for root contact. Values of 푃inf,r were truncated between zero and one. Probability of root contact

Probability of root contact (푃rc) was the probability that two trees have contact at any point in the distance between the trees (Table 3.4). Probability of root contact was calculated for each pair of trees (e.g., Tree 1 and Tree 2) within the maximum possible root contact distance as determined by tree age and planting arrangement.

1. The maximum root extent (푟), the maximum radial distance to which the root system extends from the bole, was calculated for each tree as a function of tree age, using Equation 2, 푟 = 퐴 ∗ 푎퐵 (2)

21 where 푎 is tree age, and 퐴 and 퐵 are parameters in the equation. Eq. 2 was fit to available root extent data using a non-linear regression model to estimate 퐴 and 퐵 (Table 3.4). Limited data was available regarding root extent for trees of different ages and in different growing conditions, including tree spacing. More than 50% of available data for Douglas-fir root extent versus age were from trees younger than age 20, and some trees measured were regeneration under closed canopy. Data that did not represent the conditions in simulated management approaches, such as root extent for regeneration under closed canopies, were excluded when performing regressions. Trees planted at spacings simulated in the model reach canopy closure by age 12-18

(Klaus Puettmann, personal observation, 2019) and the extent of Douglas-root systems meet or exceed crown projection (McMinn 1963, Kuiper and Coutts 1992, Mauer and Palatova 2012).

Therefore, one data point was added at age 12 and one at age 18 to account for the known conditions being simulated and counteract the likely underestimate of root extent from available data. I considered this decision necessary to meet known tree growth conditions for model management approaches, because without these additional data, probability of root contact did not reflect established real-world conditions.

Two regression models were selected for calculating maximum root extent, one more conservative than the other, to account for uncertainty in the data and compare the influence of high probability of root-vector infection versus low probability of root-vector infection for patterns of infection spread. The more conservative regression included data from Mauer and

Palatova (2012), which reported root extent values consistently lower than the other sources. A logarithmic growth function was chosen as the equation form for Eq. 2 because tree roots systems continue to expand radially as trees age but growth rates of tree roots decline as tree age increases

(Kuiper and Coutts 1992, Mauer and Palatova 2012), and the logarithmic growth function more closely matched root extent data than did the alternative equation forms considered. To account for the range of variability in the data, the fit for maximum root extent versus age was used as the mean for a normal distribution from which values were drawn during the simulation, with the standard deviation set so that values fell within the prediction interval (Appendix B).

22

2. Probability of root presence (푃rp) was calculated for each tree as a function of distance from the bole and the maximum root extent using Equation 3,

1 푃 = (3) rp 1+푒푘 ( 푥 − 푟𝑖) where 푘 is the logistic decay rate, 𝑖 is the inflection point of the function as a proportion of the maximum root extent, x is distance as measured from the bole of the tree, and 푟 is the maximum root extent. Probability of root presence was assumed to follow an inverted logistic function because root density in the soil decreases with increasing distance from the bole, ultimately reaching zero. Root densities estimated from scale diagrams of Douglas-fir root systems by

Kuiper and Coutts (1992) supported the choice of an inverse logistic function and were used to select values for 푘 and 𝑖 that matched empirical data regarding the rate of decrease in root density with distance from the tree bole.

3. Joint probability of root presence, 푃rp,Ti,j the probability that roots for both trees in a pair were present, e.g., Tree i and Tree j, was calculated as a function of the inter-tree distance, the distance between Tree i and Tree j, as the product of the probability of root presence for the individual trees.

Equation 3 was used to calculate the probability of root presence for Tree i (푃rp, Ti), and a modified, inverted version of Eq. 3 was used to calculate 푃rp, Tj (Eq. 4),

1 푃 = (4) rp, Tj 1+푒−푘(푥int−(푥−𝑖∗푟)) where 푥int is the inter-tree distance, and all other variables are the same as in Eq. 3. Equation 5 shows the calculation for joint probability of root presence.

푃rp, Ti,j = 푃rp,Ti ∗ 푃rp,Tj (5)

4. Finally, probability of root contact (푃rc) was calculated, representing the probability that two trees have contact at any point in the distance between the trees.

Because infection spread was assumed to occur at a root contact or graft at any location between the two trees, the probability of root contact calculated as the area under the curve (AUC) as the integral of the joint probability of root presence function using Equation 5:

23

푥 푃 = int 푃 rc ∫0 rp,Ti,j. (6)

The AUC represented the sum of the probability of having roots in contact at any point across the gradient. 푃rc calculations were verified through comparison against data from Reynolds (1981), which quantified the proportion of Douglas-fir trees with root contact across a gradient of inter- tree distances. Probability of root-vector transmission

Probability of root-vector transmission is the probability that the pathogen will pass from one tree to another through a root contact or graft (Table 3.4). The probability of root-vector transmission was calculated based on the amount of observed grafts between pairs of trees and the proportion those grafts that transmitted infections using both field and laboratory methods, accounting for the probability that infection is present and that the infection crosses the contact or graft (Hessburg 1984, Hessburg and Hansen 1986).

A root contact is defined as any point where roots touch, while a root graft is defined as a fusion between two otherwise separate roots where a continuous connection has formed between their xylem. Furthermore, Reynolds and Bloomberg (1982) characterized four types of contacts between Douglas-fir roots, the strongest of which being root grafts, and quantified the proportion of contacts that fell into these four contact types for pairs of 45-to-65-year-old Douglas-fir across a range of distances. Reynolds and Bloomberg (1982) suggested that the weakest root contacts may have a 50% chance of transmitting infection but acknowledged that this claim was primarily speculation and was intended to apply to a different root pathogen (Coniferiporia sulphurascens, cause of “laminated root rot”) rather than BSRD. Given that the BSRD pathogen L. wageneri grows through the xylem with only limited potential for growth through soil (Hessburg and Hansen,

1986), probability of root-vector transmission of BSRD across grafts is likely higher than for root contacts. To account for uncertainty and employ conservative estimates of probability of root- vector infection, two alternative distributions of values for probability of root-vector transmission were generated (Table 3.4). Both were based on a binomial probability distribution generated

24 using the data from Hessburg (1984) and Hessburg and Hansen (1986). The more conservative variation accounted for the lower probability of transmission by accounting for the proportion of contacts that were weak contacts and the lower probability of transmission across those contacts

(Reynolds, 1981; Reynolds and Bloomberg, 1982). Probability of insect-vector infection

Every infected tree has the potential to infect all trees within the respective dispersal radius for the different insect vectors. The probability of insect-vector infection is calculated independently for each of the three insect vectors S. carinatus, P. fasciatus, and H. nigrinus.

Although niche overlap and competition between insect vectors likely influence probability of insect-vector-mediated infection, all three insect-vector species can simultaneously colonize

Douglas-fir hosts, use different sections of the lower trunk and root systems, and show distinct preferences for infected hosts based on their stage of decline (Witcosky and Hansen, 1985).

Therefore, for each tree, the probability of insect-vector infection for each insect-vector species s

(푃inf,i,s) was calculated using Equation 7,

푛 푃inf,i,s = 푆inf ∗ ∑𝑖=0 푃d,s,𝑖 ∗ (푃w ∗ 푎푡푡푟) ∗ 푃i,s ∗ 푃it,s (7) where 푆inf is BSRD-infection susceptibility, 푃d,s,𝑖 is probability of insect-vector dispersal for species s from some tree i, 푎푡푡푟 is the combined effect of insect-vector attraction multipliers, 푃i is probability an insect vector is infested by pathogen spores, 푃it is probability of insect-vector transmission, and 푛 is the number of infected trees within the insect-vector dispersal radius (Table

3.3). Equation 7 represents the sequence of events necessary for a given tree to become infected by an insect vector. First, the insect vectors must disperse from an infected tree, wound tree T at a rate influenced by nearby dead and infected trees and management disturbance. The insect vectors must also be infested, i.e., carrying pathogen spores, and exposure to those spores must result in the transmission of infection. Values of 푃inf,r were truncated between zero and one.

25

Probability of insect-vector dispersal

Dispersal is defined as the movement of an insect vector from place of birth or reproduction to new habitat and potential future hosts. Probability of dispersal is the probability that insect vectors disperse from one tree to another as a function of the distance between them.

In the model, dispersal is only simulated from infected trees because insect vectors can only spread infection if they have become infested with spores. By projecting probability of dispersal to all trees within a dispersal radius, I approximated the probability of dispersal from each infected tree in two dimensions.

Dispersal data was limited for the insect vectors of BSRD. Of the three insect vectors, dispersal has only been quantified for the walking insect vector S. carinatus (Condrashoff, 1968).

Data from mark-recapture experiments for flying weevils and bark in the same taxonomic grouping as the BSRD vectors (Coleoptera: Curculionidae and Coleoptera: Curculionidae:

Scolytinae, respectively) were used as reference for P. fasciatus and H. nigrinus dispersal. Insect species used for reference included Dendoctonous frontalis (Turchin and Theony, 1993),

Dendroctonus pseudotsugae (Dodds and Ross, 2002, 2006), Hylurgus ligniperda (Maurisse and

Pawson, 2017), Ips grandicollis (Costa et al., 2013), Ips typographus (Dueli et al., 1997; Franklin et al.,

2000; Wichmann and Ravn, 2001; Kautz et al., 2011; Stadelmann et al., 2014), Thanasimus dubius

(Costa et al., 2013) and Tomicus piniperda (Barak et al., 2000).

I calculated probability of insect-vector dispersal based on the proportion of insect vectors successfully dispersing a given distance in the literature. I fit a negative exponential function to the dispersal data (Byers 1999, Kautz et al., 2011) for each probability of insect-vector dispersal using a non-linear least squares regression performed with the “nls” function in the R “stats” package (R Core Team, 2019). Probability of dispersal for the walking insect vector S. carinatus

(푃푑,푆퐶) was projected from each infected tree to a dispersal radius of 125 m (~0.25% probability of dispersal), supported by the data from Condrashoff (1968) reporting a maximum dispersal of 114 m. Probability of dispersal for the two flying insect vectors P. fasciatus and H. nigrinus, (푃푑,푃퐹/퐻푁) was projected from each infected tree to a dispersal radius of 350 m (~1.5% probability of

26 dispersal). The same probability of dispersal 푃푑,푃퐹/퐻푁 was used for the two flying insect vectors due to lack of data to indicate otherwise. The distance of 350 m was chosen for 푃푑,푃퐹/퐻푁 due to computational limits and justified based on evidence that most dispersal events and insect outbreaks occur well within 500 m (Franklin et al., 2000, Wichmann and Ravn, 2001; Dodds et al.,

2006). In addition, each infected tree projected a background probability of dispersal to every other tree beyond the 350 m dispersal radius to account for low-probability, extreme-long- distance dispersal events driven by wind that can extend multiple kilometers (Furniss and

Furniss, 1972). The minimum background probability of dispersal was 1.5%, and the probability increased by 1.5% for each stand with a percent of trees infected that exceeded a “spillover threshold”. Because most insect vectors disperse in their local surroundings, i.e. within stands, the spillover threshold represents a situation where high infection incidence leads to local increases in insect-vector populations, “saturating” the stand and creating competition that drives insect vectors to disperse farther to seek resources. Insect-vector attraction and probability of wounding

Insect-vector attraction has been hypothesized to play a key role in infection spread and was used to incorporate one influence of management disturbances, such as thinning, on infection. Because of the difficulty of measuring insect vector populations, the lack of reliable insect population data even for thoroughly studied bark beetles (Kausrud et al., 2011) and specifically for the insect vectors of BSRD, and the complexity of their behavior, I did not model insect vectors or their populations explicitly. Instead. I incorporated insect-vector attraction into the model to account for higher probability of wounding where insects are attracted due to volatiles released by stressed, infected, and dead trees and stumps. Insect-vector attraction was also incorporated to account for increases in insect-vector populations in the years after disturbance, when stumps and slash provide ample insect-vector habitat. Unlike some bark beetles, the insect vectors that spread black stain are not known to have aggregation pheromones, so attraction in this model is between insect vectors and their habitat. Insect-vector attraction was simulated using

27 the probability of insect-vector wounding parameter (푃w) to which attraction multipliers were applied to represent the different sources of attraction and sizes of attraction effects (Table 3.5).

Probability of wounding (푃w) was defined the probability that a tree will be attacked and physically damaged by the insect vectors of BSRD, exposing xylem to the pathogen and thus providing a means for infection transmission to occur (Table 3.5). I developed the probability of wounding parameter by comparing the proportion of trees wounded by insect vectors and the intensity of wounding (e.g., wound densities per unit area) for trees with different status and in different disturbance contexts (e.g., thinned versus un-thinned stands). I assumed that the proportion and intensity of trees wounded would be proportional to local insect-vector abundance, allowing me to effectively account for insect-vector population size through probability of wounding when calculating probability of insect-vector infection.

For each tree, probability of wounding was determined by tree status as represented by two state variables (Table 3.2) with four possible combinations: live, infected; dead, infected; live, non- infected; and dead, non-infected. Probability of wounding values differed by tree status because dead and infected trees produce volatiles that attract insect vectors and have weakened defenses against insect-vector attack (Rudinsky and Zethner-Møller, 1967; Witcosky et al., 1986a; Kelsey and Joseph, 1998). Probability of wounding for these four status combinations in the absence of management or road disturbance were multiplied by attraction multipliers when calculating probability of insect-vector infection for trees in the vicinity of infected and dead trees and management disturbance. Because no study systematically examined 푃w for trees in every combination of status and disturbance contexts, I was only able to estimate 푃w by combining data for relative and absolute measurements of wounding from multiple studies, collection methods, and metrics. Probability of wounding: Live and dead, infected trees

Probabilities of wounding for live (푃W,LI) and dead, infected trees (푃W,DI) came from data collected in BSRD infection centers that quantified the proportion of wounded trees in different stages of infection and decline (Witcosky and Hansen 1985) (Table 3.5).

28

Probability of wounding: Live, non-infected trees

The only available data for the probability of wounding for live, non-infected trees by the insect vectors were collected for trees found in the presence of thinning (푃W,LN, thin) (Witcosky et al., 1986a), as represented by Equation 8,

푃W,LN, thin ≈ 퐵(푛 = 1240, 푝 = 0.1056452) (8) where B indicates a binomial probability distribution, n is the sample size of the data, and p is the proportion of trees sampled that were wounded. To calculate the probability of wounding for live, non-infected trees in the absence of management disturbance, I calculated the relative attractiveness of thinned versus unthinned stands (푎푡푡푟thin) based on (i) the ratio of H. nigrinus wound severity in roots of Douglas-fir trees in thinned versus unthinned stands as measured by number of wounds per unit area (Rudinsky and Zethner-Møller, 1967) and (ii) ratios of insect- vector abundance pre- and post-disturbance for reference species of weevils and bark beetles, including species in the genera Pissodes and Hylastes (Sullivan et al., 2002). Due to the uncertainty of which of these values best reflected the relative attractiveness of thinned stands to the insect vectors of BSRD, I generated a uniform distribution that spanned this range of values. Finally, I calculated probability of wounding for live, non-infected trees by dividing the probability in a thinned context by the relative attractiveness of thinned versus unthinned stands to insect-vectors as represented by Equation 9,

푃W,LN, Thin 푃W,LN = (9) 푢푛𝑖푓(min(푎푡푡푟푡ℎ𝑖푛),max(푎푡푡푟푡ℎ𝑖푛)) Probability of wounding: Dead, non-infected trees

I calculated the probability of wounding for dead, non-infected trees 푃W,D,N with the same approach as for 푃W,LN, estimating 푃W,DN, Thin as a binomial probability distribution using data for the proportion of dead trees wounded by insect vectors in a thinned stand (Harrington et al.,

1985) and dividing by 푎푡푡푟thin (Table 3.5). Where 푃W,DN, Thin was estimated as a binomial probability distribution using data for the proportion of dead trees wounded by insect vectors in a thinned stand (Harrington et al., 1985),

29

Attraction multiplier (management disturbance)

The attraction multiplier from management disturbance (푎푡푡푟푚푔푚푡) is the ratio of attractiveness for a tree in a management-disturbed setting relative to a tree in a non-disturbed setting. Attraction multipliers are multiplied by probability of wounding to account for increased insect-vector abundance near disturbance and increase the probability of insect-vector infection.

The magnitude of 푎푡푡푟푚푔푚푡 for each thinning and harvest in the model is proportional to the density of stumps, with different maximum values of 푎푡푡푟푚푔푚푡 for each silvicultural treatment. The wounding ratios in thinned versus unthinned stands reported by Rudinsky and

Zethner- Møller (1967) and Sullivan et al., (2002) served as the base values for 푎푡푡푟푚푔푚푡 (see Probability of wounding for details). Because the stands studied by Witcosky et al. (1986a) were

“overstocked” with initial densities of 2,000 to 4,000 trees per hectare (trees/ha), the density of stumps produced during thinning in that study exceeded the highest stump densities produced in simulated management treatments by a factor of between two and ten. To provide conservative estimates for 푎푡푡푟푚푔푚푡 in thinned and harvested stands, I scaled the maximum values of 푎푡푡푟푚푔푚푡 for model management treatments by the ratios of stump densities in the simulated stands to stump densities in the study by Witcosky et al. (1986b). Attraction multiplier (road disturbance)

The attraction multiplier from road disturbance (푎푡푡푟푟표푎푑) is the ratio of attractiveness for a tree impacted by road disturbance relative to a tree in a non-disturbed setting. 푎푡푡푟푟표푎푑 was estimated as the ratio of the proportion of trees wounded along roads to the proportion of trees wounded in stand interiors, as reported by Witcosky et al. (1986a). Attraction multiplier (infected trees)

Infected trees and their neighbors release chemicals that attract insects and thus have a higher probability of being wounded by insect-vectors (Rudinsky and Zethner-Møller, 1967;

Witcosky et al., 1986a; Witcosky et al., 1987; Kelsey and Joseph, 1998), which was accounted for using an attraction multiplier for infected trees (푎푡푡푟𝑖푛푓) (Table 3.5). This multiplier was calculated as

30 the ratio of the probability of wounding for infected trees to the probability of wounding for non- infected trees. The values drawn from the distribution for 푎푡푡푟inf were scaled based on the number of infected trees within the insect-vector attraction radius, weighted by distance to account for higher levels of insect-vector attraction in areas with more infected trees. Scaling was done using the infection attraction threshold (푡푎푡푡푟), which represents the percentage of trees in the insect-vector attraction radius that must be infected to reach maximum levels of attraction (e.g., attraction similar to infection centers). Attraction multiplier (dead trees)

The attraction multiplier for dead trees (푎푡푡푟dead) represented the role of dead trees in attracting insect vectors (Table 3.5). This parameter was used for individual dead trees that were killed by BSRD and was not factored into probability of infection calculations for trees in and around recently thinned or harvested stands. Attraction decay with distance

Each insect-vector attraction multiplier decays with distance from the attraction source.

Insect-vector attraction is caused by volatile chemical attractants released into the air by trees and stumps, and the concentration of those attractants decreases with distance, eventually reaching insufficient concentrations to be sensed by insect vectors or cause change to their behavior. In the literature, values for the insect-vector attraction radius, the maximum distance for attraction, range from 10 to 25 m (Hansen, 1978; Witcosky and Hansen, 1985; Kelsey and Westlind, 2017). I chose

15 meters as a conservative estimate after consulting expert opinion (R. Kelsey, personal communication, 2019). I modeled the attraction multiplier decay as an inverted logistic function beginning at the value of attraction multiplier of the attraction source and decreasing to reach 1% attraction by 15 meters. Although the concentration of chemical attractants in the air likely decreases as a negative exponential function with distance (Schlyter, 1992), I used an inverted logistic equation form because attraction of insect vectors to the hosts that produce attractants is imprecise, with healthy trees in the vicinity regularly attacked at similar proportion and wound

31 densities to the attractive tree itself (Jantz and Rudinsky, 1965; Jantz and Rudinsky, 1966;

Rudinsky and Zethner-Møller, 1967; Harrington, 1983; Dueli et al., 1997; Franklin et al., 2000; R.

Kelsey, personal communication, 2019). I applied the same of attraction multiplier decay with distance for each of the causes of attraction (e.g., infected trees, dead trees, stands affected by management disturbance, trees along roads) because the chemical attractants released and the diffusion of those chemicals through the air are assumed to remain constant independent of the cause of their emission. This is a simplifying and consistent assumption, even though thinning, harvest, and tree shape and size alter dynamics of air movement in the real-world system.

OTHER FACTORS

Other factors including climate, topography, slope, aspect, elevation, and soils were assumed to be constant because of the lack of empirical data to relate them to insect-vector behavior and BSRD infection and to isolate the relationship between forest management and infection spread.

SIMULATIONS

LANDSCAPE SCENARIOS

I simulated the spread of disease in different landscape scenarios to analyze the influence of landscape-scale patterns of management on infection spread. In this study, each unique landscape scenario was defined based on the proportion of stands managed with each of the two management approaches (Table 3.1). I performed simulations for five landscape scenarios across a gradient from 100% intensive management to 100% extensive management at 25% increments

(Figure 3.3). A minimum of five simulations were completed for each unique combination of landscape scenario and infection variant (described below). Landscapes were initialized with 0.5 to 0.75% of trees initially infected based on levels of infection observed in stands as reported in the literature (Goheen and Hansen 1993, Hessburg et al., 2001). The spatial distribution of initial infections was random, and the percentage of initial infections was consistent between

32 management approaches to account for the differences in tree density. The landscape gradient represents a space-for-time substitution approach to simulate the current trajectory away from longer-rotation management with periodic thinning towards short-rotation, intensive management with frequent clear-cut harvest.

INFECTION VARIANTS

Each aspect of the disease system incorporated into the model has an associated range of variability, uncertainty, and measurement errors. In addition, the relative importance of root versus insect vectors for infection spread is poorly understood. To account for these uncertainties,

I simulated disease spread with three infection variants (Table 3.6). I simulated all possible combinations of landscape scenarios and infection variants to generate hypotheses regarding the interaction between the strength of the infection vector, root versus insect, and forest management practices as they influence the spread of infection. For each variant, parameter values were chosen from the low or high end of the range of variability or were simulated with alternative, plausible assumptions that would favor one vector over the other. The three variants are referred to hereafter as the “high-root-infection”, “intermediate”, and “high-insect -infection” variants.

ANALYSIS

Infection spread and mortality were analyzed by comparing infection incidence, quantified as the percentage of trees infected at a given spatial scale (i.e., stand or landscape), and mortality between infection variants and scenarios. I also compared the percentages of infections caused by each of the four infection vectors and analyzed infection at the stand and landscape scales. I described the simulated patterns of infection and mortality and trends in their changes over time.

33

VERIFICATION

Model verification consists of ensuring that the model is implemented correctly, confirming that the transformation of a conceptual model into a computer program is done accurately (Balci, 1995). Component testing throughout model development was used to debug the model and eliminate artifacts that would influence simulation results. In addition, the assumptions, parameter values, and equations used in the model were verified with experts and analyzed in group settings to avoid inaccurate representation of the disease system in the model.

34

Table 3.1. Forest management approaches simulated, with tree densities represented as trees per hectare (trees/ha) or trees per acre (tpa), the latter being more commonly used in forest management in the study region.

Variable Intensive Extensive Land use Production forestry Production forestry Stand size (mean) 12.1 ha (30 acres) 12.1 ha (30 acres) Composition Douglas-fir (single species) Douglas-fir (single species) Age structure Even-aged plantation Even-aged plantation Initial tree spacing 4.6 m (15 ft) 3.0 m (10 ft) Initial planting density 478 tph (194 tpa) 1076 tph (436 tpa) Rotation length 37 years 80 years Pre-commercial thinning (PCT) NO YES Age (years) 15 years Residual density 741 trees/ha (300 tpa) Commercial thinning (1st) NO YES Age (years) 35 years Residual density 395 trees/ha (160 tpa) Commercial thinning (2nd) NO YES Age (years) 55 years Final density 247 trees/ha (100 tpa) Regeneration delay 1 year 1 year

Road density 34.9 m/ha (5.6 mi/mi2) 34.9 m/ha (5.6 mi/mi2)

35

Table 3.2. Important state variables for trees in the model.

Variable Definition Description/influence Value range Unit

1 to rotation age The age of a tree as determined by Influences BSRD-infection susceptibility and (varies among age an assigned initial value or time Time (years) BSRD-mortality susceptibility. stands by since regeneration/planting. management)

Influences insect-vector attraction as a function of distance. Influences the viability of hosts alive? Whether a tree is alive or dead. Alive/dead N/A to support inoculum, which is limited to between 0 and 1 year after death.

Determines whether tree acts as infection infected? Whether or not a tree is infected. Infected/not infected N/A source.

Probability that the pathogen infects BSRD- the tree when the tree is exposed to infection See Table 3.3 for details. 0 to 1 N/A inoculum and all other conditions susceptibility necessary for infection are met.

0 to rotation age Influences the BSRD-mortality susceptibility, Time since Time since tree became infected by (varies among with lower rates of mortality during the year Time (years) infection BSRD. stands by of infection than in subsequent years. management)

36

Table 3.2. Important state variables for trees in the model (Continued).

Variable Definition Description/influence Value range Unit

BSRD- Probability of mortality for an mortality infected tree as a function of age See Table 3.3 for details. 0 to 1 N/A susceptibility and time-since-infection.

Influences host viability to sustain viable pathogen inoculum and act as an infection source (limited to Time since tree mortality Time since 1-2 years after mortality). Also influences the host resulting from BSRD infection, 0 to rotation age Time (years) mortality attractiveness to insect vectors (limited to 2-4 thinning, or harvest entry years) as stumps and dead trees begin to decay and become unsuitable as insect-vector habitat.

Attraction The insect-vector attraction multiplier multiplier of a tree due to infection See Table 3.3 for details. 0 to 46.38 N/A (infected trees) by BSRD.

37

Table 3.2. Important state variables for trees in the model (Continued).

Variable Definition Description/influence Value range Unit

The insect-vector attraction multiplier of a tree due to stress Attraction and disturbance resulting from multiplier See Table 3.3 for details. 0 to 2.71 N/A proximity to management (management) disturbance (thinning or harvest entry).

The insect-vector attraction Attraction multiplier of a tree due to stress multiplier See Table 3.3 for details. 0 to 2.20 N/A and disturbance resulting from (roads) proximity to roads.

Calculated as the cumulative probability of being infected via root contact and transmission by any Probability of Probability the tree is infected via or all infected trees within root-contact distance. root-vector root contacts or grafts with 0 to 1 N/A The calculation includes the probability of root infection infected trees contact and the probability of transmission across a root contact or graft. See Table 3.3 for details.

38

Table 3.2. Important state variables for trees in the model (Continued).

Variable Definition Description/influence Value range Unit For each insect vector, probability of insect-vector infection is calculated as the cumulative probability Probability of Probability the tree is infected by of insect-vector infection from all infected trees insect-vector transmission via the insect vector within the dispersal distance for that insect vector. 0 to 1 N/A infection S. carinatus dispersing from This calculation includes the probabilities that (S. carinatus) infected trees insect vectors are attracted, disperse to, and wound the tree, are infested with pathogen inoculum (spores), and transmit the inoculum to infect the tree. See probability of insect-vector infection Probability of description in “Methods” text for details. Probability the tree is infected by insect-vector transmission via the insect vector 0 to 1 N/A infection P. fasciatus (P. fasciatus)

Probability of Probability the tree is infected by insect-vector transmission via the insect vector 0 to 1 N/A infection H. nigrinus (H. nigrinus)

39

Figure 3.1. Probability of infection calculation, including parameters relating the influence of management (gray), tree and stand conditions (green), infection spread via root (orange) and insect vectors (blue), and the events of infection and mortality.

40

Figure 3.2. Example simulated landscape with equal proportions of intensively and extensively managed stands showing how management influenced susceptibility. Intensively managed stands have high BSRD-mortality susceptibility during most of their rotation, while trees in extensively managed stands passed through periods of high and low susceptibility during each rotation.

41

Table 3.3. Infection parameters related to host response to infection that probability of infection and infection spread in the model simulations. TREE HOST PARAMETERS Parameter Definition Equation/probability distribution Source Dead host viability The length of time after a tree's Min: 0.5 years (0 years in the model) Adams and Cobb, 1986; duration that it remains a viable host for the Max: 1 year Witcosky et al., 1986a pathogen, after which time the pathogen can no longer survive in or colonize a dead tree. BSRD-infection Probability that the pathogen Binomial probability distribution Witcosky et al., 1986a; susceptibility infects the tree when the tree is 푆inf ≈ 퐵(푛 = 86, 푝 = 0.767) Hessburg and Hansen, exposed to inoculum and all other Where: 1986 conditions necessary for infection 푛 = Number of trees inoculated are met. 푝 = Proportion of inoculated trees infected

BSRD-mortality Probability of mortality for an Inverted logistic curve Hansen and Goheen, susceptibility infected tree as a function of age 1988 and time since infection. 푆mort,max − 푆mort,min 푆mort = + 푆mort,min 1 + 푒 푘 (푥−푥0) Where:

푆inf,max = Maximum value of mortality susceptibility (younger trees), a beta probability distribution

푆inf,min = Minimum value of mortality susceptibility (older trees), a beta probability distribution

푥 = age, 푥0 = inflection point, and 푘 = logistic decay rate.

In the year of infection: 푆mort,max = 0.3,

푆mort,min = 0.0017

In subsequent years: 푆mort,max = 0.3, 푆mort,min = 0.005

42

Table 3.4. Infection parameters related probability of root-vector infection.

ROOT-VECTOR INFECTION PARAMETERS Parameter Definition Equation/probability distribution Values Source Probability of For a tree pair, the probability root Equation 6 in Chapter 3. Methods. 0 to 1 Reynolds, 1981; Reynolds and root contact contacts or grafts exist at any point Bloomberg, 1982 along the distance between them. Additional details in "Probability of root contact" in Methods. Maximum The maximum radial distance Equation 2 in Chapter 3. Methods. 0 to 8 McMinn, 1963; Smith, 1963; root extent from the base of the tree to which Less-conservative fit: m Reynolds, 1981; Reynolds and the root system extends 퐴 = 0.5931, 퐵 = 0.4346 Bloomberg, 1982; Kuiper and Coutts, More-conservative fit: 1992; Mauer and Palatova, 2012; 퐴 = 0.4937, 퐵 = 0.4568 Kuehne et al., 2015; P. Hessburg, personal communication, 2019 Probability of Probability that BSRD Less-conservative: 0 to 1 Reynolds, 1981 root-vector transmission occurs via root 푃rt,LC = 퐵(푛 = 273, 푝 = 0.1282) transmission contacts and grafts. More-conservative:

푃rt,MC = {푃rt,LC ∗ 푝푇푦푝푒1 ∗ 푐, 푃rt,LC ∗ 푝푂푡ℎ푒푟}

Where 푝푇푦푝푒1 is the proportion of Type 1 contacts (weak) for tree pairs with inter-tree distances of 2.5 to 5.0 m, 푝푇푦푝푒1 = 퐵(푛 = 72, 푝 = 0.6944); 푐 is effective contact strength for Type 1 contacts (0.5); and 푝푂푡ℎ푒푟 is the proportion of other root contact types (i.e., 2, 3, and 4) for tree pairs with inter-tree distances between 2.5 and 5.0 m, 푝푂푡ℎ푒푟 = 퐵(푛 = 72, 푝 = 0.3056).

43

Table 3.5. Infection parameters related probability of insect-vector infection.

INSECT-VECTOR INFECTION PARAMETERS Parameter Definition Equation/probability distribution Values Source

Probability insect Probability that insect vectors Binomial probability distribution 푛i,SC = 433 Witcosky et al., vector infested by dispersing from infection 푃i,s = 퐵(푛 = 푛i,s, 푝 = 푝i,s) 푝i,SC = 0.0046 1986a pathogen spores centers are infested by L. Where: 푛i,PF = 62 푝 = 0.0161 푃i,s wageneri spores. 푛i,s = Sample size (number of trials) for i,PF 푛 = 173 insect-vector species s, and i,HN 푝i,HN = 0.0231 푝i,s = Proportion of insect vectors infested

(successes) for insect-vector species s.

Probability of insect- Probability that a tree directly Binomial probability distribution 푛it,SC = 78, Harrington et al., vector transmission exposed to and wounded by 푃it = 퐵(푛 = 푛it,s, 푝 = 푝it,s) 푝it,SC = 0.667 1985; Witcosky et 푃it,s spore-infested vectors will Where: 푛it,PF = 93, al., 1986a 푝 = 0.247 become infected. 푛it,s = Sample size (number of trials) for it,PF 푛 = 352, insect vector s, and it,HN 푝it,HN = 0.088 푝it,s = Proportion of infested insect vectors transmitting the infection (successes) for vector s.

Probability of insect- Probability that an insect vector Exponential decay function S. carinatus See “Probability of −휆푥 vector dispersal disperses from an infected tree 푃d,s(푥) = 푃d,s,0 푒 푃d,SC,0 = 0.9999, insect-vector 푃d,s to a point at a given distance Where: 휆 = −0.0507 dispersal” section x = distance, P. fasciatus and in Methods. λ = decay rate, H. nigrinus: 푃 = 0.932, 푃d,s,0 = probability of dispersal for species s d,PF/HN,0 at x = 0. 휆 = −0.0114

44

Table 3.5. Infection parameters related probability of insect-vector infection (Continued).

Parameter Definition Equation/probability distribution Values Source Probability of insect- Probability that an insect vector Binomial probability distribution Min: 0.0174 Witcosky et al., vector wounding, attacks a tree and creates a 푃W,LN, Thin ≈ 퐵(푛 = 1240, 푝 = 0.1056452) Median: 0.0313 1986a Live, non-infected wound during feeding and Mean: 0.0349 푃W,LN, Thin tree reproduction activity, exposing 푃 = Max: 0.0710 W,LN ( ) ( ) 푃W,LN that tree to infection 푢푛𝑖푓(min 푎푡푡푟푡ℎ𝑖푛 , max 푎푡푡푟푡ℎ𝑖푛 )

Probability of insect- Binomial probability distribution Min: 0.0236 Rudinsky and vector wounding, 푃W,DN, Thin ≈ 퐵(푛 = 22, 푝 = 0.4091) Median: 0.0902 Zethner-Møller, Dead, non-infected Mean: 0.1031 1967; Harrington et 푃W,DN, Thin tree 푃 = Max: 0.2773 al., 1985; Sullivan et W,DN ( ) ( ) 푃W,DN 푢푛𝑖푓(min 푎푡푡푟푡ℎ𝑖푛 , max 푎푡푡푟푡ℎ𝑖푛 ) al., 2002

Probability of insect- Binomial probability distribution Min: 0.2500 Witcosky and vector wounding, 푃W,LI ≈ 퐵(푛 = 108, 푝 = 0.629) Median: 0.5556 Hansen, 1985 Live, infected tree Mean: 0.6244 푃W,LI Max: 0.9722

Probability of insect- Binomial probability distribution Min: 0.7917 Harrington et al., vector wounding, 푃W,DI ≈ 퐵(푛 = 48, 푝 = 1) Median: 1.000 1985 Dead, infected tree Mean: 0.9746 푃W,DI Max: 1.0000

45

Table 3.5. Infection parameters related probability of insect-vector infection (Continued).

Parameter Definition Equation/probability distribution Values Source Attraction The attraction of vectors caused For live trees: Min: 3.184 Witcosky and Hansen, multiplier: infected by the presence of infected trees 푃W,LI Mean: 17.985 1985; Harrington et al., 푎푡푡푟inf = trees as a multiplicative effect 푃w,LN Median: 15.103 1985 푎푡푡푟inf applied to probability of For dead trees: Max: 55.996 wounding. 푃W,DI 푎푡푡푟inf = 푃w,DN Attraction The attraction effect caused by 푃W,DI Min: 1.0 Witcosky and Hansen, 푎푡푡푟dead = multiplier: dead the presence of dead trees 푃w,LI Mean: 1.660 1985 trees (killed by BSRD) as a Median: 1.646 푎푡푡푟dead multiplicative effect applied to Max: 3.6 probability of wounding. Attraction The attraction effect caused by Uniform distribution See “Equation/ Zethner-Moller and multiplier: the presence of dead trees and probability Rudinsky, 1967; management stress resulting from thinning 푎푡푡푟INT,harv = 푢푛𝑖푓(1.518, 2.708) distribution” Condrashoff, 1968; disturbance and harvest disturbance, as a 푎푡푡푟EXT,PCT = 푢푛𝑖푓(1.527, 2.348) column Witcosky and Hansen, 푎푡푡푟 = 푢푛𝑖푓(1.533, 2.373) 푎푡푡푟mgmt multiplicative effect applied to EXT,CT1 1985; Witcosky et al., ( ) probability of wounding. 푎푡푡푟EXT,CT2 = 푢푛𝑖푓 1.518, 1.889 1986a, 1986b; Sullivan 푎푡푡푟 = 푢푛𝑖푓(1.518,2.135) EXT,harv et al., 2003 Attraction The attraction effect caused by Min: 1.114 Witcosky et al., 1986b multiplier: road stress resulting from roadside 퐵(푛road = 909, 푝road = 0.1760) Mean: 1.668 Hessburg et al., 2001 푎푡푡푟road = disturbance disturbance, as a multiplicative 퐵(푛int = 1240, 푝int = 0.1056) Median: 1.660 푎푡푡푟road effect applied to probability of Max: 2.481 wounding.

46

Table 3.5. Infection parameters related probability of insect-vector infection (Continued).

Parameter Definition Equation/probability distribution Values Source Attraction duration The length of time (years) Uniform distribution: Min: 1 Witcosky and for dead hosts during which dead trees (killed 푢푛𝑖푓(푚𝑖푛, 푚푎푥) Max: 4 Hansen, 1985; by BSRD or management Witcosky, 1989 disturbance) continue to attract insect vectors Infection attraction Measured as a percentage of the Constant. . Min: 3% Hansen and threshold maximum possible number of Max: 15% Goheen, 1988 푡푎푡푡푟 infected trees within the insect- vector attraction radius based on percentages of trees reported to be infected in infection centers. Attraction distance Decrease in insect-vector Inverted logistic curve: Min: 0 Hansen, 1978; decay attraction multiplier value as a 푎푡푡푟 − 1 Max: Maximum Witcosky and 푎푡푡푟(푑) = + 1 function of distance from the 1 + 푒 푘 (푑−푑0) value of attraction Hansen, 1985; attraction source. Where: multiplier to Kelsey and 푎푡푡푟max = Attraction effect value at the which the function Westlind, 2017; R. source of attraction, is being applied. Kelsey, personal 푑 = distance, communication, 푑0 = inflection point (= 7.5 푚), and 2019 푘 = logistic decay rate.

Insect-vector The maximum distance at Constant. 15 m attraction radius which insect vectors can be attracted

47

Table 3.6. Infection variants simulated to account for the uncertainty in parameter values and the relative importance of the different vectors for BSRD infection.

High root infection Intermediate High insect infection

Probability of root contact Less-conservative Less-conservative More-conservative regression fit for regression fit for regression fit for maximum root extent maximum root extent maximum root extent parameter (Eq. 1). parameter (Eq. 1). parameter (Eq. 1).

Probability of root-vector Less-conservative More-conservative More-conservative transmission distribution that does distribution that distribution that not account for effect of accounts for the effect accounts for the effect root contact type on of root contact type on of root contact type on probability of probability of probability of transmission. transmission. transmission.

Background probability of 15% 10% 3% insect-vector dispersal: Spillover threshold Attraction duration for 1-3 years 2-4 years 3-4 years dead hosts

Insect-vector attraction to infected trees: 15% 10% 3% Infection attraction threshold

48

CHAPTER 4. RESULTS

INFECTION

Infection incidence, quantified as the percentage of trees infected by BSRD, increased as extensive management became more prevalent and decreased as intensive management became more prevalent in the landscape (Figure 4.1). The median infection incidence in the 100% extensive landscape scenario exceeded that of the 50-50% landscape scenario by about a factor of twelve and was more four orders of magnitude greater than the median infection incidence in the

100% intensive stand. The 100% intensive management landscape never exceeded 0.15% of trees infected under any circumstances (Table 4.1). The persistence of infection depended on the landscape scenario and infection variant. Infections were less likely to persist in the high-root- infection variant and in landscapes with majority intensive management, with infection dropping to zero in every simulation for the 100% intensive management landscape (Figure 4.2). For the simulated infection variants, the high-insect-infection variant resulted in the highest landscape infection incidence of all variants, followed by the intermediate variant and finally the high-root- infection variant.

Interactions between landscapes and infection variants influenced infection incidence, but the 100%-extensive landscape had the highest level of infection regardless of infection variant

(Figure 4.1, Table 4.2). For the high-root-infection variant, the extensive-only landscape scenario had much higher levels of infection than the other landscapes, with a median value of 7.73% and over 45% of trees in the landscape infected in some years; whereas, infection incidence in landscapes with 50% or more of intensive management never exceeded 3%. For the high-insect- infection variant, median infection levels in the 100% extensive and 50%-50% landscape scenarios exceeded 10%, with about half of trees infected during some years. The intermediate variant produced infection patterns that reflected aspects of the root and vector variants. The percentages of trees infected for the intermediate variant were more similar to those observed for the high- root-infection variant than those of the high-insect-infection variant. However, the magnitude of

49 the differences between the 100% extensive and the 50%-50% landscapes were similar to those observed for the vector infection variant.

STAND-SCALE INFECTION INCIDENCE

The distribution of infection incidence by stand was right skewed across landscape scenarios and variants, with high incidence concentrated in fewer stands (Figure 4.3). The skewness of the distribution increased in landscapes with higher percentages of intensive management and also increased when probability of root-vector infection increased. Probability of vector infection decreased as evidenced by the difference in stand infection incidence distribution between the root and vector infection variants.

INFECTION SPREAD AS INFLUENCED BY STAND AND LANDSCAPE MANAGEMENT

Simulations across the gradient of landscape management scenarios showed a non-linear relationship between infection incidence and the percent of stands in the landscape managed with intensive versus extensive management (Figure 4.1). Infection incidence exhibited a threshold response to the change in landscape-scale management, with the position of the threshold along the landscape-management gradient depending on the infection variant. When high root-vector infection was simulated, the relationship between infection incidence and the percent of each management approach was concave, with the threshold located between 0 and 25% of stands in the landscape with intensive management, i.e., between 100 and 75% of stands with extensive management, respectively. When the intermediate variant was simulated, the relationship between infection incidence and the percent of each management approach appeared to follow a sigmoidal curve, with the threshold located between 25 and 50% of stands with intensive management. When the high-insect-infection variant was simulated, the relationship between infection incidence and the percent of each management approach was convex, with the threshold located between 0 and 25% of stands with intensive management.

50

Interactions between management and infection incidence occurred at the stand and landscape scales. In landscapes with majority intensive management, intensively managed stands had near-zero infection, and infections disappeared from the stands and landscape during nearly every simulation (Figure 4.4, Table 4.3). However, when both intensively and extensively managed stands were present in the landscape, infection incidence in intensively managed stands was higher than in the 100%-intensive landscape, and infection incidence in extensively managed stands was lower than in the 100%-extensive landscape. The size and direction of interaction effects varied depending on the management approach being considered and the infection variant. Infection incidence in intensively managed stands did not show much change with the addition of extensively managed stands to the landscape for the high-root-infection variant but increased sharply for the high-insect-infection variant. In contrast, infection incidence in extensively managed stands plummeted with the addition of intensively managed stands to the landscape for the high-root-infection variant but showed no change for the high-insect-infection variant.

In landscapes with intensive and extensive management, infections and infection centers, spatial clusters of infection, appeared to be concentrated in extensively managed stands based on visual analysis of raster data (Figure 4.5). While infections were present in intensively managed stands, infection clusters were smaller and infection densities were lower. Between neighboring extensively managed stands, infection centers appeared to be continuous, with similar infection densities across stand boundaries. However, moving from an extensively managed stand to a neighboring intensively managed stand, infection densities decreased, and the infections were primarily along the boundaries rather than in the interiors of intensively managed stands. Spatial analysis, including quantification of infection center sizes and infection densities, was outside of the scope of this research but has been planned for future analysis.

At the stand scale, regeneration harvest reduced the infection incidence in intensively and extensively managed stands across landscapes and infection variants (Figure 4.6). The decrease in stand infection incidence was largest for the high-root-infection variant and smallest for the

51 high-insect-infection variant. The infection incidences generally decreased in stands after harvest disturbance, even in stands with more than half of trees infected before harvest (Figure 4.7). The effect of regeneration harvest on infection trajectories, however, was more complex. After some harvests, infection incidence decreased and remained near zero, stopping the stand’s upward trajectory in infection incidence (e.g., harvest around year 160 in Figure 4.7B). During other harvests, the trajectory of infection incidence did not appear to be affected and began to increase immediately (e.g., harvest around year 115, Figure 4.7A).

Stand infection incidence before and after thinning did not present consistent patterns between thinning events and between stands. The range of values for stand infection incidence remained consistent before and after thinnings (Figure 4.6). In individual stands, both increases and decreases occurred in stand infection incidence as well as positive and negative changes to the slope of the percent of trees infected over time, an indicator of the rate of change (Figure 4.7B).

INFECTION CAUSE BY VECTOR

The flying insect vectors P. fasciatus and H. nigrinus accounted for most infections across all landscapes (Figure 4.8, Table 4.4). In the 100% intensive landscapes, nearly all infections were caused by these two vectors. Though the percentages of infections caused by roots was lower than those caused by P. fasciatus and H. nigrinus for most landscapes and infection variants, the percentage of infections caused by root-vectors increased with increasing prevalence of extensive management and decreased with increasing prevalence of intensive management in the landscape.

P. fasciatus and H. nigrinus also accounted for the largest percentage of infections across infection variants. In the intermediate and high-insect-infection variants, these insect vectors caused the largest proportion of infections, with little overlap in the range of variability between these two vectors and either roots or S. carinatus. With increasing prevalence of extensive management, roots became more important as a vector for infection. The closest root infection came to match the contribution of P. fasciatus and H. nigrinus to infections was in the high-root-

52 infection variant, where the ranges of variability in the percent of infection caused by roots had substantial overlap with that of the dominant vectors. However, even in the high-root-infection variant where probability of root-vector infection was highest, infection via roots never was the dominant infection vector as measured by the mean or median percentages of infections (Table

4.4).

The relative importance of the insect vector S. carinatus versus root vectors in spreading infection depended on the infection variant, with roots contributing to a larger percentage of infections than S. carinatus in the high-root-infection variant. In the intermediate and high-insect- infection variants, roots and S. carinatus did not appear to differ in their contribution to infections, with a slightly higher contribution of roots in the intermediate infection variant and the opposite in the vector infection variant. In all landscape scenarios, the vector S. carinatus consistently accounted for a lowest percentage of infected trees relative to the other vectors. The patterns of infection incidence by vector observed were consistent between the stand and landscape-scales

(Figure 4.3).

INFECTION SPREAD OVER TIME

The landscape experienced cyclic increases and decreases in infection spread over time

(Figure 4.2). Over 300 years, the infection incidence went through multiple cycles of “outbreaks,” with recurrence frequency between 50 and 200 years. Cycles appeared to occur for all infection variants and observed in all landscape scenarios except when infection did not persist. For each unique landscape scenario and infection variant combination, the timing of increasing and decreasing infection incidence were consistent for some simulations, peaking at around the same year, and inconsistent for others. There was also variation as to the frequency of cycle recurrence between simulations with the same landscape scenario and infection variant. The largest outbreaks occurred in the landscape scenario with 100% extensively managed stands and infection variant favoring probability of vector infection. The cycles were present and simultaneous for all four infection vectors.

53

MORTALITY

In comparing landscape scenarios infection variants, the differences between the percentages of all trees that were killed by BSRD reflected the differences in infection incidence

(Figure 4.8). However, the values for the percentage of trees killed by BSRD were roughly half that of the percentage of infected trees in all scenarios and variants (Table 4.5). BSRD mortalities as a percentage of trees in the landscape was highest in the landscape scenario dominated by extensive management and lowest in the scenario dominated by intensive management, but the ratio of BSRD mortalities to infected trees was consistently higher in the 100%-intensive landscape scenario than in all other landscape scenarios (Figure 4.10).

SENSITIVITY TO SELECT FACTORS

DEAD HOST VIABILITY DURATION

In smaller-scale simulations during model testing, infection incidence was highly sensitive to dead host viability duration, the length of time during which the pathogen can survive in a dead host (Figure 4.11). When dead host viability duration was increased from one to two years, the median infection incidence in the landscape more than doubled.

SENSITIVITY TO INITIAL CONDITIONS

When simulations were initialized with infection incidence of 0.5 to 1% of trees, infection was always sustained in the 100% extensive landscape. However, when infection incidence was initialized at 10% of trees, infection incidence immediately began to peak, followed by a crash to zero where infection was lost even in scenarios with extensively managed stands (Figure 4.11).

54

Figure 4.1. Infection incidence for each infection variant and landscape scenarios for all years (after year 25).

55

Table 4.1. Summary statistics for landscape infection incidence shown by landscape scenario and infection variant for all years (after year 25).

TREES INFECTED (%)

Landscape Min. 1st quart. Mean Median 3rd quart. Max. scenario

Intensive: 0% 0.00 4.76 13.56 11.82 19.99 62.87 Extensive: 100%

Intensive: 25% 2.55E-03 4.90 9.40 8.73 12.70 44.68 Extensive: 75%

Intensive: 50% 3.39E-04 7.36E-03 4.75 0.93 7.89 41.01 Extensive: 50%

Intensive: 75% 0.00 0.00 4.08 0.01 8.35 28.08 Extensive: 25%

Intensive: 100% 0.00 0.00 0.01 1.11E-03 2.10E-03 0.15 Extensive: 0%

Infection variant Min. 1st quart. Mean Median 3rd quart. Max.

High root 0.00 2.08E-03 4.98 1.07E+00 8.40 45.96 infection

Intermediate 0.00 3.92E-02 10.30 8.56 16.67 62.87

High vector 0.00 0.00 2.60 0.01 0.69 45.32 infection

56

Table 4.2. Summary statistics for landscape infection incidence shown by unique combinations of landscape scenarios and infection variants for all years (after year 25) (Int: Intensive, Ext: Extensive).

TREES INFECTED (%) Infection Landscape 1st 3rd Min. Mean Median Max. variant scenario quart. quart.

High Int: 0% 8.15E-04 1.34 9.38 7.73 14.22 45.32 root Ext: 100% infection Int: 25% 2.55E-03 0.01 3.97 0.45 7.67 18.88 Ext: 75%

Int: 50% 6.86E-04 4.17E-03 0.12 9.68E-03 0.05 2.23 Ext: 50%

Int: 75% 1.11E-03 3.01E-03 0.02 4.78E-03 0.02 0.27 Ext: 25% Int: 100% 0.00 6.21E-04 5.67E-03 1.11E-03 2.55E-03 0.08 Ext: 0% Int: 0% Intermediate 0.29 4.44 11.63 10.03 18.09 45.96 Ext: 100% Int: 25% 0.36 5.75 9.07 8.79 12.15 27.75 Ext: 75% Int: 50% 3.39E-04 4.01E-03 2.79 1.32 5.22 13.48 Ext: 50% Int: 75% 0.00 1.28E-03 9.93E-03 2.66E-03 7.27E-03 0.12 Ext: 25% Int: 100% 0.00 6.37E-04 4.22E-03 1.05E-03 1.65E-03 0.08 Ext: 0% Int: 0% High 0.05 13.68 21.20 19.66 26.51 62.87 insect Ext: 100% infection Int: 25% 3.35 8.98 16.07 14.18 21.87 44.68 Ext: 75% Int: 50% 0.41 5.47 11.58 10.95 15.86 41.01 Ext: 50% Int: 75% 2.42 8.36 12.21 12.20 15.07 28.08 Ext: 25% Int: 100% Ext: 0% 0.00 7.98E-04 0.02 1.21E-03 2.51E-03 0.15

57

Figure 4.2. Landscape-scale infection incidence over time for each landscape scenario and infection variant. Each line represents one simulation.

58

Figure 4.3. Distribution of median stand-scale BSRD infection incidence for all stands and all simulation years (after year 25).

59

Figure 4.4. Infection incidence by stand management approach, grouped by infection variant and landscape scenario for all years (after year 25).

60

Table 4.3. Summary statistics for infection showing interaction between infection variants, landscape scenarios, and management approaches for all years (after year 25) (Int: Intensive, Ext: Extensive).

TREES INFECTED (%) Infection Landscape 1st 3rd Mgmt. Min. Mean Median Max. variant scenario quart. quart. Int: 0%; Extensive 7.96E-04 1.32 8.97 7.50 13.67 41.81 Ext: 100%

Int: 25% Extensive 2.85E-03 0.02 5.05 0.57 10.14 23.87 Ext: 75% Intensive 0.00 1.28E-03 0.73 0.03 1.02 4.11 High root Int: 50% Extensive 9.81E-04 6.77E-03 0.21 0.02 0.09 4.30 infection Ext: 50% Intensive 0.00 7.96E-04 0.01 1.59E-03 3.83E-03 0.27 Int: 75% Extensive 1.03E-03 8.20E-03 0.07 0.01 0.05 1.08 Ext: 25% Intensive 0.00 6.85E-04 2.82E-03 1.10E-03 2.47E-03 0.02 Int: 100% Intensive 0.00 6.06E-04 5.53E-03 1.08E-03 2.50E-03 0.08 Ext: 0% Int: 0% Extensive 0.28 4.32 11.10 9.75 17.29 43.01 Ext: 100% Int: 25% Extensive 0.44 7.02 11.31 10.93 15.15 36.78 Ext: 75% Intensive 0.01 1.31 2.70 2.38 3.57 10.17 Int: 50% Extensive 2.78E-04 6.52E-03 4.91 2.16 9.24 24.39 Intermed. Ext: 50% Intensive 0.00 1.28E-03 0.80 0.24 1.46 5.93 Int: 75% Extensive 0.00 2.19E-03 0.03 7.24E-03 0.02 0.37 Ext: 25% Intensive 0.00 6.72E-04 2.49E-03 1.06E-03 2.04E-03 0.06 Int: 100% Intensive 0.00 6.28E-04 4.12E-03 1.02E-03 1.62E-03 0.08 Ext: 0% Int: 0% Extensive 0.05 13.23 19.98 18.69 24.91 56.05 Ext: 100% Int: 25% Extensive 3.71 10.49 18.62 16.24 25.25 52.49 Ext: 75% Intensive 0.69 3.49 7.81 6.44 11.24 23.98 High Int: 50% Extensive 0.56 7.58 15.85 14.85 21.73 57.99 insect Ext: 50% Intensive 0.17 3.78 7.25 6.89 9.92 25.53 infection Int: 75% Extensive 1.07 12.03 20.78 19.79 26.80 57.11 Ext: 25% Intensive 0.66 6.42 9.29 8.65 11.96 24.32 Int: 100% Intensive 0.00 7.76E-04 0.02 1.17E-03 2.45E-03 0.15 Ext: 0%

61

Figure 4.5. Map of infected trees in a portion of one 50-50% landscape simulation, with shades of blue and green indicating stands managed with extensive or intensive management, respectively. Inset shows a close-up view of an infection center at the boundary between an intensively managed and extensively managed stand. Infected trees shown are those from 30-year intervals starting with year 30 and ending with year 300.

62

Figure 4.6. Stand infection incidences in the five years before (pre) and after (post) each management disturbance for all years (after simulation years 15 for thinnings and 80 for harvest to exclude data from stands initialized at ages. Intensively managed stands were excluded from the thinning plots.

63

A

B

Figure 4.7. Infection incidence for one intensively managed stand (A) and one extensively managed stand (B) showing the effect of thinning and harvest disturbance on stand infection incidence over time. Solid vertical lines represent regeneration harvest, and dashed vertical lines represent thinning. Changes in the percentages of trees infected are shown for the 50-50% landscape with the intermediate infection variant but represent effects observed in many stands across landscape scenarios and infection variants.

64

Figure 4.8. Infection cause by vector as a percentage of infections for infection variants and landscape scenarios for all years (after year 25).

64

65

Table 4.4. Summary statistics for the percent of BSRD infections by vector, variant, and landscape scenario for all years (after year 25) (Int: Intensive, Ext: Extensive).

TREES INFECTED (%) Infection Landscape Infection 1st 3rd Min. Mean Median Max. variant scenario cause quart. quart. High root Int: 0% Root 0.00 15.04 23.13 20.24 26.87 65.52 infection Ext: 100% Int: 25% 5.56 17.02 30.87 25.09 45.51 63.64 Ext: 75% Int: 50%, 0.00 28.57 37.65 39.95 47.78 71.43 Ext: 50% Int: 75% 0.00 24.65 34.11 35.29 44.49 66.67 Ext: 25% Int: 100% 0.00 0.00 5.64 0.00 8.11 100.00 Ext: 0% Int: 0% S. carinatus 0.00 9.93 12.19 13.21 14.82 25.02 Ext: 100% Int: 25% 0.00 4.46 8.13 7.15 13.14 16.86 Ext: 75% Int: 50%, 0.00 2.63 5.63 5.26 7.97 28.57 Ext: 50% Int: 75% 0.00 0.00 4.48 4.55 7.69 25.00 Ext: 25% Int: 100% 0.00 0.00 1.88 0.00 0.00 50.00 Ext: 0% Int: 0% P. fasciatus 17.24 61.06 61.44 64.09 65.94 100.00 Ext: 100% Int: 25% 9.09 45.18 53.35 54.55 64.62 68.41 Ext: 75% Int: 50%, 0.00 41.80 48.15 47.51 54.55 90.00 Ext: 50% Int: 75% 12.50 40.33 47.42 47.81 53.85 83.33 Ext: 25% Int: 100% 0.00 27.78 50.00 50.00 71.43 100.00 Ext: 0%

66

Table 4.4. Summary statistics for the percent of BSRD infections by vector, variant, and landscape scenario for all years (after year 25) (Int: Intensive, Ext: Extensive) (Continued).

Infection Landscape Infection 1st 3rd Min. Mean Median Max. variant scenario cause quart. quart. High root Int: 0% infection H. nigrinus 0.00 34.23 54.40 64.09 68.32 82.56 Ext: 100% (Cont.) Int: 25% 2.63 24.42 41.99 30.00 67.38 73.80 Ext: 75% Int: 50% 0.00 20.00 28.00 25.00 30.77 100.00 Ext: 50% Int: 75% 0.00 20.00 26.96 26.18 33.33 66.67 Ext: 25% Int: 100% 0.00 6.31 27.12 21.62 40.00 100.00 Ext: 0% Int: 0% Intermed. Root 2.85 8.65 12.88 11.44 15.11 36.13 Ext: 100%

Int: 25% 2.57 9.37 13.17 12.10 15.54 38.92 Ext: 75%

Int: 50% 0.00 9.30 17.62 13.94 26.13 63.64 Ext: 50%

Int: 75% 0.00 0.00 19.62 20.00 33.33 100.00 Ext: 25%

Int: 100% 0.00 0.00 3.03 0.00 0.00 100.00 Ext: 0% Int: 0% S. carinatus 4.41 10.71 12.59 12.88 14.98 27.37 Ext: 100% Int: 25% 4.80 12.06 13.17 13.41 14.86 21.78 Ext: 75% Int: 50% 0.00 4.33 9.28 11.29 13.86 21.50 Ext: 50% Int: 75% 0.00 0.00 3.74 0.00 6.71 33.33 Ext: 25% Int: 100% 0.00 0.00 1.82 0.00 0.00 100.00 Ext: 0%

67

Table 4.4. Summary statistics for the percent of BSRD infections by causal vector, variant, and landscape scenario for all years (after year 25) (Int: Intensive, Ext: Extensive) (Continued).

Infection Landscape Infection 1st 3rd Min. Mean Median Max. variant scenario cause quart. quart.

Intermed. Int: 0% P. fasciatus 47.45 59.48 61.37 61.57 64.32 68.68 (Cont.) Ext: 100%

Int: 25% 45.43 60.16 62.64 63.47 65.25 70.74 Ext: 75%

Int: 50% 0.00 52.41 59.36 62.50 65.99 100.00 Ext: 50%

Int: 75% 0.00 44.03 55.00 52.08 66.67 100.00 Ext: 25%

Int: 100% 0.00 33.33 55.83 55.56 77.78 100.00 Ext: 0%

Int: 0% H. nigrinus 3.40 57.86 60.26 65.37 69.68 83.85 Ext: 100%

Int: 25% 3.31 64.39 62.76 67.72 69.98 77.22 Ext: 75%

Int: 50% 0.00 25.00 46.35 56.14 66.07 75.00 Ext: 50%

Int: 75% 0.00 13.33 23.42 20.98 31.33 100.00 Ext: 25%

Int: 100% 0.00 8.61 28.79 25.00 42.86 100.00 Ext: 0%

High insect Int: 0% Root 0.00 3.39 7.15 5.82 9.32 31.90 infection Ext: 100%

Int: 25% 0.94 3.84 7.59 6.85 10.21 23.40 Ext: 75%

68

Table 4.4. Summary statistics for the percent of BSRD infections by causal vector, variant, and landscape scenario for all years (after year 25) (Int: Intensive, Ext: Extensive) (Continued).

Infection Landscape Infection 1st 3rd Min. Mean Median Max. variant scenario cause quart. quart. Int: 50% Root High insect 0.60 3.21 7.01 5.50 9.08 25.52 Ext: 50% (Cont.) infection Int: 75% (Cont.) 0.61 1.76 4.29 3.08 6.15 16.18 Ext: 25% Int: 100% 0.00 0.00 3.36 0.00 2.78 100.00 Ext: 0% Int: 0% S. carinatus 0.00 12.80 14.64 14.17 16.71 29.60 Ext: 100% Int: 25% 0.46 11.43 13.77 13.66 15.91 26.10 Ext: 75% Int: 50% 0.53 10.17 11.55 12.07 13.74 23.42 Ext: 50% Int: 75% 0.67 8.55 9.97 9.89 11.37 18.61 Ext: 25% Int: 100% 0.00 0.00 3.61 0.00 3.33 66.67 Ext: 0% Int: 0% P. fasciatus 0.00 64.44 64.99 66.93 68.44 73.39 Ext: 100% Int: 25% 7.55 61.35 63.45 64.22 67.55 71.25 Ext: 75% Int: 50% 8.46 60.92 62.74 62.92 65.88 71.78 Ext: 50% Int: 75% 8.73 68.70 69.07 70.09 71.38 75.45 Ext: 25% Int: 100% 0.00 45.45 59.17 62.50 71.43 100.00 Ext: 0% 8.46 Int: 0% H. nigrinus 0.00 67.95 69.20 70.97 74.37 88.22 Ext: 100% Int: 25% 4.19 64.20 66.36 68.11 71.91 81.89 Ext: 75% Int: 50% 3.93 60.62 61.22 65.06 68.12 78.57 Ext: 50%

69

Table 4.4. Summary statistics for the percent of BSRD infections by vector, variant, and landscape scenario for all years (after year 25) (Int: Intensive, Ext: Extensive) (Continued).

Infection Landscape Infection 1st 3rd Min. Mean Median Max. variant scenario cause quart. quart. Int: 75% 3.43 54.71 56.82 58.21 61.58 72.09 Ext: 25% Int: 100% 0.00 14.43 28.09 27.11 37.50 100.00 Ext: 0%

70

Figure 4.9. Percent of BSRD-killed trees for each infection variant and landscape scenario for all years (after year 25).

70

71

Figure 4.10. Ratio of the percent of trees killed by BSRD to the percent of trees for each infection variant and landscape scenario for all years (after year 25). Ratios exceed one because BSRD-killed trees persist after the year that they die.

71

72

Table 4.5 Summary statistics for the percent of trees killed by BSRD shows by infection variant and landscape scenario for all years (after year 25) (Int: Intensive, Ext: Extensive).

BSRD MORTALITY (%) Infection Landscape Min. 1st quart. Mean Median 3rd quart. Max. variant scenario Int: 0% High 0.00 0.37 3.73 3.07 5.79 21.36 root Ext: 100% Int: 25% infection 0.00 1.98E-03 1.65 0.04 3.18 8.89 Ext: 75% Int: 50%, 0.00 7.64E-04 0.03 1.61E-03 0.01 0.90 Ext: 50% Int: 75% 0.00 5.34E-04 3.12E-03 1.04E-03 2.60E-03 0.03 Ext: 25% Int: 100% 0.00 2.81E-04 3.63E-03 6.27E-04 1.73E-03 0.04 Ext: 0% Int: 0% Intermed. 0.03 2.34 5.77 4.90 8.85 19.27 Ext: 100% Int: 25% 0.04 2.72 4.57 4.32 6.36 14.47 Ext: 75% Int: 50%, 0.00 1.15E-03 1.42 0.51 2.61 8.23 Ext: 50% Int: 75% 0.00 5.16E-04 2.59E-03 9.63E-04 1.90E-03 0.04 Ext: 25% Int: 100% 0.00 4.03E-04 3.08E-03 6.31E-04 1.26E-03 0.05 Ext: 0% Int: 0% High 0.01 8.62 12.61 12.36 16.35 36.63 insect Ext: 100% Int: 25% infection 1.91 5.08 9.41 8.67 12.40 25.19 Ext: 75% Int: 50%, 0.16 3.60 7.36 6.83 10.44 27.78 Ext: 50% Int: 75% 0.48 5.68 8.23 8.24 10.33 20.99 Ext: 25% Int: 100% 0.00 5.81E-04 0.02 8.36E-04 2.01E-03 0.11 Ext: 0%

73

Figure 4.11. Sensitivity to dead host viability duration (left) and initial infection conditions (right).

73

74

CHAPTER 5. DISCUSSION

INSIGHTS ON THE BSRD SYSTEM

COMPARISON OF SIMULATED VERSUS OBSERVED PATTERNS OF BSRD

No systematic assessment of landscape-scale black stain root disease incidence has yet been completed (Lockman and Kearns, 2016), and the largest surveys of BSRD were performed in the management and disturbance context of the 1980s. Thus, limited comparison can be made between my simulation results as compared to infection incidences observed in the field. Though

BSRD infection and mortality are higher than those observed in published studies, the occurrence of incidences within stands is similar, with most stands having low incidence and few stands having higher incidence (Goheen and Hansen, 1993; Hessburg et al., 2001) (Figure 4.3). In addition, infection in the simulation results occurred in discrete clusters forming irregularly shaped infection centers that contained infected and uninfected trees, similar to patterns found in the field by Hansen and Goheen (1988) (Figure 4.4).

Similarity between spatial patterns of infections as simulated and those measured in field studies suggested that the model accurately represented the underlying processes of infection spread. As noted by Fahse and Heurich (2011), process models often do not exactly reproduce observed patterns due to uncertainty in parameters as well as unknown initial conditions in the landscape but can still represent the general traits and trends relevant to the ecological process.

TREE DENSITY AND ROTATION LENGTH REGULATE INFECTION SPREAD

The difference in tree densities between the intensive and extensive management approaches combined with shorter rotations for the intensive managed approach likely contributed to higher infection incidence and BSRD-caused tree mortality in landscapes dominated by extensive management. In simulations with the high-root-infection variant, in which the percent of infections caused by root vectors was highest (Figure 4.8), tree density likely increased infection incidence by decreasing the distance between trees and increasing

75 probabilities of root contact. With extensive management, higher initial planting density and longer rotation lengths than simulated in intensive management increased the length of time during which root contact was possible relative to intensively managed stands. The probability of root contact between neighboring trees remained near zero until canopy closure, between 12 and 18 years on average, with extensively managed stands reaching canopy closure and beginning to have root contact as early as 10 years old. Root contact only acted as a potential infection vector in intensively managed stands for 15 to 20 years. In contrast, trees in extensive stands had higher potential of root contact and infection spread from their neighbors for up to 70 years. The combined effects of higher probability of root contact with more years during which root contact was possible thus resulted in higher probabilities of root-vector infection and root- vector-caused infection for extensive management versus intensive management. Based on these numbers, one would expect root-vectors to cause three-to-four times as many infections in extensively versus intensively managed landscape, which falls within the range of variability for simulations results (Figure 4.6).

Tree density also influenced the amount of infection caused by insect vectors. Even in the landscape scenarios and infection variants where probability of insect-vector infection was highest and probability of root-vector infection was lowest (Figure 4.6), stands and landscapes with extensive management had the highest incidences of BSRD. Though infection spread via insect vectors can exceed 500 m, the probability of insect-vector dispersal decreases exponentially with distance; therefore, differences in tree spacing, though small compared to the maximum dispersal distance of these vectors, can have a large impact on infection incidence. Within a 500 m dispersal radius, nearly 15,000 more trees are potential infection targets in an extensively managed landscape at initial planting density than in an intensively managed landscape with lower planting densities. Based on the number of trees alone, one could expect more than twice as many infections caused by insects in an extensively managed landscape. However, in my simulations, the percent of trees infected, i.e., the number of infections per tree, increased with the percent of extensively managed stands in the landscape. Therefore, higher density did not

76 only increase infection incidence due to the number of trees but also provided a positive feedback to the process of infection spread.

Given the influence of density and the host-specificity of the BSRD pathogen to Douglas- fir, my results suggest the hypothesis that lower-density or mixed-species plantations could mitigate BSRD incidence, though mixed-species stands were not simulated in this study. As opposed to lower-density, pure-Douglas-fir plantations, mixed species plantations provide an opportunity to decrease the total number and density of BSRD-infections while providing additional benefits (Himes and Puettmann, 2020). Because my results suggest that stand infection was also influenced by the surrounding landscape, decreasing BSRD host density could also reduce the probability that a given stand serves as a source of inoculum from which infection could spread to neighboring stands. By increasing the distance between Douglas-fir trees, infection caused by root vectors would decrease as probability of root contact decreases, with non-Douglas-fir roots in mixed-species management additionally providing physical barriers to root contact. Infection via insect vectors could also decrease with decreasing tree density because of the negative exponential relationship between insect-vector dispersal and distance. In mixed- species stands. trees may still become infected, but infection within stands and growth of infection centers could be lower than in higher-density, pure-Douglas-fir stands. The degree of disease mitigation provided by mixed-species management will also depend upon the relative importance of root- versus insect-vector infection and whether the non-Douglas-fir tree species also provide suitable insect-vector habitat.

In contrast to my expectation, the percent of trees that were killed by BSRD was higher in landscapes dominated by extensively managed stands versus those dominated by intensively managed stands. This is surprising, given that trees in extensively managed stands reached ages when BSRD infection was unlikely to cause mortality. This trend is likely influenced by the very large differences in infection between intensive and extensive management, with lower percentages of trees dying from BSRD in intensive stands and landscapes because fewer trees are infected.

77

My results also suggest the hypothesis that rotation length contributes to higher infection incidence in extensive stands. I hypothesized that increased harvest frequency would create a net positive feedback to infection spread because vectors are attracted to the stumps created during harvest. However, the loss of infection sources due to tree mortality from harvest disturbance appears to override that trend, as it provides a negative feedback to infection spread because of the limited window of time during which dead trees can sustain viable pathogen inoculum, as observed in model simulations (Figure 4.6). The combination of low probabilities of infection due to lower tree density and high frequency of infection removal likely maintained infection incidences near zero in intensively managed stands and landscapes. Though the extensive management approach included thinnings, whereas the intensive management approach did not, the change in incidence following thinning did not suggest a prominent positive feedback to infection spread, as had been observed in field studies (Goheen and Hansen, 1978; Witcosky et al., 1986a, 1986b; Hessburg et al., 2001). The role of management disturbance as a driver of BSRD spread may ultimately depend on the balance between the positive and negative feedback loops.

Management disturbance creates a positive feedback to BSRD spread by attracting vectors and providing habitat that increases local vector populations, while also providing a negative feedback by killing tree hosts. The strength of the positive feedback will depend on the effect size of vector attraction, which will likely vary based on the density of dead hosts and timing of thinning and harvest relative to vector dispersal and reproduction (Witcosky et al., 1986a).

One possible explanation for the lack of a net-positive feedback between thinning or harvest and BSRD incidence in model simulations is underestimation of the effect of insect-vector attraction in the model. While increases in insect-vector activity and infection have been documented in thinned stands, no experimental studies have quantified and compared insect- vector abundance in stands pre- and post-thinning or harvest disturbance. Instead, studies used unthinned plots in the vicinity as a control for comparison (Witcosky et al., 1986a), potentially drawing insect vectors away from the unthinned areas and into the thinned areas, preventing meaningful comparison. These studies were also performed at smaller spatial scales. Witcosky et

78 al. (1986b) thinned two-hectare plots, while Harrington et al. (1985) thinned 0.04-hectare plots, 10 and 500 times smaller than the average stand in the study region, respectively. While both of these studies showed increased insect-vector abundance and activity in thinned plots, insect vector responses could have been caused primarily by movement of existing nearby insects into the plots, whereas a stand-scale thinning disturbance likely results in a much larger response because it additionally provides thousands of stumps suitable for vectors to reproduce and increase populations. Additional research that improves understanding of the degree to which vector populations in management-disturbed areas are increased by attraction and creation of new habitat, i.e., stumps and slash in clear-cuts, are needed to determine whether estimates of management attraction available during the development of this model were over- or under- estimated.

Longer rotations in extensively managed stands and landscapes may also contribute to higher infection because infection can persist in older trees. With intensive management, the rotation length maintains trees within the age range of highest susceptibility to BSRD-caused mortality. Trees die quickly once infected and cease to serve as a source of inoculum within one- to-two years. In contrast, with extensive management, longer rotation lengths allow trees to surpass the age of highest susceptibility to BSRD-caused mortality. Older infected trees rarely die, so the pathogen can persist in extensively managed stands and infection centers continue to grow, allowing inoculum to accumulate. When lower BSRD-mortality susceptibility is coupled with decreased distance between trees and lower frequency of disease removal via harvest, the suite of practices in the extensive management approach creates multiple complementary conditions that could enhance BSRD infection, with extensively managed stands serving as a persistent infection sources in the landscape. Conversely, intensively managed stands, with lower densities and frequent inoculum removal through BSRD-caused mortality and regeneration harvest, could be serving as infection sinks.

Stand regeneration appears to provide a critical window of time for the persistence of

BSRD. When stands are harvested, multiple factors influence the infection trajectory of the next

79 stand. Tree mortality provides a strong negative feedback reducing the persistence of infection, as evidenced by the sensitivity of infection incidence to the duration of pathogen viability in dead hosts (Figure 4.10). The duration of vector attraction post-disturbance is also limited to a period of several years. These factors likely interact with the time between harvest and regeneration, assumed to occur within one year in simulations, to influence whether infection persists into the new stand. Refining understanding of these interactions could guide best management practices to mitigate the impact of BSRD.

IMPLICATIONS OF SHIFTS IN LANDSCAPE MANAGEMENT PRACTICES FOR BSRD

TRENDS TOWARDS SHORTER ROTATIONS

My results do not provide support for the hypothesis that the increasing prevalence of short-rotation, intensively managed stands will increase BSRD infection but rather suggest that the combination of management practices in the extensive management approach increase infection. However, the results do support findings from previous research suggesting management influences the spread of BSRD (Witcosky et al., 1986b; Harrington et al., 1985,

Hessburg et al., 2001). Previous studies only considered the BSRD-management connection at the stand scale, with my results suggesting the novel hypothesis that this is true at the landscape scale as well. Though the intensive management scenario simulated in my model did not sustain infection, tree densities simulated were at the lowest end of planting densities permitted under

Oregon forest management regulations. The non-linear responses observed between factors in the disease system and infection incidence suggest the hypothesis that even small increases in tree density could dramatically shift disease outcomes. Smaller contrasts in density were not simulated in this study, but the role of density in driving disease outcomes indicates a productive avenue for future research.

80

INTERACTIONS BETWEEN MANAGEMENT APPROACHES AND INFECTION ACROSS SCALES

My results suggest the hypothesis that BSRD spread is influenced by management practices at the stand and the landscape scales because of the spatial nature of the spread process and the contrast between the spread of BSRD in the two management approaches. The management approaches simulated in the model showed a strong contrast regarding the potential for BSRD infections when scaled to the landscape. When simulated in isolation, the intensive management approach resulted in near complete loss of infections while extensive management resulted in landscape infection incidences exceeding 60%. However, in landscapes with both management approaches, the presence of intensive stands buffered the landscape against infections, while the presence of extensive stands increased infections.

As the percent of intensively managed stands increased in the landscape, barriers to infection spread appeared to form (Figure 4.5). When examining the spatial pattern of infection in the landscape, intensively managed stands contain the spread of infection largely within extensively managed stands. Continuous areas of intensively managed stands produced barriers and created bottlenecks, reducing the spread of infection to between extensively managed portions of the landscape that had limited or no physical continuity. Intensively managed stands also appeared to limit the growth of infection centers beyond the boundaries of extensively managed areas (Figure 4.5). Extensive stands reciprocally provided a persistent source of infections with spillover into intensively managed stands, where infections were concentrated along boundaries shared with extensively managed stands. These results suggest that contrasts in stand infection incidence created by intensive versus extensive management approaches could influence the connectivity of the landscape with respect to the spread of disease.

In a study of Phytopthora ramorum, the invasive fungal pathogen responsible for Sudden

Oak Death (SOD) in California and Oregon, Meentemeyer et al. (2008) also found that landscape- scale changes in land cover resulting from management created conditions facilitating the establishment of the pathogen. Increased density of SOD hosts facilitated the spread of the disease by increasing sources of inoculum and enhancing the connectivity of the landscape. In a review

81 paper, Roberts et al. (2020) also cites multiple examples suggesting that increasing forest connectivity increased incidence, severity, and mortality for forest diseases, citing BSRD as an example system. In my simulations, decreasing landscape connectivity for infection spread with increasing proportion of low-density, low-infection stands was also suggested by the concentration of infection in the portion of the landscape with extensively managed stands in the

50-50% landscape scenario (Figure 4.5). Future research involving spatial analysis of infection incidence and landscape connectivity metrics would strengthen support for this observation.

My results suggest that connected areas of low-infection stands could serve as “disease breaks” reducing infection spread, analogous to the role of fuel breaks in reducing fire spread.

Fuel breaks are areas where silvicultural fuel-reduction treatments have been applied that reduce fire spread by decreasing the continuity of combustible vegetation. In the case of BSRD simulations, intensively managed stands serve as disease breaks by interrupting the continuity of stands managed with approaches that increase tree density, provide persistent sources of inoculum, and create disturbance regimes that favor infection. In a study simulating landscape fire spread, Loehle (2004) found that increasing the percentage of the landscape with fuel breaks, decreased the percent of the landscape burned. When 30% of the landscape was treated, a threshold response was observed where the landscape became essentially “fireproof.” The 30% threshold observed by Loehle (2004) is similar to the threshold between 25 and 50% intensively managed stands observed in my simulations with the intermediate infection variant (Figure 4.1).

In my simulations, the effectiveness of low-infection, intensively managed stands in reducing landscape connectivity and forming a “disease break” depended on the strength of the short-distance, root-driven infection versus long-distance, insect-driven infection as determined by infection variant. When root-vector infection was increased, i.e., the high-root-infection variant, less than 25% intensively managed stands may have been sufficient for a disease break to form. In contrast, when insect-vector infection was increased, as simulated in the high-insect- infection variant, dispersal may have connected extensively managed stands physically separated by intensively managed stands even when the latter occupied 75% of the landscape.

82

In addition, the spatial arrangement of intensively and extensively managed stands may influence the formation and effectiveness of disease breaks as has been shown for fuel breaks

(Loehle, 2004; Finney et al., 2004; Finney et al., 2007; Schmidt et al., 2008; Wei, 2012). In my simulations, the arrangement of management approaches was random, and additional simulations varying the spatial pattern of management would improve understanding of disease break formation and management strategies. As with fire, the patchiness created by increasing forest structural and compositional diversity at multiple scales, including irregular gaps and inclusion of open- and closed-canopy forest habitat could influence infection spread while also allowing for consideration of other ecological values including habitat connectivity (Lehmkuhl et al., 2007). Given the evidence that connectivity is important for forest pathology (Meentemeyer et al., 2008; Roberts et al., 2020) as well as biodiversity and conservation (Taylor et al., 1993), the disease break hypothesis could be relevant across ecological systems and a productive avenue for future research.

MISMATCHES BETWEEN THE SCALES OF SOCIAL AND ECOLOGICAL PROCESSES

The interaction between stand- and landscape-scale management and BSRD infection incidence highlights a potential mismatch between the scale at which forests are managed (i.e., stands) and the scale at which the process of disease spread operates (i.e., up to 500 meters). In the case of BSRD, the forest landscape is divided by property boundaries and historic legacies of management and settlement that resulted in present stand boundaries. The planning and implementation of forest management practices occurs primarily at the stand scale. In contrast, ecological disturbances, including BSRD among fire and other diseases, do not recognize property lines. Disturbances are not contained by stand boundaries unless contrasts in management across those boundaries create conditions that facilitate or limit their spread.

BSRD represents a coupled social-ecological scale mismatch, where the fine, stand-scale of the social system that drives management does not match the broad, landscape-scale ecological

83 process of disease spread influenced by spatial patterns of forest structure, composition and management disturbance (Cumming et al., 2006). The division of the landscape among many landowners with differing objectives, motivations, and limitations, including competition, limits the capacity of forest managers to collaborate beyond stand boundaries and adapt stand management practices to address increased BSRD spread, e.g., by providing barriers by planting other species. Also, the differences between the role of each infection vector in causing infections between simulations (Figure 4.6) suggests that infection spread via short-distance mechanisms

(i.e., roots and walking vectors), could be mitigated at the stand scale by increasing tree spacing.

However, strategies that transcend stand boundaries will likely be necessary if forest managers wish to mitigate infection spread by flying vectors with large dispersal ranges, which are hypothesized to cause the largest proportion of infections.

POTENTIAL INTERACTIONS BETWEEN BSRD AND CLIMATE

Agne et al. (2018) hypothesized that BSRD spread could accelerate due to drought- induced stress weakening tree defenses and increasing vector attraction through production of ethanol and chemical volatiles. Climate was not incorporated into my model, by my results suggested that higher tree density increases infection. Higher tree density also increases competition for soil water. Therefore, as portions of the landscape become hotter and drier, the discrepancy between BSRD infection between lower- and higher-density stands could increase.

Stands on south-facing slopes with high exposure to solar radiation could be particularly susceptible to this effect. Additional research regarding interactions between climate and BSRD is needed to clarify whether recent reports of BSRD mortality in young stands and renewed concern about BSRD from forest managers is connected to significant recent droughts and accelerated climatic change.

84

CHAPTER 6. CONCLUSION

SUMMARY

By synthesizing the best available understanding of black stain root disease into a spatial simulation model, I was able to evaluate the influence of forest management practices on BSRD infection and produce new insights as to the dynamics of the disease system. The results produced by simulations raised new questions and hypotheses about the drivers of black stain root disease spread across spatial scales. Tree density, removal of infections via management disturbance and tree mortality, and the insect vectors P. fasciatus and H. nigrinus were identified as important drivers of infection. The unexpected result that thinning and harvest disturbance provide a net-negative rather than net-positive feedback to the spread of disease suggested that the relationship between management disturbance, vector populations, and vector attraction should be prioritized for future research. Experiments that monitor insect vector populations and infections pre- and post-thinning and harvest would improve understanding of the strength of the feedbacks created by management disturbance as they interact with the loss of pathogen viability in dead hosts. Whether and under what conditions management disturbance promotes or hinders the spread of disease could have important implications for management and understanding of the ecological system. Refining understanding of the position of thresholds with respect to changes in forest management practices and the influence of spatial patterns of management on disease spread would also serve to identify the conditions under which forest structure and disturbance at the landscape scale operate as a driver of BSRD infection.

NOVEL SCIENTIFIC CONTRIBUTION

One novel contribution of this research is an integration and synthesis of information relevant to the black stain root disease system: a meticulous literature review identifying mechanisms of disease transmission; selecting the relevant probabilities, distributions and equations; and using deductive reasoning to integrate this understanding into a mechanistic simulation model of BSRD infection probability. Also relevant was choosing the scale of the

85 model to fit the available data. By developing this model in the framework of an agent-based model (ABM), I was able to use available understanding of individual-scale and stand-scale processes that govern interactions between the host, vectors, and pathogen to simulate emergent system behaviors including cycles of outbreak over time and cross-scale feedbacks. This is the first model developed to simulate BSRD spread and one of few agent-based models simulating root diseases at both individual-tree and landscape scales.

In addition, my research contributes to the body of scientific literature relating spatial patterns to ecological processes. Relatively few studies have analyzed the influence of landscape- scale changes to forest disturbance regimes and stand structure on the interactions within disease systems (Holdenrieder, 2004; Meentemeyer 2008). Disease spread is a spatial process as are other types of disturbance, and the results suggesting a link between forest structure and landscape connectivity with respect to disturbance have the potential to inform understanding of other disturbances such as fire or insect-vector outbreaks. The emergence of a novel disease break hypothesis from my research, akin to fuel breaks in fire management, could provide a useful lens for further integrating principles of landscape ecology into forest management practices related to issues of forest health.

IMPLICATIONS FOR FOREST MANAGEMENT

LARGE-SCALE FOREST MANAGEMENT PLANNING

Mechanistic models are a tool that managers can use to “optimize” management approaches to face specific challenges (Aurambout and Endress, 2018). The model I created, and the hypotheses generated from its use, aim to inform management practices with respect to the threat of BSRD in the Douglas-fir region. By simulating the probability of BSRD infection and spread in a variety of landscape management scenarios, the model can help managers assess the risk of potential risk of BSRD as a management issue and evaluate the effectiveness of adjusting silvicultural practices or engaging in cross-boundary management planning that considers the complexity of forests as ecological systems. The model itself serves as a focal point of accumulated

86 knowledge through which landscape-scale management planning can occur. Addressing disease issues at landscape scales is complicated by the fact that forest landscapes are managed by many owners with diverse objectives and limited coordination or joint planning efforts beyond property boundaries. Models have been employed in group-based decision settings with promising results for facilitating cross-organizational collaboration (Cook et al., 2016). The

NetLogo program used to develop this was originally designed as an educational tool. It has a user-friendly interface where users can adjust model settings and watch the system respond in real time, and all the code for the model is visible to the user, providing transparency.

Implications for managers include planning decisions to reduce the probability of BSRD infection with emphasis on decreasing planting density and considering the spatial distribution of forest. Management decisions require considerations of tradeoffs between different ecosystem services, and this model can be used as a decision-support tool to evaluate a broad array of different management approaches and evaluate tradeoffs before committing resources. Results showing support for the hypothesis that landscape-scale management trends influence on BSRD infection and mortality suggest that managers consider the forest lying beyond stand boundaries when making management decisions.

My research has contributed as an initial step towards producing new, evidence-based management strategies for BSRD mitigation by providing a means of evaluating potential outcomes of landscape-scale management planning efforts. Additional simulation can expand on this research by suggesting how the spatial pattern of management practices, including amount and arrangement of different management approaches, could provide disease breaks or corridors for the spread of BSRD.

87

BIBLIOGRAPHY

Adams, D.H., Cobb Jr., F.W., 1986. Infection of outplanted Douglas-fir seedlings by Verticicladiella wageneri (Black stain root disease) when planted around infected Douglas-fir stumps, California Forestry Note. Sacramento, CA.

Agne, M.C., Beedlow, P.A., Shaw, D.C., Woodruff, D.R., Lee, E.H., Cline, S.P., Comeleo, R.L., 2018. Interactions of predominant insects and diseases with climate change in Douglas-fir forests of western Oregon and Washington, U.S.A. For. Ecol. Manage. 317–332. https://doi.org/10.1016/j.foreco.2017.11.004

Aurambout, J.P., Endress, A.G., 2018. A model to simulate the spread and management cost of kudzu (Pueraria montana var. lobata) at landscape scale. Ecol. Inform. 43, 146–156. https://doi.org/10.1016/j.ecoinf.2017.12.004

Balci, O., 1995. Principles and techniques of simulation validation, verification, and testing, in: Alexopoulos, C., Kang, K., Lilegdon, W.R., Goldsman, D. (Eds.), Proceedings of the 1995 Winter Simulation Conference. pp. 147–154.

Barak, A. V., McGrevy, D., Takaya, G., 2000. Dispersal and re-capture of marked, overwintering Tomicus piniperda (Coleoptera: Scolytidae) from Scotch pine bolts. Gt. Lakes Entomol. 33, 69–80.

Berner, L.T., Law, B.E., Meddens, A.J.H., Hicke, J.A., 2017. Tree mortality from fires, bark beetles, and timber harvest during a hot and dry decade in the western United States (2003-2012). Environ. Res. Lett. 12, 065005.

Briggs, D., 2007. Management Practices on Pacific Northwest West-Side Industrial Forest Lands, 1991-2005: With Projections To 2010, SMC Working Paper No. 6. Seattle, WA.

Byers, J.A., 1999. Effects of attraction radius and flight paths on catch of Scolytid beetles dispersing outward through rings of pheromone traps. J. Chem. Ecol. 25, 985–1005. https://doi.org/10.1023/A:1020869422943

Cohen, W.B., Spies, T.A., Alig, R.J., Oetter, D.R., Maiersperger, T.K., Fiorella, M., 2002. Characterizing 23 years (1972-95) of stand replacement disturbance in western Oregon forests with LANDSAT imagery. Ecosystems 5, 122–137. https://doi.org/10.1007/s10021- 001-0060-X

Condeso, T.E., Meentemeyer, R.K., 2007. Effects of landscape heterogeneity on the emerging forest disease sudden oak death. J. Ecol. 95, 364–375. https://doi.org/10.1111/j.1365- 2745.2006.01206.x

88

Condrashoff, S.F., 1968. Biology of Steremnius carinatus (Coleoptera: Curculionidae), a reforestation pest in coastal British Columbia. Can. Entomol. 100, 386–394. https://doi.org/https://doi.org/10.4039/Ent100386-4

Costa, A., A, M., Boone, C.K., Kendrick, A.P., Murphy, R.J., Sharpee, W.C., Raffa, K.F., Reeve, J.D., 2013. Dispersal and edge behaviour of bark beetles and predators inhabiting red pine plantations. Agric. For. Entomol. 15, 1–11. https://doi.org/10.1111/j.1461-9563.2012.00585.x

Dillon, W.W., Haas, S.E., Rizzo, D.M., Meentemeyer, R.K., 2014. Perspectives of spatial scale in a wildland forest epidemic. Eur. J. Plant Pathol. 138, 449–465. https://doi.org/10.1007/s10658-013-0376-3

Dodds, K.J., Garman, S.L., Ross, D.W., 2006. Landscape analyses of Douglas-fir beetle populations in northern Idaho. For. Ecol. Manage. 231, 119–130. https://doi.org/10.1016/j.foreco.2006.05.023

Dodds, K.J., Ross, D.W., 2002. Sampling range and range of attraction of Dendroctonus pseudotsugae pheromone-baited traps. Can. Entomol. 134, 343–355. https://doi.org/10.4039/Ent134343-3

Duelli, P., Zahradnik, P., Knizek, M., Kalinova, B., 1997. Migration in spruce bark beetles (Ips typographis L.) and the efficiency of pheromone traps . J. Appl. Entomol. 121, 297–303. https://doi.org/10.1111/j.1439-0418.1997.tb01409.x

Fahse, L., Heurich, M., 2011. Simulation and analysis of outbreaks of bark beetle infestations and their management at the stand level. Ecol. Modell. 222, 1833–1846. https://doi.org/10.1016/j.ecolmodel.2011.03.014

Finney, M.A., McHugh, C.W., Grenfell, I.C., 2005. Stand- and landscape-level effects of prescribed burning on two Arizona wildfires. Can. J. For. Res. 35, 1714–1722. https://doi.org/10.1139/x05-090

Finney, M.A., Seli, R.C., McHugh, C.W., Ager, A.A., Bahro, B., Agee, J.K., 2007. Simulation of long-term landscape-level fuel treatment effects on large wildfires. Int. J. Wildl. Fire 16, 712–727. https://doi.org/10.1071/WF06064

Fotheringham, A.S., Rogerson, P.A., 1993. GIS and spatial analytical problems. Int. J. Geogr. Inf. Syst. 7, 3–19. https://doi.org/10.1080/02693799308901936

Franklin, A.J., Debruyne, C., Grégoire, J.C., 2000. Recapture of Ips typographus L. (Col., Scolytidae) with attractants of low release rates: Localized dispersion and environmental influences. Agric. For. Entomol. 2, 259–270. https://doi.org/10.1046/j.1461-9563.2000.00075.x

89

Furniss, M.M., Furniss, R.L., 1972. Scolytids (Coleoptera) on snowfields above the timberline in Oregon and Washington. Can. Entomol. 104, 1471–1478.

Goheen, D., Hansen, E., 1993. Effects of pathogens and bark beetles on forests, in: Schowalter, T.D., Filip, G.M. (Eds.), Beetle-pathogen interactions in conifer forests. Academic Press, London, pp. 175–196.

Goheen, D.J., Hansen, E.M., 1978. Black stain root disease in Oregon and Washington. Plant Dis. Report. 62, 1098–1102.

Gunnoe, A., Bailey, C., Ameyaw, L.K., 2018. Millions of acres, billions of trees: Socioecological impacts of shifting timberland ownership. Rural Sociol.

Hansen, E.M., Goheen, E.M., 2000. Phellinus weirii and other native root pathogens as determinants of forest structure and process in western North America. Ann. Rev. Phytopathol. 38, 515–539.

Hansen, E.M., 1978. Incidence of Verticicladiella wagenerii and Phellinus weirii in Douglas-fir adjacent to and away from roads in western Oregon. Plant Dis. Report. 62, 179–181.

Hansen, E.M., Goheen, D.J., 1988. Rate of increase of black-stain root disease in Douglas-fir plantations in Oregon and Washington. Can. J. For. Res. 18, 942–946.

Harrington, T.C., 1988. Leptographium species, their distributions, hosts and insect vectors, in: Leptographium Root Diseases on Conifers. pp. 1–39.

Harrington, T.C., 1983. Verticicladiella wageneri: and vector relations. Doctoral dissertation, University of California, Berkeley.

Harrington, T.C., Cobb Jr., F.W., Lownsbery, J.W., 1985. Activity of Hylastes nigrinus, a vector of Verticicladiella wageneri, in thinned stands of Douglas-fir. Can. J. For. Res. 519–523.

Harrington, T.C., Cobb Jr., F.W., 1986. Varieties of Verticicladiella wageneri. Mycologia 78, 562–567.

Hessburg, P.F., Goheen, D.J., Koester, H., 2001. Association of black stain root disease with roads, skid trails, and precommercial thinning in southwest Oregon. West. J. Appl. For. 16, 127– 135.

Hessburg, P.F., Hansen, E.M., 2000. Infection of Douglas-fir by Leptographium wageneri. Can. J. Bot. 78, 1254–1261. https://doi.org/10.1139/cjb-78-10-1254

Hessburg, P.F., Hansen, E.M., 1986. Soil temperature and rate of colonization of Ceratocystis wageneri in Douglas-fir. Phytopathology 627. https://doi.org/doi: 10.1094/phyto-76-627

90

Hessburg, P.F., 1984. Pathogenesis and intertree transmission of Verticicladiella wageneri in Douglas-fir (Pseudotsuga menziesii). Doctoral dissertation, Oregon State University.

Hessburg, P.F., Hansen, E.M., 1987. Pathological anatomy of black stain root disease of Douglas- fir. Can. J. Bot. 65, 962–971.

Hessburg, P.F., Hansen, E.M., 1986. Mechanisms of intertree transmission of Ceratocystis wageneri in young Douglas-fir. Can. J. For. Res. 1250–1254. https://doi.org/10.1139/x86-221

Himes, A., Puettmann, K., 2020. Tree species diversity and composition relationship to biomass, understory community, and crown architecture in intensively managed plantations of the coastal pacific northwest, USA. Can. J. For. Res. 50, 1–12. https://doi.org/10.1139/cjfr-2019- 0236

Holdenrieder, O., Pautasso, M., Weisberg, P.J., Lonsdale, D., 2004. Tree diseases and landscape processes: The challenge of landscape pathology. Trends Ecol. Evol. 19, 446–452. https://doi.org/10.1016/j.tree.2004.06.003

Jantz, O.K., Rudinsky, J.A., 1965. Laboratory and field methods for assaying olfactory responses of the Douglas-fir beetle, Dendroctonus pseudotsugae Hopkins. Can. Entomol. 97, 935–941. https://doi.org/10.4039/Ent97935-9

Jantz, O.K., Rudinsky, J.A., 1966. Studies of the olfactory behavior of the Douglas-fir beetle, Dendroctonus pseudotsugae Hopkins. Corvallis, OR. https://doi.org/10.4039/Ent98953-9

Jensen, J.G., 1955. Tree farming in the Douglas fir region: An evaluation. Yearb. Assoc. Pacific Coast Geogr. https://doi.org/10.1353/pcg.1955.0006

Kausrud, K.L., Grégoire, J.C., Skarpaas, O., Erbilgin, N., Gilbert, M., Økland, B., Stenseth, N.C., 2011. Trees wanted-dead or alive! Host selection and population dynamics in tree-killing bark beetles. PLoS One 6. https://doi.org/10.1371/journal.pone.0018274

Kautz, M., Dworschak, K., Gruppe, A., Schopf, R., 2011. Quantifying spatio-temporal dispersion of bark beetle infestations in epidemic and non-epidemic conditions. For. Ecol. Manage. 262, 598–608. https://doi.org/10.1016/j.foreco.2011.04.023

Kautz, M., Imron, M.A., Dworschak, K., Schopf, R., 2015. Dispersal variability and associated population-level consequences in tree-killing bark beetles. Mov. Ecol. 4, 1–12. https://doi.org/10.1186/s40462-016-0074-9

Kelsey, R.G., Joseph, G., 1998. Ethanol in Douglas-fir with black-stain root disease (Leptographium wageneri). Can. J. For. Res. 28, 1207–1212. https://doi.org/10.1139/x98-087

91

Kendrick, W.B., 1962. The Leptographium complex. Can. J. Bot. 40, 771–797.

Kendrick, W.B., 1962. The Leptographium complex. Verticicladiella Hughes. Can. J. Bot. 40, 771–797.

Kuehne, C., Karrié, C., Forrester, D.I., Kohnle, U., Bauhus, J., 2015. Root system development in naturally regenerated Douglas-fir saplings as influenced by canopy closure and crowding. J. For. Sci. 61, 406–415. https://doi.org/10.17221/53/2015-JFS

Kuehne, C., Weiskittel, A.R., Fraver, S., Puettmann, K.J., 2015. Effects of thinning-induced changes in structural heterogeneity on growth, ingrowth, and mortality in secondary coastal Douglas-fir forests. Can. J. For. Res. https://doi.org/10.1139/cjfr-2015-0113

Kuiper, L.C., Coutts, M.P., 1992. Spatial disposition and extension of the structural root system of Douglas-fir. For. Ecol. Manage. 47, 111–125. https://doi.org/10.1016/0378-1127(92)90269-F

Lehmkuhl, J.F., Kennedy, M., Ford, E.D., Singleton, P.H., Gaines, W.L., Lind, R.L., 2007. Seeing the forest for the fuel: Integrating ecological values and fuels management. For. Ecol. Manage. 246, 73–80. https://doi.org/10.1016/j.foreco.2007.03.071

Levin, S.A., 1992. The problem of pattern and scale in ecology. Ecology 73, 1943–1967. https://doi.org/10.2307/1941447

Lockman, I.B., Kearns, H.S.J., 2016. Forest root diseases across the United States. Gen. Tech. Rep. RMRS-GTR-342.

Loehle, C., 2004. Applying landscape principles to fire hazard reduction. For. Ecol. Manage. https://doi.org/10.1016/j.foreco.2004.04.010

McMinn, R.G., 1963. Characteristics of Douglas-fir root systems. Can. J. Bot. 41.

Meentemeyer, R.K., Rank, N.E., Anacker, B.L., Rizzo, D.M., Cushman, J.H., 2008. Influence of land-cover change on the spread of an invasive forest pathogen. Ecol. Appl. 18, 159–171. https://doi.org/10.1890/07-0232.1

Messier, C., Puettmann, K.J., Chazdon, R., Andersson, K.P., Angers, V.A., Brotons, L., Filotas, E., Tittler, R., Parrott, L., Levin, S.A., 2015. From management to stewardship: Viewing forests as complex adaptive systems in an uncertain world. Conserv. Lett. 8, 368–377. https://doi.org/10.1111/conl.12156

Messier, C., Puettmann, K.J., Coates, K.D., 2013. Managing forests as complex adaptive systems: Building resilience to the challenge of global change. https://doi.org/10.4324/9780203122808

92

North, A.R., Godfray, H.C.J., 2017. The dynamics of disease in a metapopulation: The role of dispersal range. J. Theor. Biol. 418, 57–65. https://doi.org/10.1016/j.jtbi.2017.01.037

Ohmann, J.L., Gregory, M.J., Spies, T.A., 2007. Influence of environment, disturbance, and ownership on forest vegetation of coastal Oregon. Ecol. Appl. 17, 18–33. https://doi.org/10.1890/1051-0761(2007)017[0018:IOEDAO]2.0.CO;2

R Core Team (2019). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/

Reynolds, K.M., Bloomberg, W.J., 1982. Estimating probability of intertree root contact in second- growth Douglas-fir. Can. J. For. Res. 12, 493–498.

Reynolds, K.M., 1981. Factors affecting inter-tree root contact and the transmission of Phellinus weirii in young-growth Douglas-fir. Oregon State University.

Roberts, M., Gilligan, C.A., Kleczkowski, A., Hanley, N., Whalley, A.E., Healey, J.R., 2020. The effect of forest management options on forest resilience to pathogens. Front. For. Glob. Chang. 3. https://doi.org/10.3389/ffgc.2020.00007

Rudinsky, J.A., Zethner-Mølller, O., 1967. Olfactory responses of Hylastes nigrinus (Coleoptera: Scolytidae) to various host materials. Can. Entomol. 99, 911–916.

Schmidt, D.A., Taylor, A.H., Skinner, C.N., 2008. The influence of fuels treatment and landscape arrangement on simulated fire behavior, Southern Cascade range, California. For. Ecol. Manage. 255, 3170–3184. https://doi.org/10.1016/j.foreco.2008.01.023

Taylor, P.D., Fahrig, L., Henein, K., Merriam, G., 1993. Connectivity is a vital element of landscape structure. Oikos 68, 571–573.

Thiele, J.C., 2014. R Marries NetLogo: Introduction to the RNetLogo Package. J. Stat. Softw. 58, 1– 41. https://doi.org/10.18637/jss.v058.i02

Thiele, J.C., Grimm, V., 2010. NetLogo meets R: Linking agent-based models with a toolbox for their analysis. Environ. Model. Softw. https://doi.org/10.1016/j.envsoft.2010.02.008

Thiele, J.C., Kurth, W., Grimm, V., 2015. Jan C . Thiele , Winfried Kurth and Volker Grimm (2014) Facilitating parameter estimation and sensitivity analysis of agent-based models : A cookbook using NetLogo and R. J. Artif. Soc. Soc. Simul. 17, 1–45. https://doi.org/10.18564/jasss.2503

93

Vega, Mario L. spread-infection, (2020), GitHub repository, https://github.com/mariowhowrites/spread-infection

Wei, Y., 2012. Optimize landscape fuel treatment locations to create control opportunities for future fires. Can. J. For. Res. 42, 1002–1014. https://doi.org/10.1139/x2012-051

Wilensky, U. 1999. NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.

Wilensky, U. (2007). NetLogo Hex Cell Aggregation model. http://ccl.northwestern.edu/NetLogo/models/HexCellAggregation. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL

Wingfield, M., 1985. Reclassification of Verticicladiella based on conidial development. Trans. Br. Mycol. Soc. 85, 81–93.

Witcosky, J.J., Schowalter, T.D., Hansen, E.M., 1987. Host-derived attractants for the beetles Hylastes nigrinus (Coleoptera : Scolytidae) and Steremnius carinatus (Coleoptera : Curculionidae). Environ. Entomol. 16, 1310–1313.

Witcosky, J.J., Schowalter, T.D., Hansen, E.M., 1986a. The influence of time of precommercial thinning on the colonization of Douglas-fir by three species of root-colonizing insects. Can. J. For. Res. 16, 745–749. https://doi.org/10.1139/x86-133

Witcosky, J.J., 1981. Insects associated with black stain root disease of Douglas-fir. Master’s thesis, Oregon State University.

Witcosky, J.J., 1989. Root beetles, stand disturbance and management of black-stain root disease in plantations of Douglas-fir, in: Alfaro, R.I., GLover, S.G. (Eds.), Proceeding of IUFRO Working Group on Insects Affecting Reforestation XVIII International Congress of Entomology. Forestry Canada Pacific and Yukon Region Pacific Forestry Centre, Victoria, British Columbia, Canada, pp. 58–70.

Witcosky, J.J., Hansen, E.M., 1985. Root-colonizing insects recovered from Douglas-fir in various stages of decline due to black-stain root disease. Phytopathology 75, 399–402.

Witcosky, J.J., Schowalter, T.D., Hansen, E.M., 1986b. Hylastes nigrinus (Coleoptera: Scolytidae), Pissodes fasciatus, and Steremnius carinatus (Coleoptera: Curculionidae) as vectors of black- stain root disease of Douglas-fir. Environ. Entomol. 1090–1095. https://doi.org/10.1093/ee/15.5.1090

94

Zethner-Mølller, O., Rudinsky, J.A., 1967. On the biology of Hylastes nigrinus (Coleoptera: Scolytidae) in western Oregon. Can. Entomol. 99, 897–911. https://doi.org/http://dx.doi.org/10.4039/Ent99897-9

95

APPENDIX

96

APPENDIX A: PLOTS OF INFECTION PARAMETERS

HOST PARAMETERS

INFECTION SUSCEPTIBILITY

Figure A.1. Density plot for BSRD-infection susceptibility, a binomial probability distribution, with the mean represented as a dashed line.

97

MORTALITY SUSCEPTIBILITY

Figure A.2. Probability of mortality at a function of tree age and time-since-infection. Probability of mortality during the year the tree becomes infected by BSRD is lower than in subsequent years.

98

ROOT-VECTOR PARAMETERS

PROBABILITY OF ROOT CONTACT

Maximum root extent

Figure A.3. Maximum radial extent of tree root systems as a function of tree age by data source.

99

Figure A.4. Maximum radial extent of tree root systems as a function of tree age. The regression fit is plotted (line) with the prediction interval (shaded blue), literature data (black diamonds), and random parameter values drawn from a normal distribution with a mean that falls along the fit line.

99

100

PROBABILITY OF ROOT-VECTOR TRANSMISSION

Figure A.5. Density plot of probability of root-vector transmission, a binomial probability distribution, with the mean represented as a dashed line.

101

INSECT-VECTOR PARAMETERS

PROBABILITY INSECT VECTOR INFESTED BY PATHOGEN SPORES

Figure A.6. Density plot of the probability that an insect vector is infested by pathogen spores for each insect species, binomial probability distributions with the mean for each species represented as a dashed line.

102

PROBABILITY OF INSECT-VECTOR TRANSMISSION

Figure A.7. Density plot of the probability of insect-vector transmission for each insect species, binomial probability distributions with the mean for each species represented as a dashed line.

103

PROBABILITY OF INSECT-VECTOR DISPERSAL

Figure A.8. Probability of insect-vector dispersal for the walking insect S. carinatus (sea green) and the flying insects P. fasciatus and H. nigrinus (royal blue), modeled with exponential decay functions.

104

APPENDIX B. MODEL CODE

The full model code, including code for supporting files used in the main model file

(“BSRD_model_1.9.3.0.nlogo”) depends, is included in this appendix. For the NetLogo files most recent version of the model with any changes made subsequent to the submission of this thesis, please visit the GitHub repository found at https://github.com/flowbouche. The code for the spread-infection program used by the main model can be found in the GitHub repository of Mario Vega, https://github.com/mariowhowrites/spread-infection (Vega, 2020).

;______; MODEL INITIALIZATION ;______; Included files: __includes [ "supporting_files/current/basic_functions_1.9.3.0.nls" "supporting_files/current/probability_parameters_1.9.3.0.nls" "supporting_files/current/ring_lists_1.9.2.0.nls" "supporting_files/current/vector-attraction_1.9.2.0.nls" "supporting_files/current/spread-infection_Go_1.9.3.0.nls" ]

; Import extensions extensions [ gis r ]

; Define global variables globals [ ; GENERAL, GIS & files base-setup? ; Whether base has been set up run-id-no ; unique run id number run-id ; unique run id model-dir ; model directory ;run-dir ; run directory run-file ; path to run file progress-file ; file to keep track of model progress

105

stand-data-file ; file for stand-level data output tree-data-file ; file for data output cell-coords-file ; file will cell distances test-timer ; Useful for a timer that needs to be used in a global context current-date-and-time ; Used to store an abbreviated timestamp of current date and time intercell-distance ; Variable to set distance between cells/patch dimensions (m) cell-area ; The area represented by each patch/cell (m^2)

; GIS, OUTPUTS projection ; projection used for output files

; LANDSCAPE GENERATOR / MANAGEMENT seed-radius ; used to make the stands more evenly sized ; Stand lists: (lists of stand-id numbers, NOT agentsets of cells with those mgmt types) stand-list ; a list of all stand-id numbers (1 to total number of stands) intensive-stand-list ; list of stand-id #s of 'intensive' stands extensive-stand-list ; list of stand-id #s of 'extensive stands' set-aside-stand-list ; list of stand-id #s of 'set-aside stands' ; SET ASIDE NOT USED IN THIS MODEL VERSION regen-list-intensive ; list of intensive stands to be regenerated regen-list-extensive ; list of extensive stands to be regenerated thin-list-PCT ; list of thinned stands (for attraction) thin-list-CT1 ; list of thinned stands (for attraction) thin-list-CT2 ; list of thinned stands (for attraction) plantation-road-density ; density of roads in plantations in meters per hectare (34.2 m/ha, from John Sessions, personal communication) thinning-occurred? ; bool to track whether a thinning occurred harvest-occurred? ; bool to track whether a harvest occurred

; GLOBAL AGENTSETS trees_current ; an agentset of all current trees trees_potential ; an agentset of all cells than will be trees during a model run edges ; an agentset of all cells/patches at a stand edge trees-to-thin ; agentset: all trees to be thinned trees-to-harvest ; agentset: all trees to be harvested ; INFECTION MODEL trees_newly-infected ; an agentset of all trees that are newly infected trees_losing-infection ; an agentset of all trees that have lost their infection (due to mortality and inoculum viability decay

106

trees_infected ; an agentset of all infected trees cells-projecting ; an agentset of all cells projecting infection or attraction empty-agentset ; an empty agentset for clearing

; Maximum dispersal distances (measured in number of cells, not meters), used for generating cell-distance-file ; and calculated based on the distances set by max-cell-distance-___-m (which is in meters) max-root-distance_ext_cell ; Max cell distance transmission for roots (extensive stands == 3 cell dists) max-root-distance_int_cell ; Max cell distance transmission for roots (intensive stands == 4 cell dists) max-vector-distance_SC_cell ; Max cell dispersal for vector1 (S. carinatus) max-vector-distance_PF_cell ; Max cell dispersal for vector2 (P. fasciatus) max-vector-distance_HN_cell ; Max cell dispersal for vector3 (H. nigrinus) max-inf-spread-distance_cell ; Max cell distance used for spread (max of dispersal distances in cells max-attraction-distance_cell ; max distance for attraction of vectors (in cell units): 10 cells = 15 m / 49.2 ft

; BACKGROUND PROBABILITY OF VECTOR DISPERSAL n-stands-projecting-vector-dispersal_background ; the number of stands projecting background dispersal ; occurs when the % infection is very high (for BSRD) prob-vector-dispersal_background_cumul ; the probability of vector dispersal to project based on the number of stands with dispersal spillover

;max-distance-used_cell ; Max distance used for distance rings bsrd-inf_cumul ; Count of all bsrd infections during model run (cumulative) bsrd-mort_cumul ; Count of all bsrd mortalities during model run (cumulative) trees_cumul ; count of all trees ever existing in the model bsrd-inf_INT_cumul ; Count of all bsrd infections during model run in INTENSIVE stands (cumulative) bsrd-mort_INT_cumul ; Count of all bsrd mortalities during model run in INTENSIVE stands (cumulative) bsrd-inf_EXT_cumul ; Count of all bsrd infections during model run in EXTENSIVE stands (cumulative) bsrd-mort_EXT_cumul ; Count of all bsrd mortalities during model run in EXTENSIVE stands (cumulative) trees_INT_cumul ; count of all trees ever existing in the model trees_EXT_cumul ; count of all trees ever existing in the model

107

; for checking parameters parameter-values

; Define colors for easy visual understanding of the model color_empty ; Non-tree cells color_tree-live-notinf ; Live trees: not infected color_tree-live-inf ; Live trees: infected color_tree-dead-notinf ; Dead trees: not infected color_tree-dead-inf ; Dead trees: infected color_road ; Color for road cells color_patches ; Background color

kill-run? ; kills the run if a major error occurs ]

; Patch properties (used to quickly produce raster files of the landscape) patches-own [ p_cell ; bool: Whether or not a patch has a cell; used to avoid having >1 cell per patch p_seed ; bin: Whether or not a patch serves as a "seed" for "growing" a stand (0 = NO, 1 = YES) p_near-seed ; bin: Whether or not near a seed (to make stand sizes more equal) p_edge ; bin: Whether or not an edge (0: no, 1: yes) p_road ; bin: Whether or not a road p_stand-id ; int: unique ID # for each stand p_mgmt ; int: management regime (1: intensive, 2: extensive, 3: old growth) p_tree ; bin: whether or not patch contains tree/stump (alive or dead) p_age ; int: tree age p_alive ; bin: If patch contains tree, whether patch has a live tree (1) or dead tree/stump (0). Default: 0 p_inf ; bin: whether or not a tree is infected (0: no, 1: yes) p_inf-root ; bin: whether infected via roots p_inf-SC ; bin: whether infected via vector SC p_inf-PF ; bin: whether infected via vector PF p_inf-HN ; bin: whether infected via vector HN p_mort-cause ; int: cause of mortality: 1 == thin, 2 == harvest, 3 == BSRD p_p-inf_root ; float: probability of infection from root transmission p_p-inf_SC ; float: probability of infection from vector S. carinatus p_p-inf_PF ; float: probability of infection from vector P. fasciatus

108

p_p-inf_HN ; float: probability of infection from vector H. nigrinus

;patch attraction properties p_attr-road ; real: Attraction factor when near a road p_attr-mgmt p_attr-mgmt_source ]

; Create a class ("breed") of turtles to serve as the hexagon cells of the model breed [ cells cell ]

; Hexagon cell properties - see patch properties for info cells-own [ ;cell-nbors ; agentset: The six neighboring hexagons ; DEACTIVATED ; STAND SETUP seed? ; bool: Whether or not cell serves as a "seed" for "growing" a stand stand-id ; int: Unique ID # for each stand near-seed? ; bool: Whether or not cells are near a "seed", used to generate similarly sized stands edge? ; bool: Whether or not an edge road? ; bool: Whether or not a road mgmt ; str: Management regime (i.e., intensive, extensive)

; TREE STATUS potential-tree? ; bOOL: used so that project-inf and attr affect those cells that are trees or will become trees post-regen tree? ; bool: whether or not cell contains tree/stump (alive or dead) alive? ; bool: whether or not the tree is alive age ; int: cell/stand age ; Infection infected? ; bool: whether or not a tree is infected newly-infected? ; bool: if a tree is infected during this time step (clear before next time step) losing-infection? ; bool: if a tree is losing its infection during this time step inf-initial? ; bool: whether tree became infection in initial setup inf-root? ; bool: whether tree became infected by roots inf-SC? ; bool: whether tree became infected by SC inf-PF? ; bool: whether tree became infected by PF inf-HN? ; bool: whether tree became infected by HN

109

time-since-inf ; int: Time since infection, used to create a 1-2 year lag between infection and mortality mort-cause ; str: cause of mortality for a tree (used for harvest/regeneration and bsrd mort) time-since-mort ; int: Time since mortality, used to eliminate the viability of dead trees as a source of inoculum after 1-2 years

age-bsrd-inf-suscept ; real: age-based infection susceptibility age-bsrd-mort-suscept ; real: age-based mortality susceptibility

; Inf probs at-risk? ; bool: whether the cell is at risk to become infected: is (a) alive or recently dead AND (b) has yet to be infected by all mechs prob-inf-root ; real: probability of infection by root transmission prob-inf-SC ; real: probability of infection by vector 1 transmission (S. carinatus) prob-inf-PF ; real: probability of infection by vector 2 transmission (P. fasciatus) prob-inf-HN ; real: probability of infection by vector 3 transmission (H. nigrinus) ; ATTRACTION prob-vector-wound ; list of real: probability of wounding based on the state of the tree (live/dead, inf/non-inf) attr-road ; list of real: factor by which wounding is increased when near a road attr-mgmt ; list of real: factor by which wounding is increased when in/near a thinned/harvested stand attr-mgmt_source ; int: the stand id of the stand that was thinned or managed to create the attraction stand-w-thin-disturbance? ; bool: whether the stand has been recently thinned stand-w-harv-disturbance? ; bool: whether the stand has been recently harvested losing-attr-dead? ; bool: if a dead tree is losing its attractiveness to vectors (after death and decay, no longer suitable host for pathogen) new-bsrd-mortality? ; bool: if a tree has just died

attr-inf ; list of real: factor by which wounding is increased when near an infected tree attr-inf_source ; list: cell IDs (who) of trees in attraction radius providing infection attraction attr-dead ; list of real: factor by which wounding is increased when near a dead tree attr-dead_source ; list: cell IDs (who) of trees in attraction radius providing dead attraction

; for prob-inf calc ______

110

; base prob for root infection is prob-root-transm ; one-of prob-root-transmission_list ; base probabilities = ( prob-vector-transmission * prob-vector-infested ), set from the time the tree is initialized prob-inf_SC_base ; (( one-of prob-vector-infested_SC_list ) * ( one-of prob-vector- transmission_SC_list )) prob-inf_PF_base ; (( one-of prob-vector-infested_PF_list ) * ( one-of prob-vector- transmission_PF_list )) prob-inf_HN_base ; (( one-of prob-vector-infested_HN_list ) * ( one-of prob-vector- transmission_HN_list ))

; For new root inf project.... prob-root-contact_cumul ; Calculated as the SUM of all prob-root-contact for individual trees any-inf-root-nbors? ; used to track whether probability of root contact has changed and needs to be recalculated inf-root-nbors_ages_r1 ; used to store a list of ages of infected neighbors within the distance necessary for root contact and transmission inf-root-nbors_ages_r2 ; used to store a list of ages of infected neighbors within the distance necessary for root contact and transmission inf-root-nbors_ages_r3 ; used to store a list of ages of infected neighbors within the distance necessary for root contact and transmission inf-root-nbors_ages_r4 ; used to store a list of ages of infected neighbors within the distance necessary for root contact and transmission inf-root-nbors_ids_r1 ; used to store a list of ages of infected neighbors within the distance necessary for root contact and transmission inf-root-nbors_ids_r2 ; used to store a list of ages of infected neighbors within the distance necessary for root contact and transmission inf-root-nbors_ids_r3 ; used to store a list of ages of infected neighbors within the distance necessary for root contact and transmission inf-root-nbors_ids_r4 ; used to store a list of ages of infected neighbors within the distance necessary for root contact and transmission ; For probability of vector dispersal prob-vector-disp_cumul_SC ; Cumulative dispersal prob for S. carinatus (sum of prob dispersal from all infected trees) prob-vector-disp_cumul_PF ; Cumulative dispersal prob for P. fasciatus ' ' prob-vector-disp_cumul_HN ; Cumulative dispersal prob for H. nigrinus ' '

111

; Used in testing: test tree-count tree-count_decay

]

;______; USEFUL REPORTERS - USED IN PROGRESS FILE

; REPORTING WHOLE STANDS to-report stand [ stand-id-no ] ; Reports an agentset of all cells with a given stand ID # report ( cells with [ stand-id = stand-id-no ] ) end to-report stand-patches [ stand-id-no ] report ( patches with [ p_stand-id = stand-id-no ] ) ; Reports an agentset of all patches with a given stand ID # end to-report trees ; Reports an agentset of all trees (cells) ; !!! Keep this one reporter as-is because it's used to set the trees_current agentset report ( cells with [ tree? ] ) end to-report live-trees ; Reports an agentset of live trees (infected an uninfected) report ( trees_current with [ alive? ] ) end to-report live-infected-trees ; reports an agentset of live, infected trees report ( trees_current with [ infected? and alive? ] ) end to-report dead-trees ; reports an agentset of dead trees (infected and uninfected) report ( trees_current with [ not alive? ] )

112 end to-report dead-infected-trees ; reports an agentset of dead, infected trees report ( trees_current with [ infected? and not alive? ] ) end to-report infected-trees ; reports an agentset of infected trees (alive and dead) report ( trees_current with [ infected? ] ) end to-report newly-infected-trees ; agentset of trees losing infection (some may already be non-trees) report ( trees_current with [ newly-infected? ] ) end to-report losing-infection-trees ; agentset of trees losing infection (some may already be non-trees) report ( trees_potential with [ losing-infection? ] ) end

to-report root-infected-trees ; reports an agentset of trees infected by roots (alive and dead) report ( trees_current with [ inf-root? ] ) end to-report SC-infected-trees ; reports an agentset of trees infected by SC (alive and dead) report ( trees_current with [ inf-SC? ] ) end to-report PF-infected-trees ; reports an agentset of trees infected by PF (alive and dead) report ( trees_current with [ inf-PF? ] ) end to-report HN-infected-trees ; reports an agentset of trees infected by HN (alive and dead) report ( trees_current with [ inf-HN? ] )

113 end to-report susceptible-trees ; reports an agentset of trees susceptible to infection (all live trees and dead trees that died less than 1 year ago) report ( trees_current with [ alive? or ( not alive? and time-since-mort <= dead-host- viability-duration_min ) ] ) end to-report bsrd-killed-trees report ( trees_current with [ mort-cause = "bsrd" ] ) end to-report thinned-trees report ( trees_current with [ mort-cause = "thin" ] ) end to-report harvested-trees report ( trees_current with [ mort-cause = "harvest" ] ) end to reset-globals reset-ticks if comp = "asus-big" [ set model-dir "D:/AdamB/Documents/Masters/Thesis/Modeling/Models/BSRD_NetLogo/BSRD-full- model/" ] ; Adam's big ASUS if comp = "asus-small" [ set model-dir "C:/Users/ASUS/Documents/Masters/Thesis/Modeling/Models/BSRD_NetLogo/BSRD-full- model/" ] ; Adam's ASUS Zenbook if comp = "law" [ set model-dir "/home/bouchea/" ] ; LAW cluster if comp = "remote" [ set model-dir "C:/Users/bouchea/BSRD_full_model/" ] ; Grad remote desktop if comp = "cgrb" [ set model-dir "/home/pi/bouchea/models/" ] ; CGRB cluster set run-id "r0" ; unique run id number set run-file "" ; path to run file set progress-file "" ; file to keep track of model progress set stand-data-file "" ; file for stand-level data output set tree-data-file "" ; file to store prob-inf data at the cell scale set projection ( word "supporting_files/projections/wgs_84.prj" ) ; GIS projection file

114

set test-timer 0 set current-date-and-time "" ; Abbreviated timestamp of current date and time set intercell-distance 1.524 ; Global to set distance between cells (1.524 meter resolution) = patch dimensions set cell-area ( intercell-distance ^ 2 ) ; Area of each patch (m^2)

; LANDSCAPE GENERATOR / MANAGEMENT set seed-radius 1 ; Stand lists set stand-list [] set intensive-stand-list [] set extensive-stand-list [] set set-aside-stand-list [] ; SET ASIDE NOT USED IN THIS MODEL VERSION set regen-list-intensive [] set regen-list-extensive [] set thinning-occurred? false ; bool to track whether a thinning occurred set harvest-occurred? false ; bool to track whether a harvest occurred set n-stands-projecting-vector-dispersal_background 0 set prob-vector-dispersal_background_cumul 0

; Lists to track management attraction decay set thin-0yr-ago [] set thin-1yr-ago [] set thin-2yr-ago [] set thin-3yr-ago [] ; set thin-4yr-ago [] set harv-0yr-ago [] set harv-1yr-ago [] set harv-2yr-ago [] set harv-3yr-ago [] ; set harv-4yr-ago []

set plantation-road-density 34.93 ; density of roads in meters per hectare (34.2 m/ha, from John Sessions, personal communication) ;set set-aside-road-density 14.92 ; density of roads in meters per hectare (14.92 m/ha) ; SET ASIDE NOT USED IN THIS MODEL VERSION set empty-agentset cells with [ tree? and not tree? ] ; An impossible combination set trees-to-thin empty-agentset ; agentset: all trees to be thinned set trees-to-harvest empty-agentset ; agentset: all trees to be thinned

115

set edges empty-agentset ; an agentset of all hex cells considered to be at a stand edge ; REMOVE? set trees_current empty-agentset ; an agentset of all trees set trees_potential empty-agentset ; an agentset of all cells than will be trees during a model run set trees_newly-infected empty-agentset ; an agentset of all trees that are newly infected set trees_losing-infection empty-agentset ; an agentset of all trees that lost infection (dead trees) ;set trees_losing-dead-attraction empty-agentset ; an agentset of all trees that lost infection (dead trees) set trees_infected empty-agentset ; an agentset of all trees that are infected set cells-projecting empty-agentset

; INFECTION MODEL ; PROB PARAM LISTS reset-infection-parameters ; Maximum dispersal distances (measured in cells, not meters), used for generating cell- distance-file set-max-cell-distances

set bsrd-inf_cumul 0 set bsrd-mort_cumul 0 set bsrd-inf_INT_cumul 0 set bsrd-mort_INT_cumul 0 set bsrd-inf_EXT_cumul 0 set bsrd-mort_EXT_cumul 0 set trees_cumul 0 set trees_INT_cumul 0 ; count of all trees ever existing in the model set trees_EXT_cumul 0 ; count of all trees ever existing in the model

set kill-run? false ; kills the run if a major error occurs end

; Set the default/initial value of cell variables

116 to set-default-cell-properties ; with the exception of some properties that need to be set separately (i.e., cell-nbors) if visualize? [ set color color_empty ] ; set cells to default (empty) cell color ;set cell-nbors [] ; deactivated ; STAND SETUP set seed? false set near-seed? false set edge? false set stand-id 0 set mgmt "" set road? false

; STATUS set tree? false set alive? false set age 0 ; Infection set infected? false set newly-infected? false set losing-infection? false set inf-initial? false set inf-root? false set inf-SC? false set inf-PF? false set inf-HN? false set time-since-inf 0 set age-bsrd-inf-suscept 0.0 set age-bsrd-mort-suscept 0.0 set prob-inf-root 0.0 set prob-inf-SC 0.0 set prob-inf-PF 0.0 set prob-inf-HN 0.0 ; Attraction set prob-vector-wound 0.0 set attr-road 1 set attr-mgmt [ 1 ] set attr-mgmt_source [ -1 ] ; impossible cell ID value ifelse attr-inf-dead_version = "proportional" [ set attr-inf 1 set attr-inf_source 0

117

] [ set attr-inf [ 1 ] set attr-inf_source [ -1 ] ; impossible cell ID value ] set attr-dead [ 1 ] set attr-dead_source [ -1 ] ; impossible cell ID value set stand-w-thin-disturbance? false ; bool: whether the stand has been recently thinned set stand-w-harv-disturbance? false ; bool: whether the stand has been recently harvested set losing-attr-dead? false set new-bsrd-mortality? false set mort-cause "" set time-since-mort 0

set prob-root-transm 0 set prob-root-contact_cumul 0 set prob-inf_SC_base 0 set prob-inf_PF_base 0 set prob-inf_HN_base 0 set prob-vector-disp_cumul_SC 0 set prob-vector-disp_cumul_PF 0 set prob-vector-disp_cumul_HN 0 set at-risk? false set potential-tree? false

; For new root inf project.... set inf-root-nbors_ages_r1 [] ; used to store a list of ages of infected neighbors within the distance necessary for root contact and transmission set inf-root-nbors_ages_r2 [] ; used to store a list of ages of infected neighbors within the distance necessary for root contact and transmission set inf-root-nbors_ages_r3 [] ; used to store a list of ages of infected neighbors within the distance necessary for root contact and transmission set inf-root-nbors_ages_r4 [] ; used to store a list of ages of infected neighbors within the distance necessary for root contact and transmission set inf-root-nbors_ids_r1 [] ; used to store a list of ages of infected neighbors within the distance necessary for root contact and transmission set inf-root-nbors_ids_r2 [] ; used to store a list of ages of infected neighbors within the distance necessary for root contact and transmission set inf-root-nbors_ids_r3 [] ; used to store a list of ages of infected neighbors within the distance necessary for root contact and transmission

118

set inf-root-nbors_ids_r4 [] ; used to store a list of ages of infected neighbors within the distance necessary for root contact and transmission set any-inf-root-nbors? false end

to reset-cell-properties ; clears cell properties except for stand id, mgmt, road, and attraction if visualize? [ set color color_empty ] set tree? false ; true/false: whether or not the cell has a tree set alive? false ; true/false: whether or not the cell is alive set age 0 ; integer: the age of the cell set infected? false ; true/false: whether or not the cell is infected set newly-infected? false set inf-initial? false set inf-root? false set inf-SC? false set inf-PF? false set inf-HN? false set mort-cause "" ; list: cause of mortality (e.g., thin, harvest, bsrd) set prob-inf-SC 0.0 ; real: probability of infection by vector 1 transmission (S. carinatus) set prob-inf-PF 0.0 ; real: probability of infection by vector 2 transmission (P. fasciatus) set prob-inf-HN 0.0 ; real: probability of infection by vector 3 transmission (H. nigrinus) set time-since-inf 0 ; int: used to create a 1-2 year lag between infection and mortality if mort-cause != "harvest" [ set time-since-mort 0 ] ; int: used to create a lag between mortality and infection loss, attraction, etc. Not used for harvest to allow for regen set at-risk? false ;

; DON'T RESET ; attr-mgmt, road, dead, or inf ; inf-root-nbor age or id lists ; losing-infection? losing-attr-dead? or new-bsrd-mortality? end

; Set the default/initial value of patch variables

119 to set-default-patch-properties if visualize? [ set pcolor color_patches ] set p_cell false set p_seed 0 set p_near-seed 0 set p_edge 0 set p_road 0 set p_stand-id 0 set p_mgmt 0 set p_tree 0 set p_age 0 set p_alive 0 set p_inf 0 set p_inf-root 0 set p_inf-SC 0 set p_inf-PF 0 set p_inf-HN 0 set p_mort-cause 0

set p_p-inf_root 0.0 set p_p-inf_SC 0.0 set p_p-inf_PF 0.0 set p_p-inf_HN 0.0 ;patch attraction properties set p_attr-road 0.0 set p_attr-mgmt 0.0 set p_attr-mgmt_source 0.0 end

; SET DEFAULT VALUES FOR USER-DEFINED VARIABLES to startup no-display ;detect-computer set-patch-size 1E-10 set base "patch" set visualize? false set limit-ticks? true set max-ticks 160 set config "random"

120

set n-stands 1 set pct-intensive 50 set pct-extensive 50 set pct-set-aside 0 ; SET ASIDE NOT USED IN THIS MODEL VERSION set rotation:intensive 37 set rotation:extensive 80 set replant-delay 1 set spread-setup? true set age-inf-suscept "age-indep" set dead-attr-duration_min 0 ; default 2 yr set dead-attr-duration_max 0 ; default 4 yr set dead-host-viability-duration_min 0 ; default 1 yr set dead-host-viability-duration_max 0 ; default 2 yr set pct-initial-infection 0.5 set reinitiate-infection? false set initial-infection "generate-initial-infection-pct" set max-root-distance_m 8 set max-vector-distance_SC_m 8 set max-vector-distance_PF_m 8 set max-vector-distance_HN_m 8 set max-attraction-distance_m 15 set sensitivity-analysis-param "none" set sensitivity-analysis-multiplier 1.0 set track-run? false set export-tree-data? false set tree-data-export-freq 300 set export-rasters? false set raster-export-frequency 300 end to detect-computer ; Detect computer based on folders present ifelse ( file-exists? "D:/AdamB" ) [ set comp "asus-big" ] [ if ( file-exists? "C:/Users/ASUS" ) [ set comp "asus-small" ] if ( file-exists? "/home/bouchea/law.txt" ) [ set comp "law" ] if ( file-exists? "//acer/home/a-e/bouchea" ) [ set comp "remote" ] if ( file-exists? "/home/pi/bouchea/cgrb.txt" ) [ set comp "cgrb" ] ] end

121 to create-run-id ; used in generate-landscape to create a unique run identifier based on the date/time and configuration create-datetimestamp set run-id-no (word "r" ( random 100000 ) ) set run-id (word run-id-no "_" current-date-and-time "_dm-" max-pxcor "-" max-pycor "_" config "_" n-stands "_L-I-" pct-intensive "-E-" pct-extensive "_" "SNS-" sensitivity-analysis- param "-mult-" sensitivity-analysis-multiplier ) end to create-run-files ; Detect computer ; Change model directory to reflect comp being used if comp = "asus-big" [ set model-dir "D:/AdamB/Documents/Masters/Thesis/Modeling/Models/BSRD_NetLogo/BSRD-full- model/" ] ; Adam's big ASUS if comp = "asus-small" [ set model-dir "C:/Users/ASUS/Documents/Masters/Thesis/Modeling/Models/BSRD_NetLogo/BSRD-full- model/" ] ; Adam's ASUS Zenbook if comp = "law" [ set model-dir "/home/bouchea/models/" ] ; LAW cluster if comp = "remote" [ set model-dir "C:/Users/bouchea/BSRD_full_model/" ] ; Grad remote desktop if comp = "cgrb" [ set model-dir "/home/pi/bouchea/models/" ] ; CGRB cluster

set run-file ( word "output/" run-id "_run.txt" ) ; Set the path for the run info file-open run-file write-run-details file-close ; Print out run details in log file for reference file-open run-file while [ not file-at-end? ] [print file-read-line ] file-close

; initialize progress file with column names initialize-progress-file

; initialize stand data file with column names if export-stand-data? [ initialize-stand-data-file ] end

122

to write-run-details file-print ( word "Run ID: " run-id ) file-print "----BASICS----\n" file-print ( word "Start: " date-and-time ) file-print ( word "Time stamp: " current-date-and-time ) file-print ( word "Projection: " projection )

file-print "\n----RUN INFO----\n" file-print ( word "comp: " comp ) file-print ( word "set-world-size? " set-world-size? ) if set-world-size? = "preset" [ file-print ( word "world-size: " world-size ) ] if set-world-size? = "automatic" [ file-print ( word "stands: " n-stands " stands" ) file-print ( word "mean stand size (acres): " stand-size_mean_acres " acres" ) file-print ( word "mean stand size (ha): " ( stand-size_mean_acres * 0.404686 ) " ha” ) file-print ( word "World size: " ( stand-size_mean_acres * n-stands ) " acre(s)" ) ] file-print ( word "n-stands: " n-stands ) file-print ( word "World dim - x_min: " min-pxcor ) file-print ( word "World dim - x_max: " max-pxcor ) file-print ( word "World dim - y_min: " min-pycor ) file-print ( word "World dim - y_max: " max-pycor ) file-print ( word "limit-ticks? " limit-ticks? ) file-print ( word "max-ticks: " max-ticks ) file-print ( word "visualize? " visualize? ) file-print ( word "track-run? " track-run? ) file-print ( word "export-tree-data? " export-tree-data? ) file-print ( word "tree-data-export-freq: " tree-data-export-freq ) file-print ( word "export-rasters? " export-rasters? ) file-print ( word "raster-export-frequency: " raster-export-frequency ) file-print ( word "base: " base ) file-print ( word "config: " config ) file-print ( word "n-blocks: " n-blocks ) file-print ( word "pct-intensive: " pct-intensive ) file-print ( word "pct-extensive: " pct-extensive ) file-print ( word "pct-set-aside: " pct-set-aside ) ; SET ASIDE NOT USED IN THIS MODEL VERSION

123

file-print ( word "rotation:intensive: " rotation:intensive ) file-print ( word "rotation:extensive: " rotation:extensive ) file-print ( word "thinning? " thinning? ) file-print ( word "harvest? " harvest? ) file-print ( word "replant-delay: " replant-delay ) file-print ( word "spread-setup? " spread-setup? ) file-print ( word "spread-infection-version? " spread-infection-version? ) file-print ( word "initial-infection: " initial-infection ) file-print ( word "pct-initial-infection: " pct-initial-infection ) file-print ( word "reinitiate-infection? " reinitiate-infection? ) file-print ( word "sensitivity-analysis-param: " sensitivity-analysis-param ) file-print ( word "sensitivity-analysis-multiplier: " sensitivity-analysis-multiplier ) file-print ( word "max-attraction-distance_m: " max-attraction-distance_m ) file-print ( word "max-root-distance_m: " max-root-distance_m ) file-print ( word "max-vector-distance_SC_m: " max-vector-distance_SC_m ) file-print ( word "max-vector-distance_PF_m: " max-vector-distance_PF_m ) file-print ( word "max-vector-distance_HN_m: " max-vector-distance_HN_m ) file-print ( word "background-prob-vector-dispersal?" background-prob-vector-dispersal?) file-print ( word "vector-disp_background_stand-pct-inf-spillover-threshold: " vector- disp_background_stand-pct-inf-spillover-threshold ) file-print ( word "prob-vector-disp_background: " prob-vector-disp_background ) file-print ( word "age-inf-suscept: " age-inf-suscept ) file-print ( word "export-jsons? " export-jsons? ) file-print ( word "export-potential-trees? : " export-potential-trees? ) file-print ( word "debug-mode? " debug-mode? ) file-print ( "----- Adjustable parameter settings -----" ) file-print ( word "prc_conservative?" prc_conservative? ) file-print ( word "prt-exclude-data? " prt-exclude-data? ) file-print ( word "prt-discount-by-contact-type? " prt-discount-by-contact-type? ) file-print ( word "new-attr? " new-attr? ) file-print ( word "attr-inf? " attr-inf? ) file-print ( word "attr-dead? " attr-dead? ) file-print ( word "attr-mgmt_conservative?" attr-mgmt_conservative? ) file-print ( word "attr-inf-dead_version: " attr-inf-dead_version ) file-print ( word "inf-center-attr-threshold: " inf-center-attr-threshold ) file-print ( word "inf-center-attr-threshold_pct: " inf-center-attr-threshold_pct ) file-print ( word "dead-attr-duration (min): " dead-attr-duration_min ) ; data indicates: 2 yr file-print ( word "dead-attr-duration (max): " dead-attr-duration_max ) ; data indicates: 4 yr

124

file-print ( word "dead-host-viability-duration_min: " dead-host-viability-duration_min ) ; data indicates: 0.5 yr file-print ( word "dead-host-viability-duration_max: " dead-host-viability-duration_max ) ; data indicates: 2 yr end to complete-run-file if run-file != 0 and run-file != "" [ file-open run-file file-print ( word "End: " date-and-time ) file-close ] print ( word "End: " date-and-time ) end ;______;______;______; MODEL SETUP ;______;______

; LANDSCAPE GENERATION PROCEDURES: ;______;______; AGE DISTRIBUTIONS

; AGE DISTRIBUTION (TO DRAW STAND AGES FROM) to-report age-dist:intensive report ( random rotation:intensive + 1 ) end to-report age-dist:extensive report ( random rotation:extensive + 1 ) end

;______LANDSCAPE SETUP

; SETUP THE BASE FOR THE WORLD to setup-base

125

; Clear the model no-display ; Turn off display: keeps the setup running faster clear-all ; Clears everything r:clear ; clear the R environent reset-timer reset-ticks ; Reset the model ticks (time steps) to 0 reset-globals ; Set all globals to default values, including globals that will not change if ( patch-size != 1E-10 ) [ set-patch-size 1E-10 ] ; Set the patch size very small to avoid running out of memory w/big worlds if set-world-size? != "manual" [ set-world-size ] ; Set the dimentions of the world if visualize? [ setup-colors set-default-shape cells "hex" ] ; Set default colors and those that represent cell states ; set default shape for cells. The hexagon shape must be imported if this is a new ; installation of NetLogo. This can be done from the menu bar >> Tools >> Turtle Shapes Editor set-default-shape cells "hex"

; Set GIS settings gis:load-coordinate-system ( projection ) ; Set the coordinate system (default WGS 1984) gis:set-world-envelope [ 0 4503.42 0 4503.42 ] ; World dimensions in meters ( 2955 cells * 1.524 m/cell = 4503.42 m per side)

ask patches [ set-default-patch-properties ] ; Set default patch properties

if visualize? [ color-world display ; Turn the display back on when the landscape is finished. ] print ( word "Base generated successfully @ " date-and-time "; Duration: " timer ) set base-setup? true end

; BASE SETUP SUB-PROCEDURES - these are model procedures used within both landscape generation procedures

; SET WORLD SIZE to set-world-size if set-world-size? = "pre-set" [

126

if world-size = "10 x 10" [ resize-world 0 9 0 9 set-patch-size 1E-10 ] if world-size = "26 x 26" [ resize-world 0 25 0 25 set-patch-size 1E-10 ] if world-size = "50 x 50" [ resize-world 0 49 0 49 set-patch-size 1E-10 ] if world-size = "100 x 100" [ resize-world 0 99 0 99 set-patch-size 1E-10 ] if world-size = "300 x 300" [ resize-world 0 299 0 299 set-patch-size 1E-10 ] if world-size = "500 x 500" [ resize-world 0 499 0 499 set-patch-size 1E-10 ] if world-size = "1000 x 1000" [ resize-world 0 999 0 999 set-patch-size 1E-10 ] ] if set-world-size? = "automatic" [ if config = "blocks" [ user-message "Blocks requires manual or pre-set setup, sorry!" set kill-run? true stop ] let stand-size_mean_ha ( stand-size_mean_acres * 0.404686 ) ; convert acres to ha let world-size_ha ( stand-size_mean_ha * n-stands ) ; multiply by n- stands to get world size let world-size_m2 ( world-size_ha * 10000 ) ; convert ha to m^2 let world-dim_m ( sqrt world-size_m2 ) ; calc dimensions of a square with this area let world-dim_patches ( ceiling ( world-dim_m / 1.524 ) ) ; calc n patches necessary for this world (rounding up) if world-dim_patches mod 2 = 1 [ set world-dim_patches ( world-dim_patches + 1 ) ] ; avoid having a misalignment at world edges resize-world 0 ( world-dim_patches - 1 ) 0 ( world-dim_patches - 1 ) ; Resize the world

; Output values for documentation print ( word "Mean stand size: " stand-size_mean_acres " acre(s)" ) print ( word "Mean stand size: " stand-size_mean_ha " ha" ) print ( word "World size: " (stand-size_mean_acres * n-stands ) " acre(s)" ) print ( word "World size: " stand-size_mean_ha " ha" ) print ( word "World size: " world-size_m2 " m^2" ) print ( word "world dim: " world-dim_m " x " world-dim_m " m" ) print ( word "world dim: " world-dim_patches " x " world-dim_patches " patch(es)" ) ] end to check-world-size let stand-size_mean_ha ( stand-size_mean_acres * 0.404686 ) ; convert acres to ha let world-size_ha ( stand-size_mean_ha * n-stands ) ;multiply by n-stands to get world size let world-size_m2 ( world-size_ha * 10000 ) ; convert ha to m^2

127

let world-dim_m ( sqrt world-size_m2 ) ; calc dimensions of a square with this area let world-dim_patches ( ceiling ( world-dim_m / 1.524 ) ) ; calc n patches necessary for this world (rounding up) if world-dim_patches mod 2 = 1 [ set world-dim_patches ( world-dim_patches + 1 ) ] ; avoid having a misalignment at world edges

print ( word "Mean stand size: " stand-size_mean_acres " acre(s)" ) print ( word "Mean stand size: " stand-size_mean_ha " ha" ) print ( word "World size: " (stand-size_mean_acres * n-stands ) " acre(s)" ) print ( word "World size: " stand-size_mean_ha " ha" ) print ( word "World size: " world-size_m2 " m^2" ) print ( word "world dim: " world-dim_m " x " world-dim_m " m" ) print ( word "world dim: " world-dim_patches " x " world-dim_patches " patch(es)" ) end

;______; Clear the landscape with the appropriate process without clearing ring globals (if already read) to reset no-display ifelse ( base-setup? = true ) [ reset-globals ] [ setup-base print "base being set up from clear landscape" ] ; If base set up: reset globals, If not: setup-base reset-ticks ; Reset tick count ask patches [ set-default-patch-properties ] ; Reset all patch properties if any? cells [ ask cells [ die ] ] ; Deletes all cells if visualize? [ setup-plots update-plots display ] end

; "Setup" function (once the cell grid has been created). Generates the landscape to user specifications. to setup no-display ;______; BEGIN SETUP PROCEDURE let approx-world-size_acres ( ( ( world-width * 1.524 ) ^ 2 ) / 10000 / 0.404686 ) let desired-world-size_acres ( n-stands * stand-size_mean_acres )

carefully [ set approx-world-size_acres ( ( ( world-width * 1.524 ) ^ 2 ) / 10000 / 0.404686 )

128

set desired-world-size_acres ( n-stands * stand-size_mean_acres )

if ( base-setup? != true or ( set-world-size? = "pre-set" and not member? ( word world-width) world-size ) OR ( set-world-size? = "automatic" AND ( ( approx-world-size_acres / desired-world- size_acres ) < 0.97 OR ( approx-world-size_acres / desired-world-size_acres ) > 1.03 ) ) ; make sure world size is within 3% of what it should be ) [ setup-base print "base being set up from generate landscape" ] ; Setup base if it has not been set up if ( any? patches with [ p_stand-id != 0 ] or any? cells ) [ reset ] ; Resets globals and removes stand from previous landscape

; CHECK TO MAKE SURE THE SETTINGS WILL ALLOW A LANDSCAPE TO BE SET UP if config = "random" OR config = "clustered" AND n-stands <= 0 [ user-message "Please set n-stands to a number > 0." set kill-run? true stop ] if config = "random" OR config = "clustered" AND n-stands >= ( 10 * count patches ) [ user-message "Too many stands for a landscape of this size." set kill-run? true stop ] let total-of-mgmt-proportions ( pct-intensive + pct-extensive + pct-set-aside ) ; SET ASIDE NOT USED IN THIS MODEL VERSION if total-of-mgmt-proportions != 100 [ user-message "Percentages of forest management types do not add to 100%. Try again!" print "Percentages of forest management types do not add to 100%. Try again!" set kill-run? true stop ] ] [ print "ERROR: setup -> initial" print error-message ] reset-timer reset-ticks

;______; CREATE RUN ID UNIQUE TO THIS SIMULATION RUN create-run-id ;______

; SET UP FOR SPREADING INFECTION set-max-cell-distances ; Find the max rings necessary based on spread distance settings print "set-max-cell-distances: successful" setup-infection-parameters ; setup lists that store param values; includes attraction setting print "setup-infection-parameters: successful" if ( spread-setup? = true ) [ set-ring-lists_R ] print "set-ring-lists_R: successful"

129

;______

; SET UP THE LANDSCAPE ; Create the stands in the landscape generate-stands print "generate-stands: successful" ; CRATE AN INITIAL INFECTION run initial-infection ; set the agentset of infected trees print "generate initial-infection: successful" set trees_infected ( infected-trees ) set trees_newly-infected ( newly-infected-trees ) ; Landscape setup is complete...

;______

; Set up for Go spread infection create-spread-infection-directory print "Directories set up for Go" if ( spread-setup? and spread-infection-version? = "Go" and ( ( max-vector-distance_SC_m + max-vector-distance_SC_m + max-vector-distance_SC_m ) > 0 ) ) [ write-spread-infection-ouputs_initial print "Initial go outputs written" ]

;______

; RUN TRACKING AND DATA EXPORT: Keep track of run progress and export data if track-run? [ create-run-files ] let duration timer if run-file != 0 and run-file != "" [ file-open run-file file-print ( word "Run ID: " run-id ) file-print ( word "The landscape has been generated successfully @" date-and-time "; Duration: " duration ) file-print (word "% Intensive: " pct-intensive "; % Exensive: " pct-extensive ) file-close-all ] print (word "Run ID: " run-id)

130

print ( word "The landscape has been generated successfully @" date-and-time "; Duration: " duration ) print (word "% Intensive: " pct-intensive "; % Exensive: " pct-extensive )

if export-rasters? [ export-stand-map ] ; Export a raster of management, age, etc

if visualize? [ color-world setup-plots update-plots display ] if track-run? [ write-settings-file ] end to generate-stands if config = "random" [ setup-random-stands ; Creates blocks in the landscape that become stands assign-mgmt ; Stands are assigned a management class create-initial-trees ; Trees are created based on the management and age of the stand ] ;if config = "blocks" [ ; complete later ;if config = "clustered" [ ; complete later setup-roads

; Realign cells in the world ;ask cells [ ifelse (pxcor mod 2 = 0) [ set ycor ( ycor - 0.25 ) ] [ set ycor ( ycor + 0.25 ) ] ] ; if even column (based on pxcor), shift down one half coordinate, else realign cells in world (gets cells off the boundary between patches) ask cells [ if (pxcor mod 2 = 0) [ set ycor ( ycor - 0.5 ) ] ] ; if even column (based on pxcor), shift down one half coordinate, else realign cells in world (gets cells off the boundary between patches) set trees_potential ( cells with [ potential-tree? ] ) set trees_current ( trees ) print ( word "Count trees: " count trees_current )

print "generate-stands complete" end

; RANDOM STAND LANDSCAPE

131

; Stand origins are randomly seeded with some constraints to make them evenly-sized, and the spatial arrangement of ; management classes is random to setup-random-stands ifelse n-stands > 1 [ setup-seeds ;; create the seed cells from which the stands will "grow" grow-seeds ;; "grow" the stands from the "seeds" ] [ set stand-list [ 1 ] ask patches [ set p_stand-id 1 ] ] end to setup-seeds ; Create a list of numbers from 1 to the total number of stands as set by ; "n-stands" (increment of 1) set stand-list ( range 1 ( n-stands + 1) )

set seed-radius round ( 1.2 * sqrt ( ( ( max-pxcor * max-pycor ) / n-stands ) / pi ) ) ; Create a radius in which no other patches will serve as stand seeds ; Calculate total number of patches per stand, calculate an appropriate radius

; Select a set of random cells of size "n-stands", assign one to seed each stand foreach stand-list [ this-stand -> ask one-of patches with [ p_near-seed = 0 ] [ set p_stand-id this-stand ; set the cell's stand id set p_seed 1 ; change property to indicate that this cell is a seed ask patches in-radius seed-radius [ set p_near-seed 1 ] ; makes a minimum radius for stand-building, making stands more even ] ] end to grow-seeds ; To fill the landscape: while there are any patches with no stand id (stand-id = 0), have each seed (and later, the stand patches) ; set all unassigned neighbors to their stands while [ any? patches with [ p_stand-id = 0 ] ] [

132

ask patches with [ p_stand-id != 0 ] [ ask neighbors with [ p_stand-id = 0 ] [ set p_stand-id [ p_stand-id ] of myself ] ] ] end to assign-mgmt let remaining-stands stand-list ; Create a temporary variable 'remaining stands' that is a copy of the stand list set intensive-stand-list ( n-of ( pct-intensive / 100 * length ( stand-list ) ) remaining-stands ) ; subset of remaining stands to be intensive stands foreach intensive-stand-list [ this-stand -> ask stand-patches this-stand [ set p_mgmt 1 ] ; set mgmt set remaining-stands remove this-stand remaining-stands ; remove from remaining stand list ] ; Repeat for extensive stands and old growth set extensive-stand-list ( n-of ( pct-extensive / 100 * length ( stand-list ) ) remaining-stands ) foreach extensive-stand-list [ this-stand -> ask stand-patches this-stand [ set p_mgmt 2 ] ; set mgmt set remaining-stands remove this-stand remaining-stands ; remove from remaining stand list ] ; SET ASIDE NOT USED IN THIS MODEL VERSION set set-aside-stand-list ( n-of ( pct-set-aside / 100 * length ( stand-list ) ) remaining-stands ) foreach set-aside-stand-list [ this-stand -> ask stand-patches this-stand [ set p_mgmt 3 ] set remaining-stands remove this-stand remaining-stands ] foreach remaining-stands [ this-stand -> ; Randomly assign all unassigned stands one of the appropriate mgmt options based on the settings ; This occurs when the proportions of each forest type do not work 'perfectly' with the number of stands (i.e., when the proportion * n-stands is not an whole number) let mgmt-options [] ; empty list of possible management classes (based on the user- defined percentages) if pct-intensive > 0 [ set mgmt-options fput 1 mgmt-options ] ; add the appropriate mgmt classes to the if pct-extensive > 0 [ set mgmt-options fput 2 mgmt-options ]

133

if pct-set-aside > 0 [ set mgmt-options fput 3 mgmt-options ] let mgmt-to-set ( one-of mgmt-options ) ; choose 1 mgmt type ask stand-patches this-stand [ set p_mgmt mgmt-to-set ] ; set it ; assign to a list based on what mgmt was randomly chosen if mgmt-to-set = 1 [ set intensive-stand-list lput this-stand intensive-stand-list ] if mgmt-to-set = 2 [ set extensive-stand-list lput this-stand extensive-stand-list ] if mgmt-to-set = 3 [ set set-aside-stand-list lput this-stand set-aside-stand-list ] set remaining-stands remove this-stand remaining-stands ; update remaining stand list ] end to create-initial-trees ; Setup intensive stands foreach intensive-stand-list [ this-stand -> let age-to-set age-dist:intensive ; chooses an age from intensive age dist (so that all trees in the stand have the same age) ask ( stand-patches this-stand ) [ ; set every 4.572 (15 ft) as a tree (every 3 cells) if pxcor mod 3 = 0 AND pycor mod 3 = 0 [ create-tree age-to-set ] ; create a tree ; create cells where trees will be (offset placement) after harvest, allowing stumps to persist if ( pxcor + 2 ) mod 3 = 0 AND ( pycor + 2 ) mod 3 = 0 [ if not p_cell [ set p_cell true sprout-cells 1 [ set-default-cell-properties ] ; Create cells at all places where they will be needed ask cells-here [ set potential-tree? true if p_edge = 1 [ set edge? true ] set stand-id p_stand-id if p_mgmt = 1 [ set mgmt "intensive" ] if p_mgmt = 2 [ set mgmt "extensive" ] if p_mgmt = 3 [ set mgmt "set-aside" ] ] ] ] ] ] ; Setup extensive stands foreach extensive-stand-list [ this-stand ->

134

let age-to-set age-dist:extensive ; chooses age from extensive age dist (so all trees in a stand have same age) ask ( stand-patches this-stand ) with [ ( pxcor mod 2 = 0 AND pycor mod 2 = 0 ) OR ( ( pxcor + 1 ) mod 2 = 0 AND ( pycor + 1 ) mod 2 = 0 ) ] [ if not p_cell [ set p_cell true sprout-cells 1 [ set-default-cell-properties ] ; Create cells at all places where they will be needed ask cells-here [ set potential-tree? true if p_edge = 1 [ set edge? true ] set stand-id p_stand-id if p_mgmt = 1 [ set mgmt "intensive" ] if p_mgmt = 2 [ set mgmt "extensive" ] if p_mgmt = 3 [ set mgmt "set-aside" ] ] ] ] ; Initialize the stand only where the coordinates meet the following criteria ask ( stand-patches this-stand ) with [ pxcor mod 2 = 0 AND pycor mod 2 = 0 ] [ ; 3.048 m / 10 ft / 2 cell spacing ; The number of trees to generate depends on the age, which determines how many trees have been thinned and therefore the density of trees if ( age-to-set <= 15 ) [ create-tree age-to-set ] ; if before the first thinning, all patches at the spacing sprout trees if ( age-to-set > 15 and age-to-set <= 35 and random-float 1 < 0.688705234 ) [ create-tree age-to-set ] ; if after the first but before the second thinning, a smaller proportion of patches make trees if ( age-to-set > 35 and age-to-set <= 55 and random-float 1 < 0.367309458 ) [ create-tree age-to-set ] ; if after the second but before the third thinning, a smaller proportion of patches make trees if ( age-to-set > 55 and random-float 1 < 0.229568411 ) [ create-tree age-to-set ] ; if after the third thinning, a smaller proportion of patches make trees ] ] end

; CREATE NEW TREES - Used in "create-initial-trees" and "regenerate-stands" to create new trees - They start at a defined age to create-tree [ this-tree-age ] ; ADD PROB-vector-WOUND

135

if ( not p_cell ) [ set p_cell true set p_tree 1 sprout-cells 1 [ set-default-cell-properties ] ] ; Shows this patch has a cell and thus cannot make more ask cells-here [ set tree? true set alive? true set age this-tree-age ifelse age-inf-suscept != "age-indep" [ set age-bsrd-inf-suscept ( one-of ( item ( this-tree- age - 1 ) age-bsrd-inf-suscept_list ) ) ] ; assign a susceptibility from the distribution based on age [ set age-bsrd-inf-suscept ( one-of age-bsrd-inf-suscept_list ) ] set prob-vector-wound ( one-of prob-vector-wound_live-nonInf_list ) ; Set prob- wound

set prob-root-transm ( one-of prob-root-transmission_list ) set prob-inf_SC_base (( one-of prob-vector-infested_SC_list ) * ( one-of prob-vector- transmission_SC_list )) set prob-inf_PF_base (( one-of prob-vector-infested_PF_list ) * ( one-of prob-vector- transmission_PF_list )) set prob-inf_HN_base (( one-of prob-vector-infested_HN_list ) * ( one-of prob-vector- transmission_HN_list ))

set mort-cause "" set time-since-mort 0

; Set stand id and mgmt based on patch if stand-id = 0 [ set stand-id p_stand-id ] if mgmt = "" [ if p_mgmt = 1 [ set mgmt "intensive" ] if p_mgmt = 2 [ set mgmt "extensive" ] if p_mgmt = 3 [ set mgmt "set-aside" ] ] set potential-tree? true set trees_cumul ( trees_cumul + 1) ; add to cumulative tree count if mgmt = "intensive" [ set trees_INT_cumul ( trees_INT_cumul + 1) ] ; add to cumulative tree count if mgmt = "extensive" [ set trees_EXT_cumul ( trees_EXT_cumul + 1) ] ; add to cumulative tree count ] end

136

;______; ROAD PROCEDURES

; CREATE ROADS IN THE LANDSCAPE PROPORTIONAL TO THE AREA to setup-roads ; IF THERE IS ONLY ONE STAND, THERE ARE NO EDGES. THEREFORE, CREATE THE APPROPRIATE NUMBER OF ROAD CELLS BASED ON AREA AND DISTRIBUTE RANDOMLY if ( config = "random" or config = "clustered" ) and n-stands = 1 [ if any? patches with [ p_mgmt = 1 or p_mgmt = 2 ] [ let area-plantations ( count patches * cell-area / 10000 ) ; Calculate the area of plantations in ha let n-road-cells ( area-plantations * plantation-road-density / intercell-distance ) ; Calculate number of road cells needed given the area of plantations ask n-of n-road-cells patches with [ p_tree = 0 ] [ create-road_patch ] ; Have that number of patches make roads ] ]

; IF THERE ARE MULTIPLE STANDS, TURN SOME EDGES INTO ROADS AT A PROPORTION BASED ON THE AREA OF PLANTATIONS IN THE LANDSCAPE if config = "random" or config = "clustered" and n-stands > 1 [ ; Assign edge patches & cells to have p_edge = 1 & edge? = true set edges ( patches with [ any? neighbors with [ p_stand-id != [ p_stand-id ] of myself ] ] ) ; Edges are patches at the edge of a stand (neighbors have diff stand id) ask edges [ ; Ask edge patches set p_edge 1 if visualize? [ set pcolor [ pcolor ] of self + 1.25 ] ; designate as edges w/ p_edge property if not p_cell [ set p_cell true sprout-cells 1 [ set-default-cell-properties ] ] ; create an edge cell to spread attr and make roads (if not already there) ask cells-here [ set edge? true set stand-id p_stand-id ; assign that cell to have propeties of the patch if p_mgmt = 1 [ set mgmt "intensive" ] if p_mgmt = 2 [ set mgmt "extensive" ] if p_mgmt = 3 [ set mgmt "set-aside" ] ; SET ASIDE NOT USED IN THIS MODEL VERSION ] ] set edges ( edges with [ p_tree = 0 ] ) ; reduce edges to patches that could have roads (i.e. those that don't have trees)

137

; Set roads for plantations; total plantation area = number of plantation patches * patch area if ( length intensive-stand-list > 0 ) OR ( length extensive-stand-list > 0 ) [ ; if there are any intensive or extensive stands let area-plantations ( count patches * cell-area / 10000 ) ; Calculate the area of plantations in ha let n-necessary-roads ( area-plantations * plantation-road-density / intercell-distance ) ; Calculate number of road cells needed given the area of plantations let n-potential-roads ( count edges with [ p_tree = 0 AND ( p_mgmt = 1 or p_mgmt = 2 ) ] ) ; Calculate the number of cells available to become roads (those without trees) let potential-road-deficit_initial ( n-potential-roads - n-necessary-roads ) ; Calculate the number needed in case there aren't sufficient patches available to make roads let potential-road-deficit potential-road-deficit_initial ; Calculate the number needed in case there aren't sufficient patches available to make roads if potential-road-deficit <= 0 [ ; If there's a road deficit (i.e. there are less edge cells than necessary to be roads): print (word "Potential road deficit: " potential-road-deficit ) while [ potential-road-deficit <= 0 ] [ ; While the deficit remains ask edges with [ p_mgmt = 1 or p_mgmt = 2 ] [ ; Ask edge patches with plantation management and no trees ask neighbors with [ p_tree = 0 ] [ if ( p_mgmt = 1 or p_mgmt = 2 ) [ set p_edge 1 ] ] ; to make their nbors edges too ] set edges ( patches with [ p_edge = 1 and p_tree = 0 ] ) ; Set edge agentset again set n-potential-roads ( count edges with [ not p_cell AND ( p_mgmt = 1 or p_mgmt = 2 ) ] ) ; Recalculate the number of patches available to make roads set potential-road-deficit ( n-potential-roads - n-necessary-roads ) ; Realculate the number needed in case there aren't sufficient patches available to make roads ] ask n-of ( ( abs potential-road-deficit_initial ) + 1 ) edges with [ not p_cell ] [ ; Add as many cells as you need to fill the deficit of potential road cells set p_cell true sprout-cells 1 [ set-default-cell-properties ] ; make them edges ask cells-here [ set edge? true set stand-id p_stand-id if p_mgmt = 1 [ set mgmt "intensive" ] if p_mgmt = 2 [ set mgmt "extensive" ] if p_mgmt = 3 [ set mgmt "set-aside" ] ; SET ASIDE NOT USED IN THIS MODEL VERSION ]

138

] ] ask ( n-of n-necessary-roads cells with [ edge? AND ( mgmt = "intensive" or mgmt = "extensive" ) and not tree? ] ) [ set road? true ] ; Have that number of cells become roads ] ] if spread-setup? [ if any? cells with [ road? ] [ add-attr-road ] ] end

; CREATE ROADS - Used in "setup-roads" to create-road_patch ; For use by patches only if not p_cell [ set p_cell true sprout-cells 1 [ set-default-cell-properties ] ] ; Create a cell if there's not one set p_road 1 ; Designate self as a road & having a cell ask cells-here [ set road? true set edge? true ] end

to remove-edges if ( any? cells with [ edge? ] ) [ ask cells [ set edge? false set road? false ] ] if ( any? patches with [ p_edge ] ) [ ask patches [ set p_edge false set p_road false ] ] set edges empty-agentset end

;______; GENERATE INITIAL INFECTION to generate-initial-infection-pct ; Create an initial infection (based on initial-infection-proportion slider), with trees set to be infected ; based on the proportion of trees they account for to avoid always having higher density of initial infections ; in the more densely planted stands. With this approach, % initial infected in INTENSIVE = % initial infected in EXTENSIVE carefully [ ifelse any? trees_current [

139

let prop-trees_extensive (( count trees_current with [ mgmt = "extensive" ] ) / ( count trees_current )) let prop-trees_intensive (( count trees_current with [ mgmt = "intensive" ] ) / ( count trees_current )) let n-initial-infections ( count trees_current ) * ( pct-initial-infection / 100 )

; Set initial infections in extensive stands ask n-of ( ceiling ( n-initial-infections * prop-trees_extensive ) ) trees_current with [ mgmt = "extensive" ] [ set infected? true set newly-infected? true set inf-initial? true set prob-vector-wound ( one-of prob-vector-wound_live-inf_list ) set age-bsrd-mort-suscept ( one-of ( item ( age - 1 ) age-bsrd-mort-suscept_year-of- infection_list ) ) ] ; Set initial infections in intensive stands ask n-of ( ceiling ( n-initial-infections * prop-trees_intensive ) ) trees_current with [ mgmt = "intensive" ] [ set infected? true set newly-infected? true set inf-initial? true set prob-vector-wound ( one-of prob-vector-wound_live-inf_list ) set age-bsrd-mort-suscept ( one-of ( item ( age - 1 ) age-bsrd-mort-suscept_year-of- infection_list ) ) ] ] [ print "PROBLEM: setup -> generate-initial-infection-pct -- No \"trees_current\"! Trees were either not generated or the agentset was never set." ] ] [ print "ERROR: generate-initial-infection-pct" print error-message set kill-run? true set kill-run? true stop ] end to generate-initial-infection-alt ask patch ( ceiling max-pxcor * ( 1 / 4 ) ) ( ceiling max-pycor * ( 1 / 4 ) ) [ ask one-of cells in-radius 20 with [ tree? and alive? ] [ set infected? true set newly- infected? true set inf-initial? true set prob-vector-wound ( one-of prob-vector-wound_live- inf_list ) set age-bsrd-mort-suscept ( one-of ( item ( age - 1 ) age-bsrd-mort-suscept_year-of- infection_list ) ) ] ] ask patch ( ceiling max-pxcor * ( 1 / 4 ) ) ( ceiling max-pycor * ( 3 / 4 ) ) [

140

ask one-of cells in-radius 20 with [ tree? and alive? ] [ set infected? true set newly- infected? true set inf-initial? true set prob-vector-wound ( one-of prob-vector-wound_live- inf_list ) set age-bsrd-mort-suscept ( one-of ( item ( age - 1 ) age-bsrd-mort-suscept_year-of- infection_list ) ) ] ] ask patch ( ceiling max-pxcor * ( 3 / 4 ) ) ( ceiling max-pycor * ( 1 / 4 ) ) [ ask one-of cells in-radius 20 with [ tree? and alive? ] [ set infected? true set newly- infected? true set inf-initial? true set prob-vector-wound ( one-of prob-vector-wound_live- inf_list ) set age-bsrd-mort-suscept ( one-of ( item ( age - 1 ) age-bsrd-mort-suscept_year-of- infection_list ) ) ] ] ask patch ( ceiling max-pxcor * ( 3 / 4 ) ) ( ceiling max-pycor * ( 3 / 4 ) ) [ ask one-of cells in-radius 20 with [ tree? and alive? ] [ set infected? true set newly- infected? true set inf-initial? true set prob-vector-wound ( one-of prob-vector-wound_live- inf_list ) set age-bsrd-mort-suscept ( one-of ( item ( age - 1 ) age-bsrd-mort-suscept_year-of- infection_list ) ) ] ] end to generate-initial-infection-center ask patch ( ceiling max-pxcor * ( 1 / 2 ) ) ( ceiling max-pycor * ( 1 / 2 ) ) [ ask one-of cells in-radius 10 with [ tree? and alive? ] [ set infected? true set newly- infected? true set inf-initial? true set prob-vector-wound ( one-of prob-vector-wound_live- inf_list ) set age-bsrd-mort-suscept ( one-of ( item ( age - 1 ) age-bsrd-mort-suscept_year-of- infection_list ) ) ] ] end

to reinitiate-infection ; If infection dies out, reinitialize infection carefully [ let drew-age-0? false

141

ifelse any? trees_current [ if not any? trees_current with [ infected? ] [ ; Create an initial infection (based on initial-infection-proportion slider), with trees set to be infected ; based on the proportion of trees they account for to avoid always having higher density of initial infections ; in the more densely planted stands. With this approach, % initial infected in INTENSIVE = % initial infected in EXTENSIVE print "infection lost... reinitiating based on \"initial-infection\""

let prop-trees_extensive (( count trees_current with [ mgmt = "extensive" ] ) / ( count trees_current )) let prop-trees_intensive (( count trees_current with [ mgmt = "intensive" ] ) / ( count trees_current )) let n-initial-infections ( count trees_current ) * ( pct-initial-infection / 100 * 0.1 )

; Set initial infections in extensive stands ask n-of ( ceiling ( n-initial-infections * prop-trees_extensive ) ) trees_current with [ mgmt = "extensive" ] [ set infected? true set newly-infected? true set inf-initial? true set prob-vector-wound ( one-of prob-vector-wound_live-inf_list ) ; In case you draw age 0 (shouldn't happen) ifelse age > 0 [ set age-bsrd-mort-suscept ( one-of ( item ( age - 1 ) age-bsrd-mort-suscept_year-of- infection_list ) ) ] [ set age-bsrd-mort-suscept ( one-of ( item ( age ) age-bsrd-mort-suscept_year-of- infection_list ) ) set drew-age-0? true ] ] ; Set initial infections in intensive stands ask n-of ( ceiling ( n-initial-infections * prop-trees_intensive ) ) trees_current with [ mgmt = "intensive" ] [ set infected? true set newly-infected? true set inf-initial? true set prob-vector-wound ( one-of prob-vector-wound_live-inf_list ) ifelse age > 0 [ set age-bsrd-mort-suscept ( one-of ( item ( age - 1 ) age-bsrd-mort-suscept_year-of- infection_list ) ) ] [ set age-bsrd-mort-suscept ( one-of ( item ( age ) age-bsrd-mort-suscept_year-of- infection_list ) ) set drew-age-0? true ]

142

] ] ][ print "No trees_current. Could not reinitiate infection" ] if drew-age-0? [ print "PROBLEM: tried to assign age-0 agent in trees_current to be an infection. Likely not a tree." ] ][ print "ERROR go -> reinitiate infection" print error-message set kill-run? true set kill- run? true stop ] end

;______;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;______;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;______;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ; GO PROCEDURE ;______;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ to go ; PROCEDURE THAT RUNS EVERY TICK (YEAR)

;______; GO SETUP ;______; Stop the model once you reach the maximum number of ticks (failsafe) no-display if ( limit-ticks? AND ( ticks > max-ticks ) ) [ if run-file != 0 and run-file != "" [ file-open run-file file-print (word max-ticks " time steps reached!") file-print ( word "End: " date-and-time ) file-close ] print (word max-ticks " time steps reached!") print ( word "End: " date-and-time ) set kill-run? true stop ]

; Kill a simulation if an error is encountered if do-kill-runs? [ if kill-run? [

143

print "///////////////////////////////////////////////////////////////////////////////////////////////" print "------FATAL ERROR: kill-run triggered. Run aborted. ------" print "///////////////////////////////////////////////////////////////////////////////////////////////" stop ] ]

reset-timer ; for keeping track of speed

print (word "\n------Tick " ticks " ------\n" ) ; for easier visual parsing of output

;______

; SPREAD INFECTION - Calculate infection probabilities and have cells become infected carefully [ if ( spread-infection-version? != "none" ) [ project-infection ] ] [ print "ERROR go -> project-infection" print error-message set export-rasters? false set export-tree-data? false set kill-run? true stop ]

;______

; STAND MANAGEMENT PROCEDURES carefully [ manage-stands ] [ print "ERROR go -> manage-stands" print error-message set export-rasters? false set export-tree-data? false set kill-run? true stop ]

;______

; TIME-PASSES: Various time-related model processes Trees age, gain or lose infection susceptibility, die, old dead trees and stumps disappear carefully [ time-passes ] [ print "ERROR go -> time-passes" print error-message set export-rasters? false set export-tree-data? false set kill-run? true stop ] ;______

144

; EXPORT DATA AND PRINT TIMER

; Export data: This happens after time passes to account for new deaths ; Progress file tracks the number of current and cumulative infections and mortalities at each tick carefully [ if track-run? [ if progress-file != 0 and progress-file != "" [ write-to-progress-file ] ] ] [ print "ERROR go -> writing progress file" print error-message set kill-run? true stop ]

; Data file tracks the states of each tree at the frequency determined by the user carefully [ if ( export-tree-data? and ticks mod tree-data-export-freq = 0 ) [ export-tree-data ] ] [ print "ERROR go -> setting export-tree-data" print error-message set kill-run? true stop ] carefully [ if ( export-stand-data? and ticks mod stand-data-export-freq = 0 ) [ export-stand-data ] ] [ print "ERROR go -> setting export-stand-data" print error-message set kill-run? true stop ]

; Raster files track the states of each cell tree at the frequency determined by the user carefully [ if ( export-rasters? AND ( ticks mod raster-export-frequency = 0 ) ) [ export-inf-map ] ] [ print "ERROR go -> setting trees_current" print error-message set kill-run? true stop ]

if visualize? [ color-world display ask newly-infected-trees [ set color magenta - 1 ] ask losing-infection-trees [ set color violet + 1 ] ask trees_potential with [ new-bsrd-mortality? ] [ set color orange ] ask trees_potential with [ losing-attr-dead? ] [ set color yellow ] ]

let go-duration timer print (word "Tick " ticks " took: " go-duration " seconds." ) if track-run? [ file-open run-file file-print (word "Tick " ticks " took: " go-duration " seconds." ) file-close-all

145

]

;______; FINAL ACTIONS: ; Set trees_current carefully [ set trees_current ( trees ) ; set an agentset for all current trees ] [ print "ERROR go -> setting trees_current" print error-message set kill-run? true stop ]

; If infection lost, reinitiate if reinitiate-infection? [ reinitiate-infection ] ; ADD IN RANDOM INFECTION IF THERE ARE NO TREES INFECTED

; Increase ticks (to next time step) tick

if limit-ticks? and ticks = max-ticks [ delete-program-directory ] end

;///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ; PROJECT INFECTION - Core of the infection spread for the model ;///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// to project-infection ; SET AGENTSETS FOR TREES NEWLY-INFECTED and LOSING-INFECTION carefully [ ; set the agentsets for cells projecting infection set trees_newly-infected ( newly-infected-trees ) print ( word "Number of trees_newly-infected: " ( count trees_newly-infected ) ) set trees_losing-infection ( losing-infection-trees ) print ( word "Number of trees_losing-infection: " ( count trees_losing-infection ) ) ] [ print "Error project-infection -> set tree agentsets" print error-message set kill-run? true stop ]

;______; PROJECT VECTOR DISPERSAL PROCEDURE

if ( ( max-vector-distance_SC_m + max-vector-distance_PF_m + max-vector- distance_HN_m ) > 0 ) [ ; Check that vector dispersal is active

146

; 1) output the trees_newly-infected and trees_losing-infection to JSON export-newly-infected-trees-json export-losing-infection-trees-json ;print "Exporting newly-infected and losing-infection files: complete" ; 2) run the program and load the data back into NetLogo run-spread-infection_Go ;print "Running spread-infection program: complete" ; 3) use the data to assign probabilities apply-solution_Go ;print "Applying solution from spread-infection: complete" ; Clear lists set spread-infection-solution [] r:eval "rm(solution)"

; Background probability of dispersal ; ADD: (4) Background projection if background-prob-vector-dispersal? [ calculate-vector-dispersal_background ] ]

;______; PROJECT ROOT CONTACT: PROJECT TREE AGES AND IDS ifelse new-attr? [ ifelse attr-inf-dead_version = "proportional" [ project_root-infection_attraction-proportional ] [ project_root-infection_attraction ] ] [ project-root-infection ]

;______

; Clear agentsets set trees_newly-infected empty-agentset set trees_losing-infection empty-agentset end

;______

147

; PROJECT ROOT INFECTION PROBABILITIES to project_root-infection_attraction ; trees spreading root infection (newly-infected and losing-infection) defined previously in main project-infection procedure

; Newly-infected add their who and age to their neighbors' properties let attr-distance-range ( range 1 ( max-attraction-distance_cell + 1 ) ) ; create a list for the range of distances ; print (word "attr-distance-range " attr-distance-range )

; ID all of the trees that are projecting infection and/or attraction ifelse attr-dead? [ set cells-projecting ( turtle-set trees_current with [ newly-infected? ] ; a) newly infected: add to prob root contact (+) and infection attraction (+) trees_potential with [ losing-infection? ] ; b) losing infection: remove prob root contact (-) AND infection attraction (-) trees_potential with [ new-bsrd-mortality? ] ; c) newly dead (from BSRD): add to dead attraction (attr-dead) (+) trees_potential with [ losing-attr-dead? ] ; d) dead losing attraction and being reset: remove dead attraction (attr-dead) (-) ) ] [ ; IF THERE IS NO DEAD ATTRACTION ACTIVATED set cells-projecting ( turtle-set trees_current with [ newly-infected? ] ; a) newly infected: add to prob root contact (+) and infection attraction (+) trees_potential with [ losing-infection? ] ; b) losing infection: remove prob root contact (-) AND infection attraction (-) ) ]

; If there are any trees spreading root infection carefully [ ifelse is-agentset? cells-projecting and any? cells-projecting [ let source-is-newly-infected? false let source-is-losing-infection? false let source-is-new-bsrd-mortality? false let source-is-losing-attr-dead? false ask cells-projecting [

148

; Set temp variables to track source tree properties let age_source-tree age let id_source-tree who ifelse newly-infected? [ set source-is-newly-infected? true ] [ set source-is-newly- infected? false ] ifelse losing-infection? [ set source-is-losing-infection? true ] [ set source-is-losing- infection? false ] ifelse new-bsrd-mortality? [ set source-is-new-bsrd-mortality? true ] [ set source-is- new-bsrd-mortality? false ] ifelse losing-attr-dead? [ set source-is-losing-attr-dead? true ] [ set source-is-losing- attr-dead? false ]

; Root spread with distance based on management and stand position let max-root-contact-distance_source 0 ; the number of cells the tree can have root contact based on management spacing and whether an edge ifelse pct-intensive > 0 [ ; if there are intensive stands, allow extensive on their borders to have root contact ifelse ( ( edge? and mgmt = "extensive" ) or mgmt = "intensive" ) [ set max-root-contact-distance_source max-root-distance_int_cell ; intensive and extensive edges ] [ set max-root-contact-distance_source max-root-distance_ext_cell ] ; extensive interior ] [ set max-root-contact-distance_source max-root-distance_ext_cell ] ; extensive

; Loop through root contact distances foreach attr-distance-range [ current-ring-distance -> ; Calculate the current distance (in meters) let current-distance_m ( current-ring-distance * intercell-distance )

; for each potential tree in each ring ask cells at-points ( item ( current-ring-distance - 1 ) ring-list_attraction ) [ if potential-tree? [ ;------; PROJECT ROOT CONTACT INFECTIONS AND INF-ATTR - if the tree is newly infected if source-is-newly-infected? [ ; PROJECT ROOT CONTACT (+) (add) - if within the distance for root contact

149

if max-root-distance_m > 0 AND current-ring-distance <= max-root-contact- distance_source [ set any-inf-root-nbors? true ; track that there is some root infection probability that needs to be accounted for carefully [ ; add the age and who of each source tree to the relevant distance ring of all neighbors if current-ring-distance = 1 [ set inf-root-nbors_ages_r1 ( lput age_source-tree inf-root-nbors_ages_r1 ) set inf-root-nbors_ids_r1 ( lput id_source-tree inf-root-nbors_ids_r1 ) ] if current-ring-distance = 2 [ set inf-root-nbors_ages_r2 ( lput age_source-tree inf-root-nbors_ages_r2 ) set inf-root-nbors_ids_r2 ( lput id_source-tree inf-root-nbors_ids_r2 ) ] if current-ring-distance = 3 [ set inf-root-nbors_ages_r3 ( lput age_source-tree inf-root-nbors_ages_r3 ) set inf-root-nbors_ids_r3 ( lput id_source-tree inf-root-nbors_ids_r3 ) ] if current-ring-distance = 4 [ set inf-root-nbors_ages_r4 ( lput age_source-tree inf-root-nbors_ages_r4 ) set inf-root-nbors_ids_r4 ( lput id_source-tree inf-root-nbors_ids_r4 ) ] ] [ print "ERROR project-infection -> project_root-infection_attraction -> trees_newly-infected -> project root infection" print error-message set kill-run? true stop ] ] ;------; PROJECT ATTR-INF (+) (add) - attraction due to infection if attr-inf? [ ; (i) Draw an attraction value from the list and run through distance decay equation, carefully [ let attr-inf_to-set 0 ; to store value ; Draw infection attraction based on whether the tree is alive or dead (potential trees that are not trees treated as alive because they will be regenerated) ; account for distance decay ifelse (not tree? or alive? ) [ set attr-inf_to-set ( attraction-distance- decay_FUNCTION ( one-of attr-effect_inf-vs-live_list ) ( current-distance_m ) ) ] [ set attr-inf_to-set ( attraction-distance-decay_FUNCTION ( one-of attr- effect_inf-vs-dead_list ) ( current-distance_m ) ) ]

150

; (ii) Add to the attr-inf list for the target tree/cell set attr-inf ( lput attr-inf_to-set attr-inf ) ; set target cell inf attraction by adding to end of list set attr-inf_source ( lput id_source-tree attr-inf_source ) ; set the mgmt attraction source stand to their own stand id ] [ print "ERROR project-infection -> project_root-infection_attraction -> trees_newly-infected -> project attraction (infection)" print error-message set kill-run? true stop ] ] ] ;------; PROJECT INFECTION LOSS AND REMOVE INFECTION ATTRACTION - if source is losing-infection if source-is-losing-infection? [ carefully [ ; remove the age and who of each source tree from the relevant distance ring of all potential tree neighbors ; PROJECT ROOT INFECTION (-) (remove) - if within the distance for root contact if max-root-distance_m > 0 AND current-ring-distance <= max-root-contact- distance_source [ if current-ring-distance = 1 [ ; print ( word "entered ring " current-ring-distance ) let value-position ( position id_source-tree inf-root-nbors_ids_r1 ) ; Find the position of the tree losing infection in the root nbor lists ; print ( word "value position? " value-position ) if ( value-position != false ) [ ; print "entered remove loop" set inf-root-nbors_ages_r1 ( remove-item value-position inf-root- nbors_ages_r1 ) ; remove the age at that position set inf-root-nbors_ids_r1 ( remove id_source-tree inf-root-nbors_ids_r1 ) ; remove the who of that tree losing infection ] ] if current-ring-distance = 2 [ ; print ( word "entered ring " current-ring-distance ) let value-position ( position id_source-tree inf-root-nbors_ids_r2 ) ; Find the position of the tree losing infection in the root nbor lists ; print ( word "value posit? " value-position ) if ( value-position != false ) [

151

; print "entered remove loop" set inf-root-nbors_ages_r2 ( remove-item value-position inf-root- nbors_ages_r2 ) ; remove the age at that position set inf-root-nbors_ids_r2 ( remove id_source-tree inf-root-nbors_ids_r2 ) ; remove the who of that tree losing infection ] ] if current-ring-distance = 3 [ ; print ( word "entered ring " current-ring-distance ) let value-position ( position id_source-tree inf-root-nbors_ids_r3 ) ; Find the position of the tree losing infection in the root nbor lists ; print ( word "value posit? " value-position ) if ( value-position != false ) [ ; print "entered remove loop" set inf-root-nbors_ages_r3 ( remove-item value-position inf-root- nbors_ages_r3 ) ; remove the age at that position set inf-root-nbors_ids_r3 ( remove id_source-tree inf-root-nbors_ids_r3 ) ; remove the who of that tree losing infection ] ] if current-ring-distance = 4 [ ; print ( word "entered ring " current-ring-distance ) let value-position ( position id_source-tree inf-root-nbors_ids_r4 ) ; Find the position of the tree losing infection in the root nbor lists ; print ( word "value posit? " value-position ) if ( value-position != false ) [ ; print "entered remove loop" set inf-root-nbors_ages_r4 ( remove-item value-position inf-root- nbors_ages_r4 ) ; remove the age at that position (can't use "remove" function because it would remove all) set inf-root-nbors_ids_r4 ( remove id_source-tree inf-root-nbors_ids_r4 ) ; remove the who of that tree losing infection ] ] ] ] [ print "ERROR project-infection -> project_root-infection_attraction -> trees_losing-infection -> project root infection" print error-message set kill-run? true stop ] ;------; PROJECT INFECTION ATTRACTION (-) (remove) - infection due to attraction if attr-inf? [

152

carefully [ let value-position_attr-inf ( position id_source-tree attr-inf_source ) ; Find the position of the tree losing infection in the attr-inf list ifelse ( value-position_attr-inf != false ) [ ; If the source id is found in the list set attr-inf ( remove-item value-position_attr-inf attr-inf ) ; remove the age at that position set attr-inf_source ( remove-item value-position_attr-inf attr-inf_source ) ; remove the who of that tree losing infection ] [ print (word "PROBLEM in project_root-infection_attraction -> trees_losing- infection -> project attraction (infection): for target tree **" who "**, value of source **" id_source-tree "** not found" ) ] ] [ print "ERROR project-infection -> project_root-infection_attraction -> trees_losing-infection -> project attraction (infection)" print error-message set kill-run? true stop ] ] ] ;------; PROJECT DEAD ATTRACTION (+) (add) - if tree is new bsrd-caused mortality (thin- and harvest-killed trees dealt with separately, at the stand-scale) if attr-dead? [ if source-is-new-bsrd-mortality? [ carefully [ ; draw an attraction value from the list and run through distance decay equation, let attr-dead_to-set ( attraction-distance-decay_FUNCTION ( one-of attr- effect_dead_list ) ( current-distance_m ) ) set attr-dead ( lput attr-dead_to-set attr-dead ) ; set target cell dead attraction by adding to the list set attr-dead_source ( lput id_source-tree attr-dead_source ) ; set the mgmt attraction source stand to their own stand id ] [ print "ERROR project-infection -> project_root-infection_attraction -> new- bsrd-mortality -> project attraction (dead)" print error-message set kill-run? true stop ] ] ;------; PROJECT DEAD ATTRACTION (-) (remove) - if dead tree is losing attraction and being reset if source-is-losing-attr-dead? [ carefully [

153

let value-position_attr-dead ( position id_source-tree attr-dead_source ) ; Find the position of the tree losing infection in the attr-dead list ; print ( word "source: " id_source-tree ) print (word "target: " print who) if ( value-position_attr-dead != false ) [ ; If the source id is found in the list set attr-dead ( remove-item value-position_attr-dead attr-dead ) ; remove the age at that position set attr-dead_source ( remove-item value-position_attr-dead attr-dead_source ) ; remove the who of that tree losing infection ] ] [ print "ERROR project-infection -> project_root-infection_attraction -> losing- attr-dead -> project attraction (infection)" print error-message ] ] ] ] ] ] ] ] [ print "------>" print "NO CELLS PROJECTING" print "------>" ] ] [ print "Error in project-infection -> project-root-infection -> ask cells-projecting" print error-message set kill-run? true stop ]

ask cells-projecting [ ; RESET PROPERTIES OF PROJECTORS set newly-infected? false ; remove newly-infected status set losing-infection? false ; remove losing-infection status set new-bsrd-mortality? false ; remove newly-dead status set losing-attr-dead? false ; remove losing-dead-attr status ]

ifelse any? ( cells-projecting with [ newly-infected? OR losing-infection? OR new-bsrd- mortality? OR losing-attr-dead? ] ) [ print "PROBLEM !!! cell status used for projection WAS NOT CLEARED!!!!" user-message "PROBLEM !!! cell status used for projection WAS NOT CLEARED!!!!" ] [ print "All projecting properties correctly cleared" ] ; Clear the cells-projecting agentset set cells-projecting empty-agentset end

154 to project_root-infection_attraction-proportional ; trees spreading root infection (newly-infected and losing-infection) defined previously in main project-infection procedure

; Newly-infected add their who and age to their neighbors' properties let attr-distance-range ( range 1 ( max-attraction-distance_cell + 1 ) ) ; create a list for the range of distances ; print (word "attr-distance-range " attr-distance-range )

; ID all of the trees that are projecting infection and/or attraction ifelse attr-dead? [ set cells-projecting ( turtle-set trees_current with [ newly-infected? ] ; a) newly infected: add to prob root contact (+) and infection attraction (+) trees_potential with [ losing-infection? ] ; b) losing infection: remove prob root contact (-) AND infection attraction (-) trees_potential with [ new-bsrd-mortality? ] ; c) newly dead (from BSRD): add to dead attraction (attr-dead) (+) trees_potential with [ losing-attr-dead? ] ; d) dead losing attraction and being reset: remove dead attraction (attr-dead) (-) ) ] [ ; NO DEAD ATTRACTION set cells-projecting ( turtle-set trees_current with [ newly-infected? ] ; a) newly infected: add to prob root contact (+) and infection attraction (+) trees_potential with [ losing-infection? ] ; b) losing infection: remove prob root contact (-) AND infection attraction (-) ) ]

; If there are any trees spreading root infection carefully [ ifelse is-agentset? cells-projecting and any? cells-projecting [ let source-is-newly-infected? false let source-is-losing-infection? false let source-is-new-bsrd-mortality? false let source-is-losing-attr-dead? false ask cells-projecting [ ; Set temp variables to track source tree properties

155

let age_source-tree age let id_source-tree who ifelse newly-infected? [ set source-is-newly-infected? true ] [ set source-is-newly- infected? false ] ifelse losing-infection? [ set source-is-losing-infection? true ] [ set source-is-losing- infection? false ] ifelse new-bsrd-mortality? [ set source-is-new-bsrd-mortality? true ] [ set source-is- new-bsrd-mortality? false ] ifelse losing-attr-dead? [ set source-is-losing-attr-dead? true ] [ set source-is-losing- attr-dead? false ]

; Root spread with distance based on management and stand position let max-root-contact-distance_source 0 ; the number of cells the tree can have root contact based on management spacing and whether an edge ifelse pct-intensive > 0 [ ; if there are intensive stands, allow extensive on their borders to have root contact ifelse ( ( edge? and mgmt = "extensive" ) or mgmt = "intensive" ) [ set max-root-contact-distance_source max-root-distance_int_cell ; intensive and extensive edges ] [ set max-root-contact-distance_source max-root-distance_ext_cell ] ; extensive interior ] [ set max-root-contact-distance_source max-root-distance_ext_cell ] ; extensive

; Loop through root contact distances foreach attr-distance-range [ current-ring-distance -> ; Calculate the current distance (in meters) let current-distance_m ( current-ring-distance * intercell-distance )

; for each potential tree in each ring ask cells at-points ( item ( current-ring-distance - 1 ) ring-list_attraction ) [ if potential-tree? [ ;------; PROJECT ROOT CONTACT INFECTIONS AND INF-ATTR - if the tree is newly infected if source-is-newly-infected? [ ; PROJECT ROOT CONTACT (+) (add) - if within the distance for root contact if max-root-distance_m > 0 AND current-ring-distance <= max-root-contact- distance_source [

156

set any-inf-root-nbors? true ; track that there is some root infection probability that needs to be accounted for carefully [ ; add the age and who of each source tree to the relevant distance ring of all neighbors if current-ring-distance = 1 [ set inf-root-nbors_ages_r1 ( lput age_source-tree inf-root-nbors_ages_r1 ) set inf-root-nbors_ids_r1 ( lput id_source-tree inf-root-nbors_ids_r1 ) ] if current-ring-distance = 2 [ set inf-root-nbors_ages_r2 ( lput age_source-tree inf-root-nbors_ages_r2 ) set inf-root-nbors_ids_r2 ( lput id_source-tree inf-root-nbors_ids_r2 ) ] if current-ring-distance = 3 [ set inf-root-nbors_ages_r3 ( lput age_source-tree inf-root-nbors_ages_r3 ) set inf-root-nbors_ids_r3 ( lput id_source-tree inf-root-nbors_ids_r3 ) ] if current-ring-distance = 4 [ set inf-root-nbors_ages_r4 ( lput age_source-tree inf-root-nbors_ages_r4 ) set inf-root-nbors_ids_r4 ( lput id_source-tree inf-root-nbors_ids_r4 ) ] ] [ print "ERROR project-infection -> project_root-infection_attraction- proportional -> trees_newly-infected -> project root infection" print error-message set kill- run? true stop ] ] ;------; PROJECT ATTR-INF (+) (add) - attraction due to infection if attr-inf? [ carefully [ ; Draw an weighted tree value from the list based on distance and add to attr- inf_source set attr-inf_source ( attr-inf_source + ( item ( current-ring-distance - 1 ) attr- effect_tree-weight-over-distance_list ) ) ] [ print "ERROR project-infection -> project_root-infection_attraction- proportional -> trees_newly-infected -> project attraction (infection)" print error-message set kill-run? true stop ] ] ] ;------

157

; PROJECT INFECTION LOSS AND REMOVE INFECTION ATTRACTION - if source is losing-infection if source-is-losing-infection? [ carefully [ ; remove the age and who of each source tree from the relevant distance ring of all potential tree neighbors ; PROJECT ROOT INFECTION (-) (remove) - if within the distance for root contact if max-root-distance_m > 0 AND current-ring-distance <= max-root-contact- distance_source [ if current-ring-distance = 1 [ ; print ( word "entered ring " current-ring-distance ) let value-position ( position id_source-tree inf-root-nbors_ids_r1 ) ; Find the position of the tree losing infection in the root nbor lists ; print ( word "value position? " value-position ) if ( value-position != false ) [ ; print "entered remove loop" set inf-root-nbors_ages_r1 ( remove-item value-position inf-root- nbors_ages_r1 ) ; remove the age at that position set inf-root-nbors_ids_r1 ( remove id_source-tree inf-root-nbors_ids_r1 ) ; remove the who of that tree losing infection ] ] if current-ring-distance = 2 [ ; print ( word "entered ring " current-ring-distance ) let value-position ( position id_source-tree inf-root-nbors_ids_r2 ) ; Find the position of the tree losing infection in the root nbor lists ; print ( word "value posit? " value-position ) if ( value-position != false ) [ ; print "entered remove loop" set inf-root-nbors_ages_r2 ( remove-item value-position inf-root- nbors_ages_r2 ) ; remove the age at that position set inf-root-nbors_ids_r2 ( remove id_source-tree inf-root-nbors_ids_r2 ) ; remove the who of that tree losing infection ] ] if current-ring-distance = 3 [ ; print ( word "entered ring " current-ring-distance ) let value-position ( position id_source-tree inf-root-nbors_ids_r3 ) ; Find the position of the tree losing infection in the root nbor lists

158

; print ( word "value posit? " value-position ) if ( value-position != false ) [ ; print "entered remove loop" set inf-root-nbors_ages_r3 ( remove-item value-position inf-root- nbors_ages_r3 ) ; remove the age at that position set inf-root-nbors_ids_r3 ( remove id_source-tree inf-root-nbors_ids_r3 ) ; remove the who of that tree losing infection ] ] if current-ring-distance = 4 [ ; print ( word "entered ring " current-ring-distance ) let value-position ( position id_source-tree inf-root-nbors_ids_r4 ) ; Find the position of the tree losing infection in the root nbor lists ; print ( word "value posit? " value-position ) if ( value-position != false ) [ ; print "entered remove loop" set inf-root-nbors_ages_r4 ( remove-item value-position inf-root- nbors_ages_r4 ) ; remove the age at that position (can't use "remove" function because it would remove all) set inf-root-nbors_ids_r4 ( remove id_source-tree inf-root-nbors_ids_r4 ) ; remove the who of that tree losing infection ] ] ] ] [ print "ERROR project-infection -> project_root-infection_attraction-proportional -> trees_losing-infection -> project root infection" print error-message set kill-run? true stop ] ;------; PROJECT INFECTION ATTRACTION (-) (remove) - infection due to attraction if attr-inf? [ carefully [ ; Draw an weighted tree value from the list based on distance and subtract from attr-inf_source set attr-inf_source ( attr-inf_source - ( item ( current-ring-distance - 1 ) attr- effect_tree-weight-over-distance_list ) ) ] [ print "ERROR project-infection -> project_root-infection_attraction- proportional -> trees_losing-infection -> project attraction (infection)" print error-message set kill-run? true stop ] ] ]

159

;------; PROJECT DEAD ATTRACTION (+) (add) - if tree is new bsrd-caused mortality (thin- and harvest-killed trees dealt with separately, at the stand-scale) if attr-dead? [ if source-is-new-bsrd-mortality? [ carefully [ ; draw an attraction value from the list and run through distance decay equation, let attr-dead_to-set ( attraction-distance-decay_FUNCTION ( one-of attr- effect_dead_list ) ( current-distance_m ) ) set attr-dead ( lput attr-dead_to-set attr-dead ) ; set target cell dead attraction by adding to the list set attr-dead_source ( lput id_source-tree attr-dead_source ) ; set the mgmt attraction source stand to their own stand id ] [ print "ERROR project-infection -> project_root-infection_attraction- proportional -> new-bsrd-mortality -> project attraction (dead)" print error-message set kill- run? true stop ] ] ;------; PROJECT DEAD ATTRACTION (-) (remove) - if dead tree is losing attraction and being reset if source-is-losing-attr-dead? [ carefully [ let value-position_attr-dead ( position id_source-tree attr-dead_source ) ; Find the position of the tree losing infection in the attr-dead list ; print ( word "source: " id_source-tree ) print (word "target: " print who) if ( value-position_attr-dead != false ) [ ; If the source id is found in the list set attr-dead ( remove-item value-position_attr-dead attr-dead ) ; remove the age at that position set attr-dead_source ( remove-item value-position_attr-dead attr-dead_source ) ; remove the who of that tree losing infection ] ] [ print "ERROR project-infection -> project_root-infection_attraction- proportional -> losing-attr-dead -> project attraction (infection)" print error-message ] ] ] ] ] ]

160

] ] [ print "------>" print "NO CELLS PROJECTING" print "------>" ] ] [ print "Error in project-infection -> project-root-infection -> ask cells-projecting" print error-message set kill-run? true stop ]

ask cells-projecting [ ; RESET PROPERTIES OF PROJECTORS set newly-infected? false ; remove newly-infected status set losing-infection? false ; remove losing-infection status set new-bsrd-mortality? false ; remove newly-dead status set losing-attr-dead? false ; remove losing-dead-attr status ]

ifelse any? ( cells-projecting with [ newly-infected? OR losing-infection? OR new-bsrd- mortality? OR losing-attr-dead? ] ) [ print "PROBLEM !!! cell status used for projection WAS NOT CLEARED!!!!" user-message "PROBLEM !!! cell status used for projection WAS NOT CLEARED!!!!" ] [ print "All projecting properties correctly cleared" ] ; Clear the cells-projecting agentset set cells-projecting empty-agentset end to project-root-infection ; trees spreading root infection (newly-infected and losing-infection) defined previously in main project-infection procedure

; Newly-infected add their who and age to their neighbors' properties let root-contact-distance-range 0 let distance-range_int ( range 1 ( 4 + 1 ) ) ; create a list for the range of distances let distance-range_ext ( range 1 ( 3 + 1 ) ) ; create a list for the range of distances (tight spacing prevents root contact beyond 3 cells)

; If there are any trees spreading root infection carefully [ if is-agentset? trees_newly-infected and any? trees_newly-infected [ ask trees_newly-infected [ let age_source-tree age let id_source-tree who ; Root spread distance based on management

161

if edge? or mgmt = "intensive" [ set root-contact-distance-range distance-range_int ] ; intensive and edges if mgmt = "extensive" and not edge? [ set root-contact-distance-range distance- range_ext ] foreach root-contact-distance-range [ current-ring-distance -> ask cells at-points ( item ( current-ring-distance - 1 ) ring-list_root ) [ if potential-tree? [ set any-inf-root-nbors? true ; just acknowledging that there is some root infection probability that needs to be accounted for ; add the age and who of each source tree to the relevant distance ring of all neighbors if current-ring-distance = 1 [ set inf-root-nbors_ages_r1 ( lput age_source-tree inf-root-nbors_ages_r1 ) set inf-root-nbors_ids_r1 ( lput id_source-tree inf-root-nbors_ids_r1 ) ] if current-ring-distance = 2 [ set inf-root-nbors_ages_r2 ( lput age_source-tree inf-root-nbors_ages_r2 ) set inf-root-nbors_ids_r2 ( lput id_source-tree inf-root-nbors_ids_r2 ) ] if current-ring-distance = 3 [ set inf-root-nbors_ages_r3 ( lput age_source-tree inf-root-nbors_ages_r3 ) set inf-root-nbors_ids_r3 ( lput id_source-tree inf-root-nbors_ids_r3 ) ] if current-ring-distance = 4 [ set inf-root-nbors_ages_r4 ( lput age_source-tree inf-root-nbors_ages_r4 ) set inf-root-nbors_ids_r4 ( lput id_source-tree inf-root-nbors_ids_r4 ) ] ] ] ] set newly-infected? false ; remove newly-infected status ] ] ] [ print "ERROR project-infection -> project-root-infection -> ask trees_newly-infected" print error-message set kill-run? true stop ]

; Losing-infection remove their who and age from their neighbors' properties carefully [ if is-agentset? trees_losing-infection and any? trees_losing-infection [ print "entered project-root -> losing infection"

162

ask trees_losing-infection [ let id_source-tree who ; print ( word "cell losing: " id_source-tree ) ; Root spread distance based on management if edge? or mgmt = "intensive" [ set root-contact-distance-range distance-range_int ] ; intensive and edges if mgmt = "extensive" and not edge? [ set root-contact-distance-range distance- range_ext ]

; loop through rings foreach root-contact-distance-range [ current-ring-distance -> ; ask cells in each ring ask cells at-points ( item ( current-ring-distance - 1 ) ring-list_root ) [ if potential-tree? [ ; remove the age and who of each source tree from the relevant distance ring of all potential tree neighbors if current-ring-distance = 1 [ let value-position ( position id_source-tree inf-root-nbors_ids_r1 ) ; Find the position of the tree losing infection in the root nbor lists if ( value-position != false ) [ set inf-root-nbors_ages_r1 ( remove-item value-position inf-root-nbors_ages_r1 ) ; remove the age at that position set inf-root-nbors_ids_r1 ( remove id_source-tree inf-root-nbors_ids_r1 ) ; remove the who of that tree losing infection ] ] if current-ring-distance = 2 [ let value-position ( position id_source-tree inf-root-nbors_ids_r2 ) ; Find the position of the tree losing infection in the root nbor lists if ( value-position != false ) [ set inf-root-nbors_ages_r2 ( remove-item value-position inf-root-nbors_ages_r2 ) ; remove the age at that position set inf-root-nbors_ids_r2 ( remove id_source-tree inf-root-nbors_ids_r2 ) ; remove the who of that tree losing infection ] ] if current-ring-distance = 3 [ let value-position ( position id_source-tree inf-root-nbors_ids_r3 ) ; Find the position of the tree losing infection in the root nbor lists if ( value-position != false ) [

163

set inf-root-nbors_ages_r3 ( remove-item value-position inf-root-nbors_ages_r3 ) ; remove the age at that position set inf-root-nbors_ids_r3 ( remove id_source-tree inf-root-nbors_ids_r3 ) ; remove the who of that tree losing infection ] ] if current-ring-distance = 4 [ let value-position ( position id_source-tree inf-root-nbors_ids_r4 ) ; Find the position of the tree losing infection in the root nbor lists if ( value-position != false ) [ set inf-root-nbors_ages_r4 ( remove-item value-position inf-root-nbors_ages_r4 ) ; remove the age at that position (can't use "remove" function because it would remove all) set inf-root-nbors_ids_r4 ( remove id_source-tree inf-root-nbors_ids_r4 ) ; remove the who of that tree losing infection ] ] if length ( sentence inf-root-nbors_ids_r1 inf-root-nbors_ids_r2 inf-root- nbors_ids_r3 inf-root-nbors_ids_r4 ) = 0 [ set any-inf-root-nbors? false ; just acknowledging that there is some root infection probability that needs to be accounted for ] ] ] ] set losing-infection? false ; remove losing-infection status ] ] ] [ print "Error in project-infection -> project-root-infection -> ask trees_losing-infection" print error-message set kill-run? true stop ] end

;______; BACKGROUND PROBABILITY OF VECTOR DISPERSAL to calculate-vector-dispersal_background ; EDIT to remove minimum values carefully [ ; Reset the number of stands projecting background dispersal set n-stands-projecting-vector-dispersal_background 0 set prob-vector-dispersal_background_cumul 0

164

; Go through each stand foreach stand-list [ this-stand-id -> ; count the number of trees in the stand let stand-trees ( trees_current with [ stand-id = this-stand-id ] ) ; calculate the proportion of trees infected in the stand let pct-trees-infected ( ( count stand-trees with [ infected? ] ) / ( count stand-trees ) * 100 ) ; if the % of trees infected meets or exceeds the limit for dispersal spillover if pct-trees-infected >= vector-disp_background_stand-pct-inf-spillover-threshold [ set n-stands-projecting-vector-dispersal_background ( n-stands-projecting-vector- dispersal_background + 1 ) ] ] ; Calculate the cumulative prob-vector-dispersal ifelse n-stands-projecting-vector-dispersal_background > 0 [ set prob-vector-dispersal_background_cumul ( n-stands-projecting-vector- dispersal_background * prob-vector-disp_background ) ] [ set prob-vector-dispersal_background_cumul prob-vector-disp_background ] ; always a minimum ] [ print "ERROR in project-infection -> calculate-vector-dispersal_background" print error-message ] end

;////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

; TIME-PASSES: Various time-related model processes Trees age, gain or lose infection susceptibility, die, old dead trees and stumps disappear to time-passes

; Begin procedure to update the status of all trees

; To calculate cumulative prob root contact using the lists - use the max distance to account for trees near other management let root-contact-distance-range ( range 1 ( 4 + 1 ) )

; REMOVE PROB INFECTION CAUSED BY ERRORS WITH FLOATING POINT MATH ask trees_potential [ if prob-vector-disp_cumul_SC < 0.000001 [ set prob-vector-disp_cumul_SC 0 ] if prob-vector-disp_cumul_PF < 0.000001 [ set prob-vector-disp_cumul_PF 0 ] if prob-vector-disp_cumul_HN < 0.000001 [ set prob-vector-disp_cumul_HN 0 ]

165

]

; MAIN LOOP --> Update status for all current trees ask trees_current [ ; Setup variables to track whether the cell WAS or BECAME infected (used throughout) let previously-infected? infected? ; reset let became-infected? false ; reset carefully [ ; (1) INCREASE COUNTER: MORTALITY ; (this goes before infected tree death so that trees dying at this step will not have their time-since-mort counter increased) ifelse not alive? [ ; Ask trees that are dead set time-since-mort ( time-since-mort + 1 ) ; add 1 to their mortality counter - trees killed by thinning or harvest will have time-since-mort = 1 for the same tick in which ; they died because the attraction due to the mgmt action that killed them has already been accounted for in this tick

; (2) DEAD CELLS ARE RESET AND DESIGNATED TO LOSE ATTRACTION, REDUCE NBOR ATTR, AND DECREASE NBOR PROB-INF (IF INFECTED) ; IF dead at least 2 years, tree can lose attraction and be reset; after 4 years (dead-attr- duration), all are reset ifelse ( ( ( time-since-mort >= dead-attr-duration_max ) OR ( time-since-mort >= dead-attr-duration_min and random-float 1 < prob-attr-dead-loss ) ) AND time-since-mort > dead-host-viability-duration_max ) [ if infected? or newly-infected? [ set losing-infection? true ] ; note whether it was infected if ( mort-cause = "bsrd" ) [ set losing-attr-dead? true ; designate as losing vector attraction but only when not in a managed setting (in thinned or harvested stands, attraction loss and reset cell properties managed by remove-attr-mgmt_by-stand) ] reset-cell-properties ; reset cell properties only for dead by bsrd, NOT management (separate proceduree) ] ; ELSE, if not being reset...

166

[ carefully [ ; (3) PREVIOUSLY DEAD & INF TREES LOSE INFECTION ; Check how long ago the tree died relative to inoculum-viability-loss (the amount of time after tree/host death before (a) the pathogen can't survive ; or (b) the pathogen can't colonize the host [7-24 months / 0.5-2 years]) ; IF time-since-mort is >= inoc-viab-loss, THEN lose infection; otherwise, THERE'S A probabilistic loss of infection if infected? [ ; IF the dead tree cannot maintain viable pathogen inoculum (based on time-since- mortality), it loses infection ifelse ( ( time-since-mort >= dead-host-viability-duration_min AND ( random 2 = 0 ) ) OR ( time-since-mort >= dead-host-viability-duration_max ) ) [ set losing-infection? true set infected? false set inf-root? false set inf-SC? false set inf-PF? false set inf-HN? false set inf-initial? false ] ; ELSE as long as not losing infection... ; (4) INCREASE COUNTER: INFECTION ; (this goes BEFORE infection so that trees infected during this step will not have their time-since-inf counter increased) ; (this goes AFTER INCREASE COUNTER: MORTALITY, DEAD CELL RESET, and INFECTION LOSS to identify trees eligible to continue being infected) ; (4a) for dead trees [ set time-since-inf ( time-since-inf + 1 ) ] ; INCREASE INFECTION COUNTER ] ] [ print "ERROR: time-passes -> Steps 3-4" print error-message set kill-run? true stop ] ] ] [ ; (4b) for live trees set time-since-inf ( time-since-inf + 1 ) ; INCREASE INFECTION COUNTER set age-bsrd-mort-suscept ( one-of ( item ( age - 1 ) age-bsrd-mort-suscept_years-after- infection_list ) ) ; UPDATE PROBABILITY OF MORTALITY (IF time-since-inf = 1, otherwise, already updated)

167

] ] [ print "ERROR: time-passes -> Steps 1-4" print error-message set kill-run? true stop ]

if tree? [ ; IF STILL A TREE (NOT RESET EARLIER IN PROCEDURE) - Check if tree? before continuing, since some trees have now been reset to non-trees ; (5) PROBABILITY OF INFECTION CALCULATION - Clear prob dispersal that are too low set prob-root-contact_cumul 0 ; clear prob root contact from last tick (always changes because of aging and tree growth) set prob-inf-root 0

; (6) RECALCULATE PROBABILITIES OF INFECTION & INFECT TREES ; Clear prob-root-contact and prob-inf-root for all trees (needs to be recalculated to account for changing age ; (A) RECALCULATE PROBABILITY OF INFECTION ; (i) PROB ROOT INFECTION carefully [ if max-root-distance_m > 0 [ if any-inf-root-nbors? [ ; if the tree potentially has infected root neighbors let inf-root-nbor-age-lists ( list ; create a nested list with all root-neighbor age lists (to iterate through) inf-root-nbors_ages_r1 inf-root-nbors_ages_r2 inf-root-nbors_ages_r3 inf-root- nbors_ages_r4 ) ifelse length ( sentence inf-root-nbor-age-lists ) != 0 [ ; if there are any values in the root neighbors age lists, proceed with calculation, else ; no values in the root neighbors age lists, set prc and prob root infection to 0 foreach root-contact-distance-range [ this-distance -> ; for each distance in the root radius let current-age-list ( item ( this-distance - 1 ) inf-root-nbor-age-lists ) ; get the current nbor age list

; Calcuate the prob root contact by mapping the draw prc function to the neighbor age list and summing, let prc_current-list [] ; store in temp variable prc_current-list

168

carefully [ set prc_current-list ( calculate-prob-root-contact age current-age-list this-distance ) ] [ print "Error during calc-prob-root-contact/draw-prob-root-contact" print error- message set kill-run? true stop ] set prob-root-contact_cumul ( prob-root-contact_cumul + prc_current-list ) ; add to the prc for this tree ] ; Calculate prob infection via roots set prob-inf-root ( age-bsrd-inf-suscept * prob-root-contact_cumul * prob-root- transm ) ] [ ; ELSE there are no infected root nbors - set any infected root neighbors to false to indicate lack of inf root nbors and prevent calculation set any-inf-root-nbors? false ] ] ] ] [ print "ERROR: time-passes -> Step 7.A.i" print error-message set kill-run? true stop ]

carefully [ if ( max-vector-distance_SC_m + max-vector-distance_PF_m + max-vector- distance_HN_m ) > 0 OR background-prob-vector-dispersal? [ ; if vector dispersal is active, recalculate prob vector infection ; PROB. VECTOR INFECTION

; Attraction is applied to prob vector wounding ; (i) initialize temp variables let prob-vector-wound_calc 0 ; Initialize a temporary variable to modify for probability of vector wounding let attr-mgmt_to-use 0 let attr-dead_to-use 0 let attr-inf_to-use 0

; (ii) Set management, inf, and dead attraction based on version used ; For the "median" version, the median is used for all three if attr-inf-dead_version = "median" OR attr-inf-dead_version = "proportional" [ set attr-mgmt_to-use ( median attr-mgmt ) set attr-dead_to-use ( median attr-dead ) ; For the "proportional" version, the median is used for attr-mgmt and attr-dead if attr-inf-dead_version = "median" [

169

set attr-inf_to-use ( median attr-inf ) ] ] if attr-inf-dead_version = "max" [ set attr-mgmt_to-use ( max attr-mgmt ) set attr-dead_to-use ( max attr-dead ) set attr-inf_to-use ( max attr-inf ) ]

; CONSERVATIVE/PROPORTIONAL: weight the infected neighbor trees based on distance and set an attr-inf proportional to the amount of inf trees ; in the attraction radius versus the max possible, with a threshold for what is considered an infection center (with the full range ; of attr-inf values) if attr-inf-dead_version = "proportional" [ ; draw an attraction factor from the appropriate list ifelse alive? [ set attr-inf_to-use ( one-of attr-effect_inf-vs-live_list ) ] [ set attr-inf_to-use ( one-of attr-effect_inf-vs-dead_list ) ] ; scale based on number and distance of inf trees in surroundings let proportion-of-inf-nbors-relative-to-threshold ( min ( list ( attr-inf_source / inf- center-attr-threshold_n-source-trees ) 1 ) ) ; prop relative to threshold - max = 1 set attr-inf_to-use ( max ( list ( attr-inf_to-use * proportion-of-inf-nbors-relative-to- threshold ) 1 ) ) ; attr-inf effect min = 1 set attr-inf attr-inf_to-use ]

; Combine attraction effects and apply to prob wound ifelse ( stand-w-thin-disturbance? or stand-w-harv-disturbance? ) [ ; If the cell is in a thinned or harvested stand, don't apply dead attraction, which would be redundant set prob-vector-wound_calc ( prob-vector-wound * attr-road * attr-mgmt_to-use * attr-inf_to-use ) ] [ set prob-vector-wound_calc ( prob-vector-wound * attr-road * attr-mgmt_to-use * attr-dead_to-use * attr-inf_to-use ) ] ; Prob vector wounding should not exceed 1 set prob-vector-wound_calc ( min ( list prob-vector-wound_calc 1 ) )

; Set probability of vector infection by each vector, should not exceed 1 set prob-inf-SC ( min ( list ( age-bsrd-inf-suscept * prob-inf_SC_base * prob-vector- disp_cumul_SC * prob-vector-wound_calc ) 1 ) ) ; limit to 1

170

set prob-inf-PF ( min ( list ( age-bsrd-inf-suscept * prob-inf_PF_base * ( prob-vector- disp_cumul_PF + prob-vector-dispersal_background_cumul ) * prob-vector-wound_calc ) 1 ) ) ; limit to 1 set prob-inf-HN ( min ( list ( age-bsrd-inf-suscept * prob-inf_HN_base * ( prob-vector- disp_cumul_HN + prob-vector-dispersal_background_cumul ) * prob-vector-wound_calc ) 1 ) ) ; limit to 1 ] ][ print "Error in time-passes -> Step 7.A.ii: Prob vector inf calc" print error-message set kill-run? true stop ]

; (B) DETERMINE WHETHER INFECTION OCCURS & INFECT TREES ; (i) IDENTIFY TREES THAT CAN BECOME INFECTED (by setting "at-risk?" to TRUE) ; If the tree has been infected by all four mechanisms OR has not been dead for too long to be infected ifelse ( ( infected? AND inf-root? AND inf-SC? AND inf-PF? AND inf-HN? ) OR losing- infection? OR losing-attr-dead? ) [ set at-risk? false ] ; ELSE at risk to become infected [ set at-risk? true ] ; (ii) Infect trees carefully [ if at-risk? [ ; Only check whether infection occurs if at-risk if infected? [ set previously-infected? true set newly-infected? false ] ; If the cell was infected before, make sure that is tracked and that the tree is not labeled as newly-inf

; (1) ROOT INFECTION if not inf-root? [ ; IF not already infected by roots if ( random-float 1 < prob-inf-root ) [ ; infection occurs probabilistically based on prob-inf-root set inf-root? true set became-infected? true ; set infected true for that mechanism ] ] ; (2) VECTOR INFECTION ; (a) Stremnius carinatus (SC) if not inf-SC? [ ; IF not already infected by SC, check whether infection happened if ( random-float 1 < prob-inf-SC ) [ ; infection occurs probabilistically based on prob-inf-SC

171

set inf-SC? true set became-infected? true ; set infected true for that mechanism ] ] ; (b) Pissodes fasciatus (PF) if not inf-PF? [ ; IF not already infected by PF, check whether infection happened if ( random-float 1 < prob-inf-PF ) [ ; infection occurs probabilistically based on prob-inf-PF set inf-PF? true set became-infected? true ; set infected true for that mechanism ] ] ; (c) Hylastes nigrinus (HN) if not inf-HN? [ ; IF not already infected by HN, check whether infection happened if ( random-float 1 < prob-inf-HN ) [ ; infection occurs probabilistically based on prob-inf-HN set inf-HN? true set became-infected? true ; set infected true for that mechanism ] ] ; IF the tree was NOT INFECTED and BECAME INFECTED, if ( not previously-infected? ) and became-infected? [ set infected? true ; set as infected set newly-infected? true ; designate as newly infected ; ifelse alive? [ set prob-vector-wound ( one-of prob-vector-wound_live-inf_list ) ] ; update prob-vector-wound to refect current cell state if alive... [ set prob-vector-wound ( one-of prob-vector-wound_dead-inf_list ) ] ; or dead set bsrd-inf_cumul ( bsrd-inf_cumul + 1 ) ; add to total infection count if mgmt = "intensive" [ set bsrd-inf_INT_cumul ( bsrd-inf_INT_cumul + 1 ) ] ; add to total infection count for intensive if mgmt = "extensive" [ set bsrd-inf_EXT_cumul ( bsrd-inf_EXT_cumul + 1 ) ] ; and extensive stands set age-bsrd-mort-suscept ( one-of ( item ( age - 1 ) age-bsrd-mort-suscept_year-of- infection_list ) ) ; change bsrd mortality susceptibility to reflect newly infected status ]

172

] ] [ print "Error in time-passes -> Step 7.B: Infect trees" print error-message set kill-run? true stop ]

if alive? [ ; (7) LIVE, INFECTED TREES DIE (including NEWLY-INFECTED, which can occasionally die in the year of infection, especially when seedlings) if infected? [ carefully [ if ( ( random-float 1 ) < age-bsrd-mort-suscept ) [ set alive? false set mort-cause "bsrd" ; Kill the tree if YES and set BSRD as cause of death set new-bsrd-mortality? true set prob-vector-wound ( one-of prob-vector-wound_dead-inf_list ) ; Change prob wound to that of a dead tree set bsrd-mort_cumul ( bsrd-mort_cumul + 1 ) ; Increase the cumulative count of mortalities caused by bsrd overall... if mgmt = "intensive" [ set bsrd-mort_INT_cumul ( bsrd-mort_INT_cumul + 1 ) ] ; and for each management practice if mgmt = "extensive" [ set bsrd-mort_EXT_cumul ( bsrd-mort_EXT_cumul + 1 ) ] ] ][ print "ERROR time-passes -> Step 8: Live, infected trees die" print error-message set kill-run? true stop ]

; (8) NEWLY-INFECTED DEAD TREES LOSE INFECTION (PREVIOUSLY INFECTED TREES ALREADY ACCOUNTED FOR IN STEPS 3 & 4) carefully [ if newly-infected? [ ; IF the dead tree cannot maintain viable pathogen inoculum (based on time-since- mortality), it loses infection if ( ( time-since-mort >= dead-host-viability-duration_min AND ( random 2 = 0 ) ) OR ( time-since-mort >= dead-host-viability-duration_max ) ) [ set newly-infected? false set infected? false set inf-initial? false set inf-root? false set inf-SC? false set inf-PF? false set inf-HN? false

173

;set losing-infection? false ; no longer newly infected to avoid spreading then removing prob inf ] ] ] [ print "ERROR time-passes -> Step 9: Newly-infected dead trees lose infection" print error-message ] ] ; (9) AGING: LIVE TREES get older and have their bsrd susceptibilities change based on their age carefully [ set age ( age + 1 ) ; Live trees set age to age + 1 if age-inf-suscept != "age-indep" [ set age-bsrd-inf-suscept ( one-of ( item ( age - 1 ) age-bsrd-inf-suscept_list ) ) ; Draw a new age/inf-suscept from the list ] if infected? [ ; If the tree is infected, set a susceptibility to mortality value based on age and time-since-infection ifelse time-since-inf = 0 [ set age-bsrd-mort-suscept ( one-of ( item ( age - 1 ) age-bsrd- mort-suscept_year-of-infection_list ) ) ] [ set age-bsrd-mort-suscept ( one-of ( item ( age - 1 ) age-bsrd-mort-suscept_years- after-infection_list ) ) ] ] ] [ print "ERROR time-passes -> Step 10: aging" print error-message ] ] ; (10) Root neighbor ages increase to account for ages of infected neighbors carefully [ if any-inf-root-nbors? [ ; If the tree has infected root neighbors, update ages (if any) in each list for the next tick if ( length inf-root-nbors_ages_r1 ) > 0 [ set inf-root-nbors_ages_r1 ( map [ i -> i + 1 ] inf-root-nbors_ages_r1 ) ] ; increment all ages by 1 if ( length inf-root-nbors_ages_r2 ) > 0 [ set inf-root-nbors_ages_r2 ( map [ i -> i + 1 ] inf-root-nbors_ages_r2 ) ] if ( length inf-root-nbors_ages_r3 ) > 0 [ set inf-root-nbors_ages_r3 ( map [ i -> i + 1 ] inf-root-nbors_ages_r3 ) ] if ( length inf-root-nbors_ages_r4 ) > 0 [ set inf-root-nbors_ages_r4 ( map [ i -> i + 1 ] inf-root-nbors_ages_r4 ) ] ] ] [ print "ERROR time-passes -> Step 11: Root neighbor ages increase" print error- message ] ]

174

]

; (11) MANAGED LOSE ATTRACTION ; REMOVE ATTR-MGMT for cells after appropriate amount of time (2-4 years influencing infection) carefully [ remove-attr-mgmt_by-stand ] [ print "ERROR: time-passes -> Step 1: remove-attr-mgmt_by-stand" print error-message set kill-run? true stop ] end

;______;______;______; MANAGEMENT ;______to manage-stands ; Perform the three management activities (thinning, harvest, and regeneration) on appropriate stands (based on their age and management history)

; Reset trackers for harvest and thinning set thinning-occurred? false ; bool to track whether a thinning occurred set harvest-occurred? false ; bool to track whether a harvest occurred

; THIN STANDS if ( length extensive-stand-list > 0 ) and thinning? [ ; If any stands with extensive management set trees-to-thin ( trees_current with [ mgmt = "extensive" AND ( age = 15 or age = 35 or age = 55 ) AND alive? ] ) ; Find the trees to thin if any? trees-to-thin [ thin-stands ] ; Thin them ] ; HARVEST STANDS if harvest? [ set trees-to-harvest ( trees_current with [ ( ( mgmt = "intensive" AND age = rotation:intensive ) OR ( mgmt = "extensive" AND age = rotation:extensive ) ) AND alive? ] ) ; If any trees to harvest if any? trees-to-harvest [ harvest-stands ] ; Harvest them

175

]

; REGENERATE STANDS if ( length regen-list-intensive > 0 ) or ( length regen-list-extensive > 0 ) [ ; IF any stands that have been harvested regenerate-stands ; replant them ] end

; THIN EXTENSIVELY MANAGED STANDS (with % removed based on age) to thin-stands ; Create temp lists for stands let thinned-stands_pct_list [] let thinned-stands_ct1_list [] let thinned-stands_ct2_list []

; If there are extensively managed stands ; Perform PCT thinning on 15-year-old trees in EXTENSIVE mgmt stands let trees-to-thin_pct ( trees-to-thin with [ age = 15 ] ) ; subset trees to thin if any? trees-to-thin_pct [ ; if there are any of pct age ask trees-to-thin_pct [ if ( random-float 1 < 0.311294766 ) [ set alive? false set mort-cause "thin" ; have a proportion of them cut ifelse infected? [ set prob-vector-wound ( one-of prob-vector-wound_dead-inf_list ) ] ; Set prob-wound [ set prob-vector-wound ( one-of prob-vector-wound_dead-nonInf_list ) ] ] ] set thinned-stands_pct_list ( remove-duplicates ( [ stand-id ] of trees-to-thin_pct ) ) ; make a list of stands thinned w/pct set thinning-occurred? true ; mark that a thinning occurred this year ]

; Perform CT1 thinning on 35-year-old trees in EXTENSIVE mgmt stands let trees-to-thin_ct1 ( trees-to-thin with [ age = 35 ] ) ; subset trees to thin

176

if any? trees-to-thin_ct1 [ ; if there are any of ct1 age ask trees-to-thin_ct1 [ if ( random-float 1 < 0.466666667 ) [ set alive? false set mort-cause "thin" ; have a proportion of them cut ifelse infected? [ set prob-vector-wound ( one-of prob-vector-wound_dead-inf_list ) ] ; Set prob-wound [ set prob-vector-wound ( one-of prob-vector-wound_dead-nonInf_list ) ] ] ] set thinned-stands_ct1_list ( remove-duplicates ( [ stand-id ] of trees-to-thin_ct1 ) ) ; make a list of stands thinned w/ct1 set thinning-occurred? true ; mark that a thinning occurred this year ]

; Perform CT2 thinning on 55-year-old trees in EXTENSIVE mgmt stands let trees-to-thin_ct2 ( trees-to-thin with [ age = 55 ] ) ; subset trees to thin if any? trees-to-thin_ct2 [ ; if there are any of ct2 age ask trees-to-thin_ct2 [ if ( random-float 1 < 0.375 ) [ set alive? false set mort-cause "thin" ; have a proportion of them cut ifelse infected? [ set prob-vector-wound ( one-of prob-vector-wound_dead-inf_list ) ] ; Set prob-wound [ set prob-vector-wound ( one-of prob-vector-wound_dead-nonInf_list ) ] ] ] set thinned-stands_ct2_list ( remove-duplicates ( [ stand-id ] of trees-to-thin_ct2 ) ) ; make a list of stands thinned w/ct2 set thinning-occurred? true ; mark that a thinning occurred this year ]

; Set list of stands thinned 1 yr ago to the stands thinned in the current year set thin-0yr-ago remove-duplicates ( sentence thinned-stands_pct_list thinned- stands_ct1_list thinned-stands_ct2_list )

; Create attraction if spread-infection is active if spread-setup? and max-attraction-distance_m > 0 [ add-attr-mgmt_thin thinned- stands_pct_list thinned-stands_ct1_list thinned-stands_ct2_list ]

177

; Clear agentset of trees to be thinned set trees-to-thin empty-agentset print ( word "stands thinned: " thin-0yr-ago ) end to harvest-stands ; Harvest the trees at rotation age ask trees-to-harvest [ set alive? false set mort-cause "harvest" ; Kill trees, set mort cause set time-since-mort 0 ; Reset time-since- mort (just in case) ifelse infected? [ set prob-vector-wound ( one-of prob-vector-wound_dead-inf_list ) ] ; Set prob-wound [ set prob-vector-wound ( one-of prob-vector-wound_dead-nonInf_list ) ] ] ; create a list from that agentset of stands to regenerate for each management class let regen-list-intensive_to-add ( remove-duplicates ( [ stand-id ] of trees-to-harvest with [ mgmt = "intensive" ] ) ) ; Get a list of stand-ids of trees to harvest set regen-list-intensive ( sentence regen-list-intensive regen-list-intensive_to-add ) ; Add to regen list so these stands can be regenerated let regen-list-extensive_to-add ( remove-duplicates ( [ stand-id ] of trees-to-harvest with [ mgmt = "extensive" ] ) ) ; Get a list of stand-ids of trees to harvest set regen-list-extensive ( sentence regen-list-extensive regen-list-extensive_to-add ) ; Add to regen list so these stands can be regenerated set harv-0yr-ago ( sentence regen-list-intensive_to-add regen-list-extensive_to-add ) ; Recently harvested added to the list print ( word "stands harvested: " harv-0yr-ago ) ; ADD ATTRACTION TO HARVESTED STANDS if ( spread-setup? and max-attraction-distance_m > 0 ) [ add-attr-mgmt_harvest regen-list- intensive_to-add regen-list-extensive_to-add ]

set harvest-occurred? true ; mark that a harvest occurred this year ; clear agentset of trees to harvest set trees-to-harvest empty-agentset end

to regenerate-stands ; REGENERATE STANDS AFTER HARVEST

178

; Check the conditions used to regen stands and whether or not foreach regen-list-intensive [ this-stand -> ; FOR EACH stand on the regen list if ( any? ( ( stand this-stand ) with [ tree? and ( mort-cause = "harvest" AND time-since- mort >= replant-delay ) ] ) ) [ ; IF there are any ready to replant (based on cause of morality and replant delay)

ifelse not any? ( ( stand this-stand ) with [ tree? AND pxcor mod 3 = 0 AND pycor mod 3 = 0 ] ) [ ; THEN, IF there are no trees on patches with coord divisible by 3 ask ( stand-patches this-stand ) with [ ( pxcor ) mod 3 = 0 AND ( pycor ) mod 3 = 0 ] [ create-tree 1 ] ; regenerate trees on those patches ] ; ELSE IF those patches have (dead) trees [ ask ( stand-patches this-stand ) with [ ( pxcor + 2 ) mod 3 = 0 AND ( pycor + 2 ) mod 3 = 0 ] [ create-tree 1 ] ] ; offset the regeneration set regen-list-intensive ( remove this-stand regen-list-intensive ) ; Remove the stand from the regen list ask ( stand this-stand ) [ set time-since-mort 0 ] ; Reset time-since-mort print ( word "stand " this-stand " regenerated." ) ] ] foreach regen-list-extensive [ this-stand -> ; FOR EACH stand on the regen list if ( any? ( ( stand this-stand) with [ tree? and mort-cause = "harvest" AND time-since- mort >= replant-delay ] ) ) [ ; IF there are any ready to replant (based on cause of morality and replant delay) ifelse not any? ( ( stand this-stand ) with [ tree? AND pxcor mod 2 = 0 AND pycor mod 2 = 0 ] ) [ ; THEN, IF there are no trees on patches with coord divisible by 2 ask ( stand-patches this-stand ) with [ ( pxcor ) mod 2 = 0 AND ( pycor ) mod 2 = 0 ] [ create-tree 1 ] ; regenerate trees on those patches ] ; ELSE IF those patches have (dead) trees [ ask ( stand-patches this-stand ) with [ ( pxcor + 1 ) mod 2 = 0 AND ( pycor + 1 ) mod 2 = 0 ] [ create-tree 1 ] ] ; offset the regeneration set regen-list-extensive ( remove this-stand regen-list-extensive ) ; Remove the stand from the regen list ask ( stand this-stand ) [ set time-since-mort 0 ] ; Reset time-since-mort print ( word "stand " this-stand " regenerated." )

179

] ] ; GLOBAL AGENTSETS carefully [ set trees_current ( trees ) ; set an agentset for all current trees ] [ print "ERROR regenerate-stands -> setting trees_current" print error-message ] end

;______; COLOR PROCEDURES - used to color landscape in a way that visually represents stand and cell characteristics ;______

; Define colors for easy visual understanding of the model to setup-colors set color_patches 9.2 ; background patch color set color_empty 9.7 ; empty (non-tree) cells set color_tree-live-notinf 66.0 ; non-infected trees set color_tree-live-inf 15.5 ; infected trees set color_tree-dead-notinf 36.0 ; dead, non-infected trees set color_tree-dead-inf 18.5 ; dead, infected trees set color_road 6.0 ; cells that are roads end

; Colors all cells based on their states (e.g., tree vs. empty, alive vs. dead, ; infected vs. not-infected) to color-world ask patches [ set pcolor color_patches ] ask cells [ if ( not tree? ) [ set color color_empty ] if ( alive? AND tree? AND not infected? ) [ set color color_tree-live-notinf ] if ( alive? AND infected? AND tree? ) [ set color color_tree-live-inf ] if ( tree? AND not alive? AND not infected? ) [ set color color_tree-dead-notinf ] if ( infected? AND tree? AND not alive? ) [ set color color_tree-dead-inf ] if ( road? ) [ set color color_road ] ] end

180 to color-cells ; Colors cells to "color-world" colors without changing patch colors ask cells [ if ( not tree? ) [ set color color_empty ] if ( alive? AND tree? AND not infected? ) [ set color color_tree-live-notinf ] if ( alive? AND infected? AND tree? ) [ set color color_tree-live-inf ] if ( tree? AND not alive? AND not infected? ) [ set color color_tree-dead-notinf ] if ( infected? AND tree? AND not alive? ) [ set color color_tree-dead-inf ] if ( road? ) [ set color color_road ] ] end

; COLOR STANDS BY AGE to color-by-age ; The darker the shade of red, the older the stand color-world let min-age min [ age ] of cells let max-age max [ age ] of cells ifelse max-age != min-age [ ask cells with [ tree? and alive? ] [ set color scale-color red age ( max-age * 1.1 ) ( min-age * 0.9 ) ] ] [ ask cells with [ tree? and alive? ] [ set color red + 2 ] ] ; if any? cells with [ edge? ] [ ask edges [ set color [ color ] of self + 1.25 ] ] ; REMOVE? end

; COLOR STANDS BY STAND ID # ; Stand colors are set sequentially based on stand ID #, from darkest to lightest shade of blue to color-by-stand-id ; UPDATED - incorporate ask patches [ if config = "random" OR config = "clustered" [ set pcolor scale-color blue p_stand-id ( ( n- stands ) + 1 ) 1 ] if config = "blocks" [ set pcolor scale-color blue p_stand-id ( ( n-blocks ) + 1 ) 1 ] ] ask cells [ set color ( ( [ pcolor ] of patch-here ) + 1 ) ] ;if any? cells with [ edge? ] [ ask edge-cells [ set color [ color ] of self + 1.25 ] ] ; remove? end

; Set colors to unique management classes to color-by-mgmt ask patches [ if p_mgmt = 1 [ set pcolor green ]

181

if p_mgmt = 2 [ set pcolor blue ] if p_mgmt = 3 [ set pcolor brown ] ] ask cells [ set color ( ( [ pcolor ] of patch-here ) + 1 ) ] end

; Set colors to unique combinations of management and stand-id to color-by-mgmt-&-stand-id ; INTENSIVE ask patches with [ p_mgmt = 1 ] [ if config = "random" OR config = "clustered" [ set pcolor scale-color green p_stand-id ( max intensive-stand-list + 50 ) ( min intensive- stand-list - 50) ] if config = "blocks" [ set pcolor scale-color green p_stand-id ( max intensive-stand-list + 50 ) ( min intensive-stand-list - 50 ) ] ] ; EXTENSIVE ask patches with [ p_mgmt = 2 ] [ if config = "random" OR config = "clustered" [ set pcolor scale-color blue p_stand-id ( max extensive-stand-list + 50 ) ( min extensive- stand-list - 50) ] if config = "blocks" [ set pcolor scale-color blue p_stand-id ( max extensive-stand-list + 50 ) ( min extensive-stand-list - 50 ) ] ] end

; Color based on inf suscept to color-by-inf-susc ask cells with [ not tree? ] [ set color color_empty ] if any? trees_current [ ask trees_current [ set color scale-color red age-bsrd-inf-suscept 1 0 ] ]

182 end to color-by-root if any? trees_current [ let max-value ( max [ prob-inf-root ] of trees_current ) ask trees_current [ ;set color scale-color red prob-inf-root 1 0 ifelse prob-inf-root = 0 [ set color color_patches ] [ set color scale-color red prob-inf-root max-value 0.0000000000001 ] ] ] end to color-by-SC if any? trees_current [ let max-value ( max [ prob-inf-SC ] of trees_current ) ask trees_current [ ;set color scale-color red prob-inf-SC 1 0 set color scale-color red prob-inf-SC max-value -0.001 ] ] end to color-by-PF if any? trees_current [ let max-value ( max [ prob-inf-PF ] of trees_current ) ask trees_current [ ;set color scale-color red prob-inf-PF 1 0 set color scale-color red prob-inf-PF max-value -0.001 ] ] end to color-by-HN if any? trees_current [ let max-value ( max [ prob-inf-HN ] of trees_current ) ask trees_current [ ;set color scale-color red prob-inf-HN 1 0 set color scale-color red prob-inf-HN max-value -0.001

183

] ] end

;______;______;______;______Beginning of code for included file: "supporting_files/current/basic_functions_1.9.3.0.nls"

; Developed by: Adam J Bouché for a Master of Science Thesis in Forest Ecosystems and Society at Oregon State University ; 2017 - 2020 globals [ settings_names ; the names of the run settings to be printed as export files headers settings_values ; the values of the run settings to be printed in export files ]

; BASIC FUNCTIONS ;______; Creates a shortened time stamp from the current date and time to label output files to create-datetimestamp ; MAKE A DATE STAMP IN THE FORMAT "YYYYMMDD" let current-year ( substring date-and-time 23 27 ) let current-month ( month-code ( substring date-and-time 19 22 ) ) let current-day ( substring date-and-time 16 18 ) let current-date ( word current-year current-month current-day ) ; MAKE A TIME STAMP IN THE FORMAT "HHMMXM" (Where "X" is either "A" or "P") let current-time substring date-and-time 0 15 ( foreach [ 2 4 4 4 4 4 4 4 4 ] [ [ y ] -> set current-time remove-item y current-time ] ) ; COMBINE DATE AND TIME TO MAKE A TIME STAMP set current-date-and-time ( word current-date "_" current-time ) end to-report month-code [ string-input ] ; REPORT A 2-DIGIT CODE FOR THE MONTH BASED ON THE ALPHABETICAL CODE if string-input = "Jan" [ report "01" ]

184

if string-input = "Feb" [ report "02" ] if string-input = "Mar" [ report "03" ] if string-input = "Apr" [ report "04" ] if string-input = "May" [ report "05" ] if string-input = "Jun" [ report "06" ] if string-input = "Jul" [ report "07" ] if string-input = "Aug" [ report "08" ] if string-input = "Sep" [ report "09" ] if string-input = "Oct" [ report "10" ] if string-input = "Nov" [ report "11" ] if string-input = "Dec" [ report "12" ] end

; SUBTRACT AGENTSET FROM AGENTSET ; What it does: subtracts the agentset2 input from the agentset1 input, with the resulting agentset stored as agentset1. ; How it works: creates a subset of the agents in agentset1, including agents that are not members of agentset2 ; How to use it: set the agentset you want to produce (the difference of the two inputs) to the reporter ; E.g., I want to subtract agentset2 from agentset1 and set this difference to be agentset3. Thus, I would write: ; set agentset3 ( subtract-agentset agentset2 agentset1 ) to-report subtract-agentset [ agentset2 agentset1 ] report ( agentset1 with [ not member? self agentset2 ] ) end

;______; TIME TESTS ;______to compare-time [ reps procedure1 procedure2 ] ; reps - the number of times to run each procedure ; procedure1 - 1st procedure to be timed (place procedure name in quotations) ; procedure2 - 2nd procedure to be timed (place procedure name in quotations) ; e.g. compare-time 5 "setup-random-stands" "setup-block-stands" reset-timer repeat reps [ run procedure1 ] ; procedure1 is the first input let name1 ( word procedure1 ) ; Insert the name of procedure 1 let result1 timer ;; the total time (sec) it took to run procedure 1 ("reps" times)

185

reset-timer repeat reps [ run procedure2 ] ; Replace "procedure2" with the name let name2 ( word procedure2 ) ; Insert the name of procedure 2 let result2 timer ;; the total time (sec) it took to run procedure 2 ("reps" times) ifelse result1 < result2 [ print ( word name1 " wins! It is " ( precision ( result2 / result1 ) 2 ) " times faster than " name2 "." ) ] [ print ( word name2 " wins! It is " ( precision ( result1 / result2) 2 ) " times faster than " name1 "." ) ] end to test-time [ reps procedure ] ; reps - the number of times to run each procedure ; procedure - procedure to be timed (place procedure name in quotations) ; e.g. test-time 5 "setup-random-stands" reset-timer repeat reps [ run procedure ] ; procedure1 is the first input let name ( word procedure ) ; Insert the name of the procedure let result timer ;; the total time (sec) it took to run the procedure ("reps" times) print ( word name " total-time: " ( precision result 5 ) " s" ) print ( word name " per-call time: " ( precision ( result / reps ) 5 ) " s (avg)" ) end

;______;______; EXPORT DATA ;______to store-settings set settings_names ( word "run.id.no," "run.id," "config," "set.world.size," "world.size," "n.stands," "stand.size_mean_acres," "pct.intensive," "pct.extensive," "pct.set.aside," "rotation:extensive," "rotation:intensive," "replant.delay," "thinning.active," "harvest.active," ; SET ASIDE NOT USED IN THIS MODEL VERSION "spread.setup," "spread.infection.version," "initial.infection," "pct.initial.infection," "reinitiate.infection," "max.attraction.distance_m," "max.root.distance_m," "max.vector.distance_SC_m," "max.vector.distance_PF_m," "max.vector.distance_HN_m,"

186

"background.prob.vector.dispersal," "vector.disp_background_spillover.threshold," "prob.vector.disp_background," "age.inf.suscept," "dead.attr.duration_min," "dead.attr.duration_max," "dead.host.viability.duration_min," "dead.host.viability.duration_max," "sens.analys.param," "sens.analys.mult," "prc.conservative," "prt.excludeData," "prt.discount.by.contact.type," "new.attr," "attr.inf," "attr.dead," "attr.mgmt_conservative," "attr.inf.dead_version," "inf.center.attr.threshold," "inf.center.attr.threshold_pct" )

set settings_values ( word run-id-no "," run-id "," config "," set-world-size? "," world-size "," n-stands "," stand- size_mean_acres "," pct-intensive "," pct-extensive "," pct-set-aside "," rotation:extensive "," rotation:intensive "," replant-delay "," thinning? "," harvest? "," ; SET ASIDE NOT USED IN THIS MODEL VERSION spread-setup? "," spread-infection-version? "," initial-infection "," pct-initial-infection "," reinitiate-infection? "," max-attraction-distance_m "," max-root-distance_m "," max-vector-distance_SC_m "," max-vector-distance_PF_m "," max-vector-distance_HN_m "," background-prob-vector-dispersal? "," vector-disp_background_stand-pct-inf-spillover- threshold "," prob-vector-disp_background "," age-inf-suscept "," dead-attr-duration_min "," dead-attr-duration_max "," dead-host- viability-duration_min "," dead-host-viability-duration_max "," sensitivity-analysis-param "," sensitivity-analysis-multiplier "," prc_conservative? "," prt- exclude-data? "," prt-discount-by-contact-type? "," new-attr? "," attr-inf? "," attr-dead? "," attr-mgmt_conservative? "," attr-inf-dead_version "," inf-center-attr-threshold "," inf-center-attr-threshold_pct ) end to write-settings-file ; write all settings store-settings let settings-file ( word "output/" run-id "_settings.csv" ) file-open settings-file file-print settings_names file-print settings_values file-close

187 end to initialize-progress-file store-settings set progress-file ( word "output/" run-id "_prog.csv" ) if file-exists? progress-file [ set progress-file ( word "output/" run-id "_" random 10000 "_prog.csv" ) print "alternative progress file used to avoid overwrite:" print progress-file ] file-open progress-file file-type ( word "run.id," "ticks," "thinning.yr," "harvest.yr,")

if pct-intensive > 0 [ file-type (word "trees_INT," "trees_live_INT," "trees_live.inf_INT," "trees_dead.inf_INT," "trees_inf_INT," "trees_inf.root_INT," "trees_inf.SC_INT," "trees_inf.PF_INT," "trees_inf.HN_INT," "trees_dead_INT," "trees_dead.bsrd_INT," "trees_dead.harv_INT," ) ]

if pct-extensive > 0 [ file-type (word "trees_EXT," "trees_live_EXT," "trees_live.inf_EXT," "trees_dead.inf_EXT," "trees_inf_EXT," "trees_inf.root_EXT," "trees_inf.SC_EXT," "trees_inf.PF_EXT," "trees_inf.HN_EXT," "trees_dead_EXT," "trees_dead.bsrd_EXT," "trees_dead.thin_EXT," "trees_dead.harv_EXT," ) ]

file-type ( word "trees," "trees_live," "trees_live.inf," "trees_dead.inf," "trees_inf," "trees_inf.initial," "trees_inf.root," "trees_inf.SC," "trees_inf.PF," "trees_inf.HN," "trees_inf_new," "trees_inf.initial_new," "trees_inf.root_new," "trees_inf.SC_new," "trees_inf.PF_new," "trees_inf.HN_new," "trees_dead," "trees_dead.bsrd_new," "trees_dead.bsrd," "trees_dead.thin_new," "trees_dead.harv," "trees_dead.harv_new," ) file-print ( word

188

"bsrd.inf_cumul," "bsrd.mort_cumul," "bsrd.inf_INT_cumul," "bsrd.mort_INT_cumul," "bsrd.inf_EXT_cumul," "bsrd.mort_EXT_cumul," "trees_cumul," "trees_INT_cumul," "trees_EXT_cumul" )

file-close end

; WRITE THE PROGRESS FILE DATA - writes with every run where "track-run?" is activated to write-to-progress-file store-settings file-open progress-file file-type ( word run-id "," ticks "," thinning-occurred? "," harvest-occurred? ) if pct-intensive > 0 [ file-type ( word "," ( count trees_current with [ mgmt = "intensive" ] ) "," ( count live-trees with [ mgmt = "intensive" ] ) "," ( count live-infected-trees with [ mgmt = "intensive" ] ) "," ( count dead-infected-trees with [ mgmt = "intensive" ] ) "," ( count infected-trees with [ mgmt = "intensive" ] ) "," ( count root-infected-trees with [ mgmt = "intensive" ] ) "," ( count SC-infected-trees with [ mgmt = "intensive" ] ) "," ( count PF-infected-trees with [ mgmt = "intensive" ] ) "," ( count HN-infected-trees with [ mgmt = "intensive" ] ) "," ( count dead-trees with [ mgmt = "intensive" ] ) "," ( count bsrd-killed-trees with [ mgmt = "intensive" ] ) "," ( count harvested-trees with [ mgmt = "intensive" ] ) ) ] if pct-extensive > 0 [ file-type ( word "," ( count trees_current with [ mgmt = "extensive" ] ) "," ( count live-trees with [ mgmt = "extensive" ] ) "," ( count live-infected-trees with [ mgmt = "extensive" ] ) "," ( count dead-infected-trees with [ mgmt = "extensive" ] ) "," ( count infected-trees with [ mgmt = "extensive" ] ) "," ( count root-infected-trees with [ mgmt = "extensive" ] )

189

"," ( count SC-infected-trees with [ mgmt = "extensive" ] ) "," ( count PF-infected-trees with [ mgmt = "extensive" ] ) "," ( count HN-infected-trees with [ mgmt = "extensive" ] ) "," ( count dead-trees with [ mgmt = "extensive" ] ) "," ( count bsrd-killed-trees with [ mgmt = "extensive" ] ) "," ( count thinned-trees with [ mgmt = "extensive" ] ) "," ( count harvested-trees with [ mgmt = "extensive" ] ) ) ]

file-print ( word "," (count trees) "," (count live-trees) "," (count live-infected-trees) "," (count dead-infected-trees) "," (count infected-trees) "," (count trees_current with [ inf-initial? ] ) ; initial inf seeded into landscape ; ***** "," (count root-infected-trees) "," (count SC-infected-trees) "," (count PF-infected-trees) "," (count HN-infected-trees) "," (count trees_current with [ newly-infected? ] ) ; bsrd- infected (this year) ; ***** "," (count trees_current with [ newly-infected? AND inf-initial? ] ) ; bsrd-infected (this year) ; ***** "," (count trees_current with [ newly-infected? AND inf-root? ] ) ; bsrd-infected (this year) ; ***** "," (count trees_current with [ newly-infected? AND inf-SC? ] ) ; bsrd-infected (this year) ; ***** "," (count trees_current with [ newly-infected? AND inf-PF? ] ) ; bsrd-infected (this year) ; ***** "," (count trees_current with [ newly-infected? AND inf-HN? ] ) ; bsrd-infected (this year) ; ***** "," (count dead-trees) "," (count trees_current with [ new-bsrd-mortality? ] ) ; bsrd- killed (this year) ; ***** "," (count bsrd-killed-trees) "," (count trees_current with [ not alive? and mort-cause = "thin" AND time-since-mort = 1 ] ) ; trees killed by thinning (this year) ; *****

190

"," (count harvested-trees) "," (count trees_current with [ not alive? and mort-cause = "harvest" and time-since-mort = 1 ] ) ; trees killed by harvest this year ; ***** "," bsrd-inf_cumul "," bsrd-mort_cumul "," bsrd-inf_INT_cumul "," bsrd-mort_INT_cumul "," bsrd-inf_EXT_cumul "," bsrd-mort_EXT_cumul "," trees_cumul "," trees_INT_cumul "," trees_EXT_cumul ) file-close end

to initialize-stand-data-file store-settings set stand-data-file ( word "output/" run-id "_standData.csv" ) if file-exists? stand-data-file [ set stand-data-file ( word "output/" run-id "_" random 10000 "_standData.csv" ) ] file-open stand-data-file file-print ( word "run.id,ticks," "mgmt," "stand.id," "age," "trees," "trees_live," "trees_live.inf," "trees_dead.inf," "trees_inf," "trees_inf.initial," "trees_inf.root," "trees_inf.SC," "trees_inf.PF," "trees_inf.HN," "trees_inf_new," "trees_inf.initial_new," "trees_inf.root_new," "trees_inf.SC_new," "trees_inf.PF_new," "trees_inf.HN_new," "trees_dead," "trees_dead.bsrd," "trees_dead.bsrd_new," "trees_dead.thin," "trees_dead.thin_new," "trees_dead.harv," "trees_dead.harv_new" ) file-close end to export-stand-data ifelse file-exists? stand-data-file [ ; check if the data file exists file-open stand-data-file ; Open the file to write to it ] [ initialize-stand-data-file file-open stand-data-file ] ; or create and open the file

191

let stand-age 0 foreach intensive-stand-list [ this-stand-id -> let stand-trees ( trees_current with [ stand-id = this-stand-id ] ) ifelse any? stand-trees with [ alive? ] [ set stand-age ( [ age ] of one-of stand-trees with [ alive? ] ) ] [ set stand-age ( max [ age ] of stand-trees with [ not alive? ] ) ]

file-print ( word run-id "," ticks "," "intensive" ; mgmt "," this-stand-id ; stand ID # "," stand-age ; stand age "," ( count stand-trees ) ; n trees "," ( count stand-trees with [ alive? ] ) ; live trees "," ( count stand-trees with [ alive? and infected? ] ) ; live, inf trees "," ( count stand-trees with [ not alive? and infected? ] ) ; dead, inf "," ( count stand-trees with [ infected? ] ) ; inf "," ( count stand-trees with [ inf-initial? ] ) ; initial inf seeded into landscape ; ***** "," ( count stand-trees with [ inf-root? ] ) ; root inf "," ( count stand-trees with [ inf-SC? ] ) ; SC infected "," ( count stand-trees with [ inf-PF? ] ) ; PF infected "," ( count stand-trees with [ inf-HN? ] ) ; HN infected "," ( count stand-trees with [ newly-infected? ] ) ; bsrd- infected (this year) ; ***** "," ( count stand-trees with [ newly-infected? AND inf-initial? ] ) ; bsrd-infected (this year) ; ***** "," ( count stand-trees with [ newly-infected? AND inf-root? ] ) ; bsrd-infected (this year) ; ***** "," ( count stand-trees with [ newly-infected? AND inf-SC? ] ) ; bsrd-infected (this year) ; ***** "," ( count stand-trees with [ newly-infected? AND inf-PF? ] ) ; bsrd-infected (this year) ; ***** "," ( count stand-trees with [ newly-infected? AND inf-HN? ] ) ; bsrd-infected (this year) ; ***** "," ( count stand-trees with [ not alive? ] ) ; dead

192

"," ( count stand-trees with [ not alive? and mort-cause = "bsrd" ] ) ; bsrd-killed "," ( count stand-trees with [ new-bsrd-mortality? ] ) ; bsrd- killed (this year) ; ***** "," 0 ; stand-in for thinned trees "," 0 ; stand-in for thinned trees (this year) ; ***** "," (count stand-trees with [ not alive? and mort-cause = "harvest" ] ) ; trees killed by harvest "," (count stand-trees with [ not alive? and mort-cause = "harvest" and time-since-mort = 1 ] ) ; trees killed by harvest this year ; ***** ) ] foreach extensive-stand-list [ this-stand-id -> let stand-trees ( trees_current with [ stand-id = this-stand-id ] ) if any? stand-trees [ ifelse any? stand-trees with [ alive? ] [ set stand-age ( [ age ] of one-of stand-trees with [ alive? ] ) ] [ set stand-age ( max [ age ] of stand-trees with [ not alive? ] ) ] file-print ( word run-id "," ticks "," "extensive" ; mgmt "," this-stand-id ; stand ID # "," stand-age ; stand age "," ( count stand-trees ) ; n trees "," ( count stand-trees with [ alive? ] ) ; live trees "," ( count stand-trees with [ alive? and infected? ] ) ; live, inf trees "," ( count stand-trees with [ not alive? and infected? ] ) ; dead, inf "," ( count stand-trees with [ infected? ] ) ; inf "," ( count stand-trees with [ inf-initial? ] ) ; initial inf seeded into landscape ; ***** "," ( count stand-trees with [ inf-root? ] ) ; root inf "," ( count stand-trees with [ inf-SC? ] ) ; SC infected "," ( count stand-trees with [ inf-PF? ] ) ; PF infected "," ( count stand-trees with [ inf-HN? ] ) ; HN infected

193

"," ( count stand-trees with [ newly-infected? ] ) ; bsrd- infected (this year) ; ***** "," ( count stand-trees with [ newly-infected? AND inf-initial? ] ) ; bsrd-infected (this year) ; ***** "," ( count stand-trees with [ newly-infected? AND inf-root? ] ) ; bsrd-infected (this year) ; ***** "," ( count stand-trees with [ newly-infected? AND inf-SC? ] ) ; bsrd-infected (this year) ; ***** "," ( count stand-trees with [ newly-infected? AND inf-PF? ] ) ; bsrd-infected (this year) ; ***** "," ( count stand-trees with [ newly-infected? AND inf-HN? ] ) ; bsrd-infected (this year) ; ***** "," (count stand-trees with [ not alive? ] ) ; dead "," (count stand-trees with [ not alive? and mort-cause = "bsrd" ] ) ; bsrd-killed "," ( count stand-trees with [ new-bsrd-mortality? ] ) ; bsrd- killed (this year) ; ***** "," (count stand-trees with [ not alive? and mort-cause = "thin" ] ) ; trees killed by thinning "," (count stand-trees with [ not alive? and mort-cause = "thin" AND time-since-mort = 1 ] ) ; trees killed by thinning (this year) ; ***** "," (count stand-trees with [ not alive? and mort-cause = "harvest" ] ) ; trees killed by harvest "," (count stand-trees with [ not alive? and mort-cause = "harvest" and time-since-mort = 1 ] ) ; trees killed by harvest this year ; ***** ) ] ] file-close-all

if run-file != 0 and run-file != "" [ file-open run-file file-print ( word "export-stand-data completed, ticks:" ticks " @ " date-and-time " - " stand- data-file) file-close-all ] end

; DATA EXPORT

194 to initialize-tree-data-file set tree-data-file ( word model-dir "output/" run-id "_t-" ticks "_treeData.csv" ) file-open tree-data-file file-print ( word "run," "ticks," "stand.id," "mgmt," "age," "tree," "alive," "inf," "prob.root.contact_cumul," "prob.disp_cumul_sc,prob.disp_cumul_pf,prob.disp_cumul_hn," "prob.inf_root," "prob.inf_SC," "prob.inf_PF," "prob.inf_HN," "inf.initial," "inf.root," "inf.sc," "inf.pf," "inf.hn," "mort.cause" ) file-close-all end to export-tree-data initialize-tree-data-file ; write to a new data file every time if is-string? tree-data-file and tree-data-file != "" [ ; check if the data file exists, make sure it's got a determined file path, not 0 or an empty string file-open tree-data-file ; Open the file to write to it ask trees_current [ if infected? or prob-inf-root > 0 or prob-inf-SC > 0 or prob-inf-PF > 0 or prob-inf-HN > 0 [ file-print ( word run-id "," ticks "," stand-id "," mgmt "," age "," tree? "," alive? "," infected? "," prob-root- contact_cumul "," prob-vector-disp_cumul_SC "," prob-vector-disp_cumul_PF "," prob-vector- disp_cumul_HN "," prob-inf-root "," prob-inf-SC "," prob-inf-PF "," prob-inf-HN "," inf-initial? "," inf-root? "," inf-SC? "," inf-PF? "," inf-HN? "," mort-cause ) ] ] file-close ] if run-file != 0 and run-file != "" [ file-open run-file file-print ( word "export-tree-data completed, ticks:" ticks " @ " date-and-time ) file-close ] print ( word "export-tree-data completed, ticks:" ticks " @ " date-and-time " - " tree-data- file) end ;______

195

; RASTER FILES ------to clear-output-properties_patches ; RESETS THE VALUES EXPORTED IN RASTERS, NOT including management, stand-id, etc if visualize? [ set pcolor color_patches ] set p_tree 0 set p_age 0 set p_alive 0 set p_inf 0 set p_inf-root 0 set p_inf-SC 0 set p_inf-PF 0 set p_inf-HN 0 set p_mort-cause 0 set p_p-inf_root 0.0 set p_p-inf_SC 0.0 set p_p-inf_PF 0.0 set p_p-inf_HN 0.0 end

; Syncs cell and patch properties for to sync-stand-properties ask patches [ ; clear patch properties clear-output-properties_patches ifelse any? cells-here [ set p_cell true ] [ set p_cell false ] ; Check whether the patch has a cell (just a fail-safe) ] ask cells [ ; HAVE CELLS TRANSFER RELEVANT PROPERTIES TO PATCHES if tree? [ set p_tree 1 set p_age age if alive? [ set p_alive 1 ] if infected? [ set p_inf 1 ] ] if base = "cell" [ set p_stand-id stand-id set p_age age if ( mgmt = "intensive" ) [ set p_mgmt 1 ] if ( mgmt = "extensive" ) [ set p_mgmt 2 ] if ( mgmt = "set-aside" ) [ set p_mgmt 3 ] ; SET ASIDE NOT USED IN THIS MODEL VERSION

196

] ] end to sync-inf-properties ; Syncs the infection properties of cells and patches (cells set patch values) ask patches [ ; clear patch properties clear-output-properties_patches ifelse any? cells-here [ set p_cell true ] [ set p_cell false ] ; Check whether the patch has a cell (just a fail-safe) ] ask trees_current [ ; HAVE CELLS TRANSFER RELEVANT PROPERTIES TO PATCHES set p_tree 1 set p_age age if alive? [ set p_alive 1 ] if infected? [ set p_inf 1 ] if inf-root? [ set p_inf-root 1 ] if inf-SC? [ set p_inf-SC 1 ] if inf-PF? [ set p_inf-PF 1 ] if inf-HN? [ set p_inf-HN 1 ] if not alive? [ if mort-cause = "thin" [ set p_mort-cause 1 ] if mort-cause = "harvest" [ set p_mort-cause 2 ] if mort-cause = "bsrd" [ set p_mort-cause 3 ] ] if prob-inf-root > 0.0 [ set p_p-inf_root prob-inf-root ] if prob-inf-SC > 0.0 [ set p_p-inf_SC prob-inf-SC ] if prob-inf-PF > 0.0 [ set p_p-inf_PF prob-inf-PF ] if prob-inf-HN > 0.0 [ set p_p-inf_HN prob-inf-HN ]

] end

; EXPORTS RASTERS SHOWING STANDS, INCLUDING THE FOLLOWING PROPERTIES (ONLY USED AT THE BEGINNING) to export-stand-map reset-timer sync-stand-properties ; sync patch and cell properties

197

gis:store-dataset gis:patch-dataset p_mgmt ( word model-dir "output/rasters/" run-id "_mgmt_" ticks ) gis:store-dataset gis:patch-dataset p_stand-id ( word model-dir "output/rasters/" run-id "_sid_" ticks ) gis:store-dataset gis:patch-dataset p_road ( word model-dir "output/rasters/" run-id "_road_" ticks ) gis:store-dataset gis:patch-dataset p_tree ( word model-dir "output/rasters/" run-id "_tree_" ticks ) gis:store-dataset gis:patch-dataset p_age ( word model-dir "output/rasters/" run-id "_age_" ticks ) gis:store-dataset gis:patch-dataset p_alive ( word model-dir "output/rasters/" run-id "_alive_" ticks ) gis:store-dataset gis:patch-dataset p_inf ( word model-dir "output/rasters/" run-id "_inf_" ticks ) if run-file != 0 and run-file != "" [ file-open run-file file-print ( word "Done exporting stand map. Ticks: " ticks ". Duration: " timer "." ) file-close ] print ( word "Done exporting stand map. Ticks: " ticks ". Duration: " timer "." ) end

; EXPORT INFECTION MAP: Exports a raster grid of infections and infection probabilities to export-inf-map sync-inf-properties ; Sync properties between cells and patches gis:store-dataset gis:patch-dataset p_tree ( word model-dir "output/rasters/" run-id "_trees_" ticks ) gis:store-dataset gis:patch-dataset p_alive ( word model-dir "output/rasters/" run-id "_alive_" ticks ) gis:store-dataset gis:patch-dataset p_age ( word model-dir "output/rasters/" run-id "_age_" ticks ) gis:store-dataset gis:patch-dataset p_inf ( word model-dir "output/rasters/" run-id "_inf_" ticks ) gis:store-dataset gis:patch-dataset p_inf-root ( word model-dir "output/rasters/" run-id "_inf-root_" ticks ) gis:store-dataset gis:patch-dataset p_inf-SC ( word model-dir "output/rasters/" run-id "_inf-SC_" ticks ) gis:store-dataset gis:patch-dataset p_inf-PF ( word model-dir "output/rasters/" run-id "_inf-PF_" ticks )

198

gis:store-dataset gis:patch-dataset p_inf-HN ( word model-dir "output/rasters/" run-id "_inf-HN_" ticks ) gis:store-dataset gis:patch-dataset p_p-inf_root ( word model-dir "output/rasters/" run-id "_p-inf-root_" ticks ) gis:store-dataset gis:patch-dataset p_p-inf_SC ( word model-dir "output/rasters/" run-id "_p-inf-SC_" ticks ) gis:store-dataset gis:patch-dataset p_p-inf_PF ( word model-dir "output/rasters/" run-id "_p-inf-PF_" ticks ) gis:store-dataset gis:patch-dataset p_p-inf_HN ( word model-dir "output/rasters/" run- id "_p-inf-HN_" ticks ) gis:store-dataset gis:patch-dataset p_mort-cause ( word model-dir "output/rasters/" run- id "_mort-cause_" ticks ) end

;______;______;______;______Beginning of code for included file: "supporting_files/current/spread- infection_Go_1.9.3.0.nls" ;______;______

; Developed by: Adam J. Bouché for a Master of Science Thesis in Forest Ecosystems and Society at Oregon State University ; 2017 - 2020

; Go program for spreading infection written by collaborator Mario Vega globals [ spread-infection-solution ]

;______; SETUP ;______; Setting up the spread-infection program for NetLogo

; setup a directory to create-spread-infection-directory r:eval "library(jsonlite)" ; Read in library r:eval (word "worldWidth <- " world-width ) ; store world width for Go program

199

if run-id = 0 or run-id = "" [ ; if there's no run id set run-id ( word "r" random 100000 ) ]

; Set directories and paths to find the go program if comp = "cgrb" [ r:eval "programsDir <- \"/raid1/home/pi/bouchea/models/programs\"" ] if comp = "law" [ r:eval "programsDir <- \"/home/bouchea/models/programs\"" ] if comp = "asus-big" [ r:eval "programsDir <- \"D:/AdamB/Documents/Masters/Thesis/Modeling/Models/BSRD_NetLogo/BSRD-full- model/programs\"" ] print ( word "programsDir: " r:get "programsDir")

; Create a new directory ---- create a new directory with the run id r:eval ( word "runProgramDir <- file.path(programsDir, \"" run-id "\")" ) ; new directory to create print ( word "Run program directory: any directory here? " r:get "file.exists(runProgramDir)" ) r:eval "dir.create(runProgramDir)" print ( word "Run program directory: how about now? " r:get "file.exists(runProgramDir)" ) ; Set the new program path and copy the file (different program name for linux vs. windows) ifelse ( comp = "cgrb" OR comp = "law" ) [ r:eval "ogProgramPath <- file.path(programsDir, \"program_og\", \"current\", \"spread-infection\")" ; original program path r:eval ( word "runProgramPath <- file.path(runProgramDir, \"spread-infection\")" ) ; path to the copy of the program ] [ r:eval "ogProgramPath <- file.path(programsDir, \"program_og\", \"current\", \"spread-infection.exe\")" ; original program path r:eval ( word "runProgramPath <- file.path(runProgramDir, \"spread-infection.exe\")" ) ] print ( word "ogProgPath: " r:get "ogProgramPath" ) print ( word "runProgramPath: " r:get "runProgramDir") ; Copy the program to the new directory r:eval "file.copy(ogProgramPath, runProgramPath, copy.mode = T)" print ( word "program in directory? " r:get "file.exists(runProgramPath)" )

200 end

; set run program directory to set-run-program-directories r:eval "library(jsonlite)" r:eval (word "worldWidth <- " world-width ) ; store world width for Go program

if run-id = 0 or run-id = "" [ ; if there's no run id set run-id ( word "r" random 100000 ) ]

if comp = "cgrb" [ r:eval "programsDir <- \"/raid1/home/pi/bouchea/models/programs\"" ] if comp = "law" [ r:eval "programsDir <- \"/home/bouchea/models/programs\"" ] if comp = "asus-big" [ r:eval "programsDir <- \"D:/AdamB/Documents/Masters/Thesis/Modeling/Models/BSRD_NetLogo/BSRD-full- model/programs\"" ] print ( word "programsDir: " r:get "programsDir") r:eval ( word "runProgramDir <- file.path(programsDir, \"" run-id "\")" ) ; new directory to create ifelse ( comp = "cgrb" OR comp = "law" ) [ r:eval "ogProgramPath <- file.path(programsDir, \"program_og\", \"current\", \"spread-infection\")" ; original program path r:eval ( word "runProgramPath <- file.path(runProgramDir, \"spread-infection\")" ) ; path to the copy of the program ] [ r:eval "ogProgramPath <- file.path(programsDir, \"program_og\", \"current\", \"spread-infection.exe\")" ; original program path r:eval ( word "runProgramPath <- file.path(runProgramDir, \"spread-infection.exe\")" ) ] end to write-spread-infection-ouputs_initial r:eval "library(jsonlite)"

; RING LIST export-ring-list-json r:eval "rm(ring.list)"

201

; PROBABILITY LISTS export-probs-json r:eval "rm(prob_SC_list)" r:eval "rm(prob_PF_list)" r:eval "rm(prob_HN_list)"

; POTENTIAL TREES export-potentialTrees-json if export-potential-trees? [ r:eval "rm(potentialTreeCoords)" ] end

to write-spread-infection-outputs r:eval "library(jsonlite)"

; RING LIST: put this code into the ring file/ just add storing the ring to the current code

; PROBABILITY LISTS export-probs-json

; TREE COORDINATE LISTS: potential trees output coordinates export-potentialTrees-json

; TREE COORDINATE LISTS: newly-infected trees export-newly-infected-trees-json

; TREE COORDINATE LISTS: losing-infection trees export-losing-infection-trees-json

ifelse R-clear-environment? [ ] [ r:eval "rm(potentialTreeCoords)" r:eval "rm(newlyInfectedTreeCoords)" r:eval "rm(losingInfectionTreeCoords)" r:eval "rm(prob_SC_list)" r:eval "rm(prob_PF_list)" r:eval "rm(prob_HN_list)" ; r:eval "rm(ring.list)" ]

202

if R-gc? [ r:eval "gc()" ] end

; RING LIST: put this code into the ring file/ just add storing the ring to the current code to export-ring-list-json r:eval "ringList_path <- file.path(runProgramDir,\"ring_list.json\")" r:eval "write_json(ring.list, ringList_path)" print ( word "ring-list in directory? " r:get "file.exists(ringList_path)" ) r:eval "rm(ring.list)" end

; PROBABILITY LISTS to export-probs-json ; PROBABILITY LISTS ( r:put "prob_SC_list" prob-vector-dispersal_SC_list ) ( r:put "prob_PF_list" prob-vector-dispersal_PF_list ) ( r:put "prob_HN_list" prob-vector-dispersal_HN_list ) r:eval "write_json( as.vector(prob_SC_list), file.path(runProgramDir, \"prob_SC_list.json\"))" r:eval "write_json( as.vector(prob_PF_list), file.path(runProgramDir, \"prob_PF_list.json\"))" r:eval "write_json( as.vector(prob_HN_list), file.path(runProgramDir, \"prob_HN_list.json\"))" print ( word "prob_SC file in directory? " r:get "file.exists(file.path(runProgramDir, \"prob_SC_list.json\"))" ) print ( word "prob_PF file in directory? " r:get "file.exists(file.path(runProgramDir, \"prob_PF_list.json\"))" ) print ( word "prob_HN file in directory? " r:get "file.exists(file.path(runProgramDir, \"prob_HN_list.json\"))" ) end

; TREE COORDINATE LISTS: potential trees output coordinates to export-potentialTrees-json ifelse export-potential-trees? [ ifelse any? trees_potential [ ( r:putagentdf "potentialTreeCoords" ( trees_potential ) "xcor" "ycor" ) r:eval "write_json(unname(potentialTreeCoords), file.path(runProgramDir, \"potential_trees.json\"))"

] [ print "No potential trees. Run impossible." stop ]

203

] [ r:eval "write_json(list(), file.path(runProgramDir, \"potential_trees.json\"))" ]

print ( word "potential_trees file in directory? " r:get "file.exists(file.path(runProgramDir, \"potential_trees.json\"))" ) end

; TREE COORDINATE LISTS: newly-infected trees to export-newly-infected-trees-json set-run-program-directories ifelse ( is-agentset? trees_newly-infected AND any? trees_newly-infected ) [ ( r:putagentdf "newlyInfectedTreeCoords" ( trees_newly-infected ) "xcor" "ycor" ) r:eval "write_json(unname(newlyInfectedTreeCoords), file.path(runProgramDir, \"trees_newly_infected.json\"))" ] [ r:eval "write_json(list(), file.path(runProgramDir, \"trees_newly_infected.json\"))" ] r:eval "rm(newlyInfectedTreeCoords)" print ( word "trees_newly_infected file in directory? " r:get "file.exists(file.path(runProgramDir, \"trees_newly_infected.json\"))" ) end

; TREE COORDINATE LISTS: losing-infection trees to export-losing-infection-trees-json set-run-program-directories ifelse ( is-agentset? trees_newly-infected AND any? trees_losing-infection ) [ ( r:putagentdf "losingInfectionTreeCoords" ( trees_losing-infection ) "xcor" "ycor" ) r:eval "write_json(unname(losingInfectionTreeCoords), file.path(runProgramDir, \"trees_losing_infection.json\"))" ] [ r:eval "write_json(list(), file.path(runProgramDir, \"trees_losing_infection.json\"))" ] r:eval "rm(losingInfectionTreeCoords)" print ( word "trees_losing_infection file in directory? " r:get "file.exists(file.path(runProgramDir, \"trees_losing_infection.json\"))" ) end to delete-program-directory set-run-program-directories r:eval "unlink(runProgramDir, recursive = T)" end

204

;______; USING THE SPREAD-INFECTION PROGRAM ;______to run-spread-infection_Go ; model found at path stored in R: runProgramPath carefully [ if R-clear-environment? [ ; if clearing R env, set the runpath r:eval "library(jsonlite)" ; set go program directories set-run-program-directories ] ] [ print "ERROR during go -> project-infection -> run-spread-infection_Go -> clear-R- environment" print error-message set export-rasters? false set export-tree-data? false set kill-run? true stop ] carefully [ ifelse set-Go-solution_direct? [ set spread-infection-solution r:get "fromJSON( paste( system2( runProgramPath, stdout = T, args = worldWidth), collapse = \"\"), simplifyDataFrame = F, simplifyVector = F, auto.unbox = T)" ] [ r:eval "solution <- paste( system2( runProgramPath, stdout = T, args = worldWidth), collapse = \"\")" print ( word "Go -> R - Success - Program run, solution stored" ) r:eval "solution <- fromJSON(solution, simplifyDataFrame = F, simplifyVector = F, auto.unbox = T)" print ( word "R JSON -> R FORMAT - Success -> program output converted from JSON to R" ) set spread-infection-solution r:get "solution" ; bring the solution from R -> NetLogo ] r:eval "rm(solution)" if R-clear-environment? [ r:clear ] if R-gc? [ r:gc ]

print ( word "R -> NetLogo - Solution stored in NetLogo list \"spread-infection- solution\"" ) ] [ print "ERROR in project-infection -> run-spread-infection_Go" print error-message set export-rasters? false set export-tree-data? false set kill-run? true stop]

205

end to apply-solution_Go carefully [ print "Applying Go solution in NetLogo: INITIALIZE" foreach spread-infection-solution [ this-entry -> ask cells at-points ( item 0 this-entry ) [ let probs ( item 1 this-entry ) set prob-vector-disp_cumul_SC ( prob-vector-disp_cumul_SC + (item 0 probs) ) set prob-vector-disp_cumul_PF ( prob-vector-disp_cumul_PF + (item 1 probs) ) set prob-vector-disp_cumul_HN ( prob-vector-disp_cumul_HN + (item 2 probs) ) ] ] print "Applying Go solution in NetLogo: COMPLETE" ] [ print "ERROR project-infection -> apply-solution_Go" print error-message set kill-run? true stop ] end

;______;______;______;______Beginning of code for included file: "supporting_files/current/probability_parameters_1.9.3.0.nls" ;______

; Developed by: Adam J Bouché for a Master of Science Thesis in Forest Ecosystems and Society at Oregon State University ; 2017 - 2020 globals [ ;______; PROBABILITY PARAMETERS

max-tree-age ; used for multiple parameter setups

; SUSCEPTIBILITY GLOBALS for BSRD infection and mortality susceptibility age-bsrd-inf-suscept_list

206

; Susceptibility to mortality - susceptibility is lower in the year the tree becomes infected than in subsequent years age-bsrd-mort-suscept_year-of-infection_list ; Mortality rate in the year that tree is infected (low) age-bsrd-mort-suscept_years-after-infection_list ; Mortality rate in the years after the initial year of infection (high)

; PROB ROOT INFECTION GLOBALS: Lists for probability distribution samples improves speed prob-root-contact_1cellDist_list prob-root-contact_2cellDist_list prob-root-contact_3cellDist_list prob-root-contact_4cellDist_list prob-root-transmission_list

; PROB VECTOR INFECTION GLOBALS: Lists for probability distribution samples improves speed prob-vector-infested_SC_list prob-vector-infested_PF_list prob-vector-infested_HN_list prob-vector-transmission_SC_list prob-vector-transmission_PF_list prob-vector-transmission_HN_list prob-vector-dispersal_SC_list prob-vector-dispersal_PF_list prob-vector-dispersal_PF_background_list prob-vector-dispersal_HN_list prob-vector-dispersal_HN_background_list

; Prob vector wounding - Base probabilities (Trees in stand interiors of unthinned, unharvested stands) ; Attraction effects applied to these probabilities prob-vector-wound_live-nonInf_list ; PROB WOUND for LIVE, NON-INF TREE prob-vector-wound_dead-nonInf_list ; PROB WOUND for DEAD, NON-INF TREE prob-vector-wound_live-inf_list ; PROB WOUND for LIVE, INF TREE prob-vector-wound_dead-inf_list ; PROB WOUND for DEAD, INF TREE

; Attraction effects ______; MGMT EFFECT (THIN/HARVEST)

207

attr-effect_mgmt_int-harv_list ; ATTRACTION EFFECT FOR harvest in INTENSIVELY MANAGED STANDS attr-effect_mgmt_ext-thin-pct_list ; ATTRACTION EFFECT FOR Pre-commercial thinning in EXTENSIVELY MANAGED STANDS attr-effect_mgmt_ext-thin-ct1_list ; ATTRACTION EFFECT FOR 1st commercial thinning in EXTENSIVELY MANAGED STANDS attr-effect_mgmt_ext-thin-ct2_list ; ATTRACTION EFFECT FOR 2nd commercial thinning in EXTENSIVELY MANAGED STANDS attr-effect_mgmt_ext-harv_list ; ATTRACTION EFFECT FOR harvest in EXTENSIVELY MANAGED STANDS ; ROAD EFFECT attr-effect_road_list ; ATTRACTION EFFECT FOR TREES ALONG ROADS ; STATUS EFFECTS attr-effect_inf-vs-live_list ; ATTRACTION EFFECT FOR INFECTED TREES - Infected relative to live trees attr-effect_inf-vs-live_max ; ATTRACTION EFFECT FOR INFECTED TREES - Infected relative to live trees attr-effect_inf-vs-dead_list ; ATTRACTION EFFECT FOR INFECTED TREES - Infected relative to dead trees attr-effect_inf-vs-dead_max ; ATTRACTION EFFECT FOR INFECTED TREES - Infected relative to dead trees attr-effect_dead_list ; ATTRACTION EFFECT FOR DEAD TREES attr-effect_dead_max ; ATTRACTION EFFECT FOR DEAD TREES

; for attr-inf-dead_conservative? == true attr-effect_tree-weight-over-distance_list ; List used to calculate the weight an infected tree should have in its surroundings' attraction inf-center-attr-threshold_n-source-trees ; the source tree value necessary (from weighted tree presence by distance) ; for the area to be considered an infection center, allowing for the full range of attr-inf values to be used ]

;______; INFECTION PARAMETERS ;______to reset-infection-parameters ; RESET PROB PARAMS set age-bsrd-inf-suscept_list []

208

set age-bsrd-mort-suscept_year-of-infection_list [] set age-bsrd-mort-suscept_years-after-infection_list []

set prob-root-contact_1cellDist_list [] set prob-root-contact_2cellDist_list [] set prob-root-contact_3cellDist_list [] set prob-root-contact_4cellDist_list [] set prob-root-transmission_list []

set prob-vector-infested_SC_list [] set prob-vector-infested_PF_list [] set prob-vector-infested_HN_list [] set prob-vector-transmission_SC_list [] set prob-vector-transmission_PF_list [] set prob-vector-transmission_HN_list [] set prob-vector-dispersal_SC_list [] set prob-vector-dispersal_PF_list [] set prob-vector-dispersal_HN_list []

set prob-vector-wound_live-nonInf_list [] ; PROB WOUND for LIVE, NON-INF TREE set prob-vector-wound_dead-nonInf_list [] ; PROB WOUND for DEAD, NON-INF TREE set prob-vector-wound_live-inf_list [] ; PROB WOUND for LIVE, INF TREE set prob-vector-wound_dead-inf_list [] ; PROB WOUND for DEAD, INF TREE set max-attraction-distance_cell [] ; max distance for attraction of vectors (in cell units): 10 cells = 15 m / 49.2 ft set attr-effect_mgmt_int-harv_list [] ; ATTRACTION EFFECT FOR harvest in INTENSIVELY MANAGED STANDS set attr-effect_mgmt_ext-thin-pct_list [] ; ATTRACTION EFFECT FOR Pre- commercial thinning in EXTENSIVELY MANAGED STANDS set attr-effect_mgmt_ext-thin-ct1_list [] ; ATTRACTION EFFECT FOR 1st commercial thinning in EXTENSIVELY MANAGED STANDS set attr-effect_mgmt_ext-thin-ct2_list [] ; ATTRACTION EFFECT FOR 2nd commercial thinning in EXTENSIVELY MANAGED STANDS set attr-effect_mgmt_ext-harv_list [] ; ATTRACTION EFFECT FOR harvest in EXTENSIVELY MANAGED STANDS set attr-effect_road_list [] ; ATTRACTION EFFECT FOR TREES ALONG ROADS set attr-effect_inf-vs-live_list [] ; ATTRACTION EFFECT FOR INFECTED TREES

209

set attr-effect_inf-vs-dead_list [] ; ATTRACTION EFFECT FOR INFECTED TREES set attr-effect_dead_list [] ; ATTRACTION EFFECT FOR DEAD TREES set attr-effect_inf-vs-live_max 0 ; ATTRACTION EFFECT FOR INFECTED TREES - Infected relative to live trees set attr-effect_inf-vs-dead_max 0 ; ATTRACTION EFFECT FOR INFECTED TREES - Infected relative to dead trees set attr-effect_dead_max 0 ; ATTRACTION EFFECT FOR DEAD TREES

set attr-effect_tree-weight-over-distance_list [] ; List used to calculate the weight an infected tree should have in its surroundings' attraction set inf-center-attr-threshold_n-source-trees 0 set intercell-distance 1.524 ; just in case set max-attraction-distance_cell ( round ( max-attraction-distance_m / intercell-distance ) ) ; max distance for vector attraction (in cell units): 15 m / 49.2 ft / 10 cell distances set prob-attr-dead-loss 0 end to check-infection-parameters ; PROBABILITY PARAMETERS

print ( word "max.root.extent.A: " r:get "max.root.extent.A" ) print ( word "max.root.extent.B: " r:get "max.root.extent.B" )

; SUSCEPTIBILITY GLOBALS set max-tree-age ( max ( list rotation:intensive rotation:extensive )) print ( word "age-bsrd-inf-suscept_list (age 5): " item 6 age-bsrd-inf-suscept_list ) print ( word "age-bsrd-inf-suscept_list (max): " item ( max-tree-age - 1 )age-bsrd-inf- suscept_list ) print ( word "age-bsrd-mort-suscept_year-of-infection_list (age 5): " item 6 age-bsrd-mort- suscept_year-of-infection_list ) print ( word "age-bsrd-mort-suscept_year-of-infection_list (age 5) mean: " mean item 6 age-bsrd-mort-suscept_year-of-infection_list ) print ( word "age-bsrd-mort-suscept_year-of-infection_list (max): " item ( max-tree-age - 1 ) age-bsrd-mort-suscept_year-of-infection_list ) print ( word "age-bsrd-mort-suscept_year-of-infection_list (max) mean: " mean item ( max- tree-age - 1 ) age-bsrd-mort-suscept_year-of-infection_list ) print ( word "age-bsrd-mort-suscept_years-after-infection_list (age 5): " item 6 age-bsrd- mort-suscept_years-after-infection_list )

210

print ( word "age-bsrd-mort-suscept_years-after-infection_list (age 5) mean: " mean item 6 age-bsrd-mort-suscept_years-after-infection_list ) print ( word "age-bsrd-mort-suscept_years-after-infection_list (max): " item ( max-tree-age - 1 ) age-bsrd-mort-suscept_years-after-infection_list ) print ( word "age-bsrd-mort-suscept_years-after-infection_list (max) mean: " mean item ( max-tree-age - 1 ) age-bsrd-mort-suscept_years-after-infection_list )

; PROB ROOT INFECTION GLOBALS: Lists for probability distribution samples improves speed print ( word "prob-root-contact_1cellDist_list (age 5) (sample): " item 6 prob-root- contact_1cellDist_list ) print ( word "prob-root-contact_1cellDist_list (age 5) (sample) mean: " mean item 0 item 6 prob-root-contact_1cellDist_list ) print ( word "prob-root-contact_1cellDist_list (max age for settings) (sample): " item ( max- tree-age - 1 ) prob-root-contact_1cellDist_list ) print ( word "prob-root-contact_1cellDist_list (max age for settings) (sample) mean: " mean item 0 item ( max-tree-age - 1 ) prob-root-contact_1cellDist_list ) print ( word "prob-root-contact_2cellDist_list (age 5): " item 6 prob-root- contact_2cellDist_list ) print ( word "prob-root-contact_2cellDist_list (age 5) mean: " mean item 0 item 6 prob- root-contact_2cellDist_list ) print ( word "prob-root-contact_2cellDist_list (max): " item ( max-tree-age - 1 ) prob-root- contact_2cellDist_list ) print ( word "prob-root-contact_2cellDist_list (max) mean: " mean item 0 item ( max-tree- age - 1 ) prob-root-contact_2cellDist_list ) print ( word "prob-root-contact_3cellDist_list (age 5): " item 6 prob-root- contact_3cellDist_list ) print ( word "prob-root-contact_3cellDist_list (age 5) mean: " mean item 0 item 6 prob- root-contact_3cellDist_list ) print ( word "prob-root-contact_3cellDist_list (max): " item ( max-tree-age - 1 ) prob-root- contact_3cellDist_list ) print ( word "prob-root-contact_3cellDist_list (max) mean: " mean item 0 item ( max-tree- age - 1 ) prob-root-contact_3cellDist_list ) print ( word "prob-root-contact_4cellDist_list (age 5): " item 6 prob-root- contact_4cellDist_list ) print ( word "prob-root-contact_4cellDist_list (age 5) mean : " mean item 0 item 6 prob- root-contact_4cellDist_list ) print ( word "prob-root-contact_4cellDist_list (max): " item ( max-tree-age - 1 ) prob-root- contact_4cellDist_list )

211

print ( word "prob-root-contact_4cellDist_list (max) mean: " mean item 0 item ( max-tree- age - 1 ) prob-root-contact_4cellDist_list )

print ( word "prob-root-transmission_list: " prob-root-transmission_list )

; PROB VECTOR INFECTION GLOBALS: Lists for probability distribution samples improves speed print ( word "prob-vector-infested_SC_list: " prob-vector-infested_SC_list ) print ( word "prob-vector-infested_PF_list: " prob-vector-infested_PF_list ) print ( word "prob-vector-infested_HN_list: " prob-vector-infested_HN_list ) print ( word "prob-vector-transmission_SC_list: " prob-vector-transmission_SC_list ) print ( word "prob-vector-transmission_PF_list: " prob-vector-transmission_PF_list ) print ( word "prob-vector-transmission_HN_list: " prob-vector-transmission_HN_list ) print ( word "prob-vector-dispersal_SC_list: " prob-vector-dispersal_SC_list ) print ( word "prob-vector-dispersal_PF_list: " prob-vector-dispersal_PF_list ) print ( word "prob-vector-dispersal_PF_background_list: " prob-vector- dispersal_PF_background_list ) print ( word "prob-vector-dispersal_HN_list: " prob-vector-dispersal_HN_list ) print ( word "prob-vector-dispersal_HN_background_list: " prob-vector- dispersal_HN_background_list )

; Prob vector wounding - Base probabilities (Trees in stand interiors of unthinned, unharvested stands) ; Attraction effects applied to these probabilities print ( word "prob-vector-wound_live-nonInf_list: " prob-vector-wound_live-nonInf_list ) print ( word "prob-vector-wound_dead-nonInf_list: " prob-vector-wound_dead- nonInf_list ) print ( word "prob-vector-wound_live-inf_list: " prob-vector-wound_live-inf_list ) print ( word "prob-vector-wound_dead-inf_list: " prob-vector-wound_dead-inf_list ) ; ATTRACTION GLOBALS - Used for PROB WOUNDING by vectors and increases in PROB VECTOR INFECTION print ( word "max-attraction-distance_cell: " max-attraction-distance_cell ) print ( word "attr-effect_mgmt_int-harv_list: " attr-effect_mgmt_int-harv_list ) print ( word "attr-effect_mgmt_ext-thin-pct_list: " attr-effect_mgmt_ext-thin-pct_list ) print ( word "attr-effect_mgmt_ext-thin-ct1_list: " attr-effect_mgmt_ext-thin-ct1_list ) print ( word "attr-effect_mgmt_ext-thin-ct2_list: " attr-effect_mgmt_ext-thin-ct2_list ) print ( word "attr-effect_mgmt_ext-harv_list: " attr-effect_mgmt_ext-harv_list ) print ( word "attr-effect_road_list: " attr-effect_road_list ) print ( word "attr-effect_inf-vs-live_list: " attr-effect_inf-vs-live_list ) print ( word "attr-effect_inf-vs-live_max: " attr-effect_inf-vs-live_max )

212

print ( word "attr-effect_inf-vs-dead_list: " attr-effect_inf-vs-dead_list ) print ( word "attr-effect_inf-vs-dead_max: " attr-effect_inf-vs-dead_max ) print ( word "attr-effect_dead_list: " attr-effect_dead_list ) print ( word "attr-effect_dead_max: " attr-effect_dead_max )

print ( word "attr-effect_tree-weight-over-distance_list" attr-effect_tree-weight-over- distance_list ) ; List used to calculate the weight an infected tree should have in its surroundings' attraction end to setup-infection-parameters ; Necessary, fixed variables reset-infection-parameters

; BETA DISTRIBUTION - for continuous proportions between 0 and 1 - functions used in other parameters r:eval "get_beta.alpha <- function( mean.val, beta.val ) { ( beta.val * mean.val ) / ( 1 - mean.val )}" r:eval "get_beta.mean <- function( alpha.val, beta.val ) { alpha.val / ( alpha.val + beta.val ) }"

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ; SUSCEPTIBILITY ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

; Get the range of ages used in this simulation set max-tree-age ( max ( list rotation:extensive rotation:intensive ) ) let age-range ( range 0 ( max-tree-age + 1 ) )

set_infection-parameters_susceptibility age-range print "setup-infection-parameters: susceptibility parameters set"

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ; PROB ROOT INFECTION FUNCTIONS ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ifelse max-root-distance_m > 0 [ setup_infection-parameters_root print "setup-infection-parameters: root parameters set" ] [

213

set prob-root-contact_1cellDist_list [0] set prob-root-contact_2cellDist_list [0] set prob-root-contact_3cellDist_list [0] set prob-root-contact_4cellDist_list [0] set prob-root-transmission_list [0] print "No root spread. max-root-distance_m is not > 0." ]

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ; PROB VECTOR INFECTION FUNCTIONS ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

; PROB VECTOR INFESTED (The probability that a vector carries L. wagneri spores, from Witcosky et al 1986a) setup_infection-parameters_vector-infested

; PROB VECTOR TRANSMISSION [UPON EXPOSURE] (The probability that the infection is transmitted to the tree when visited AND wounded by a vector that is infested with spores) r:eval "prob.vector.transmission_SC_n.infected <- 52" r:eval "prob.vector.transmission_SC_n.wounded <- 78" r:eval "prob.vector.transmission_SC_prop.inf.when.wounded <- prob.vector.transmission_SC_n.infected / prob.vector.transmission_SC_n.wounded" set prob-vector-transmission_SC_list r:get "rbinom(n = 250, size = prob.vector.transmission_SC_n.wounded, prob = prob.vector.transmission_SC_prop.inf.when.wounded ) / prob.vector.transmission_SC_n.wounded" if sensitivity-analysis-param = "prob-vector-transmission_SC" [ set prob-vector- transmission_SC_list ( map [ i -> i * sensitivity-analysis-multiplier ] prob-vector- transmission_SC_list ) ] r:eval "prob.vector.transmission_PF_n.infected <- 23" r:eval "prob.vector.transmission_PF_n.wounded <- 93" r:eval "prob.vector.transmission_PF_prop.inf.when.wounded <- prob.vector.transmission_PF_n.infected / prob.vector.transmission_PF_n.wounded" set prob-vector-transmission_PF_list r:get "rbinom(n = 250, size = prob.vector.transmission_PF_n.wounded, prob = prob.vector.transmission_PF_prop.inf.when.wounded ) / prob.vector.transmission_PF_n.wounded"

214

if sensitivity-analysis-param = "prob-vector-transmission_PF" [ set prob-vector- transmission_PF_list ( map [ i -> i * sensitivity-analysis-multiplier ] prob-vector- transmission_PF_list ) ] r:eval "prob.vector.transmission_HN_n.infected <- 31" r:eval "prob.vector.transmission_HN_n.wounded <- 352" r:eval "prob.vector.transmission_HN_prop.inf.when.wounded <- prob.vector.transmission_HN_n.infected / prob.vector.transmission_HN_n.wounded" set prob-vector-transmission_HN_list r:get "rbinom(n = 250, size = prob.vector.transmission_HN_n.wounded, prob = prob.vector.transmission_HN_prop.inf.when.wounded ) / prob.vector.transmission_HN_n.wounded" if sensitivity-analysis-param = "prob-vector-transmission_HN" [ set prob-vector- transmission_HN_list ( map [ i -> i * sensitivity-analysis-multiplier ] prob-vector- transmission_HN_list ) ] if sensitivity-analysis-param = "prob-vector-transmission" [ ; FIX finish set prob-vector-transmission_SC_list ( map [ i -> i * sensitivity-analysis-multiplier ] prob- vector-transmission_SC_list ) set prob-vector-transmission_PF_list ( map [ i -> i * sensitivity-analysis-multiplier ] prob- vector-transmission_PF_list ) set prob-vector-transmission_HN_list ( map [ i -> i * sensitivity-analysis-multiplier ] prob-vector-transmission_HN_list ) ] print "setup-infection-parameters: vector infested and transmission parameters set" ; PROB VECTOR DISPERSAL LISTS setup_infection-parameters_vector-dispersal print "setup-infection-parameters: vector dispersal parameters set"

;______; ATTRACTION EFFECTS setup_infection-parameters_attraction print "setup-infection-parameters: vector attraction parameters set"

;_____ PROB VECTOR WOUNDING _____ setup_infection-parameters_vector-wounding print "setup-infection-parameters: vector wounding parameters set"

if debug-mode? [ check-infection-parameters ]

215 end

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ; SUSCEPTIBILITY ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> to set_infection-parameters_susceptibility [ age-range ]

; For age-dependent infection susceptibility and age-mortality susceptibility, the same inflection point should be used r:eval "suscept.infl <- function(n) { rnorm( n, 35, 2) }" ; inflection point, mean = 35 r:eval "suscept.k <- function(n) { rgamma(n, shape = 10, rate = 1/(0.225 / 10) ) }" ; decay rate, mean = ~0.225

;______; INFECTION SUSCEPTIBILITY VS. AGE (PROBABILITY THAT A TREE IS INFECTED WHEN DIRECTLY EXPOSED) ;------

; Infection susceptibility: comes from Witcosky et al. 1986a and Hessburg and Hansen 1986a ; This is the infection susceptibility for all trees in the age-independent scenario and the maximum infection susceptibility for young (< 30 - 40) trees in the age-dependent scenarios ; Binomial distribution based on inoculation trial data

; NEW: data from Witcosky et al 1986 (Hylastes) + data from Hessburg and Hansen 1986a r:eval "n.trials_inoc_HH1986a <- 66" ; Hessburg and Hansen 1986a inoculation trials - number inoculated r:eval "n.successes_inoc_HH1986a <- 50" ; Hessburg and Hansen 1986a inoculation trials - number infected r:eval "n.trials_inoc_Wit1986a <- 20" ; Witcosky et al. 1986a inoculation trials - number inoculated r:eval "n.successes_inoc_Wit1986a <- 16" ; Witcosky et al. 1986a inoculation trials - number infected r:eval "n.trials_inoc <- n.trials_inoc_HH1986a + n.trials_inoc_Wit1986a" r:eval "n.successes_inoc <- n.successes_inoc_HH1986a + n.successes_inoc_Wit1986a"

216

r:eval "prop.infection_inoc <- n.successes_inoc / n.trials_inoc" r:eval "suscept.inf.max_FUNC <- function( n ) {rbinom(n, prob = prop.infection_inoc, size = n.trials_inoc)/ n.trials_inoc}"

; Set up minimum infection susceptibility, for age-dependent scenarios if age-inf-suscept != "age-indep" [ ; Age-dependent 1: Decline from 0.9 to 0.1 at age 30-40 if age-inf-suscept = "age-dep-1" [ r:eval "suscept.inf_min_mean_age.dep <- 0.1" ] ; Age-dependent 2: Decline from 0.9 (mean) to 0.3 (mean) at age 30-40 if age-inf-suscept = "age-dep-2" [ r:eval "suscept.inf_min_mean_age.dep <- 0.3" ] r:eval "suscept.inf_min_beta_age.dep <- 50" r:eval "suscept.inf_min_alpha_age.dep <- get_beta.alpha(suscept.inf_min_mean_age.dep, suscept.inf_min_beta_age.dep)" r:eval "suscept.inf.min_age.dep_FUNC <- function(n = 1) { rbeta(n, suscept.inf_min_alpha_age.dep, suscept.inf_min_beta_age.dep) }" ] ;------; INFECTION SUSCEPTIBILITY FUNCTION r:eval ( word "age.bsrd.inf.suscept_FUNC <- function ( age.input, assumption, n = 1) {\n" "calc <- 0\n" "suscept.inf.max <- suscept.inf.max_FUNC(n)\n" ; max infection susceptibility for all assumption ; use equation based on the scenario "if (assumption == \"age-dependent\") {\n" ; if an age-dependent assumption, "suscept.inf.min <- suscept.inf.min_age.dep_FUNC(n)\n" "calc <- ( suscept.inf.max - suscept.inf.min ) / ( 1 + exp ( suscept.k(n) * (age.input - suscept.infl(n)) )) + suscept.inf.min \n" ; Sigmoid function "} else { calc <- suscept.inf.max_FUNC(n) + age.input * 0 }\n" "return(calc)\n" "}\n" )

217

;------; SETTING UP PARAMETER LISTS IN NETLOGO ifelse age-inf-suscept != "age-indep" [ ; For an age-dependent infection assumption foreach age-range [ this-age -> ; add an item to the list for each possible tree age given parameter settings, in order set age-bsrd-inf-suscept_list ( lput ( ( r:get ( word "age.bsrd.inf.suscept_FUNC (" this-age ", \"age-dependent\", n = 100)" ) ) ) age-bsrd-inf-suscept_list ) if sensitivity-analysis-param = "age-infection-susceptibility" [ set age-bsrd-inf-suscept_list ( map [ i -> map [ j -> limit-prob-values ( j * sensitivity- analysis-multiplier ) ] i ] age-bsrd-inf-suscept_list ) ] ] ] ; If infection susceptibility is assumed independent of age [ set age-bsrd-inf-suscept_list ( r:get ( word "age.bsrd.inf.suscept_FUNC (0, \"age- independent\", n = 300)" ) ) if sensitivity-analysis-param = "age-infection-susceptibility" [ set age-bsrd-inf-suscept_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis- multiplier ) ] age-bsrd-inf-suscept_list ) ] ]

;______; MORTALITY SUSCEPTIBILITY VS. AGE and TIME-SINCE-INFECTED (PROBABILITY THAT A TREE DIES WHEN INFECTED) ; ------; Based on the description of mortality provided by Witcosky and Hansen 1985 and Hansen and Goheen 1988: ; Few young trees die in the first year of infection, most in the second, some in the third and fourth, with ; a very small number surviving as long as 10 years ; ------; Setup equations

218

; Minimum age-mort-suscept (old trees) r:eval "suscept.mort_old_mean <- 0.005" ; mean = 0.5%, or 1/200 old, infected trees dies per year on average r:eval "suscept.mort_old_beta <- 100" ; distribution parameter r:eval "suscept.mort_old_alpha <- get_beta.alpha(suscept.mort_old_mean, suscept.mort_old_beta)" r:eval "suscept.mort.old_FUNC <- function(n = 1) { rbeta(n, suscept.mort_old_alpha, suscept.mort_old_beta) }"

; Maximum age-mort-suscept depends on time-since-inf (young trees) ; during the year the tree becomes infected r:eval "suscept.mort_young_mean_y0 <- 0.1" r:eval "suscept.mort_young_beta_y0 <- 80" r:eval "suscept.mort_young_alpha_y0 <- get_beta.alpha(suscept.mort_young_mean_y0, suscept.mort_young_beta_y0)" r:eval "suscept.mort.young_FUNC_y0 <- function(n = 1) { rbeta(n, suscept.mort_young_alpha_y0, suscept.mort_young_beta_y0) }"

; after the year of infection r:eval "suscept.mort_young_mean <- 0.3" r:eval "suscept.mort_young_beta <- 30" r:eval "suscept.mort_young_alpha <- get_beta.alpha(suscept.mort_young_mean, suscept.mort_young_beta)" r:eval "suscept.mort.young_FUNC <- function(n = 1) { rbeta(n, suscept.mort_young_alpha, suscept.mort_young_beta) }"

; FUNCTION r:eval ( word "age.bsrd.mort.suscept_FUNC <- function ( age.input, time.since.inf, n = 1) {\n" "if (time.since.inf == 0) {\n" ; Lower susceptibility during year infected "suscept.mort.old <- suscept.mort.old_FUNC(n) * ( suscept.mort_young_mean_y0 / suscept.mort_young_mean )\n" "suscept.mort.young <- suscept.mort.young_FUNC_y0(n)\n" "} else {\n" "suscept.mort.old <- suscept.mort.old_FUNC(n)\n" "suscept.mort.young <- suscept.mort.young_FUNC(n)\n" "}\n" "calc <- ( suscept.mort.young - suscept.mort.old ) / ( 1 + exp ( suscept.k(n) * (age.input - suscept.infl(n)) )) + suscept.mort.old\n"

219

"return(calc)\n" "}" ) ;------; SETTING UP PARAMETER LISTS IN NETLOGO set age-bsrd-mort-suscept_year-of-infection_list [] set age-bsrd-mort-suscept_years-after-infection_list []

foreach age-range [ this-age -> ; Mortality rate in the year that tree is infected (low) set age-bsrd-mort-suscept_year-of-infection_list ( lput ( r:get ( word "age.bsrd.mort.suscept_FUNC ( age.input = " this-age ", time.since.inf = 0, n = 100)" ) ) age- bsrd-mort-suscept_year-of-infection_list ) ; Mortality rate in the years after the initial year of infection (high) set age-bsrd-mort-suscept_years-after-infection_list ( lput ( r:get ( word "age.bsrd.mort.suscept_FUNC ( age.input = " this-age ", time.since.inf = 1, n = 100)" ) ) age- bsrd-mort-suscept_years-after-infection_list ) ] if sensitivity-analysis-param = "age-bsrd-mortality-susceptibility" [ set age-bsrd-mort-suscept_year-of-infection_list ( map [ i -> map [ j -> limit-prob-values ( j * sensitivity-analysis-multiplier ) ] i ] age-bsrd-mort-suscept_year-of-infection_list ) set age-bsrd-mort-suscept_years-after-infection_list ( map [ i -> map [ j -> limit-prob- values ( j * sensitivity-analysis-multiplier ) ] i ] age-bsrd-mort-suscept_years-after- infection_list ) ] end

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ; PROB ROOT INFECTION FUNCTIONS ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> to setup_infection-parameters_root define-prob-root-contact-function let max-list-age ( max-tree-age + dead-attr-duration_max + 1 ) ; print max-list-age set prob-root-contact_1cellDist_list ( r:get ( word "prc.list.FUNC(max.age = " ( max-tree- age + dead-attr-duration_max + 1 ) ", cell.dist = " 1 ", n.values = " 30 ")" ) ) set prob-root-contact_2cellDist_list ( r:get ( word "prc.list.FUNC(max.age = " ( max-tree- age + dead-attr-duration_max + 1 ) ", cell.dist = " 2 ", n.values = " 30 ")" ) )

220

set prob-root-contact_3cellDist_list ( r:get ( word "prc.list.FUNC(max.age = " ( max-tree- age + dead-attr-duration_max + 1 ) ", cell.dist = " 3 ", n.values = " 30 ")" ) ) set prob-root-contact_4cellDist_list ( r:get ( word "prc.list.FUNC(max.age = " ( max-tree- age + dead-attr-duration_max + 1 ) ", cell.dist = " 4 ", n.values = " 30 ")" ) )

; PROB ROOT TRANSMISSION SETUP ; Probability of getting infection transmission from 1 pair of roots in contact

; PARAMETER ADJUSTMENT ifelse prt-exclude-data? [ ; if excluding growth chamber data r:eval "prob.root.transmission_n.trials <- 273" ; Total number of grafts/contacts observed between pairs of trees r:eval "prob.root.transmission_n.successes <- 35" ; Number of successful infection transmissions via roots in observed pairs ] [ r:eval "prob.root.transmission_n.trials <- 367" ; Total number of grafts/contacts observed between pairs of trees r:eval "prob.root.transmission_n.successes <- 98" ; Number of successful infection transmissions via roots in observed pairs ]

r:eval "prob.root.transmission_proportion <- prob.root.transmission_n.successes / prob.root.transmission_n.trials" ; Proportion of successful root transmissions upon contact with an infected graft/contact r:eval "prob.root.transmission.FUNC <- function(n) {rbinom(n = n, size = prob.root.transmission_n.trials, prob = prob.root.transmission_proportion) / prob.root.transmission_n.trials}" ; function to draw n values of this parameter

ifelse prt-discount-by-contact-type? [ ; Using data from Reynolds 1981, I calculaed the count of root contacts by type, with type 1 being very weak contacts and type 4 being grafts ; limited to 2.5 to 5.0 m, which is the range of spacings in the model (with a little buffer) r:eval "sum_by_type_2.5to5m <- c( n.type1 = 50, n.type2 = 11, n.type3 = 6, n.type4 = 5)" r:eval "sum_allTypes_2.5to5m <- sum(sum_by_type_2.5to5m)" ; calculate the total contacts at this distance r:eval "prop_by_type_2.5to5m <- sum_by_type_2.5to5m / sum_allTypes_2.5to5m" ; calculate the proportion for each type

221

r:eval "names(prop_by_type_2.5to5m) <- c(\"prop_type1\", \"prop_type2\", \"prop_type3\", \"prop_type4\")" ; name appropriately

; Using sample size, draw values from a binomial distribution for the proportion of each contact type r:eval "prop.contacts_type1 <- rbinom(250, prob = prop_by_type_2.5to5m[\"prop_type1\"], size = sum_allTypes_2.5to5m) / sum_allTypes_2.5to5m" r:eval "prop.contacts_type2 <- rbinom(250, prob = prop_by_type_2.5to5m[\"prop_type2\"], size = sum_allTypes_2.5to5m) / sum_allTypes_2.5to5m" r:eval "prop.contacts_type3 <- rbinom(250, prob = prop_by_type_2.5to5m[\"prop_type3\"], size = sum_allTypes_2.5to5m) / sum_allTypes_2.5to5m" r:eval "prop.contacts_type4 <- rbinom(250, prob = prop_by_type_2.5to5m[\"prop_type4\"], size = sum_allTypes_2.5to5m) / sum_allTypes_2.5to5m"

; Probability of transmission for each contact type is based on the proportion of contacts of that type and a discount factor applied to the ; weakest contact based on Reynolds 1981 and Reynolds and Bloomberg 1982 r:eval "prob.root.transm_type1 <- prop.contacts_type1*prob.root.transmission.FUNC(250)*0.5" r:eval "prob.root.transm_type2 <- prop.contacts_type2*prob.root.transmission.FUNC(250)" r:eval "prob.root.transm_type3 <- prop.contacts_type3*prob.root.transmission.FUNC(250)" r:eval "prob.root.transm_type4 <- prop.contacts_type4*prob.root.transmission.FUNC(250)" ; Total probability is the sum of the probabilities for each contact type set prob-root-transmission_list r:get "prob.root.transm_type1 + prob.root.transm_type2 + prob.root.transm_type3 + prob.root.transm_type4" ] [ set prob-root-transmission_list r:get "prob.root.transmission.FUNC( n = 250 )" ]

if sensitivity-analysis-param = "prob-root-transmission" [ set prob-root-transmission_list ( map [ i -> i * sensitivity-analysis-multiplier ] prob-root- transmission_list ) ]

222 end to define-prob-root-contact-function ifelse prc_conservative? = false [ ; NON-CONSERVATIVE - passes right through canopy closure points. Data from Mauer and Palatova 2012 excluded r:eval "max.root.extent.A <- 0.5931181" ; based on fit of logarithmic growth function on root extent data r:eval "max.root.extent.B <- 0.4346111" ; based on fit of logarithmic growth function on root extent data ] [ ; CONSERVATIVE - Parameters are mean between regression with all data vs regression without Mauer and Palatova 2012 r:eval "max.root.extent.A <- 0.4936559" ; based on fit of logarithmic growth function on root extent data r:eval "max.root.extent.B <- 0.4568265" ; based on fit of logarithmic growth function on root extent data ] r:eval "max.root.extent.FUNC <- function ( age.input ) { return( rnorm(1, max.root.extent.A * age.input ^ max.root.extent.B, 0.4 ) ) }" ; FIX : alt values being used r:eval "prob.root.contact_k_FUNC <- function( age.input ) { ( 4 - 1.5 ) / ( 1 + exp ( exp ( rnorm(1, 0.3, 0.05) * (age.input - rnorm(1, 20,2) )))) + 1.5 }" r:eval "prob.root.contact_infl <- 0.5" ; inflection point for probability of root presence (root density) with distance, used to calculate prob root contact

;; Prob root presence function (Tree1, beginning at 0) r:eval (word "prob.root.presence.FUNC_t1 <- function ( x.distance, age.input ) {\n" "1 / ( 1 + exp ( prob.root.contact_k_FUNC(age.input) * ( x.distance - prob.root.contact_infl * max.root.extent.FUNC(age.input) ) ) )\n" "}" )

; Prob root presence function (Tree2, inverted, from starting.distance) r:eval (word "prob.root.presence.FUNC_t2 <- function ( x.distance, age.input, intertree.distance.input ) { \n"

223

"1 / ( 1 + exp ( -prob.root.contact_k_FUNC(age.input) * ( x.distance - ( intertree.distance.input - prob.root.contact_infl * max.root.extent.FUNC(age.input) ) ) ) ) \n" "}" )

; Function that combines the probability of root presence for each of the two trees to calculate prob root presence of both trees at a given distance r:eval (word "prob.root.presence_combined.FUNC <- function ( x.distance, age.t1.input, age.t2.input, intertree.distance.input ) { \n" "prob.root.presence.FUNC_t1( x.distance, age.t1.input) * prob.root.presence.FUNC_t2(x.distance, age.t2.input, intertree.distance.input) \n" "}" )

; THE PROBABILITY OF ROOT CONTACT FUNCTION, size 1 vector output r:eval ( word "prob.root.contact.FUNC <- function (age.t1.input, age.t2.input, intertree.distance.input) { \n" "calc <- ( as.numeric( ( integrate( function (x) { \n" "prob.root.presence_combined.FUNC( x, age.t1.input, age.t2.input, intertree.distance.input ) \n" "}, \n" "lower = 0, upper = intertree.distance.input ) )$value )) \n" "calc <- replace(calc, calc < 0, 0) \n" "calc <- replace(calc, calc > 1, 1) \n" "return(calc) \n" "}" )

; Function to generate nested lists of probability of root contact values given the max age, distance (cells) between trees r:eval ( word "prc.list.FUNC <- function( max.age, cell.dist, n.values = 1) {\n" "prc.list <- list() \n" ; initialize a list "dist <- cell.dist * 1.524 \n" ; Foreach age combination "age.list <- c(1:max.age) \n" ; foreach age (1->max.age), make a list of prc values for each age "for (age.t1 in age.list ){ \n" ; for tree 1 age in age list

224

"age.t1.list <- list() \n" "for ( age.t2 in age.t1:max.age ) {\n" "age.t1.list <- append(age.t1.list, list(\n" "replicate(n.values, prob.root.contact.FUNC(age.t1, age.t2, dist))\n" ")\n" ")\n" "}\n" "prc.list <- append(prc.list, list(age.t1.list))\n" "}\n" "return(prc.list)\n" "}" ) end to check-root-functions ; using age = 10 yr and dist = 3 m print (word "max.root.extent.A: " r:get "max.root.extent.A") print (word "max.root.extent.B: " r:get "max.root.extent.B") print (word "max.root.extent.FUNC: " r:get "max.root.extent.FUNC( 10 )") print (word "prob.root.contact_k_FUNC: " r:get "prob.root.contact_k_FUNC(10)") print (word "prob.root.contact_infl.x_FUNC: " r:get "prob.root.contact_infl") print (word "prob.root.presence.FUNC_t1: " r:get "prob.root.presence.FUNC_t1 ( 3, 10 )") print (word "prob.root.presence.FUNC_t2: " r:get "prob.root.presence.FUNC_t2 ( 3, 10, 3)") print (word "prob.root.presence_combined.FUNC: " r:get "prob.root.presence_combined.FUNC( 2, 10, 10, 3)" ) print (word "prob.root.contact.FUNC: " r:get "prob.root.contact.FUNC ( 10, 10, 3)" ) print (word "prc.list.FUNC " r:get "prc.list.FUNC( 2, 2, n.values = 2)" ) end

; REPORT PROB ROOT CONTACT to check-prc-lists let this-item 0 let this-age ( this-item + 1) foreach prob-root-contact_4cellDist_list [ this-list -> print ( word "item: " this-item "; this-age: " this-age " length: " length this-list ) set this-item ( this-item + 1 ) set this-age (this-age + 1) ] ;set prob-root-contact_2cellDist_list

225

;set prob-root-contact_3cellDist_list ;set prob-root-contact_4cellDist_list end

; Draw a prob-root-contact value from the correct list and sublist based on age and distance to-report draw-prob-root-contact [ age.tree1 age.tree2 cell.distance ] ; Lists are ordered from smallest age to largest age, with no repeated combinations of age ; (e.g., [ age 1: [ [1,1], [1,2], [1,3] ], age 2: [ [2,2], [2,3] ], age 3: [ [3,3] ] ] ) ; Therefore, the prob-root-contact list needs to be indexed first for the lowest tree age and ; NOTE: if you get an error, make sure the ages you're trying to use exist in the landscape, as ; determined by the max of the rotation lengths. let ages.list ( list age.tree1 age.tree2 ) let age1 min ( list (min ages.list) max-tree-age) let age2 min ( list (max ages.list) max-tree-age ) ifelse ( age2 > ( max ( list rotation:intensive rotation:extensive ) ) ) [ report 0 ] [ ; report 0 if age is outside of range allowed ; otherwise: draw a value if cell.distance = 1 [ report ( one-of ( item ( age2 - age1 ) ( item ( age1 - 1 ) prob-root- contact_1cellDist_list ) ) ) ] if cell.distance = 2 [ report ( one-of ( item ( age2 - age1 ) ( item ( age1 - 1 ) prob-root- contact_2cellDist_list ) ) ) ] if cell.distance = 3 [ report ( one-of ( item ( age2 - age1 ) ( item ( age1 - 1 ) prob-root- contact_3cellDist_list ) ) ) ] if cell.distance = 4 [ report ( one-of ( item ( age2 - age1 ) ( item ( age1 - 1 ) prob-root- contact_4cellDist_list ) ) ) ] ] end

; CALCULATE PROB ROOT CONTACT for a tree of a given age with an infected-neighbor age list at a given distance to-report calculate-prob-root-contact [ my-age nbor-age-list cell-distance ] ifelse nbor-age-list != [] [ ; if there are any ages in the list ; use each age pair (the tree calling the function w/ age = my-age and each of the ages in the nbor-age-list) let prc-list ( map [ i -> ( draw-prob-root-contact i my-age cell-distance ) ] nbor-age-list ) ; and calculate a prob-root-contact (prc) for each report ( reduce + prc-list ) ; report the sum of the values in the list ] [ report 0 ] ; else return 0 end

226

;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ; PROB VECTOR INFECTION FUNCTIONS ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

; PROB VECTOR INFESTED (The probability that a vector carries L. wagneri spores, from Witcosky et al 1986a) to setup_infection-parameters_vector-infested

; S. carinatus r:eval "prob.infested_SC_proportion <- 0.004618938" r:eval "prob.infested_SC_n.trials <- 433" set prob-vector-infested_SC_list r:get "rbinom( n = 250, size = prob.infested_SC_n.trials, prob = prob.infested_SC_proportion ) / prob.infested_SC_n.trials" ; P. fasciatus r:eval "prob.infested_PF_proportion <- 0.016129032" r:eval "prob.infested_PF_n.trials <- 62" set prob-vector-infested_PF_list r:get "rbinom( n = 250, size = prob.infested_PF_n.trials, prob = prob.infested_PF_proportion ) / prob.infested_PF_n.trials" ; H. nigrinus r:eval "prob.infested_HN_proportion <- 0.023121387" r:eval "prob.infested_HN_n.trials <- 173" set prob-vector-infested_HN_list r:get "rbinom( n = 250, size = prob.infested_HN_n.trials, prob = prob.infested_HN_proportion ) / prob.infested_HN_n.trials" ; Apply sensitivity analysis multiplier if necessary if ( sensitivity-analysis-param = "prob-vector-infested_SC" ) [ set prob-vector- infested_SC_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis-multiplier ) ] prob- vector-infested_SC_list ) ] if ( sensitivity-analysis-param = "prob-vector-infested_PF" ) [ set prob-vector- infested_PF_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis-multiplier ) ] prob- vector-infested_PF_list ) ] if ( sensitivity-analysis-param = "prob-vector-infested_HN" ) [ set prob-vector- infested_HN_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis-multiplier ) ] prob- vector-infested_HN_list ) ] if ( sensitivity-analysis-param = "prob-vector-infested" ) [ set prob-vector-infested_SC_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis- multiplier ) ] prob-vector-infested_SC_list ) set prob-vector-infested_PF_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis- multiplier ) ] prob-vector-infested_PF_list )

227

set prob-vector-infested_HN_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis- multiplier ) ] prob-vector-infested_HN_list ) ] end

; PROB VECTOR DISPERSAL LISTS to setup_infection-parameters_vector-dispersal foreach (range 1 ( max-vector-distance_SC_cell + 2 ) ) [ current-ring -> let current-distance ( current-ring * intercell-distance ) set prob-vector-dispersal_SC_list ( lput ( prob-vector-dispersal "SC" current-distance ) prob-vector-dispersal_SC_list ) ] ;print prob-vector-dispersal_SC_list foreach ( range 1 ( max-vector-distance_PF_cell + 2 ) ) [ current-ring -> let current-distance ( current-ring * intercell-distance ) set prob-vector-dispersal_PF_list ( lput ( prob-vector-dispersal "PF" current-distance ) prob-vector-dispersal_PF_list ) ; Add to the list (PF and HN assumed to be the same) set prob-vector-dispersal_HN_list prob-vector-dispersal_PF_list ] if sensitivity-analysis-param = "prob-vector-dispersal" [ set prob-vector-dispersal_SC_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis- multiplier ) ] prob-vector-dispersal_SC_list ) set prob-vector-dispersal_PF_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis- multiplier ) ] prob-vector-dispersal_PF_list ) set prob-vector-dispersal_HN_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis- multiplier ) ] prob-vector-dispersal_HN_list ) ] if sensitivity-analysis-param = "prob-vector-dispersal_SC" [ set prob-vector-dispersal_SC_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis- multiplier ) ] prob-vector-dispersal_SC_list ) ] if sensitivity-analysis-param = "prob-vector-dispersal_PF" [ set prob-vector-dispersal_PF_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis- multiplier ) ] prob-vector-dispersal_PF_list ) ] if sensitivity-analysis-param = "prob-vector-dispersal_HN" [ set prob-vector-dispersal_HN_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis- multiplier ) ] prob-vector-dispersal_HN_list ) ] end

228

to setup_infection-parameters_attraction

; Probability dead lose attraction (when between the min and the max) ifelse ( dead-attr-duration_max < dead-attr-duration_min ) [ user-message "ISSUE: Dead attraction duration max < min. Impossible. Try again. Please." stop ] [ ifelse ( dead-attr-duration_max > dead-attr-duration_min ) [ set prob-attr-dead-loss ( 1 / ( dead-attr-duration_max - dead-attr-duration_min + 1 ) ) ] [ set prob-attr-dead-loss 1 ] ]

; MANAGEMENT (THINNING/HARVEST) EFFECTS - THE INCREASE IN ATTRACTIVENESS/WOUNDING PROBABILITY WHEN IN THINNED/HARVESTED STANDS ______; PROPORTION OF STUMPS RELATIVE TO STANDS IN LITERATURE SOURCE FOR PROP. LIVE TREES WOUNDED IN THINNED STANDS (WITCOSKY ET AL 1986a) ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ifelse attr-mgmt_conservative? [ ; In Witcosky et al. 1986a, stands were thinned from 2000-4000 tph to 900-1000 tph r:eval "stumpsRmv_WitcoskyEtAl1986a <- c(2000-1000, 4000 - 900)" ; == 1000 stumps/ha at least, == 3100 stumps/ha at most

; Assuming a linear relationship between the level of attraction and stumps created, this value was scaled to create a "thinning factor" ; for attraction, scaled with a minimum value of 1. To do this, I first created a variable for the proportion of stumps per ha ; generated in each model management scenario (thinning vs. harvest) relative to the stumps/ha in the literature source. This was generated ; as a uniform distribution between the minimum and maximum number of stumps removed/ha to account for uncertainty because the literature ; did not specify wounding values by thinning treatment.

; Calculate the density of stumps in model scenarios relative to density of stumps in the literature (Witcosky et al 1986a) ; Intensive harvest: from 478.40 tph to 0.00 tph r:eval "propStumps_int.harv_max <- 478.40 / min(stumpsRmv_WitcoskyEtAl1986a)" ; Harvest: 478.40 -> 0.00 tph (-478.40 tph)

229

; Extensive managment: r:eval "propStumps_ext.thin.pct_max <- 335.07 / min(stumpsRmv_WitcoskyEtAl1986a)" ; PCT: 1076.39 -> 741.32 tph (-335.07 tph) r:eval "propStumps_ext.thin.ct1_max <- 345.95 / min(stumpsRmv_WitcoskyEtAl1986a)" ; CT1: 741.32 -> 395.37 tph (-345.95 tph) r:eval "propStumps_ext.thin.ct2_max <- 148.26 / min(stumpsRmv_WitcoskyEtAl1986a)" ; CT2: 395.37 -> 247.11 tph (-148.26 tph) r:eval "propStumps_ext.harv_max <- 247.11 / min(stumpsRmv_WitcoskyEtAl1986a)" ; HARVEST: 247.11 -> 0.00 tph (-247.11 tph)

; Calculate the max density of stumps in model scenarios relative to density of stumps in the literature (Witcosky et al 1986a) r:eval "propStumps_mgmt_max <- max(c(propStumps_int.harv_max, propStumps_ext.thin.pct_max, propStumps_ext.thin.ct1_max, propStumps_ext.thin.ct2_max, propStumps_ext.harv_max))"

; NORMALIZE stump proportion values to that max value (range: 0 to 1) ; Intensive harvest: r:eval "propStumps_int.harv_max_norm <- propStumps_int.harv_max / propStumps_mgmt_max" ; Extensive managment: r:eval "propStumps_ext.thin.pct_max_norm <- propStumps_ext.thin.pct_max / propStumps_mgmt_max" r:eval "propStumps_ext.thin.ct1_max_norm <- propStumps_ext.thin.ct1_max / propStumps_mgmt_max" r:eval "propStumps_ext.thin.ct2_max_norm <- propStumps_ext.thin.ct2_max / propStumps_mgmt_max" r:eval "propStumps_ext.harv_max_norm <- propStumps_ext.harv_max / propStumps_mgmt_max" ] [ ; Using a less conservative approach, don't scale proportionally to the stump densities in Witcosky et al. 1986 vs in the model ; Calculate the density of stumps in model scenarios relative to density of stumps in the literature (Witcosky et al 1986a) ; Intensive harvest: from 478.40 tph to 0.00 tph r:eval "sph_int.harv <- 478.40" ; Harvest: 478.40 -> 0.00 tph (-478.40 tph) ; Extensive managment: r:eval "sph_ext.thin.pct <- 335.07" ; PCT: 1076.39 -> 741.32 tph (-335.07 tph) r:eval "sph_ext.thin.ct1 <- 345.95" ; CT1: 741.32 -> 395.37 tph (-345.95 tph) r:eval "sph_ext.thin.ct2 <- 148.26" ; CT2: 395.37 -> 247.11 tph (-148.26 tph)

230

r:eval "sph_ext.harv <- 247.11" ; HARVEST: 247.11 -> 0.00 tph (-247.11 tph) ; Calculate the max density of stumps in model scenarios relative to density of stumps in the literature (Witcosky et al 1986a) r:eval "sph_mgmt_max <- max(c(sph_int.harv, sph_ext.thin.pct, sph_ext.thin.ct1, sph_ext.thin.ct2, sph_ext.harv))" ; Normalize stump proportion values to that max value (range: 0 to 1) r:eval "sph_int.harv_norm <- sph_int.harv / sph_mgmt_max" ; Extensive managment: r:eval "sph_ext.thin.pct_norm <- sph_ext.thin.pct / sph_mgmt_max" r:eval "sph_ext.thin.ct1_norm <- sph_ext.thin.ct1 / sph_mgmt_max" r:eval "sph_ext.thin.ct2_norm <- sph_ext.thin.ct2 / sph_mgmt_max" r:eval "sph_ext.harv_norm <- sph_ext.harv / sph_mgmt_max"

] ; GENERATE THINNING EFFECT ; PROPORTION OF TREES WOUNDED IN THINNED STAND IN THE STAND INTERIOR. OVERESTIMATES because stands were VERY dense ; and the density of stumps created during thinning was 2+ X what would be seen in the management represented in the model r:eval "wound_live.nonInf.thin_overEst <- rbinom(n = 300, size = 1240, prob = (131/1240))/1240" ; STAND INTERIOR, MEASURED: Witcosky et al 1986a (combined binom data, 131/1240 trees wounded) ; A) Rudinsky and Zethner-Moller 1967 - 5.692X as much wounding on live, non-inf trees in thinned areas relative to live, non-inf trees outside of thinned areas r:eval "effect.mgmt_RZM1967 <- 74 / 13" ; Wounds per area, live trees inside thinned area / live trees outside thinned area ; B) Sullivan et al 2003 - Ratios of mean insect abundance (all species) for different severities of disturbance relative to the undistubed control r:eval "effect.mgmt_Sull2003 <- c(1.517788725, 2.029009305, 3.035030104)" ; COMBINED into a uniform distribution (because it is not clear which is closest to the actual value or the shape of such a distribution) r:eval "effect.mgmt_combined <- c(effect.mgmt_Sull2003, effect.mgmt_RZM1967)" r:eval "effect.mgmt_fullRange <- runif(300, min(effect.mgmt_combined), max(effect.mgmt_combined))" ; Sample of range of values (uniform distr) r:eval "effect.mgmt_combined_lowerBound <- min(effect.mgmt_combined)" ; calc the lower boundary

ifelse attr-mgmt_conservative? [ r:eval "effect.mgmt_combined_upperBound <- max(effect.mgmt_combined)*propStumps_mgmt_max" ; and upper boundary

231

r:eval "effect.mgmt_combined_width <- effect.mgmt_combined_upperBound - effect.mgmt_combined_lowerBound" ; and the range of values

; Equation to calculate the thin effect for each mgmt scenario r:eval "effect.mgmt.prop <- function ( propStumps_mgmtSituation_max_norm ) { runif(100, effect.mgmt_combined_lowerBound, (effect.mgmt_combined_lowerBound + (effect.mgmt_combined_width * propStumps_mgmtSituation_max_norm ) ) ) }"

; SET ATTRACTION EFFECT FOR THINNING - Calculate thin effect for each mgmt scenario, stored as list set attr-effect_mgmt_int-harv_list r:get "round(effect.mgmt.prop(propStumps_int.harv_max_norm), 4)" set attr-effect_mgmt_ext-thin-pct_list r:get "round(effect.mgmt.prop(propStumps_ext.thin.pct_max_norm), 4)" set attr-effect_mgmt_ext-thin-ct1_list r:get "round(effect.mgmt.prop(propStumps_ext.thin.ct1_max_norm), 4)" set attr-effect_mgmt_ext-thin-ct2_list r:get "round(effect.mgmt.prop(propStumps_ext.thin.ct2_max_norm), 4)" set attr-effect_mgmt_ext-harv_list r:get "round(effect.mgmt.prop(propStumps_ext.harv_max_norm), 4)" ] [ r:eval "effect.mgmt_combined_upperBound <- max(effect.mgmt_combined)" ; and upper boundaries r:eval "effect.mgmt_combined_width <- effect.mgmt_combined_upperBound - effect.mgmt_combined_lowerBound" ; and the range of values ; Equation to calculate the thin effect for each mgmt scenario r:eval "effect.mgmt.prop <- function ( sph_mgmtSituation_norm ) { runif(100, effect.mgmt_combined_lowerBound, (effect.mgmt_combined_lowerBound + (effect.mgmt_combined_width * sph_mgmtSituation_norm ) ) ) }"

; SET ATTRACTION EFFECT FOR THINNING - Calculate thin effect for each mgmt scenario, stored as list set attr-effect_mgmt_int-harv_list r:get "round(effect.mgmt.prop(sph_int.harv_norm), 4)" set attr-effect_mgmt_ext-thin-pct_list r:get "round(effect.mgmt.prop(sph_ext.thin.pct_norm), 4)" set attr-effect_mgmt_ext-thin-ct1_list r:get "round(effect.mgmt.prop(sph_ext.thin.ct1_norm), 4)"

232

set attr-effect_mgmt_ext-thin-ct2_list r:get "round(effect.mgmt.prop(sph_ext.thin.ct2_norm), 4)" set attr-effect_mgmt_ext-harv_list r:get "round(effect.mgmt.prop(sph_ext.harv_norm), 4)" ]

; Increase for sensitivity analysis if sensitivity-analysis-param = "attr-effect_mgmt" [ set attr-effect_mgmt_int-harv_list ( map [ i -> i * sensitivity-analysis-multiplier ] attr-effect_mgmt_int-harv_list ) ] if sensitivity-analysis-param = "attr-effect_mgmt" [ set attr-effect_mgmt_ext-thin-pct_list ( map [ i -> i * sensitivity-analysis-multiplier ] attr-effect_mgmt_ext-thin-pct_list ) ] if sensitivity-analysis-param = "attr-effect_mgmt" [ set attr-effect_mgmt_ext-thin-ct1_list ( map [ i -> i * sensitivity-analysis-multiplier ] attr-effect_mgmt_ext-thin-ct1_list ) ] if sensitivity-analysis-param = "attr-effect_mgmt" [ set attr-effect_mgmt_ext-thin-ct2_list ( map [ i -> i * sensitivity-analysis-multiplier ] attr-effect_mgmt_ext-thin-ct2_list ) ] if sensitivity-analysis-param = "attr-effect_mgmt" [ set attr-effect_mgmt_ext-harv_list ( map [ i -> i * sensitivity-analysis-multiplier ] attr-effect_mgmt_ext-harv_list ) ]

;______;ROAD EFFECT - THE INCREASE IN ATTRACTIVENESS/WOUNDING POTENTIAL WHEN ALONG ROADSIDES ______; Data: Witcosky et al 1986a ROAD/INTERIOR - more confidence (combined binom data); PROPORTION OF TREES WOUNDED ALONG ROADS IN THINNED STAND r:eval "wound_live.nonInf.thin.road_overEst <- (rbinom(n = 100, size = 909, prob = (160/ 909))/ 909)" ; MEASURED: Witcosky et al 1986a; 160/909 trees wounded ; ROAD EFFECT = PROB WOUNDING ALONG ROAD (Witcosky et al 1986a) / PROB WOUNDING STAND INTERIOR (Witcosky et al 1986a) r:eval "effect.road_WitcoskyEA1986 <- wound_live.nonInf.thin.road_overEst / wound_live.nonInf.thin_overEst" r:eval "effect.road <- round(sample(effect.road_WitcoskyEA1986, 300), 4)" ; Set road effect set attr-effect_road_list r:get "effect.road" if sensitivity-analysis-param = "attr-effect_road" [ set attr-effect_road_list ( map [ i -> i * sensitivity-analysis-multiplier ] attr-effect_road_list ) ] ;______;DEAD EFFECT - THE INCREASE IN ATTRACTIVENESS/WOUNDING POTENTIAL FOR DEAD RELATIVE TO LIVE ; A) MEASURED: Degree of wounding by HN (Rudinsky & Zethner-Moller 1967)

233

r:eval "effect.dead_RZM67 <- rep(193 / 74, 100)" ; Measured: Rudinsky and Zethner- Moller 1967 - dead thinned tree wounds / live tree wounds in thinned area (with much windthrow and DF beetle) r:eval "effect.dead_RZM67_norm_0.25sd <- rnorm(100, 193 / 74, 0.25)" ; B) MEASURED: Vector abundance ratio (Harrington et al 1985) r:eval "v.abund_live_Har85 <- c(71, 62, 40, 40)" ; MEASURED: Harrington et al 1985 - vector abundances, live and dead trees (stumps) in a thinned plot r:eval "v.abund_dead_Har85 <- c(94,123,119, 51)" r:eval "effect.dead_Har85 <- rnorm(100,mean(v.abund_dead_Har85),sd(v.abund_dead_Har85)) / rnorm(100,mean(v.abund_live_Har85),sd(v.abund_live_Har85))" ; C) MEASURED: Proportion of red/dead infected trees wounded / prop of inf live r:eval "wound_live.inf_SC <- (rbinom(n = 100, size = 36, prob = (31 / 36)) / 36)" ; MEASURED: Witcosky and Hansen 1985, by vector r:eval "wound_live.inf_PF <- (rbinom(n = 100, size = 36, prob = (18 / 36)) / 36)" r:eval "wound_live.inf_HN <- (rbinom(n = 100, size = 36, prob = (19 / 36)) / 36)" r:eval "wound_dead.inf_SC <- (rbinom(n = 100, size = 24, prob = (24 / 24)) / 24)" ; MEASURED: Witcosky and Hansen 1985, by vector r:eval "wound_dead.inf_PF <- (rbinom(n = 100, size = 24, prob = (24 / 24)) / 24)" r:eval "wound_dead.inf_HN <- (rbinom(n = 100, size = 24, prob = (22 / 24)) / 24)" r:eval "effect.dead_SC_WitHan85 <- wound_dead.inf_SC / wound_live.inf_SC" ; For SC only r:eval "effect.dead_PF_WitHan85 <- wound_dead.inf_PF / wound_live.inf_PF" ; For PF only r:eval "effect.dead_HN_WitHan85 <- wound_dead.inf_HN / wound_live.inf_HN" ; For HN only r:eval "effect.dead_indvCombined_WitHan85 <- c(wound_dead.inf_SC, wound_dead.inf_PF, wound_dead.inf_HN) /c(wound_live.inf_SC, wound_live.inf_PF, wound_live.inf_HN)" ; COMBINED w/ equal weight r:eval "effect.dead_combined <- c(effect.dead_RZM67_norm_0.25sd, effect.dead_indvCombined_WitHan85,effect.dead_Har85)" r:eval "effect.dead <- round( sample(effect.dead_combined[ effect.dead_combined > 0 ],100), 4)" ; FIX: Make into a factor here set attr-effect_dead_list r:get "effect.dead" if sensitivity-analysis-param = "attr-effect_dead" [ set attr-effect_dead_list ( map [ i -> limit- prob-values ( i * sensitivity-analysis-multiplier ) ] attr-effect_dead_list ) ] set attr-effect_dead_max max attr-effect_dead_list ; ATTRACTION EFFECT FOR DEAD TREES

234

;; Set tree weights vs. distance for attr-inf/dead let attr-distance-range ( range 1 ( max-attraction-distance_cell + 1 ) ) set attr-effect_tree-weight-over-distance_list ( map [ i -> attraction-distance- decay_FUNCTION_0to1 ( i * intercell-distance ) ] attr-distance-range ) end to setup_infection-parameters_vector-wounding ;___BASE WOUNDING PROBABILITIES______;______BASED ON TREE STATUS: LIVE/DEAD, INF/NON-INF ______

; PROBABILITY OF WOUNDING - BASE VALUES BY TREE STATUS

; Values for LIVE, NON-INFECTED trees are used as a base for (LIVE, NON-INF) and (DEAD NON-INF) PROB WOUND. They are derived from the literature. ; These values are for STAND INTERIOR (NON-ROAD) TREES IN UNTHINNED and UNHARVESTED STANDS ; NON-INFECTED TREES ; LIVE, NON-INF TREES r:eval "wound_live.nonInf <- round( sample( wound_live.nonInf.thin_overEst / effect.mgmt_fullRange, 100), 4)" ; DERIVED: based on a ratio set prob-vector-wound_live-nonInf_list r:get "wound_live.nonInf" if sensitivity-analysis-param = "prob-vector-wound" [ set prob-vector-wound_live- nonInf_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis-multiplier ) ] prob-vector- wound_live-nonInf_list ) ]

; DEAD, NON-INF TREES r:eval "wound_dead.nonInf_base <- sample( wound_live.nonInf * effect.dead, 100)" ; DERIVED: based on ratio r:eval "wound_dead.nonInf.thin_Har85 <- rbinom(100, size = 22, prob = (9/22))/22" ; MEASURED: Harrington et al 1985 r:eval "wound_dead.nonInf_Har85 <- wound_dead.nonInf.thin_Har85 / effect.mgmt_fullRange" ; DERIVED: based on ratio r:eval "wound_dead.nonInf <- round(sample(c(wound_dead.nonInf_base, wound_dead.nonInf_Har85), 100), 4)" ; DERIVED + MEASURED, COMBINED set prob-vector-wound_dead-nonInf_list r:get "wound_dead.nonInf" if sensitivity-analysis-param = "prob-vector-wound" [ set prob-vector-wound_dead- nonInf_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis-multiplier ) ] prob-vector- wound_dead-nonInf_list ) ]

235

; INFECTED TREES ; INFECTED EFFECT - THE INCREASE IN ATTRACTIVENESS/WOUNDING POTENTIAL FOR INFECTED RELATIVE TO UNINFECTED r:eval "wound_live.inf_indvCombined_WitHan85 <- c(wound_live.inf_SC, wound_live.inf_PF, wound_live.inf_HN)" ; Live, inf wounding rates (witc) r:eval "effect.infected_live <- sample(wound_live.inf_indvCombined_WitHan85 / (wound_live.nonInf.thin_overEst / effect.mgmt_fullRange),100)" r:eval "wound_dead.inf_indvCombined_WitHan85 <- c(wound_dead.inf_SC, wound_dead.inf_PF, wound_dead.inf_HN)" r:eval "effect.infected_dead <- sample(wound_dead.inf_indvCombined_WitHan85 / wound_dead.nonInf, 100)" r:eval "effect.infected <- sample(c(effect.infected_dead, effect.infected_live), 100)" set attr-effect_inf-vs-live_list r:get "effect.infected_live" set attr-effect_inf-vs-dead_list r:get "effect.infected_dead" if sensitivity-analysis-param = "attr-effect_inf" [ set attr-effect_inf-vs-live_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis-multiplier ) ] attr-effect_inf-vs-live_list ) ] if sensitivity-analysis-param = "attr-effect_inf" [ set attr-effect_inf-vs-dead_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis-multiplier ) ] attr-effect_inf-vs-dead_list ) ] set attr-effect_inf-vs-live_max max attr-effect_inf-vs-live_list ; ATTRACTION EFFECT FOR INFECTED TREES - Infected relative to live trees set attr-effect_inf-vs-dead_max max attr-effect_inf-vs-dead_list ; ATTRACTION EFFECT FOR INFECTED TREES - Infected relative to dead trees

; LIVE, INF TREES r:eval "wound_live.inf <- round( sample(c(wound_live.inf_SC,wound_live.inf_PF,wound_live.inf_HN), 100), 4)" ; MEASURED, COMBINED set prob-vector-wound_live-inf_list r:get "wound_live.inf" if sensitivity-analysis-param = "prob-vector-wound" [ set prob-vector-wound_live-inf_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis-multiplier ) ] prob-vector-wound_live- inf_list ) ]

; DEAD, INF TREES r:eval "wound_dead.inf <- round(sample(c(wound_dead.inf_SC,wound_dead.inf_PF,wound_dead.inf_HN), 100), 4)" ; MEASURED, COMBINED set prob-vector-wound_dead-inf_list r:get "wound_dead.inf" if sensitivity-analysis-param = "prob-vector-wound" [ set prob-vector-wound_live-inf_list ( map [ i -> limit-prob-values ( i * sensitivity-analysis-multiplier ) ] prob-vector-wound_live- inf_list ) ]

236

; When setting infecion attraction proportionally - set the number of trees in the attraction radius necessary for the area to be an infection center (weighted based on distance using attraction decay) if attr-inf-dead_version = "proportional" [ ; FIX this language, it's awful if inf-center-attr-threshold = "low" [ set inf-center-attr-threshold_n-source-trees ( 8.07 * inf-center-attr-threshold_pct / 100 ) ] ; based on max weighted tree presence with density in intensive stands if inf-center-attr-threshold = "medium" [ set inf-center-attr-threshold_n-source-trees ( 13.56 * inf-center-attr-threshold_pct / 100 ) ] ; based on mean of the max weighted tree presence between the management types if inf-center-attr-threshold = "high" [ set inf-center-attr-threshold_n-source-trees ( 19.04 * inf-center-attr-threshold_pct / 100 ) ] ; based on max weighted tree presence with initial density in extensive stands ] end

;______; INFECTION PARAMETERS: ROOT INFECTION ;______

;______; INFECTION PARAMETERS: VECTOR INFECTION ;______to-report prob-vector-infested [ vector ] if vector = "SC" [ report one-of prob-vector-infested_SC_list ] if vector = "PF" [ report one-of prob-vector-infested_PF_list ] if vector = "HN" [ report one-of prob-vector-infested_HN_list ] end to-report prob-vector-transmission [ vector ] if vector = "SC" [ report one-of prob-vector-transmission_SC_list ] if vector = "PF" [ report one-of prob-vector-transmission_PF_list ] if vector = "HN" [ report one-of prob-vector-transmission_HN_list ] end to-report prob-vector-dispersal [ vector distance-input ] if ( vector = "SC" ) [ report ( ( 0.99991925 * exp ( -0.05078213 * distance-input ) ) ^ 2 ) ]

237

if ( vector = "PF" OR vector = "HN" ) [ report ( ( 0.93190627 * exp ( -0.01148399 * distance- input ) ) ^ 2 ) ] end

; Function to calculate the decay of attraction with distance to-report attraction-distance-decay_FUNCTION [ input_attrFactor input_distance.m ] ; Sigmoid function because of rapid decay with distance but imprecise host targeting by vectors near the source of attraction ; Decays from input-attrFactor to 1.01 over a 15-meter / 10-cell distance (parameterized by solving for the parameter B (== 0.8063413 ) ) report ( ( input_attrFactor - 1 ) / ( 1 + exp ( 0.8063413 * ( input_distance.m - 7.5 ) ) ) + 1 ) end

; Function to calculate the decay of attraction with distance - starts at 1 and decays to 0 to-report attraction-distance-decay_FUNCTION_0to1 [ input_distance.m ] ; Sigmoid function because of rapid decay with distance but imprecise host targeting by vectors near the source of attraction ; Decays from input-attrFactor to 1.01 over a 15-meter / 10-cell distance (parameterized by solving for the parameter B (== 0.8063413 ) ) report ( 1 / ( 1 + exp ( 0.8063413 * ( input_distance.m - 7.5 ) ) ) ) end

;______; LIMIT PROB VALUES ; Note: each parameter value that is a probability is bounded between 0 and 1. Because some values are randomly drawn ; from distributions, there is a small but real chance that calculated values fall outside of this range. "limit-prob-values" ; simply ensures that: if a value is <0, it becomes 0; if the value is >1, it becomes 1; all values between 0 and 1 ; are unchanged. to-report limit-prob-values [ input ] ifelse ( input > 1 ) [ report 1 ] [ ; if the number is > 1, set to 1. else: ifelse ( input < 0 ) [ report 0 ] [ ; if the number is < 0, set to 0. else: report input ; report the number as originally calculated ] ] end

; REPORT A RANDOM BETA DISTRIBUTION

238 to-report random-beta [ in-alpha in-beta ] let XX random-gamma in-alpha 1 let YY random-gamma in-beta 1 report XX / (XX + YY) end

;______;______;______;______Beginning of code for included file: "supporting_files/current/ring_lists_1.9.2.0.nls" ;______

; Developed by: Adam J Bouché for a Master of Science Thesis in Forest Ecosystems and Society at Oregon State University ; 2017 - 2020

; FILE STORES LONG LIST OF RING GLOBALS FOR STORING RELATIVE COORDINATES; ; USED TO PROJECT INFECTION PROBABILITIES AND ATTRACTION globals [ ; Lists of coordinates for each distance ring used for spreading infection and attraction ring-list_root ; a list of the coordinates of all rings used for root infection, stored for quick access ring-list_dispersal ; a list of the coordinates of all rings used for vector dispersal, stored for quick access ring-list_attraction ; a list of the coordinates of all rings used for vector attraction, stored for quick access ]

; Determine the distances (in cells, 1 cell ~= 1.524 m) for the spread and attraction processes to set-max-cell-distances ; To set the maximum distance to which infection can spread set intercell-distance 1.524

; INFECTION SPREAD: ROOT EXTENT set max-root-distance_ext_cell 3 ; Max cell distance transmission for roots (extensive stands == 3 cell dists) set max-root-distance_int_cell 4 ; Max cell distance transmission for roots (intensive stands == 4 cell dists)

239

;set max-root-distance_cell ( round ( max-root-distance_m / intercell-distance ) ) ; Not used for int and ext mgmt, where spread is limited to the distances above by the arrangement of trees

; INFECTION SPREAD: VECTOR DISPERSAL set max-vector-distance_SC_cell ( round ( max-vector-distance_SC_m / intercell-distance ) ) set max-vector-distance_PF_cell ( round ( max-vector-distance_PF_m / intercell-distance ) ) set max-vector-distance_HN_cell ( round ( max-vector-distance_HN_m / intercell- distance ) )

; Get the highest of the cell distances for spread to find the max spread distance (in cells) set max-inf-spread-distance_cell ( max ( list max-root-distance_ext_cell max-root- distance_int_cell max-vector-distance_SC_cell max-vector-distance_PF_cell max-vector- distance_HN_cell ) ) ; take the highest value, set global

; ATTRACTION set max-attraction-distance_cell ( round ( max-attraction-distance_m / intercell-distance ) ) ; max distance for vector attraction: 15 m / 49.2 ft / 10 cells end

; SET COORDINATES FOR INFECTION SPREAD

; Define a function that generates the coordinates for each ring based on this algorithm I developed... to setup_generate-ring-list-function_R r:eval ( word "generate.multiple.rings <- function ( ringRange ) { \n" "coordSeq <- list() \n"

"for ( thisRing in ringRange ) { \n" ; For ring 1, different rules apply: "if ( thisRing == 1 ) { coordSeq <- append( coordSeq, list( list( c( 0, 1 ), c( 0, -1 ), c( 1, 0.5 ), c( 1, -0.5 ), c( -1, 0.5 ), c( -1, -0.5 ) ) ) ) } \n"

"if ( thisRing > 1 ) { \n" ; For all rings after ring1 "xseq1 <- seq( 0, thisRing, 1) \n" ; Generate the x sequence "yseq1 <- seq( thisRing, thisRing/2, -0.5) \n" "yseq2 <- seq( ( thisRing / 2 - 1 ), 0, -1 ) \n"

240

"len.yseq2 <- length(yseq2) \n" "xseq2 <- rep( thisRing , len.yseq2 ) \n" "xseq <- c(xseq1, xseq2) \n" "yseq <- c(yseq1, yseq2) \n" "xseq.full <- c(xseq, xseq, -xseq, -xseq) \n" "yseq.full <- c(yseq, -yseq, yseq, -yseq) \n" "coordSeq <- append( coordSeq, list(unique(mapply(c, xseq.full, yseq.full, SIMPLIFY = F)))) \n" "} \n" "} \n" "return(coordSeq) \n" "} \n" ) end to set-ring-lists_R set-max-cell-distances ; Find the max rings necessary based on spread distance settings setup_generate-ring-list-function_R ; Define the function used to generate the rings in R

; If using go procedure: ifelse spread-infection-version? = "Go" [ ; Store ring list as variable in R r:eval ( word "ring.list <- generate.multiple.rings(1:" max-inf-spread-distance_cell ")" ) ; Export ring list if spreading infection with Go program ] [ if ( not is-list? ring-list_dispersal ) OR ( length ring-list_dispersal < max-inf-spread- distance_cell ) [ ; If not a list or IF the list is not long enough set ring-list_dispersal ( r:get ( word "generate.multiple.rings(1:" max-inf-spread- distance_cell ")" ) ) ] ]

if max-attraction-distance_m > 0 [ set ring-list_attraction ( r:get ( word "generate.multiple.rings(1:" max-attraction- distance_cell ")" ) ) ] if max-root-distance_m > 0 [

241

set ring-list_root ( r:get ( word "generate.multiple.rings(1:" max-root-distance_int_cell ")" ) ) ]

; IF no spread, clear lists if not spread-setup? [ set ring-list_dispersal [] set ring-list_attraction [] ] end

;______;______;______;______Beginning of code for included file: "supporting_files/current/vector-attraction_1.9.2.0.nls" ;______

; VECTOR ATTRACTION FUNCTIONS ; min last update: 1/4/2020 globals [

; LISTS FOR APPLYING AND REMOVING ATTRACTION thin-0yr-ago thin-1yr-ago thin-2yr-ago thin-3yr-ago harv-0yr-ago harv-1yr-ago harv-2yr-ago harv-3yr-ago

prob-attr-dead-loss ]

;~~~~~~~ ROAD ATTRACTION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ to add-attr-road if max-attraction-distance_m > 0 [ ask cells with [ road? ] [ ; ask road cells ; ADD ROAD ATTRACTION TO NEIGHBORS

242

; Ask all road cells to set the attraction for cells in each ring up to max attraction distance let current-distance_m intercell-distance ; Set the starting ring to 1 cell distance foreach ring-list_attraction [ this-ring -> ; For each distance ring, let attr-road_to-set ( attraction-distance-decay_FUNCTION ( one-of attr- effect_road_list ) ( current-distance_m ) ) ; draw a road attraction value from the list and run through distance decay equation, ask cells at-points this-ring [ if potential-tree? and attr-road_to-set > attr-road [ set attr- road attr-road_to-set ] ] ; apply that value to each cell in the ring set current-distance_m ( current-distance_m + intercell-distance ) ; add to the distance for the next ring ] ] ] end

;~~~~~~~ MGMT ATTRACTION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ;~~~~~~~~~~~~~~~ ADD mgmt attraction ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ to add-attr-mgmt_thin [ input_thinned-stands_pct_list input_thinned-stands_ct1_list input_thinned-stands_ct2_list ] if max-attraction-distance_m > 0 [ ; ADD ATTRACTION HERE: All trees in thinned stand (proportional to amount of trees harvested) and adjacent stands ; CHECK - Use thin list to do this? ; if infection is being spread if ( length input_thinned-stands_pct_list > 0 ) [ ; If there are stands that were PCT'd ask trees_current with [ member? stand-id input_thinned-stands_pct_list ] [ ; Have all trees in those stands (because if it's a thinning, the effect will wear off) set stand-w-thin-disturbance? true ; mark as having been thinned set attr-mgmt ( lput ( one-of attr-effect_mgmt_ext-thin-pct_list ) attr-mgmt ) ; set their mgmt attraction to a value from the pct list set attr-mgmt_source ( lput stand-id attr-mgmt_source ) ; set the mgmt attraction source stand to their own stand id if edge? [ ; PROJECT TO NEARBY STANDS FROM EDGE CELLS let current-distance_m intercell-distance ; Set the starting ring to 1 cell distance

243

foreach ring-list_attraction [ this-ring -> ; For each distance ring, let attr-mgmt_to-set ( attraction-distance-decay_FUNCTION ( one-of attr- effect_mgmt_ext-thin-pct_list ) ( current-distance_m ) ) ; draw an attraction value from the list and run through distance decay equation, ask cells at-points this-ring [ if potential-tree? [ let source-stand-id ( [ stand-id ] of myself ) ; Store the stand-id of the attraction source (edge in mgmt-affected stand) if ( stand-id != [ stand-id ] of myself ) [ ; IF in another stand ifelse ( member? source-stand-id attr-mgmt_source ) [ ; IF this cell is already made attractive by the stand applying attraction let value-position ( position source-stand-id attr-mgmt_source ) ; find the position at which the attraction value is stored in the attr-mgmt lists if ( ( item value-position attr-mgmt ) < attr-mgmt_to-set ) [ ; IF the current value is LOWER than the value to set set attr-mgmt ( replace-item value-position attr-mgmt attr-mgmt_to-set ) ; Change the value to the higher value (w/out changing attr-mgmt_source) ] ] ; ELSE: just set the value by adding to the list [ set attr-mgmt ( lput attr-mgmt_to-set attr-mgmt ) ; add the attr value to the end of the list set attr-mgmt_source ( lput ( [ stand-id ] of myself ) attr-mgmt_source ) ; and add the source to the end of the list ] ] ] ] set current-distance_m ( current-distance_m + intercell-distance ) ; add to the distance for the next ring ] ] ] ] if ( length input_thinned-stands_ct1_list > 0 ) [ ; If there are stands that were CT'd (1) ask trees_current with [ member? stand-id input_thinned-stands_ct1_list ] [ ; Have all trees in those stands (because if it's a thinning, the effect will wear off)

244

set stand-w-thin-disturbance? true ; mark as having been thinned set attr-mgmt ( lput ( one-of attr-effect_mgmt_ext-thin-ct1_list ) attr-mgmt ) ; set their mgmt attraction to a value from the ct1 list set attr-mgmt_source ( lput stand-id attr-mgmt_source ) ; set the mgmt attraction source stand to their own stand id if edge? [ ; PROJECT TO NEARBY STANDS FROM EDGE CELLS let current-distance_m intercell-distance ; Set the starting ring to 1 cell distance foreach ring-list_attraction [ this-ring -> ; For each distance ring, let attr-mgmt_to-set ( attraction-distance-decay_FUNCTION ( one-of attr- effect_mgmt_ext-thin-ct1_list ) ( current-distance_m ) ) ; draw an attraction value from the list and run through distance decay equation, ask cells at-points this-ring [ if potential-tree? [ let source-stand-id ( [ stand-id ] of myself ) ; Store the stand-id of the attraction source (edge in mgmt-affected stand) if ( stand-id != [ stand-id ] of myself ) [ ; IF in another stand ifelse ( member? source-stand-id attr-mgmt_source ) [ ; IF this cell is already made attractive by the stand applying attraction let value-position ( position source-stand-id attr-mgmt_source ) ; find the position at which the attraction value is stored in the attr-mgmt lists if ( ( item value-position attr-mgmt ) < attr-mgmt_to-set ) [ ; IF the current value is LOWER than the value to set set attr-mgmt ( replace-item value-position attr-mgmt attr-mgmt_to-set ) ; Change the value to the higher value (w/out changing attr-mgmt_source) ] ] ; ELSE: just set the value by adding to the list [ set attr-mgmt ( lput attr-mgmt_to-set attr-mgmt ) ; add the attr value to the end of the list set attr-mgmt_source ( lput ( [ stand-id ] of myself ) attr-mgmt_source ) ; and add the source to the end of the list ] ] ] ]

245

set current-distance_m ( current-distance_m + intercell-distance ) ; add to the distance for the next ring ] ] ] ] if ( length input_thinned-stands_ct2_list > 0 ) [ ; If there are stands that were ct2'd ask trees_current with [ member? stand-id input_thinned-stands_ct2_list ] [ ; Have all trees in those stands (because if it's a thinning, the effect will wear off) set stand-w-thin-disturbance? true ; mark as having been thinned set attr-mgmt ( lput ( one-of attr-effect_mgmt_ext-thin-ct2_list ) attr-mgmt ) ; set their mgmt attraction to a value from the ct2 list set attr-mgmt_source ( lput stand-id attr-mgmt_source ) ; set the mgmt attraction source stand to their own stand id if edge? [ ; PROJECT TO NEARBY STANDS FROM EDGE CELLS let current-distance_m intercell-distance ; Set the starting ring to 1 cell distance foreach ring-list_attraction [ this-ring -> ; For each distance ring, let attr-mgmt_to-set ( attraction-distance-decay_FUNCTION ( one-of attr- effect_mgmt_ext-thin-ct2_list ) ( current-distance_m ) ) ; draw an attraction value from the list and run through distance decay equation, ask cells at-points this-ring [ if potential-tree? [ let source-stand-id ( [ stand-id ] of myself ) ; Store the stand-id of the attraction source (edge in mgmt-affected stand) if ( stand-id != [ stand-id ] of myself ) [ ; IF in another stand ifelse ( member? source-stand-id attr-mgmt_source ) [ ; IF this cell is already made attractive by the stand applying attraction let value-position ( position source-stand-id attr-mgmt_source ) ; find the position at which the attraction value is stored in the attr-mgmt lists if ( ( item value-position attr-mgmt ) < attr-mgmt_to-set ) [ ; IF the current value is LOWER than the value to set set attr-mgmt ( replace-item value-position attr-mgmt attr-mgmt_to-set ) ; Change the value to the higher value (w/out changing attr-mgmt_source) ] ]

246

; ELSE: just set the value by adding to the list [ set attr-mgmt ( lput attr-mgmt_to-set attr-mgmt ) ; add the attr value to the end of the list set attr-mgmt_source ( lput ( [ stand-id ] of myself ) attr-mgmt_source ) ; and add the source to the end of the list ] ] ] ] set current-distance_m ( current-distance_m + intercell-distance ) ; add to the distance for the next ring ] ] ] ] ] end to add-attr-mgmt_harvest [ input_regen-list-intensive_to-add input_regen-list- extensive_to-add ] if max-attraction-distance_m > 0 [ ; ADD ATTRACTION TO STANDS if ( length input_regen-list-intensive_to-add > 0 ) [ ; If there are any intensive stands harvested ask trees_potential with [ member? stand-id input_regen-list-intensive_to-add ] [ ; Have cells with stand ids on that list set stand-w-harv-disturbance? true ; mark as having been harvested set attr-mgmt ( lput ( one-of attr-effect_mgmt_int-harv_list ) attr-mgmt ) ; set their mgmt attraction to a value drawn from the list set attr-mgmt_source ( lput stand-id attr-mgmt_source ) ; and set the source as their own stand id if edge? [ ; IF edge?, project attraction to neighboring stand let current-distance_m intercell-distance ; Set the starting ring to 1 cell distance foreach ring-list_attraction [ this-ring -> ; For each distance ring,

247

let attr-mgmt_to-set ( attraction-distance-decay_FUNCTION ( one-of attr- effect_mgmt_int-harv_list ) ( current-distance_m ) ) ; draw an attraction value from the list and run through distance decay equation, ask cells at-points this-ring [ if potential-tree? [ let source-stand-id ( [ stand-id ] of myself ) ; Store the stand-id of the attraction source (edge in mgmt-affected stand) if ( stand-id != [ stand-id ] of myself ) [ ; IF in another stand ifelse ( member? source-stand-id attr-mgmt_source ) [ ; IF this cell is already made attractive by the stand applying attraction let value-position ( position source-stand-id attr-mgmt_source ) ; find the position at which the attraction value is stored in the attr-mgmt lists if ( ( item value-position attr-mgmt ) < attr-mgmt_to-set ) [ ; IF the current value is LOWER than the value to set set attr-mgmt ( replace-item value-position attr-mgmt attr-mgmt_to-set ) ; Change the value to the higher value (w/out changing attr-mgmt_source) ] ] ; ELSE: just set the value by adding to the list [ set attr-mgmt ( lput attr-mgmt_to-set attr-mgmt ) ; add the attr value to the end of the list set attr-mgmt_source ( lput ( [ stand-id ] of myself ) attr-mgmt_source ) ; and add the source to the end of the list ] ] ] ] set current-distance_m ( current-distance_m + intercell-distance ) ; add to the distance for the next ring ] ] ] ] if ( length input_regen-list-extensive_to-add > 0 ) [ ; If there are any extensive stands harvested ask trees_potential with [ member? stand-id input_regen-list-extensive_to-add ] [ ; Have cells with stand ids on that list set stand-w-harv-disturbance? true ; mark as having been harvested

248

set attr-mgmt ( lput ( one-of attr-effect_mgmt_ext-harv_list ) attr-mgmt ) ; set their mgmt attraction to a value drawn from the list set attr-mgmt_source ( lput ( stand-id ) attr-mgmt_source ) ; and set the source as their own stand id if edge? [ ; IF edge?, project attraction to neighboring stand let current-distance_m intercell-distance ; Set the starting ring to 1 cell distance foreach ring-list_attraction [ this-ring -> ; For each distance ring, let attr-mgmt_to-set ( attraction-distance-decay_FUNCTION ( one-of attr- effect_mgmt_ext-harv_list ) ( current-distance_m ) ) ; draw an attraction value from the list and run through distance decay equation, ask cells at-points this-ring [ if potential-tree? [ let source-stand-id ( [ stand-id ] of myself ) ; Store the stand-id of the attraction source (edge in mgmt-affected stand) if ( stand-id != [ stand-id ] of myself ) [ ; IF in another stand ifelse ( member? source-stand-id attr-mgmt_source ) [ ; IF this cell is already made attractive by the stand applying attraction let value-position ( position source-stand-id attr-mgmt_source ) ; find the position at which the attraction value is stored in the attr-mgmt lists if ( ( item value-position attr-mgmt ) < attr-mgmt_to-set ) [ ; IF the current value is LOWER than the value to set set attr-mgmt ( replace-item value-position attr-mgmt attr-mgmt_to-set ) ; Change the value to the higher value (w/out changing attr-mgmt_source) ] ] ; ELSE: just set the value by adding to the list [ set attr-mgmt ( lput attr-mgmt_to-set attr-mgmt ) ; add the attr value to the end of the list set attr-mgmt_source ( lput ( [ stand-id ] of myself ) attr-mgmt_source ) ; and add the source to the end of the list ] ] ] ] set current-distance_m ( current-distance_m + intercell-distance ) ; add to the distance for the next ring ]

249

] ] ] ] end

;~~~~~~~~~~~~~~~ REMOVE mgmt attraction ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ; minimum attraction duration = 2 yr, max = 4 yr to remove-attr-mgmt_by-stand ; Create clean lists for the next step, thin and harvest let thin-0yr-ago_after [] let thin-1yr-ago_after [] let thin-2yr-ago_after [] let thin-3yr-ago_after [] let harv-0yr-ago_after [] let harv-1yr-ago_after [] let harv-2yr-ago_after [] let harv-3yr-ago_after [] ;______;------REMOVE ATTR THINNED STANDS ------

; set the probability that attr is lost between the min and max duration ; prob attr loss

; THIN-0YR-AGO (1st year attracting) ; If the min is greater than 1 yr, have all thin-0yr-ago move to thin-1yr-ago ifelse ( dead-attr-duration_min >= 1 ) [ set thin-1yr-ago_after ( thin-0yr-ago ) ] [ ; Else, some probability of losing attr foreach thin-0yr-ago [ this-stand -> ; IF: RANDOM = TRUE, CLEAR ATTR and REMOVE from thinned list ifelse ( random-float 1 < prob-attr-dead-loss ) [ ask trees_potential with [ member? this-stand attr-mgmt_source ] [ let value-position ( position this-stand attr-mgmt_source ) ; Find the position of this source in the attr-mgmt lists set attr-mgmt ( remove-item value-position attr-mgmt ) ; Remove the item at the position in (a) the attr-mgmt list

250

set attr-mgmt_source ( remove-item value-position attr-mgmt_source ) ; and (b) the attr-mgmt_source list ] print ( word "RM ATTR MGMT: Stand " this-stand " lost attr-mgmt" ) ] ; ELSE: RANDOM = FALSE, DO move to the next list [ set thin-1yr-ago_after ( lput this-stand thin-1yr-ago_after ) ] ] ]

; THIN-1YR-AGO (2nd year attracting) ------; If the min is greater than 2 yr, have all thin-1yr-ago move to thin-2yr-ago ifelse ( dead-attr-duration_min >= 2 ) [ set thin-2yr-ago_after ( thin-1yr-ago ) ] [ ; Else, some probability of losing attr foreach thin-1yr-ago [ this-stand -> ; IF: RANDOM = TRUE, CLEAR ATTR and REMOVE from thinned list ifelse ( random-float 1 < prob-attr-dead-loss ) [ ask trees_potential with [ member? this-stand attr-mgmt_source ] [ let value-position ( position this-stand attr-mgmt_source ) ; Find the position of this source in the attr-mgmt lists set attr-mgmt ( remove-item value-position attr-mgmt ) ; Remove the item at the position in (a) the attr-mgmt list set attr-mgmt_source ( remove-item value-position attr-mgmt_source ) ; and (b) the attr-mgmt_source list ] print ( word "RM ATTR MGMT: Stand " this-stand " lost attr-mgmt" ) ] ; ELSE: RANDOM = FALSE, DO move to the next list [ set thin-2yr-ago_after ( lput this-stand thin-2yr-ago_after ) ] ] ] ;------; THIN-2YR-AGO (3rd year attracting) ifelse ( dead-attr-duration_min >= 3 ) [ set thin-3yr-ago_after ( thin-2yr-ago ) ] [ ; Else, some probability of losing attr ; Have thin-2yr-ago move to thin-3yr-ago (unless removed)

251

foreach thin-2yr-ago [ this-stand -> ; IF: RANDOM = TRUE, CLEAR ATTR and REMOVE from thinned list ifelse ( random-float 1 < prob-attr-dead-loss ) [ ask trees_potential with [ member? this-stand attr-mgmt_source ] [ let value-position ( position this-stand attr-mgmt_source ) ; Find the position of this source in the attr-mgmt lists set attr-mgmt ( remove-item value-position attr-mgmt ) ; Remove the item at the position in (a) the attr-mgmt list set attr-mgmt_source ( remove-item value-position attr-mgmt_source ) ; and (b) the attr-mgmt_source list ] print ( word "RM ATTR MGMT: Stand " this-stand " lost attr-mgmt" ) ] ; ELSE: RANDOM = FALSE, DO move to the next list [ set thin-3yr-ago_after ( lput this-stand thin-3yr-ago_after ) ] ] ] ;------; THIN-3YR-AGO (4th year attracting) ; Remove attraction from *all* thin-3yr-ago stands foreach thin-3yr-ago [ this-stand -> ; CLEAR ATTR and REMOVE from thinned list ask trees_potential with [ member? this-stand attr-mgmt_source ] [ let value-position ( position this-stand attr-mgmt_source ) ; Find the position of this source in the attr-mgmt lists set attr-mgmt ( remove-item value-position attr-mgmt ) ; Remove the item at the position in (a) the attr-mgmt list set attr-mgmt_source ( remove-item value-position attr-mgmt_source ) ; and (b) the attr-mgmt_source list ] print ( word "RM ATTR MGMT: Stand " this-stand " lost attr-mgmt" ) ]

;------REMOVE ATTR HARVESTED STANDS ------; HARV-0YR-AGO (1st year attracting) ; If the min is greater than 1 yr, have all harv-0yr-ago move to harv-1yr-ago ifelse ( dead-attr-duration_min >= 1 ) [ set harv-1yr-ago_after ( harv-0yr-ago ) ] [ ; Else, some probability of losing attr

252

foreach harv-0yr-ago [ this-stand -> ; IF: RANDOM = TRUE, CLEAR ATTR and REMOVE from harv list ifelse ( random-float 1 < prob-attr-dead-loss ) [ ask trees_potential with [ member? this-stand attr-mgmt_source ] [ let value-position ( position this-stand attr-mgmt_source ) ; Find the position of this source in the attr-mgmt lists set attr-mgmt ( remove-item value-position attr-mgmt ) ; Remove the item at the position in (a) the attr-mgmt list set attr-mgmt_source ( remove-item value-position attr-mgmt_source ) ; and (b) the attr-mgmt_source list ] print ( word "RM ATTR MGMT: Stand " this-stand " lost attr-mgmt" ) ] ; ELSE: RANDOM = FALSE, DO move to the next list [ set harv-1yr-ago_after ( lput this-stand harv-1yr-ago_after ) ] ] ]

; HARV-1YR-AGO (2nd year attracting) ------; If the min is greater than 2 yr, have all harv-1yr-ago move to harv-2yr-ago ifelse ( dead-attr-duration_min >= 2 ) [ set harv-2yr-ago_after ( harv-1yr-ago ) ] [ ; Else, some probability of losing attr foreach harv-1yr-ago [ this-stand -> ; IF: RANDOM = TRUE, CLEAR ATTR and REMOVE from harv list ifelse ( random-float 1 < prob-attr-dead-loss ) [ ask trees_potential with [ member? this-stand attr-mgmt_source ] [ let value-position ( position this-stand attr-mgmt_source ) ; Find the position of this source in the attr-mgmt lists set attr-mgmt ( remove-item value-position attr-mgmt ) ; Remove the item at the position in (a) the attr-mgmt list set attr-mgmt_source ( remove-item value-position attr-mgmt_source ) ; and (b) the attr-mgmt_source list ] print ( word "RM ATTR MGMT: Stand " this-stand " lost attr-mgmt" ) ] ; ELSE: RANDOM = FALSE, DO move to the next list [ set harv-2yr-ago_after ( lput this-stand harv-2yr-ago_after ) ] ]

253

] ;------; HARV-2YR-AGO (3rd year attracting) ifelse ( dead-attr-duration_min >= 3 ) [ set harv-3yr-ago_after ( harv-2yr-ago ) ] [ ; Else, some probability of losing attr ; Have harv-2yr-ago move to harv-3yr-ago (unless removed) foreach harv-2yr-ago [ this-stand -> ; IF: RANDOM = TRUE, CLEAR ATTR and REMOVE from harv list ifelse ( random-float 1 < prob-attr-dead-loss ) [ ask trees_potential with [ member? this-stand attr-mgmt_source ] [ let value-position ( position this-stand attr-mgmt_source ) ; Find the position of this source in the attr-mgmt lists set attr-mgmt ( remove-item value-position attr-mgmt ) ; Remove the item at the position in (a) the attr-mgmt list set attr-mgmt_source ( remove-item value-position attr-mgmt_source ) ; and (b) the attr-mgmt_source list ] print ( word "RM ATTR MGMT: Stand " this-stand " lost attr-mgmt" ) ] ; ELSE: RANDOM = FALSE, DO move to the next list [ set harv-3yr-ago_after ( lput this-stand harv-3yr-ago_after ) ] ] ] ;------; HARV-3YR-AGO (4th year attracting) ; Remove attraction from *all* harv-3yr-ago stands foreach harv-3yr-ago [ this-stand -> ; CLEAR ATTR and REMOVE from harv list ask trees_potential with [ member? this-stand attr-mgmt_source ] [ let value-position ( position this-stand attr-mgmt_source ) ; Find the position of this source in the attr-mgmt lists set attr-mgmt ( remove-item value-position attr-mgmt ) ; Remove the item at the position in (a) the attr-mgmt list set attr-mgmt_source ( remove-item value-position attr-mgmt_source ) ; and (b) the attr-mgmt_source list ] print ( word "RM ATTR MGMT: Stand " this-stand " lost attr-mgmt" ) ]

254

;______; UPDATE ALL LISTS FOR THE NEXT YEAR set thin-0yr-ago thin-0yr-ago_after set thin-1yr-ago thin-1yr-ago_after set thin-2yr-ago thin-2yr-ago_after set thin-3yr-ago thin-3yr-ago_after set harv-0yr-ago harv-0yr-ago_after set harv-1yr-ago harv-1yr-ago_after set harv-2yr-ago harv-2yr-ago_after set harv-3yr-ago harv-3yr-ago_after end