Skip to content

VitoTAP/ANIN-drought-indices

Repository files navigation

Drought indices

Source code for the drought indices used in the ANIN project. Download without registering by clicking <> Code -> Download ZIP

This contains an openEO implementation of the algorithms that where initially developed by GMV.

https://eoafrica.drought-za.org/

Installation:

Works with standard Python. Be sure to add Python to PATH

Also works with CONDA

Register for openeo: https://docs.openeo.cloud/join/free_trial.html A free account should be more than enough. if it does not suffice, there are many credits available for this project. Ask emile.sonneveld@vito.be to link them to your account.

Example output files can be found on artifactory.

git clone https://github.com/VitoTAP/ANIN-drought-indices
cd ANIN-drought-indices
python -m pip install -r requirements.txt

To install on CONDA:

conda config --append channels conda-forge
conda install --yes --file requirements.txt

More instructions here: https://open-eo.github.io/openeo-python-client/installation.html

Running:

python -m SMA.SMA_openeo --out_format=CSV
python -m SPI.SPI_openeo --out_format=CSV --experimental=true
python -m SPEI.SPEI_openeo --out_format=CSV
python -m VCI.VCI_openeo --out_format=CSV
python -m FAPAR_Anomaly.FAPAR_Anomaly_openeo --out_format=CSV

For every layer you can overwrite the temporal extent. For CDI it is required for performance:

python -m CDI.CDI_openeo "2001-01-01" "2023-01-01" --out_format=CSV

SPI and CDI now has a larger temporal extent. To use the old version, use --experimental=false:

python -m SPI.SPI_openeo --out_format=CSV --experimental=false

Checkout the notebook examples:

SPI/SPI_openeo.ipynb
SMA/SMA_openeo.ipynb

Notes

Format code:

black --line-length 120 */*_openeo.py */*_UDF.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks