As climate change continues, the evaporative demand on plant life also increases (Anderegg et al., 2019). This predisposes trees to die through a combination of processes (Choat et al., 2018):
- Carbon starvation
- Hydraulic failure
- Attack by boring insects
Mortality events have been documented worldwide, but are particularly severe in the western US. This project has two goals:
- Improve annual predictions of the distribution of drought-induced tree mortality.
- Identify drivers of mortality over time to determine which mechanisms are most important.
First, clone the repository
git clone https://github.com/s-kganz/ForestLST
cd ForestLST
Then, create the environment. environment.yml is combination of the CryoCloud Python image and the Pangeo PyTorch image, plus a few libraries pip install'd on top.
conda env create -f environment.yml
If you want to use any of the scripts that work with earthaccess, you will have to set up a NASA Earthdata account. This is not necessary unless you want to recreate the steps we took to build the mortality datasets. Once you have done so, do the following:
- Create a file named
.netrcin your home directory. Add yourearthaccesscredentials to the file in the following formatmachine urs.earthdata.nasa.gov login <your_username> password <your_password>Now you should be able to authenticate withearthacess.login(strategy="netrc").
If you don't care about recreating the model-ready datasets we used in this project, the netcdf files are available in the github release and on Zenodo under the data_working directory.
We provided a static, compressed version of the data_out directory at submission time on github/Zenodo. Inflating this and data_working in the project directory will let you recreate all the paper figures with notebooks/plots.ipynb. Other notebooks do the following:
-
download_[dem|terraclimate].ipynb: download relevant remote sensing data (not needed if you havedata_workinghandy). -
burn_ads.ipynb: rasterize the ADS mortality polygons (not needed if you havedata_workinghandy). -
coarsen_treemap.ipynb: summarize the TreeMap dataset in 3 km cells and crosswalk with hydraulic traits (not needed if you havedata_workinghandy). -
combine_data.ipynb: combine all the intermediate datasets into a model-ready .zarr archive. -
gbm_[temporal_cv|shap].ipynb: fit gradient-boosted regression models to mortality data and derive shap values from predictions. -
mort_convnet.ipynb: fit a convolutional neural network to mortality data. -
variograms.ipynb: calculate Moran's$I$ and temporal autocorrelation at a variety of spatial and temporal lags.
See file LICENSE. This repo uses the MIT license to support collaboration, and I strongly encourage you to reach out to me if you want to work on this problem!