DOI: 10.5061/dryad.s4mw6m9fz
title: Linking intercontinental biogeographic events to decipher how European vineyards escaped Pierce's disease

description: Global change is believed to be a major driver of the emergence of
 invasive pathogens. Yet, there are few documented examples that illustrate
 the processes that hinder or trigger their geographic spread. Here, we
 present phylogenetic, epidemiological and historical evidence to explain
 how European vineyards escaped Xylella fastidiosa (Xf), the vector-borne
 bacterium responsible for Pierce’s disease (PD). Using Bayesian temporal
 reconstruction, we show that the export of American grapevines to France
 as rootstocks to combat phylloxera (~1872-1895) preceded the spread of the
 Xf grapevine lineage in the US. We found that the time of the most recent
 common ancestor in California dates around 1875, which agrees with the
 emergence of the first PD outbreak and the expansion into the southeastern
 US around 1895. We also show that between 1870 and 1990, climatic
 conditions in continental Europe were mostly below the threshold for the
 development of PD epidemics. However, our model indicates an inadvertent
 expansion of risk in southern Europe since the 1990s, which is
 accelerating with global warming. Our temporal approach identifies the
 biogeographical conditions that have so far prevented PD in southern
 European wine-producing areas and predicts that disease risk will increase
 substantially with increasing temperatures.
