README for SDM analyses ======================= Pascal Title Overview -------- This directory contains R scripts and data files to fit the species distribution models presented in the manuscript and to generate the included figures. Due to the number of files and large file sizes, the climatic and environmental grids have not been included, but notes below explain where to obtain them. The main Dryad directory contains 4 folders: data, utility, output and scripts. When running the R scripts, set your working directory to this main directory. All paths are relative to this position. Descriptions of files: * The scripts/SDM directory contains all R scripts needed to generate climatic grids, prepare occurrence data, fit SDM's and run discriminant function analyses. * The data/SDM directory contains the final SDM rasters (in data/SDM/finalSDMmodels) as well as some intermediate files: - gbif_26Apr2019.csv: full occurrence dataset as downloaded from GBIF. Script #2 processes this file and returns the file occ5.rds, which is the filtered occurrence dataset used for SDM fitting. - region_list.Rdata: This is a list of polygons that divide the species' full geographic range into the morpho-group subsets. - TSSthresholds.rds: This is generated by script #7. These are threshold values to convert the SDM's to binary presence/absence and are used in the generation of Figure 9. - climExtracts.Rdata: This file is generated by code found in script #9. It contains values for the environmental variables at all of the occurrence coordinates. It is used for scripts 9 and 10. - PRISMA_SR_50M (folder): This is a shaded relief dataset as downloaded from naturalearthdata.com and is used in the generation of figure 9. * The data/SDM/env directory should contain climatic and landcover grid datasets. It is empty, but the structure is there. To add the appropriate files to this folder, and make it possible to run all R scripts, follow the following instructions: From CHELSA-CLIM, https://chelsa-climate.org/downloads/ Version 1.2 > climatologies > tmin/tmax/tmean/prec download tmin, tmax, tmean and precip monthly rasters and place in: data/SDM/env/chelsa/current Download LGM climate data: Version 1.2 > pmip3 > NCAR_CCSM4 > tmin/tmax/tmean/prec download tmin, tmax, tmean and precip monthly rasters and place in: data/SDM/env/chelsa/lgm_ccsm4 Download future climate data: Version 1.2 > cmip5 > 2041-2060 > tmin/tmax/temp/prec download tmin, tmax, temp and precip monthly rasters and place in: data/SDM/env/chelsa/future Landcover: https://www.earthenv.org/landcover Download all files for Full Version 1.0 and place in: data/SDM/env/earthEnvLandCover Anthropogenic datasets: Download the following: https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_parks_and_protected_lands.zip https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_urban_areas.zip https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_roads.zip ... and place in data/SDM/env/anthropo/