DOI: 10.5281/zenodo.8416665
title: Python codes for "Regional Greening as a 'Positive' Tipping Phenomenon".

description: # Regional Greening as a 'Positive' Tipping Phenomenon ## Contents - [Overview](#overview)<br> - [Repo Contents](#repo-contents)<br> - [System Requirements](#system-requirements)<br> - [Installation Guide](#installation-guide)<br> - [Demo](#demo) # Overview The Python codes for our paper "Regional Greening as a 'Positive' Tipping Phenomenon". # Repo Contents<br> - [Code](./Code): main code for simulation and visualization<br> - [Tibet](Code/Tibet) : site percolation simulation and related analysis for Qinghai-Tibetan Plateau (QTP) area.<br> - [EVI_Percolation](Code/Tibet/EVI_Percolation):<br> fragment-size distribution exponent and<br> fractal dimensions for QTP<br> - [EVI_Percolation_Shuffle](Code/Tibet/EVI_Percolation_Shuffle): null models for QTP<br> - [EVI_Percolation_Snapshots](Code/Tibet/EVI_Percolation_Snapshots): correlation length and susceptibility for QTP<br> - [EVI_Percolation_Protection](Code/Tibet/EVI_Percolation_Protection): Optimal enhancing resilience model for QTP<br> - [EVI_Enhanced](Code/Tibet/EVI_Enhanced): Enhanced EVI Coverage for QTP<br> - [Sahel](Code/Sahel) site percolation simulation and related analysis for Sahel area.<br> - [EVI_Percolation](Code/Sahel/EVI_Percolation):<br> fragment-size distribution exponent and<br> fractal dimensions for Sahel<br> - [EVI_Percolation_Shuffle](Code/Sahel/EVI_Percolation_Shuffle): null models for Sahel<br> - [EVI_Percolation_Snapshots](Code/Sahel/EVI_Percolation_Snapshots): correlation length and susceptibility for Sahel<br> - [EVI_Percolation_Protection](Code/Sahel/EVI_Percolation_Protection): Optimal enhancing resilience model for Sahel<br> - [EVI_Enhanced](Code/Sahel/EVI_Enhanced): Enhanced EVI Coverage for Sahel<br> - [Plot_Figs](Code/Plot_Figs) : Draw the pictures<br> - [GEE_Data_Download_Script](./GEE_Data_Download_Script): scripts to download data from Google Earth Engine (GEE)<br> - [Shapefile](./Shapefile): shapefiles used to select the Sahel and Tibet regions in the study.<br> - [SRCJl](./SRCJl) and [SRCPy](./SRCPy) : custom function libraries. <br> # System Requirements <br> ## Software Requirements ### OS Requirements The package development version is tested on *Linux* operating systems. The developmental version of the package has been tested on the following systems: Linux: Ubuntu 22.04 # Installation Guide 1. Users should build Python (3.9) and Julia (1.9) environment first.<br> For Python, visit [https://www.anaconda.com/download](https://www.anaconda.com/download) to download and install the Anaconda distribution.<br> For Julia, go to [https://julialang.org/downloads/](https://julialang.org/downloads/) and download the Julia installer for your platform. Follow the installation instructions provided on these websites. 2. Compile the libraries.<br> ```<br> cd SRCJl\Flib\sitep<br> bash compile_site_percolation.sh<br> ``` # Prepare Data<br> 1. Download data from GEE by using the [GEE_Data_Download_Script](./GEE_Data_Download_Script) and [shapefile](./Shapefile).<br> 2. Place the data in the corresponding path:<br> - MODIS EVI V6 (QTP): [Code/Tibet/Data/Tibet_EVI_V6/Summer](Code/Tibet/Data/Tibet_EVI_V6/Summer/)<br> - MODIS EVI V6 (Sahel) : [Code/Sahel/Data/Sahel_EVI_V6/Summer](Code/Sahel/Data/Sahel_EVI_V6/Summer/)<br> - TerraClimate Summer precipitation (QTP) : [Code/Tibet/Data/Tibet_TerraClimate_pr_Summer](Code/Tibet/Data/Tibet_TerraClimate_pr_Summer)<br> - TerraClimate Summer precipitation (Sahel) : [Code/Tibet/Data/Sahel_TerraClimate_pr_Summer](Code/Sahel/Data/Tibet_TerraClimate_pr_Summer) # Demo<br> ```<br> cd Code/Sahel/EVI_Percolation<br> bash run_all.sh<br> ```<br> ```<br> cd Code/Tibet/EVI_Percolation_Shuffle<br> bash run_all.sh<br> ```<br> ```<br> cd Code/Tibet/EVI_Percolation_Snapshots<br> bash run_all.sh<br> ```<br> ```<br> cd Code/Tibet/EVI_Percolation_Protection<br> bash run_all.sh<br> ```<br> ```<br> cd ode/Tibet/EVI_Enhanced<br> bash run_all.sh<br> ```