Logo Lanfrica
  • Accueil
  • Atlas
  • Analyses
  • Documentation
  • Sign in

© 2026 Lanfrica. Tous droits réservés. Tous les droits d'auteur des ressources affichées sur le site Web Lanfrica appartiennent aux détenteurs de droits d'auteur d'origine, sauf indication contraire explicite.

Google Earth Engine Script for Extracting CHIRPS Pentad and Monthly Rainfall Zonal Statistics

Domaine:

climate

Type de record:

software
Créateur:
Ram
Éditeur:
Zenodo
Hôte:avatar
This repository provides a set of Google Earth Engine (GEE) scripts developed to extract precipitation statistics from the Climate Hazards Group InfraRed Precipitation with Station data (CHIRPS) dataset over Malawi. The code computes either (1) monthly total rainfall from the daily CHIRPS collection or (2) raw pentad (5-day) precipitation values from the CHIRPS/PENTAD collection. The scripts also implement zonal statistics using buffered regions of interest (ROIs) at 5 km and 10 km distances, with automated export of results as CSV tables to Google Drive. The scripts are designed for reproducible environmental and climate analyses, such as drought monitoring, agricultural water assessment, and hydrological modeling. They demonstrate best practices for spatiotemporal aggregation, buffer-based regional reduction, and metadata tagging (year, month, pentad number, buffer distance). Data sources: CHIRPS Daily (UCSB-CHG/CHIRPS/DAILY) CHIRPS Pentad (UCSB-CHG/CHIRPS/PENTAD)Provided via Google Earth Engine (earthengine.google.com). Programming environment:Google Earth Engine JavaScript API. How to cite:If you use this code or adapt it in your own research, please cite as follows: Ramdani, F. (2025). Google Earth Engine Script for Extracting CHIRPS Pentad and Monthly Rainfall Zonal Statistics [Code]. Zenodo.  [DOI: 10.5281/zenodo.17528160] Keywords:CHIRPS, precipitation, pentad, rainfall, Google Earth Engine, Malawi, climate monitoring, hydrology, reproducible research License:Creative Commons Attribution 4.0 International (CC BY 4.0) Critical points you should scrutinise if you want the results to stand up under peer review or publication scrutiny: 1. Conceptual definition of “year” in Nov–Apr season The code tags each month with its calendar year ('year': y).That means, for example: November 2001 and December 2001 are tagged as year=2001, January–April 2002 are tagged as year=2002. So, “season” is split across two years. If you plan to analyze seasonal totals or means, you’ll need to relabel them under one "season year" (e.g., 2001/2002 → 2001). Otherwise, statistical grouping by year will misrepresent the hydrological cycle. You should at least decide which convention to follow — meteorological (Nov–Apr belongs to the latter year) or agricultural (to the former). 2. The monthly aggregation choice The code averages all daily CHIRPS values within each month (imgs.mean()), which gives the average daily rainfall rate (mm/day), not monthly total precipitation.If your interpretation of “precipitation for the month” is the total rainfall, you must multiply the mean by the number of days (imgs.size()) or use .sum() instead of .mean(). The distinction is fundamental — a mean will bias comparisons across months of different lengths. 3. Spatial aggregation consistency Using .reduceRegions() with ee.Reducer.mean() computes the spatial mean precipitation within each buffer. That’s fine, but the scale of 5000 m is rather coarse for 5 km buffers; you might want to use 2500 m or even 1000 m for robustness, depending on how heterogeneous your terrain is. 4. Export structure The code will export separately into five CSV files, but keep in mind: Each CSV contains both 5 km and 10 km buffer data; always filter by buffer_km downstream before comparing across radii. If you intend to merge the exports later, include a stable identifier (like feature ID or ROI name) — currently, unless your shapefile has an attribute like "id", you’ll lose the link between rows and features.

Visit

doi.orgzenodo.org

Licenses

Creative Commons Attribution 4.0 Internationalhttps://creativecommons.org/licenses/by/4.0/legalcode