Pipeline for computing agroclimatic indicators (SPI, SPEI, ET₀, GDD, WRSI, NDVI…) for the Haute Matsiatra region, Madagascar, agricultural seasons 2011/12 to 2017/18.
# Agroclimatic Pipeline — Haute Matsiatra, Madagascar
> Pipeline for computing agroclimatic indicators (SPI, SPEI, ET₀, GDD, WRSI, NDVI…)
> for the Haute Matsiatra region, Madagascar — Agricultural seasons 2011/12 to 2017/18
> Climatological baseline: 1991–2020 (WMO standard)
>
> **Objective**: build a district-scale agroclimatic database (7 seasons: 2011/12 – 2017/18)
> to select features important for the analysis of **agricultural exposure to drought** in Haute Matsiatra.
---
## Overview
This project is part of a doctoral thesis on the **agroclimatic analysis of Haute Matsiatra** (Madagascar). The two scripts aim to **build a multivariate agroclimatic database** at the district level over **7 agricultural seasons (2011/12 – 2017/18)** for the analysis of agricultural exposure to drought.
> These scripts are the **data constitution phase** of the thesis.
> The extracted variables serve as inputs for subsequent correlation analysis
> and drought exposure modelling.
The variables extracted cover:
- **Drought indices** (SPI, SPEI at different time scales)
- **Meteorological variables** per crop phase (precipitation, temperature, ET₀, GDD…)
- **Water balance indicators** (WRSI, water deficit, soil moisture)
- **Vegetation indicators** (NDVI, NDWI, VCI from Landsat)
- **Phenological indicators** (onset date, cessation date, season length)
The pipeline consists of **two scripts** to be run in order:
```
1. pretraitement_spi_spei_final_v2.py → SPI/SPEI computation (1991–2020 baseline)
2. pipeline_agroclimatique_v2.py → Full agroclimatic pipeline
```
---
## Project Structure
```
📦 agroclimatic-pipeline-haute-matsiatra/
├── pretraitement_spi_spei_final_v2.py # Script 1 — SPI/SPEI
├── pipeline_agroclimatique_v2.py # Script 2 — Full pipeline
├── README.md
│
├── 📁 inputs/ (to be provided — not included in repository)
│ ├── region_district_HM.shp # District shapefile
│ ├── Soil_map_HM_VF.shp # FAO soil map
│ └── ren …