Replication code for Kotikot et al. (2024) in Scientific Reports. Processes multi-decadal precipitation grids across Kenya to analyze sub-seasonal anomalies, monthly climatologies, and time-frequency climate driver teleconnections using Wavelet Coherence.
# Spatial-Temporal-Rainfall-Analysis
Replication code for for the national and county-level climate trend analysis featured in **Kotikot et al. (2024), Scientific Reports**.
The codebase processes multi-decadal blended satellite-gauge precipitation products (1981–2021) across Kenya to isolate sub-seasonal anomalies, compute localized monthly climatologies, and map time-frequency patterns of ocean-atmospheric driver teleconnections using Continuous Wavelet Transforms (CWT) and Wavelet Coherence (WCT).
---
## Directory Structure
To ensure the scripts execute correctly, organize your local project root folder (`/`) as follows. The underlying raster grids and time-series arrays must be retrieved from the accompanying **Zenodo Dataset** and unpacked directly into the `/Data` directory.
```tree
.
├── Scripts/
│ ├── monthly_rainfallCompositing.ipynb # National grid aggregation, masking, and seasonal compositing pipeline
│ └── temporalRain_wavelet.ipynb # Wavelet transform, cross-wavelet power, and climate index coherence engine
│
├── Data/
│ ├── Raw/
│ │ ├── national_boundary/ # Spatial shapefiles (.shp) for Kenya administrative boundaries
│ │ └── county_boundary/ # Spatial shapefiles for Narok County and specific sub-regions
│ │ └── chirpsKenya_monthlySums_1981_2021_AgZnExtent2.nc # NetCDF file containing calculated long-term 40-year monthly precipitation means
│ │ └── nino34raw_2.csv # Nino 3.4 time series indices
│ │ └── IODtimeseries_.csv # Indian Ocean Dipole Mode (IOD) time series indices
│ │
│ └── Processed/
│ | ├── Climatology/
│ | │ └── KenyaAgroEcoZones_..._chirpsCellsize*.tif # Sptail layers matching the spatial resolution and extent of CHIRPS rainfall data. These define various agro-climatic zones (E.g., arid, humid)
│ |
| |
| └── Figures/ …