1. Code
01_ClimateData.R
This code processes the hourly ERA5 reanalysis climate data (https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels), to be ready for use in microclimate modelling with the microclimf package. Code is provided for a single example tile, for a single year (eg. 2019), whereby the process can be repeated for multiple tiles across the globe and multiple years. 

02_MicroclimModel.R
This code processes the vegetation parameters required for modelling microclimate using the microclimf package. Code is provided for a single example tile as above, for a single year (eg. 2019), whereby the process can be repeated for multiple tiles across the globe and multiple years. 

03_ClimateNovelty.R
This code calculates the novelty of an annual set of bioclimatic variables in time period 2 in comparison to an annual set of baseline bioclimatic variables in time period 1. Code is provided for a single example tile as above whereby the process can be repeated for multiple tiles across the globe. Please note, for this step you will need to have run scripts 01 & 02 for multiple years depending on time period of interest.


2. Datasets:
Model_example.zip holds data and output for running the example code and contains the following datasets:
- tile_01.tif, example tile template from the ERA5 reanalysis dataset: (https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels). Provided for a single example tile to match code, whereby the process can be repeated for multiple tiles across the globe.
- climdat.RDS, example of processed hourly climate data from ERA5. 
- rainfall.RDS, example of processed daily precipitation data from ERA5.
- habitats (folder), contains SpatRasters of habitat classes at annual time steps. Timeframe: 1990 and 2019,  Spatial Resolution: ~5km gridded, Projection: EPSG:3857.
- hgts (folder), contains SpatRasters of mean vegetation height at annual time steps. Timeframe: 1990 and 2019,  Spatial Resolution: ~5km gridded, Projection: EPSG:3857.
- dem.tif, SpatRaster of a digital elevation model. Spatial Resolution: ~5km gridded, Projection: EPSG:3857.
- lai (folder), contains SpatRaster stacks of 12 mean monthly leaf area index data at annual time steps. Timeframe: 1990 and 2019,  Spatial Resolution: ~5km gridded, Projection: EPSG:3857.
- groundr (folder), contains SpatRaster stacks of 12 mean monthly ground reflectance data. Timeframe: 1990 and 2019,  Spatial Resolution: ~5km gridded, Projection: EPSG:3857.
- soil_type.tif, SpatRaster of soil type. Spatial Resolution: ~5km gridded, Projection: EPSG:3857.
- soilc_2019.RDS, example of soil parameters processed for microclimf using microclimf::soilcfromtype.
- vegp_2019.RDS, example of vegetation parameters processed for microclimf using microclimf::vegpfromhab.
- bioclims (folder), contains SpatRasters of individual bioclimatic variables (BIO1-7) derived from the microclimate model for the example year (2019). Spatial Resolution: ~5km gridded, Projection: EPSG:3857.

Data Availability:
Global hourly climate data is available from "https://cds.climate.copernicus.eu/". Environmental parameters include: (a) leaf area index & surface reflectance available from "https://www.ncei.noaa.gov/data/avhrr-land-leaf-area-index-and-fapar/", (b) global habitat types available from "https://www.esa-landcover-cci.org/", (c) vegetation height available from "https://webmap.ornl.gov/ogc/", (d) soil types available from "https://www.soilgrids.org/", (e) digital elevation model available from: "https://www.usgs.gov/centers/eros/science/usgs-eros-archive-digital-elevation-shuttle-radar-topography-mission-srtm-1". The microclimate model is freely available for download and adaptation via a GitHub repository: "https://github.com/ilyamaclean/microclimf". The global tropical forest monitoring dataset is available from "https://forobs.jrc.ec.europa.eu/TMF". Temperature records used for validation are available from the global SoilTemp dataset on request: "https://www.soiltempproject.com/the-soiltemp-database/".

Novelty_TropicalForests.zip holds research results for running microclimf over the global tropics.
- Novelty (folder), contains SpatRasters of recent fractional novelty (2005 to 2019) for each bioclimatic variable in the study, compared to a baseline period (1990 to 2004), resulting from microclimate modelling across tropical forests. Includes tropical forest defined as degraded and undisturbed in 2019.