description: # Linking intercontinental biogeographic events to decipher how European
 vineyards escaped Pierce's disease
 [https://doi.org/10.5061/dryad.s4mw6m9fz](https://doi.org/10.5061/dryad.s4mw6m9fz) Eduardo Moralejo, Àlex Giménez-Romero, Manuel A. Matías ## Description of the data and file structure Files with data of annotated genomes, multiple sequence alignments, phylogenetic models built with Beauti and Beast output log, ops, and tree files needed to reproduce the phylogenetic analyses ## Phylogenetic analysis * Assembled and annotated genomes with Prokka * Core genome alignment using Roary * Gubbins recombination-masked full-genome length and SNP-only alignments * Maximum likelihood using IQ-tree * XML files created with Beauti ### Files and variables #### File: 1.1\_Prokka.rar **Description:** Prokka pipeline was used to annotate the assembled and reordered genomes. Naming convention: nº isolate*country or state. gff.  Isolates names come from different sources and are listed in Database*_1 as Supplementary information. GA= Georgia; SP=Spain; CA=California; FL=Florida; TX= Texas; TW=Taiwan; NC= North Carolina; CR= Costa Rica; MX= Mexico; MI=Mississipi 14B1_GA.gff 14B2_GA.gff 14B3_GA.gff 14B4_GA.gff 14B5_GA.gff 14B6_GA.gff 14B7_GA.gff 15B1_GA.gff 15B2_GA.gff 15B3_GA.gff 15M1_GA.gff 16B1_GA.gff 16B2_GA.gff 16B3_GA.gff 16B4_GA.gff 16B5_GA.gff 16B6_GA.gff 16M2_GA.gff 16M3_GA.gff 16M5_GA.gff 16M6_GA.gff 16M7_GA.gff 16M8_GA.gff 16M9_GA.gff 1978.18_Prokka_SP.gff3 1980.18_Prokka_SP.gff3 2014.18_Prokka_SP.gff3 2017.18_Prokka_SP.gff3 2093.18_Prokka_SP.gff3 2106.18_Prokka_SP.gff3 2107.18_Prokka_SP.gff3 2153.18_Prokka_SP.gff3 2177.18_Prokka_SP.gff3 2400.18_Prokka_SP.gff3 2508.18_Prokka_SP.gff3 Bakersfied-1_Prokka_CA.gff3 Bakersfield-8_Prokka_CA.gff3 Bakersfield-11_Prokka_CA.gff3 Bakersfield-13_Prokka_CA.gff3 Bakersfield-14_Prokka_CA.gff3 CFBP7969_NC.gff CFBP7970_FL.gff CFBP8071_Prokka_CA.gff3 CFBP8073_prokka_MX.gff3 CFBP8082_Prokka_FL.gff3 CFBP8083_*Prokka*_NC.gff3 CFBP8174_*Prokka*_CA.gff3 CFBP8175_*Prokka_*FL.gff3 CFBP8176_*Prokka_*FL.gff3 CFBP8351_CA.gff DSM10026_FL.gff EB92.1_Prokka_FL.gff3 GB514_TX.gff GV156_prokka_TW.gff3 GV210_Prokka_TW.gff3 GV215_prokka_TW.gff3 GV216_prokka_TW.gff3 GV220_prokka_TW.gff3 GV221_prokka_TW.gff3 GV222_prokka_TW.gff3 GV225_prokka_TW.gff3 GV229_prokka_TW.gff3 GV230_prokka_TW.gff3 GV231_prokka_TW.gff3 GV232_prokka_TW.gff3 GV233_prokka_TW.gff3 GV234_prokka_TW.gff3 GV235_prokka-TW.gff3 GV236_prokka_TW.gff3 GV237_prokka_TW.gff3 GV238_prokka_TW.gff3 GV239_prokka_TW.gff3 GV240_prokka_TW.gff3 GV241_prokka_TW.gff3 GV244_prokka_TW.gff3 GV245_prokka_TW.gff3 GV248_prokka_TW.gff3 GV249_prokka_TW.gff3 GV252_prokka_TW.gff3 GV253_prokka_TW.gff3 GV264_prokka_TW.gff3 GV265_prokka_TW.gff3 GV266_prokka_TW.gff3 IVIA5235_Prokka_SP.gff3 IVIA5770_*Prokka*_SP.gff3 Je1_XF1_77_CA.gff Je2_XF1_78_CA.gff Je3_XF1_79_CA.gff Je4_XF1_80_CA.gff Je5_XF1_81_CA.gff Je6_XF1_82_CA.gff Je7_XF1_83_CA.gff Je8_XF1_84_CA.gff Je9_XF1_85_CA.gff Je10_XF1_86_CA.gff Je11_XF1_87_CA.gff Je12_XF1_88_CA.gff Je13_XF1_89_CA.gff Je14_XF1_90_CA.gff Je15_XF1_91_CA.gff Je16_XF1_92_CA.gff Je17_XF1_93_CA.gff Je18_XF1_94_CA.gff Je19_XF1_95_CA.gff Je20_XF1_96_CA.gff Je21_XF2_1_CA.gff Je22_XF2_2_CA.gff Je23_XF2_3_CA.gff Je24_XF2_4_CA.gff Je25_XF2_5_CA.gff Je26_XF2_6_CA.gff Je27_XF2_7_CA.gff Je28_XF2_8_CA.gff Je29_XF2_9_CA.gff Je30_XF2_10_CA.gff Je31_XF2_11_CA.gff Je32_XF2_12_CA.gff Je33_XF2_13_CA.gff Je34_XF2_14_CA.gff Je35_XF2_15_CA.gff Je36_XF2_16_CA.gff Je37_XF2_17_CA.gff Je38_XF2_18_CA.gff Je39_XF2_19_CA.gff Je40_XF2_20_CA.gff Je41_XF2_21_CA.gff Je42_XF2_22_CA.gff Je43_XF2_23_CA.gff Je44_XF2_24_CA.gff Je45_XF2_25_CA.gff Je46_XF2_26_CA.gff Je47_XF2_27_CA.gff Je48_XF2_28_CA.gff Je49_XF2_29_CA.gff Je50_XF2_30_CA.gff Je51_XF2_31_CA.gff Je52_XF2_32_CA.gff Je53_XF2_33_CA.gff Je54_XF2_34_CA.gff Je55_XF2_35_CA.gff Je56_XF2_36_CA.gff Je57_XF2_37_CA.gff Je58_XF2_38_CA.gff Je59_XF2_39_CA.gff Je60_XF2_40_CA.gff Je61_XF2_41_CA.gff Je62_XF2_42_CA.gff Je63_XF2_43_CA.gff Je64_XF2_44_CA.gff Je65_XF2_45_CA.gff Je66_XF2_46_CA.gff Je67_XF2_47_CA.gff Je68_XF2_48_CA.gff Je69_XF2_49_CA.gff Je70_XF2_50_CA.gff Je71_XF2_51_CA.gff Je72_XF2_52_CA.gff Je73_XF2_53_CA.gff Je74_XF2_54_CA.gff Je75_XF2_55_CA.gff Je76_XF2_56_CA.gff Je77_XF2_57_CA.gff Je78_XF2_58_CA.gff Je79_XF2_59_CA.gff Je80_XF2_60_CA.gff Je81_XF2_61_CA.gff Je82_XF2_62_CA.gff Je83_XF2_63_CA.gff Je84_XF2_64_CA.gff Je85_XF2_65_CA.gff Je86_XF2_66_CA.gff Je87_XF2_67_CA.gff Je88_XF2_68_CA.gff Je89_XF2_69_CA.gff Je90_XF2_70_CA.gff Je91_XF2_71_CA.gff Je92_XF2_72_CA.gff Je93_XF2_73_CA.gff Je94_XF2_74_CA.gff Je95_XF2_75_CA.gff Je96_XF2_76_CA.gff Je97_XF2_77_CA.gff Je98_XF2_78_CA.gff Je99_XF2_79_CA.gff Je100_XF2_80_CA.gff Je101_XF2_81_CA.gff Je102_XF2_82_CA.gff Je103_XF2_83_CA.gff Je104_XF2_84_CA.gff Je105_XF2_85_CA.gff Je106_XF2_86_CA.gff Je107_XF2_87_CA.gff Je108_XF2_88_CA.gff Je109_XF2_89_CA.gff Je110_XF2_90_CA.gff Je111_XF2_91_CA.gff Je112_XF2_92_CA.gff Je113_XF2_93_CA.gff Je114_XF2_94_CA.gff Je115_XF2_95_CA.gff Je116_XF2_96_CA.gff Je117_XF3_A1_CA.gff Je118_XF3_B1_CA.gff Je119_XF3_C1_CA.gff Je120_XF3_D1_CA.gff Je121_XF3_E1_CA.gff Je122_XF3_F1_CA.gff M23_Prokka_CA.gff3 Merced_*Prokka*_CA.gff3 Napa1_CA.gff NOB1_Prokka_MI.gff3 OK3_Prokka_MI.gff3 R2XF435818_*Prokka*_SP.gff3 RAAR3_STL_CA.gff RAAR4_SLO_CA.gff RAAR7_Conn-creek_CA.gff RAAR10_CV17-3_CA.gff RAAR11_CV23-3_CA.gff RAAR18_TPD3_TW.gff RAAR19_TPD4_TW.gff RACD01AC_23R1_CA.gff RACD01AE_17R1_CA.gff RACD01AF_23L6_CA.gff RACD01AG_17L1_CA.gff RACD01AH_17L5_CA.gff RACD01AI_23c_CA.gff RIV13_Prokka_CA.gff3 Stag_Leap_CA.gff Temecula1_CA.gff Traver_Prokka_CA.gff3 UCLA_Prokka_CA.gff3 VB11_Prokka_MI.gff3 WM1-1_Prokka.gff3 X73_prokka_CR.gff3 XF.3967.18_Prokka_SP.gff3 Xf_ATCC_35879_FL.gff XF43canu_ACR01_CA.gff XF44canu_Hopland_CA.gff XF50canu_WM1-1_GA.gff XF51canu_CCPM1_GA.gff XF68_prokka_CR.gff3 XF99canu_Silverado_CA.gff XF1110_prokka_CR.gff3 XYL461_PROkka_SP.gff3 XYL1732_SP.gff XYL2055_SP.gff #### File: 1.2\_Roary.rar **Description:** A core genome alignment of the PD-causing isolates plus the three Costa Rican isolates (non-PD) and one isolate collated from a coffee plant from Mexico (CFPB8073) was created using the -e (codon aware multisequence alignment of core genes) and -n (fast nucleotide alignment) flags in Roary. Naming convention: (Roary_on_data_1690,_data_1688,_and_others)= input file in Roary analysis  Roary_on_data_1690,_data_1688,_and_others_Core_Gene_Alignment] (1) Roary_on_data_1690,_data_1688,_and_others_Gene_Presence_Absence Roary_on_data_1690,_data_1688,_and_others_Summary_statistics #### File: 1.3\_Gubbins.rar **Description:** Output files of recombination-masked full-genome length and SNP-only alignments using default parameters and a minimum of three base substitutions required to identify recombination. Naming convention: (Gubbins_on_data_1703)= input file in Gubbins analysis Gubbins_on_data_1703_Branch_Base_Reconstruction_embl Gubbins_on_data_1703_Filtered_Polymorphic_Sites_fasta (1) Gubbins_on_data_1703_Filtered_Polymorphic_Sites_phylip Gubbins_on_data_1703_Final_Tree (1).txt Gubbins_on_data_1703_Per_Branch_Statistics_csv Gubbins_on_data_1703_Recombinations_Prediction_embl Gubbins_on_data_1703_Recombinations_Prediction_gff Gubbins_on_data_1703_Summary_of_SNP_Distribution_vcf #### File: 1.4\_IQTREE.rar **Description:** Maximum likelihood phylogenies obtained from the recombination-purged alignments. Naming convention: (IQ-TREE_on_data_1708)= input file in IQTREE IQ-TREE_on_data_1708__BIONJ_Tree IQ-TREE_on_data_1708__MaxLikelihood_Distance_Matrix (2) IQ-TREE_on_data_1708__MaxLikelihood_Tree (2) IQ-TREE_on_data_1708__Report_and_Final_Tree (1) #### File: XML\_files.rar **Description:** dated phylogentic models built with Beauti and output files after running with Beast. Naming convention: (239_*SNP_GFPB_SElimit)= input file SNPs in Beauti* 239_SNP_GFPB_SE_limit_GTR_UCLN_skyline.xml 239_SNP_GFPB_SE_limit_GTR_coalescent_exp.log.txt 239_SNP_GFPB_SE_limit_GTR_coalescent_exp.ops.txt 239_SNP_GFPB_SE_limit_GTR_coalescent_exp.trees.txt 239_SNP_GFPB_SE_limit_GTR_coalescent_exp.trees.txt.mcc 239_SNP_GFPB_SE_limit_GTR_exp.mle.log.txt 239_SNP_GFPB_SE_limit_GTR_UCLN_coalescent_const.log.txt 239_SNP_GFPB_SE_limit_GTR_UCLN_coalescent_const.mle.log.txt 239_SNP_GFPB_SE_limit_GTR_UCLN_coalescent_const.mle.result.log.txt 239_SNP_GFPB_SE_limit_GTR_UCLN_coalescent_const.ops.txt 239_SNP_GFPB_SE_limit_GTR_UCLN_coalescent_const.trees.txt 239_SNP_GFPB_SE_limit_GTR_UCLN_coalescent_const.trees.txt.mcc 239_SNP_GFPB_SE_limit_GTR_UCLN_coalescent_const.xml 239_SNP_GFPB_SE_limit_GTR_UCLN_coalescent_exp.xml 239_SNP_GFPB_SE_limit_HKY_ucld_log_skyline.xml 239_SNP_GFPB_SE_limit_HKY_UCLN_coalescent_const.log.txt 239_SNP_GFPB_SE_limit_HKY_UCLN_coalescent_const.mle.log.txt 239_SNP_GFPB_SE_limit_HKY_UCLN_coalescent_const.mle.result.log.txt 239_SNP_GFPB_SE_limit_HKY_UCLN_coalescent_const.ops.txt 239_SNP_GFPB_SE_limit_HKY_UCLN_coalescent_const.trees.txt 239_SNP_GFPB_SE_limit_HKY_UCLN_coalescent_const.xml 239_SNP_GFPB_SE_limit_HKY_UCLN_coalescent_exp.log.txt 239_SNP_GFPB_SE_limit_HKY_UCLN_coalescent_exp.mle.log.txt 239_SNP_GFPB_SE_limit_HKY_UCLN_coalescent_exp.mle.result.log.txt 239_SNP_GFPB_SE_limit_HKY_UCLN_coalescent_exp.ops.txt 239_SNP_GFPB_SE_limit_HKY_UCLN_coalescent_exp.trees.txt 239_SNP_GFPB_SE_limit_HKY_UCLN_coalescent_exp.xml #### File: Database\_1 **Description:** Supplemetary Information of the list of isolates used in the phylogenetic analysis ## Code/software #### File: Data\_and\_code\_figures\_1-2.zip (Zenodo) **Description:** Data and code used to build figures 1 & 2. There is a subfolder for each figure. #### File: Data\_and\_code\_Supplementary\_Figures.rar (Zenodo) **Description:** Data and code used to build figures 1 & 2: Subfolders for each figure: * Fig. S1 * Fig. S2 * Fig. S3 * Fig. S4 * Fig. S5 * Fig. S6 * Fig. S7 * Fig. S8 * Fig. S9 * Fig. S10 * Fig. S11 * Fig. S12 * Fig. S13 #### File: Correlations\_between\_model\_and\_skygrowth.zip (Zenodo) **Description:** code statistics #### File: Data.zip (Dryad) **Description:** Temperature data to run an example of the next section. For the .grib files, the variables are as follows: * 2_metre_temperature_surface = Kelvin * lat and long = decimal degree * Time = YYYY-MM-DD Files: * vector_Europe.txt - Distribution data of the vector Philaenus spumarius * Europe_*2020_cold*_1.grib * Europe_2019_hot.txt (Units= growing degree days) * Europe_2019_hot.grib * Europe_*2019_cold*_2.grib * Europe_*2019_cold*.txt (Units= cold degree days) # Global-risk-predictions-for-Pierce-s-disease-of-grapevines * Libraries * Figures * simulation_test.ipynb * Readme.md * download_data.py * compute_climatic_variables.jl ### Model The model is split in two parts: a transmission layer, that models plant to plant disease transmission annually, and a climatic layer, that accounts for symptom-development as function of temperature (i.e. chronic infections that will contribute to produce new infections) The transmission layer is based on a standard Susceptible-Infected-Remove (SIR) compartmental model. We are only interested in addressing whether or not the infected population will grow in the future (we model risk), so that the initial exponential approximation of the SIR model is used, [![equation](https://camo.githubusercontent.com/384ff9a185b1334a55db6fb06d250d6053b8e63325e5533d954e89669aa1b8dd/68747470733a2f2f6c617465782e636f6465636f67732e636f6d2f6769662e696d6167653f253543647069253742313130253744492874293d492830292535436578702825354367616d6d6128525f302d31297429 "equation")](https://camo.githubusercontent.com/384ff9a185b1334a55db6fb06d250d6053b8e63325e5533d954e89669aa1b8dd/68747470733a2f2f6c617465782e636f6465636f67732e636f6d2f6769662e696d6167653f253543647069253742313130253744492874293d492830292535436578702825354367616d6d6128525f302d31297429) Moreover, information on the spatial distribution of the main vector in Europe, *Philaenus spumarius*, is available. Thus, to account for different transmission rates based on differences on vector climatic suitability we scale R0 linearly with this quantity (and thus R0 depends on space). Now, new infections will become or not chronic at the end of the year (i.e. will still be infective next year) depending on the climatic layer. The climatic layer is based on the interplay between two factors, the Modified Growing Degree Days (MGDD) and the Cold Degree Days (CDD). MGDDs are a metric of heat accumulation linked to the temperature-dependent growth rate of Xf (measured in [1]). Thus, it can be shown that MGDDs are directly related to bacterial population growth, modelling bacterial load in infected plants. This metric was thereafter correlated with symptom-development after a three-year inoculation experiment. This allows to build a continuous function bounded between 0 and 1 relating accumulated MGDD in one year with cumulative probability of symptom development, i.e. cumulative probability of developing a chronic infection and be still infective next year. We thereafter refer to this factor as F(MGDD). CDDs are a metric of cold accumulation used to model the so-called winter curing effect, i.e. infected plants can be cured when exposed to cold temperatures. Experimental data on this effect is not available, so we first correlate the average minimum temperature of the coldest month (Tmin) with CDD accumulation in winter, as has been observed that the disease is not present in zones with Tmin &lt; -1.1ºC [2]. Again, we build a continuous function bounded between 0 and 1 relating accumulated CDD in one year and cumulative probability of keeping infection, i.e. of developing a chronic infection. We thereafter refer to this factor as G(CDD). Finally, we can integrate both transmission and climatic layers in a single equation [![equation](https://camo.githubusercontent.com/e4be1c043fd5cc64bd57f7e6933b7c861166911647dee73206b200f8c8bab65e/68747470733a2f2f6c617465782e636f6465636f67732e636f6d2f6769662e696d6167653f253543647069253742313130253744492874293d4928742d312925354363646f742535436578702825354367616d6d6128525f302d31292925354363646f742673706163653b46284d4744442874292925354363646f742673706163653b472843444428742929 "equation")](https://camo.githubusercontent.com/e4be1c043fd5cc64bd57f7e6933b7c861166911647dee73206b200f8c8bab65e/68747470733a2f2f6c617465782e636f6465636f67732e636f6d2f6769662e696d6167653f253543647069253742313130253744492874293d4928742d312925354363646f742535436578702825354367616d6d6128525f302d31292925354363646f742673706163653b46284d4744442874292925354363646f742673706163653b472843444428742929) This allow us to compute the evolution of the infected population in time. We derive a risk index based on the comparison between the current growth of the infected population at time t and its maximum possible growth [![equation](https://camo.githubusercontent.com/175725ca82ac513e6883dbab286ce47cfe69af088f9ced3429c485d912df5420/68747470733a2f2f6c617465782e636f6465636f67732e636f6d2f6769662e696d6167653f253543647069253742313130253744722874293d25354374657874726d2537426d61782537442535436c65667428253543667261632537422535436c6f6728492874292f492830292925374425374225354367616d6d6128525f302d31292535437461752537442c2673706163653b2d312673706163653b253543726967687429 "equation")](https://camo.githubusercontent.com/175725ca82ac513e6883dbab286ce47cfe69af088f9ced3429c485d912df5420/68747470733a2f2f6c617465782e636f6465636f67732e636f6d2f6769662e696d6167653f253543647069253742313130253744722874293d25354374657874726d2537426d61782537442535436c65667428253543667261632537422535436c6f6728492874292f492830292925374425374225354367616d6d6128525f302d31292535437461752537442c2673706163653b2d312673706163653b253543726967687429) All this information is summarised in the following scheme [![scheme](https://github.com/agimenezromero/PierceDisease-GlobalRisk-Predictions/raw/main/Figures/Model.png "scheme")](https://github.com/agimenezromero/PierceDisease-GlobalRisk-Predictions/blob/main/Figures/Model.png) ##### Simulation steps Here we describe the simulation steps to assess PD risk. Although the steps are general, we describe them in relation with the example provided in this repository. For details on further usage see [Further usage](https://github.com/agimenezromero/PierceDisease-GlobalRisk-Predictions#further-usage) * Download temperature data In our work, temperature data was downloaded from [ERA5-Land dataset](https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-land?tab=overview) in GRIB format. The necessary data files to run the example can be downloaded runing the `download_data.py` script (see [Run example](https://github.com/agimenezromero/PierceDisease-GlobalRisk-Predictions#run-example)) or accessing [this zenodo repository](https://zenodo.org/record/6397388#.YkV2wHVBw3F). Take into account that the data to download is about 5GB and the process could take some minutes. * Compute MGDD and CDD factors Once data has been downloaded, the next step is to compute the climatic variables of interest, i.e. MGDD and CDD anual factors. We provide a julia script 'compute_climatic_variables' that is prepared to work with the provided example. The script loads a self-made library described in [this repository](https://github.com/agimenezromero/ERA5-Land-data-analysis) and computes the climatic variables from the data included in the repository. Nevertheless, we also provide the MGDD and CDD factors already computed for this example (the corresponding files are automatically downloaded running the `download example` script). * Run simulation In this example we provide the code to simulate only one year of PD progression (more years would require downloading more data files of about 5 GB per year). The code is as simple as this ``` #Define MGDD factor def prob_MGDD(x): return 1 / (1 + np.exp(-0.0120*(x-975))) #Define CDD factor def prob_CDD(x): return 2e7/(2e7 + x**3) #This is the simulation algorithm for 1 time step only (just for testing purposes) def disease_simulation(filename_MGDD, filename_CDD, R0=5.0, γ=1.0/5.0, I0=1.0, use_vector=False, filename_vector="Data/vector_Europe.txt"): I = I0 if use_vector == True: vector, lons_v, lats_v = np.loadtxt(filename_vector, unpack=True) R0_f = R0 * vector/1000 else: R0_f = R0 MGDD, lons, lats = np.loadtxt(filename_MGDD, unpack=True) CDD, lons, lats = np.loadtxt(filename_CDD, unpack=True) prob_1 = prob_MGDD(MGDD) prob_2 = prob_CDD(CDD) prob_f = prob_1 * prob_2 I = I * prob_f * np.exp((R0_f-1)*γ) risk = np.log(I) / ((R0_f-1)*γ*1) risk[risk &lt; -1.0] = -1.0 return risk, lons, lats ``` We can run the simulation easily providing the input filenames where the climatic variables are stored. In the example below we don't consider the vector climatic suitability. ``` filename_MGDD = "Data/Europe_2019_hot.txt" filename_CDD = "Data/Europe_2019_cold.txt" use_vector = False risk, lons, lats = disease_simulation(filename_MGDD, filename_CDD, use_vector=use_vector) ``` * Plot risk To plot the risk maps we use [Cartopy](https://scitools.org.uk/cartopy/docs/latest/#) library. First, we need to reshape the risk values to a 2D array with its original shape, this is, the shape of the downloaded climatic data. In our self-developed library that computes the climatic variables, (see [this repository](https://github.com/agimenezromero/ERA5-Land-data-analysis)) this shape is saved in the header of the climatic variables output files. ``` Europe_shape = (471, 891) risk = np.reshape(risk, Europe_shape) lons = np.reshape(lons, Europe_shape) lats = np.reshape(lats, Europe_shape) ``` Then, we are ready to plot ``` clevels = np.linspace(-1, 1, 100) cbar_ticks = np.arange(-1, 1.2, 0.2) cmap = 'jet' #-- create figure and axes instances fig = plt.figure(figsize=(11, 11), dpi=100) ax = fig.add_axes([0.1,0.1,0.8,0.9]) projection = ccrs.PlateCarree() #-- create map ax = plt.axes(projection=projection) #-- add map features ax.coastlines(resolution='10m') #110m, 50m, 10m ax.add_feature(cartopy.feature.LAND, edgecolor='black') ax.add_feature(cartopy.feature.LAKES, edgecolor='black') ax.add_feature(cartopy.feature.BORDERS, edgecolor='black') ax.add_feature(cartopy.feature.OCEAN, zorder=100, edgecolor='black', facecolor='azure') cnplot = ax.contourf(lons, lats, risk, clevels, cmap=cmap) cbar = plt.colorbar(cnplot, ticks=cbar_ticks, shrink=0.42, pad = 0.03) gl = ax.gridlines(crs=projection, linewidth=1, color='gray', alpha=0.5, zorder=200, linestyle='--') gl.xlabel_style = {'size': 8, 'color': 'gray'} gl.ylabel_style = {'size': 8, 'color': 'gray'} gl.bottom_labels = True gl.left_labels = True ``` [![Risk in Europe](https://github.com/agimenezromero/PierceDisease-GlobalRisk-Predictions/raw/main/Figures/Europe_risk_test.png "Risk in Europe")](https://github.com/agimenezromero/PierceDisease-GlobalRisk-Predictions/blob/main/Figures/Europe_risk_test.png) We can run the simulation it again now considering the vector climatic suitability ``` filename_MGDD = "Data/Europe_2019_hot.txt" filename_CDD = "Data/Europe_2019_cold.txt" use_vector = True risk, lons, lats = disease_simulation(filename_MGDD, filename_CDD, use_vector=use_vector) ``` which yields the following risk map [![Risk in Europe vector](https://github.com/agimenezromero/PierceDisease-GlobalRisk-Predictions/raw/main/Figures/Europe_risk_test_vector.png "Risk in Europe vector")](https://github.com/agimenezromero/PierceDisease-GlobalRisk-Predictions/blob/main/Figures/Europe_risk_test_vector.png) ###### Run example * To download the necessary data just run the Python script `download_data.py` via command line as `python download_data.py` or in background as `nohup python download_data.py &` Alternatively, the data can be downloaded from [this zenodo repository](https://zenodo.org/record/6397388#.YkV2wHVBw3F) A folder named "Data" will be created with all the necessary data inside. * To compute the climatic variables just run the Julia script `compute_climatic_variables.jl` via command line as `julia compute_climatic_variables.jl` or in background as `nohup julia compute_climatic_variables.jl &` However, we also provide the computed climatic variables used for this example in the Data folder. * To run the simulation just use the jupyter notebook provided (simulation_test.ipynb) Some features can be customised: * R0 (float) - Basic Reproduction Number - Default: 5.0 * γ (float) - Mortality rate of infected plants - Default: 0.2 * I0 (float) - Initial number of infected plants - Default: 1.0 * use_vector (Boolean) - Determines the use of the vector climatic suitability to account for a spatially dependent R0 - Default: False ### Requeriments #### Julia 1.5 or higher installed with the following libraries * [GRIB.jl](https://github.com/weech/GRIB.jl) * [DataFrames.jl](https://dataframes.juliadata.org/stable/) * [Feather.jl](https://github.com/JuliaData/Feather.jl) * [Dates.jl](https://docs.julialang.org/en/v1/stdlib/Dates/) ### Python 3.x installed with the following libraries * [Numpy](https://numpy.org/doc/stable/index.html) * [Matplotlib](https://matplotlib.org/devdocs/index.html) * [Cartopy](https://scitools.org.uk/cartopy/docs/latest/#) * [Requests](https://docs.python-requests.org/en/latest/) * [sys](https://docs.python.org/3/library/sys.html) * [os](https://docs.python.org/3/library/os.html) ##### Further usage In the presented example we make use of GRIB files to compute the climatic variables (indeed this is the tricky part, the simulation itself is pretty easy). However, for other usages, temperature data could be in different formats, such as .csv or excel. As previously mentioned, the algorithms to compute MGDD and CDD are described in [this repository](https://github.com/agimenezromero/ERA5-Land-data-analysis), athough they are written to be used with GRIB files using Julia. To compute the climatic variables with other data formats the details of the implementation could change for major efficiency. Anyone interested to use the approach presented here but having troubles in the implementation (e.g. because she/he is using other data formats) can contact us at [alex@ifisc.uib-csic.es](mailto:alex@ifisc.uib-csic.es). ## Access information Other publicly accessible locations of the data: * [https://doi.org/10.5281/zenodo.6397388](https://doi.org/10.5281/zenodo.6397388) Data was derived from the following sources: * [https://cds.climate.copernicus.eu/cdsapp#!/dataset/projections-cmip5-daily-single-levels?tab=overview](https://cds.climate.copernicus.eu/cdsapp#!/dataset/projections-cmip5-daily-single-levels?tab=overview) * [https://www.ncei.noaa.gov/access/monitoring/climate-at-a-glance/global/time-series](https://www.ncei.noaa.gov/access/monitoring/climate-at-a-glance/global/time-series)