-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patherismann-final-report-econ-diversity.Rmd
145 lines (86 loc) · 39.3 KB
/
erismann-final-report-econ-diversity.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
---
title: "Coffee Leaf Rust: Modelling a Serious Threat to Smallholder Farmers"
author: "Gabrial Erismann"
date: "`r Sys.Date()`"
output: pdf_document
bibliography: references.bib
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(knitr)
```
### Abstract
Coffee Leaf Rust (CLR) is a biotrophic fungi that attacks the planted coffee species *Coffea arabica* and *C. canephora*. CLR poses a threat to the global coffee trade that supports millions of livelihoods worldwide. Further, important examples of biodiversity in smallholder mountain coffee plantations may be at serious risk of market developments and the spread of aggressive strains of CLR. This paper explores the background of CLR, examines one landscape approach at modelling its spread, and develops a new landscape model.
### Background
*Coffea arabica* and *Coffea canephora*, respectively Arabica and Robusta coffee, rank as the 112th most traded commodity, accounting for more than 30 billion, or 0.18%, of global trade in 2020 [@OEC_2022]. At the base of this global trade, which includes value-added roasted coffee, are the producers, 60% of whom are considered smallholders with less than 5 hectares under production. Of these, more than 40% of these producers and their workers are estimated to live in poverty and there are serious concerns about the future of smallholder coffee farms without reforms to the sector [@Siles_2022]. One of the problems facing these smallholders is Coffee Leaf Rust (CLR), *Hemileia vastatrix*, the most significant pathogen of cultivated coffee, especially *C. arabica.* CLR accounts for billions of dollars in losses annually despite researchers and practitioners working for more than 150 years to develop techniques, fungicides and resistant cultivars to prevent outbreaks in coffee regions [@Talhinhas_2017].
Coffee grows in the tropical belt around the world, from Vietnam to Colombia to its Ethiopian homeland. The risks of CLR to smallholder livelihoods are therefore constrained to areas of the world with many pre-existing challenges in terms of economic growth and development that make support to vulnerable farmers less available than may be efficient. In Ethiopia, smallholder coffee plantations provide refuge for a number of key montane woodland species at threat of disappearing as "wild" forest patches become smaller, including the only populations of wild *C Arabica* species [@Tadesse_2014]. In Central America and Southern Mexico, the coffee plantations are known to host biodiversity that exceeds that of the surrounding mountain forests [@Perfecto_1996]. This is due to the way many coffee producers grow their trees in a mixed crop system with a diverse array of native shade trees overhead and often quite a bit of undergrowth that allows the different components of a biodiverse ecosystem to provide additional services and mitigate deleterious human impacts on local ecosystems [@Jha_2014]. There is concern that the spread of aggressive variants of CLR threaten these examples of sustainable development and production.
CLR is a biotrophic fungi in the rust family (Puccinales) which is the largest and most diverse group of plant pathogens with more than 8000 described species affecting nearly all plant families globally [@Helfer_2014]. The extreme diversity within this giant family makes understanding each species a unique challenge, as the lifecycles and properties of different rust species remain a source of debate. For example, despite the importance of coffee and CLR to the global economy and significant resources invested,there remains significant debate on the lifecycle of CLR as some rust species reproduce in a simple asexual fashion, while other pursue more complex lifecycles involving sexual reproduction on other hosts. Since these alternative hosts provide a source of infection and a site of sexual reproduction critical for the fast reaction to evolutionary pressure for which many pests are known [@Townsend_2017], and the two primary methods of control (resistant cultivar development and fungicides) create massive evolutionary pressure to overcome these control methods, a full understanding of CLR's lifecycle is very important. Despite the lack of expert consensus, opinion continues to lean towards the existence of a second host, one primary reason being the fast evolutionary capability demonstrated by CLR implies sexual reproduction of the type that likely cannot occur during the sporulation process involved in the leaf-to-leaf infection observed on coffee plantations [@Koutouleas_2019]. In addition to the uncertainty regarding the lifecylce of CLR, the specific molecular interactions that inhibit and favor CLR infection and development are not well understood, nor are the genes conferring resistance well-mapped: in short there remains significant fundamental biological research to fully understand and overcome the challenge posed by CLR [@Toniutti_2017].
```{r, echo=FALSE,out.width="40%", out.height="30%",fig.cap="Left, a picture of the devastation that CLR can cause in a heavy infestation in Costa Rica from 2013. Photo from Avelino 2015. Right, a picture of Coffee Leaf Rust. Photo from wikipedia.",fig.show='hold',fig.align='center'}
knitr::include_graphics(c("/home/tge/dev/rust-model/clr-landscape/figures/photo.jpg","/home/tge/dev/rust-model/clr-landscape/figures/photo-2.png"))
```
### Brief history of coffee and coffee leaf rust
In order to understand the situation of CLR today, a bit of history of the cultivation of coffee is important. The species *C. arabica* originates from the highlands of Ethiopia, and while coffee is a tropical plant, this species is ill-suited to the wet, humid conditions typical of many tropical environments enjoyed by CLR [@Talhinhas_2017]. Rust incidence would have been low in *C. arabica's* homerange, so there is relatively little natural resistance to CLR or other fungal pathogens (Ibid). Further, it first came under cultivation in N. Yemen, which has an even drier climate than that of the Ethiopian highlands and the accelerated evolutionary pressure from human cultivation would have led to a *C. arabica* lineage that even less suited to resist the fungal infections common to more humid environments (Ibid). As these plants of Yemeni origin provided nearly the entire genetic base for coffee cultivars, this led to a limited gene pool and very limited resistance to CLR (Ibid). Thus, once large coffee plantations sprang up in tropical regions of the old world, it was only a matter of time until a massive CLR outbreak caused serious damage. This happened first in the Celyon epidemic where coffee production fell from 43 million Kg to 2.5 million kg, and shifted the entire economy of the island of the British colony of Ceylon (now Sri Lanka) [@Gullino_2021]. Soon, coffee production with *C. arabica* was under threat throughout the old world with outbreaks spanning the range of coffee plantations.
At this point, two factors kept coffee production high: By the turn of the 20th century, entrepreneurial growers had been experimenting with different varieties and *C. robusta* was "discovered" and began to enter large scale production due to its innate resistance to CLR [@Talhinhas_2017]. Indeed the first sighting of CLR in the great lakes region overlaps with the native range of *C. robusta*, which indicates that they likely evolved together for some time. Robusta coffee generally has a higher caffeine content, the plant is more robust and less fussy, but the taste is generally judged to be inferior to the Arabica cultivars (Ibid). Robusta could however ensure coffee for the masses, as the crop had already become a staple of life for many people around the globe. Fortunately for the refined coffee drinkers, the new world remained rust free until the 1970s when CLR quickly spread into the Brazil, Colombia and Central America (Ibid). By this time, new generations of fungicides reduced the danger to *C arabica*, large-scale planting of rust-resistant varieties derived from the HDT had been planted globally and many smallholder mixed-cropping systems were often not badly affected [@Avelino_2015]. Epidemics in the past had sprung up, however smallholders were largely unbothered by the disease and were likely accepting higher losses due to CLR than they understood due to the production patterns in coffee (Ibid).
### Techniques to control coffee leaf rust
Given this history, it is not surprising that differences in altitude of Coffee plantations are a a reliable predictor for incidence of CLR infections, with altitude explaining the greatest variation in CLR incidence among infected fields in the largest survey of CLR in Ethiopia to date [@Belachew_2020]. One surprising result of the study is how widespread CLR is throughout the country: "CLR was present in every single field" with a higher than 50% incidence in more than 25% of fields. The reasons for the widespread CLR infections outlined in the article are numerous - use of vulnerable but valuable commercial varieties, spread of plantations in unsuitable regions and poor management - but altitude remained far and away the best predictor for severity (Ibid). The authors note however, that even extremely well-managed coffee plantations at high altitudes using resistant cultivars recorded non-negligible levels of CLR, thus highlighting the adaptability and danger of CLR in Ethiopia [@Belachew_2020]. This is similar to the main hypothesis regarding the proximate causes of the recent major CLR outbreak in the Americas from 2008 - 2013. As noted previously, the situation was seen as generally manageable in Central America since the arrival of CLR to the New World in the 1970s. Unfortunately, decades of low coffee prices led to underinvestment in coffee farms and the planting of productive but vulnerable varieties to increase yields. Combined with a fertilizer price shock and weather favourable to CLR development during this period, coffee farmers were devastated by the worst outbreaks of CLR in some time [@McCook_2015].
Once CLR has arrived, fungicides are critical for control. Given how widespread CLR is, many coffee plantations preemptively plan to spray fungicides throughout the year: taking the case of Brazil, we see that the primary means of keeping CLR instances under control, particularly for the productive, mechanized firms, is regularly spraying a combination of fungicides [@Sera_2022]. While one expects large plantations of mechanically grown coffee, such as Brazil is known for, to widely use pesticides, this appears to be the case for organic producers as well, who simply employ different classes of fungicides to achieve a similar effect in the case of infection of susceptible varieties [@De_resende_2021]. The profound effects of the pressures introduced by CLR are demonstrated in a recent study on smallholder farmers operating mixed forest-shade-tree coffee plantations in Mexico. Prior to the arrival of CLR, more than 80% in the study region had an organic certification and none used agrochemicals, while after the arrival of CLR more than half used chemicals and it was unclear if any farmers would continue to be certified with an organic label in the future [@Valencia_2018]. New cultivars were introduced and management practices shifted from biodiversity friendly shaded production to cultivation aimed to minimize CLR reduction. The implications of increased reliance of these smallholder farmers on international agro-industrial firms for cultivars, fungicides (and perhaps more in the future) comes with its own risks relative to the behavior of the companies and exposes smallholders to risks regarding exchange rates and external shocks, as we have seen only too vividly with the war in Ukraine (Ibid). In short, the need to resort to fungicides comes from three factors: CLR is common, it can cause high damage, and fungicides work effectively. As noted, it is often necessary to combine fungicides with different mechanisms for action in order to achieve the desired result, especially on large mechanical farms.
The other main option that farmers can take is to introduce resistant cultivars. Most resistance is derived from a spontaneous cross between *C arabica* and *C canephora* known as *Hybrido de Timor* (HDT) and fortunately for coffee drinkers globally, this spontaneous hybrid was able to be crossed with *C arabica* giving the robust qualities of the *C canephora* plant, including resistance to CLR, while maintaining the "cupping quality" of *C arabica* plants [@Diola_2011]. For some time, these hybrids had been highly effective at preventing CLR if combined with proper management and control (and fungicides). Whereas a plantation of all susceptible plants could succumb completely to a CLR epidemic, a plantation of resistant plants would produce a full crop even in an epidemic situation. While it appears that the recent outbreaks in Cololmbia and Meso-America were due to weather and environmental conditions, not a change in cultivar resistance, this is nonetheless a clear and present danger for coffee production [@vanderVossen_2015]. Further, this is a changing situation, and the World Coffee Research Director Christoph Montagnon indicated that resistance would break down in most cultivars in many regions around the world between 2023 and 2028 [@Brown_2018]. Already, in 2017 the World Coffee Research Organization announced that the lempira cultivar, widely planted in Honduras after the 2008-2013 outbreak, had lost resistance [@WCR_2017]. Highland Arabica coffees in Vietnam are rapidly losing resistance to new aggressive CLR strains and even Robusta varieties are showing waning resilience [@Le_2022]. While many authors concluded that new CLR varieties did not contribute to the last big outbreak, but the record shows that this may not always be the case.
There are numerous studies on the mitigation of CLR to complement the strategies of fungicide use and plantation of resistant cultivars: they begin with ensuring proper plant nutrition and maintenance [@De_resende_2021]. Like one might expect when dealing with a fungus pruning the coffee trees to reduce humidity and increase exposure to the sun and air flow can reduce the ability of CLR to germinate and grow (Ibid). CLR, like most parasites, thrives on plants that are growing under suboptimal conditions with reduced natural defenses. Since coffee is a nitrophilous plant, intensive or semi-intensive plantations especially need to add nitrogen to the soil to ensure the plant has adequate supply for its natural molecular defenses to inhibit CLR penetration of the leaf [@Toniutti_2017]. Via a mechanism similar to ensuring adequate nitrogen supply, reducing the load of coffee berries has been shown to reduce the spread of CLR by allowing the plant to devote more resources to its own health thereby reducing incidence of disease [@Belan_2015]. Similarly, properly pruning the trees to remove unhealthy branches and prevent overloading of the trunk can reduce stress on trees and prevent outbreaks of CLR. These general reccomendations are in any case best practice to follow to avoid infection by any number of other pests, from coffee leaf miner to coffee berry disease and ensure healthy trees that produce a good yield. Other recommendations are not so straightforward, as for example while the already discussed shaded coffee plantations are famous for their biodiversity and sustainability, evidence indicates that at least certain shade trees can greatly favor incidence of CLR by reducing the rate at which spores are washed away by rain [@Avelino_2020]. There are other hypothetical mechanical interactions that may or may not favour CLR that can be put forward - in fact the role of shade trees in the CLR and other fungal incidence is highly ambiguous as it depends on the season, the microclimate and other factors [@Liebig_2019].
The increase in global temperatures agreed upon by climate models in the IPCC reports and the corresponding increase in water content in the atmosphere is likely to have a favorable effect on many rust species, including CLR, globally [@Helfer_2014]. In many regions this is already noticeable and increased minimum winter temperatures in Colombia during the latest outbreak are blamed for exasperating the epidemic [@Avelino_2015]. The climatic effects are not generally seen as the biggest drivers, compared to plant genetic homogenization and increased global connectivity (and thus spread) for most rust fungus, CLR included [@Helfer_2014]. In the 2008-2013 outbreaks, climate change was hypothesized to be another main culprit, but a careful analysis showed that this was likely "normal" variation in weather that should be expected for the region [@Bebber_2016]. However, as climate change worsens and heat and humidity creep up the coffee-growing mountain landscapes this will not necessarily always be true.
### Modelling Coffee Leaf Rust
One approach to understanding the dynamics of Coffee Leaf Rust is to model its spread using empirical (statistical) or mechanistic models. Each approach has drawbacks and both approaches have widely been used in the study of plant diseases for decades. With respect to CLR, a search of key terms in Web of Science revealed that a significant amount of current modelling research is done on computer vision to identify early stages of Coffee Leaf Rust outbreaks from other causes of leaf yellowing, detection of severe outbreaks via remote sensing (satellite/aerial imagery), and in genetics to identify beneficial gene sequences. This is not surprising as key advances in the field of artificial intellgience, computer vision, biotechnology and satellite technology are making these technologies increasingly effective and available across fields. This report will not focus on these applications and will instead look at one instance of a mechanistic CLR transmission model that was recently published and present a different model based on a similar approach.
The first model is presented in the 2022 paper *Spatially explicit models predict coffee rust spread in fragmented landscapes* in which the authors generate a coffee-forest matrix, seed CLR infection, collect data from many runs of the program and then compare the resulting spread to that seen in other studies and real world data from smallholder coffee farmers in Central America [@Beasley_2022]. Specifically, there is some evidence that CLR spread is positively associated with increased pasture land and deforestation, and differing distributions of coffee plantations across the landscape, so the authors aim to use a landscape model to predict how effectively coffee will spread across the forest barrier to adjacent coffee plantations in a patchwork environment representative of actual coffee plantations. Understanding the threat that CLR poses to these landscapes is very important due to the high biodiversity and cultural value of the traditional, patchwork shaded coffee plantations in mountainous areas and the importance of these landscapes for economic and social production.
The authors begin with a mainstay of landscape ecology for more than 30 years, the neutral landscape model which is used to investigate either (1) "how processes impact landscape patterns" or (2) "the effects of landscape structure on ecological processes" [@Kimberly_1997]. This paper is focused on the latter, as the spread of CLR is hypthosized to be increased when forest is converted to a pasture through deforestation via the mechanism of increased facilitation of wind dispersal [@Beasley_2022]. The landscape of "coffee", "forest", and "deforested" is written in a Python script and generated using the Python software package [nlmpy](https://pypi.org/project/nlmpy/), which was created to facilitate the use of modelling for research in landscape ecology. The authors use a *nearest-neighbor random cluster algorithm*, whose technical details are beyond the scope of this paper, to cluster the coffee grid cells and the forest grid cells in a realistic fashion. A small change in cluster values has a large change in the distribution of forest/coffee/deforested in the landscapes, as can be seen in the bi-valued coffee/forest matrices generated in the figure below.
```{r, echo=FALSE,out.width="30%", out.height="30%",fig.cap="Changes in the cluster values with a constant 75\\% coffee / 25\\% forest landscape. The cluster value quickly has a large impact on the landscape distribution. Note that the higher cluster values can change the proportion of coffee due to the randomization process.",fig.show='hold',fig.align='center'}
knitr::include_graphics(c("/home/tge/dev/rust-model/clr-landscape/figures/fig1-1.png","/home/tge/dev/rust-model/clr-landscape/figures/fig1-2.png","/home/tge/dev/rust-model/clr-landscape/figures/fig1-3.png"))
```
Next, the authors model the spread of the virus. This is done in a straightforward way conceptually, as in many models of this type: pick one or more "individual(s)" and declare it infected. Then, let the mechanisms of infection take-over and run for a predetermined amount of time. In this case, the authors infect one cell and let the program run for 400 timesteps of 1 day. Since we have a spatially explicit model (a matrix of coffee / pasture / forest), the goal is to think about how spatial interactions affect the outcome so we need to start by thinking about infection on the 1) local level, such as by leaves touching, 2) intermediate level, such as by splashing rain and low wind spreading spores a small distance, and 3) and long-range level, such as by storms blowing spores across the coffee plantation [@Vandermeer_2018]. Following this framework, the authors define a "local" transmission and a "regional" transmission that happen sequentially on each time step.
The process of local infection is given by a *Stochastic cellular automaton* in which the probability of infection is given by the beta distribution $p ~ Beta(N,8-N)$ where N is the number of infected cells in the Moore neighborhood. Essentially, the likelihood of infection at each time step is random and depends on the number of infected neighbors it has. As a consequence, if all neighboring cells are infected, then the probability is one, and if no neighboring cells are infected the probability is 0. Local transmission therefore only occurs among adjacent cells and can only expand if there is further coffee plantation - a forest barrier should stop this type of infection in the model. This is a straight forward and natural way to look at local transmission.
The second type of infection is "regional" or long-range infection which is driven by wind dispersal from CLR infections at the margin of the plantation. The long range infection process is a more involved algorithm that is not nearly as straightforward as for local infection. First, on each time-step infected plants release one spore to a random cell in its Moore Neighborhood. Each spore is then given a movement value and goes to a random cell in its Moore neighborhood where a certain amount of the movement value is consumed. The amount consumed depends on the type of cell - forest consumes more than pasture or coffee. The spore repeats this process until there are no more movement points. The spore lives forever and each day the process repeats and the spore continues moving in this fashion until it reaches a non infected cell. It then has a 50% chance of infecting the cell. If it does, it is destroyed. The idea is that forest will slow movement between plantation clusters by reducing the movement of spores in forest cells.
There are many assumptions to this movement model that can be criticized, but it provides a useful framework for thinking about how CLR spores can move through the plantation-forest matrix. In both the model and in the real world data used to test the model, deforestation had little impact on predicted coffee spread. In the real-world landscapes, there was significantly more coffee relative to forest than in the parameters used for the model, so spread was faster than the model predicted. In summary, the authors provide evidence that adjascency of coffee plantations is a critical factor in spread, as is their density on the landscape.
### Discussion of Model Creation
#### Model Development
A number of models were looked at based on the Web of Science search, but in the end the Beasley 2022 article was chosen for a couple of reasons. First, the code and results were all available on Github with the landscape generator *nlmpy* well documented online. While this was not quite as useful as it could have been as I was not able to get the code to run "as is" I was nonetheless able to use their code to move in a new direction. Second, the idea of modelling a landscape representative of mountain coffee plantions with biodiversity and cultural value seemed exceptionally relevant for this course. If CLR can be kept at bay with extensive coffee plantations that have remnant forest creating dispersion barriers between them, this could be a positive step for these smallholder farmers.
```{r, echo=FALSE,out.width="60%", out.height="30%",fig.cap="Interseasonal variation of Coffee Leaf Rust from Vandermeer 2018",fig.show='hold',fig.align='center'}
knitr::include_graphics("/home/tge/dev/rust-model/clr-landscape/figures/photo-3.png")
```
Therefore, I followed Beasely 2022 and created a coffee / forest matrix using the *clustered nearest neighbor* neutral landscape model available in *nlmpy*. However, from that point, my approach was quite different. Beginning with the layout of the grid, I added 5 coffee plants within each coffee plantation grid cell, and thus had to add a third level of infection, allowing me to more closely follow the conceptual framework of Vandermeer 2018. I also added a disease progression aspect, where an infected plant develops a more significant CLR infection as time goes on. Thus, I have infection increasing on each infected plant, infection occuring between plants within cells, between plants in neighboring cells and between plants across the grid. In order to account for the high interseasonal variation a "wet season" and a "dry season" was added where virus propagation is significantly reduced in the dry season.
The progression of infection on each infected plant is not stochastic and grows more quickly the longer the plant has been infected. This allows the model to account for the latency period before the rust is infectious and allows for the infectious pressure to increase as the disease burden grows for each plant. Within grid infection occurs if infection is above a certain threshold. SImilarly, neighbor cell infection occurs when infectios pressure is high enough in adjascent cells. Long range infection occurs if the total infectious pressure is above a certain threshold and then it infects a prespecified number of previously healthy plants randomly in the grid. All stochasticity is contained in the weather variable generated each day. If infection is conducive under the conditions and the pressure is high enough then one neighboring plant in an adjascent grid cell will become infected.
The randomness of the model comes from draws from a series of uniform distributions. First, the weather has to be conducive to neighboring infection, this is conceived of as normal conditions for the wet season. Second, the weather has to be conducive to infection between grid cells - this is taken to be some light wind/rain to cause spore moevement is said to occur on half of the days conducive to infection. Long range infection occurs at a rate of once per month and is supposed to correspond to a high wind event that spreads spores throughout. The dry season has lower probability for all types of infection than the wet season. This is a pattern clearly seen in CLR throughout the world, with there often being a pronounced seasonal changes in infection [@Vandermeer_2018]. Further, I do not model the spores as transmission and infection is assumed to happen based on the conditions for that day. This is not unreasonable as it has been shown that infection generally occurs with 24 hours of the spore landing on a suitable site and the spores themselves are not thought to be long-lived [@Rayner_1969]. Many of the parameters were based on the the paper *Modelling coffee leaf rust dynamics to control its spread*, which provided a review of current and past research into CLR infection parameters [@Djuikem_2021].
```{r echo = FALSE, results = 'asis'}
parameter <- c("grid cells","plants per cell","starting infection","coffee proportions","clustering","chance within cell infection","chance neighbor cell infection","chancel global infection","latency period","dry period, wet period")
value <- c("1600","8","2","90%, 75%, 60%","0.2, 0.3, 0.4",'dry:20%, wet:70%',"dry:12%, wet:42%","dry:0.6%, wet:2.1%","20 days","180 days, 180 days")
comment <-c("The model is not robust to changes in size as the infection process infects a fixed number of healthy plants per day ","The number of grid cells and the plants per cell eflect actual numbers of coffee plants for a smallholder farmer","Infection initialized with two randomly chosen plants in adjascent cells","The 75% parameter matches many smallholder farms in Mesoamerica","Higher cluster values increase the size of group clusters and due to the randomization process greatly increase the variability of the overall number of plants on a 40X40 grid", "The chance of infection is somewhat arbitrary as empirical values are highly dependent on a number of factors.","Spread across the grid is mainly driven by adjascent spread during the wet season","These values are adjusted so that there will be roughly 6 global spread events per year","latency period somewhat lower than empirical values which range form 21-30 days based on conditions","Simple breakdown of the year into half dry-season and half wet-season")
df <- data.frame(parameter, value,comment)
kable(df,caption = "Model Parameters")
```
### Results
For this paper the model was run 10 times with 9 different parameter sets for a total of 90 runs. The only parameters modified related to the landscape: the clustering of the plants and the proportion of coffee to forest. In each case, the grid was initialized to a size of 40X40 with 8 plants in each cell. With this model and these parameter changes, I wanted to look at how having forest adjacent to coffee plantations would inhibit the main mechanism of spread - from adjacent cell to adjacent cell. Nonetheless, there is a wide variability in outcomes that result from each run of the model, even runs with the exact same parameters. Looking at the number of infected plants for the example landscapes created earlier in the figure below, we can see that the within-group variability is far larger than the between-group variability for each clustering value.
```{r, echo=FALSE,out.width="30%", out.height="100%",fig.cap="Infected plants from day 0 to day 360. Each graph represents 10 runs with the given parameters. With a 25\\% forest value, a change in the clustering does not appear to have much effect on spread. There are 9600 +/- 20 plants in each run. ",fig.show='hold',fig.align='center'}
knitr::include_graphics(c("/home/tge/dev/rust-model/clr-landscape/figures/infected-plants-[0.25, 0.75]-0.2.png","/home/tge/dev/rust-model/clr-landscape/figures/infected-plants-[0.25, 0.75]-0.3.png","/home/tge/dev/rust-model/clr-landscape/figures/infected-plants-[0.25, 0.75]-0.4.png"))
```
```{r, echo=FALSE,out.width="30%", out.height="100%",fig.cap="Changing coffee-forest proportions while keeping the cluster value the same results in little change from 90\\% coffee to 75\\% coffee, but it does appear that there is a significantly decreased value for 60\\% coffee, beyond simply the reduction in the number of coffee plants, if the two outliers are excluded.",fig.show='hold',fig.align='center'}
knitr::include_graphics(c("/home/tge/dev/rust-model/clr-landscape/figures/infected-plants-[0.1, 0.9]-0.3.png","/home/tge/dev/rust-model/clr-landscape/figures/infected-plants-[0.25, 0.75]-0.3.png","/home/tge/dev/rust-model/clr-landscape/figures/infected-plants-[0.4, 0.6]-0.3.png"))
```
```{r, echo=FALSE,out.width="30%", out.height="30%",fig.cap="The algorithm used to generate the model sometimes produces proportions far different from those expected. In all cases, the majority of the cells should be coffee but the cluster value of 0.4 resulted in more forest than coffee. The left most figure should be 60 percent coffee and the middle and right columns should be 90 percent coffee. These examples demonstrate the wide variability that can occur when deriving discreet values based on a continuous model and are a reminder to carefully check each aspect when modelling.",fig.show='hold',fig.align='center'}
knitr::include_graphics(c("/home/tge/dev/rust-model/clr-landscape/figures/fig2-1.png","/home/tge/dev/rust-model/clr-landscape/figures/fig2-2.png","/home/tge/dev/rust-model/clr-landscape/figures/fig2-3.png"))
```
As can be seen in the table below, the percentage of infected plants shrinks with the percentage of total plants. This is likely due to two factors. Infection is much slower during the dry seaon so there is not enough time for landscapes with lots of plants to "catch up" to landscapes with fewer plants. Further, the infection process chooses one adjascent uninfected plant per day for each infected cell if conditions permit. If there are more plants, this restriction to one additional infection will decrease the percentage of plants infected mechanically even if the conditions would permit a higher infection.
```{r echo = FALSE, results = 'asis'}
proportion <- c(0.9,0.75,0.6,0.9,0.75,0.6,0.9,0.75,0.6)
clusters <- c(0.2,0.2,0.2,0.3,0.3,0.3,0.4,0.4,0.4)
coffee_percent <- c(0.89,0.88,0.77,0.74,0.74,0.65,0.59,0.58,0.26)
uninfected_percent <- c(0.55,0.52,0.5,0.58,0.53,0.45,0.52,0.58,0.29)
df <- data.frame(proportion, clusters, coffee_percent, uninfected_percent)
kable(df,caption = "Average results for percentage of cells that contain coffee and percentage of coffee cells that become infected for each cluster and coffee proportion value.")
```
### Discussion
The first key aspect is the wide variability of the model. This is suspected to be due to (un)lucky global infection incidences prior to the wet season. If this happens, then the much faster adjacent cell infection will spread very fast form multiple points once the higher infection rate in the wet season starts. This has a reasonable interpretation: if conditions during the dry season allow CLR to establish a strong foothold before the expansion of the wet season, that would lead to a more widespread epidemic. However, given the limited runs and the wide variability there are too few data points to make a conclusion. Another aspect affecting the wide-ranging probabilites is that the outcomes are the results of chained uniform distributions and does not use a standard model for such outcomes. This may be responsible as well for the wide variation. In one sense this wide variation is in accordance with observed values - CLR infection rates vary widely across smallholder plantations. Replacing the chained probability statements with a proper distribution function would be an improvement in the robustness of the model.
Additionally, given the high observed variability between and within parameter sets, the model would have to be run many more times in order to have a better idea of differences in outputs. At the moment, there are too few runs to construct a statistical evaluation. However, the program would have to be optimized to run faster, as at the moment a high level of infections results in a runtime of about 1 minute. This is not feasible if one wants to run the model say, 500 times for different parameter sets to tease out small differences in the wide variability. Additionally, the mentioned issues with the clustering values likely necessitate a quality control filtering to ensure that the results are not too strongly influenced by outliers that are not useful for the analysis.
One of the strengths of this model went unexploited in that the plants themselves have characteristics that were included in the model but not tested. Each coffee plant has attributes for cost, resistance, and production built into them, that could be modified to look at trade offs between investment and infection rates. In any future development of this model these would be key aspects to test and explore as the core of the model is a modifiable "coffee plant" with different attributes. Further, this flexibility does not come for free and this implementation takes significantly longer to run than that of the original model. As such, this model performs sub optimally for the results produced in this paper as it runs slower than it should since it is not taking advantage of the extra attributes.
Given that economic factors are suspected to be behind the last big outbreak in the Americas, this model was set up to look at some of the factors that affect production. However, given time constraints these factors were not included beyond some testing to make them work. While the distribution of coffee production across the landscape can affect virus spread, it is perhaps a minor factor compared to the macro-economic pressures that result in weak plants or the weather factors that lend themselves to be favourable to rust development. This limitation is not included in the model as the model is based on the years of significant infection, which are themselves outliers. At the same time, it is mainly the progression of these outlier years that are of interest to farmers - low levels of infection have little to no discernible impact on crop yield if resistant varieties are properly maintained.
Some of the parameter values themselves could have been more strongly based in the literature. For example, a somewhat shortened latency period of 20 days was used rather than a more standard 21 - 36 days. However, in many cases there is little empirical evidence. "The chance of an infected CLRL plant infecting an adjacent CLR plant on any given day" in the framework of my plant grid is quite different than the questions regarding successful spore germination pursued in the scientific literature. Therefore, the adjustment of parameters and the comparison to real-world parameters has to be done quite carefully for these types of modelling exercises as the question is whether the *mechanism* works for the results, not whether the *parameters* themselves are the correct ones.
### Conclusion
The conclusion of the short review of CLR and the example of its impact on smallholder coffee farmers is that it is a dangerous infection that will affect coffee producers for the foreseeable future and more research is needed into various aspects of the disease and its interaction with weather and the coffee plants. While the threat of complete devastation of all coffee by CLR is exxagerated, traditional, biodiversity-rich methods of planting coffee may be threatened in some regions due to the need to combat CLR. Researchers are concerned about genetic homogenization, increased intensification, the spread of CLR into new areas due to a changing climate and the emergence of aggressive new varieties of CLR that can overcome fungicides and cultivar resistance.
The results of the modelling section demonstrate some of the challenges inherent in modelling. CLR is a complicated natural phenomenon dependent on landscape features, weather, farm management and macroeconomic factors. Choosing which aspect of CLR to model and then choosing which parameters to simplify and how in order to arrive at a functional model with reasonable mechanisms of transmission is a difficult exercise and can be approached numerous valid ways. There is a trade-off between functionality and speed in any model that needs to be assessed at the beginning of the project.
### References