Tags : Remote Sensing, CHIRPS, Time Series, Rainfall,
A step-by-step workflow for extracting CHIRPS data for an area using Google Earth Engine
Climate Hazards Group Infrared Precipitation with Station data (CHIRPS) data is a 40 years quasi-global rainfall dataset where 0.050 resolution satellite imagery with in situ rainfall stations data are incorporated to generate gridded daily rainfall. The dataset is thus used for trend analysis, storm water analysis, seasonal drought monitoring and determining catchment properties.
Google Earth Engine on the other hand is a planetary-scale platform for spatial data storage and analysis. It contains multi-petabyte catalog of global datasets with analysis capability exposed to the users via JavaScript API, REST API or Python API. The tool is currently available for free for scientists, researchers, and developers to analyze the earths surface.
If you do not have a Google Earth Engine account, Sign Up for one at Google Earth Engine signup page.
The following are the steps for generating rainfall data for an area of interest:
The Google Earth Engine Code Editor is Google Earth Engine JavaScript API exposed on your browser to access the analysis capability of GEE.
Once you login you get to the Google Earth Engine User Interface with various tools as shown below.
The area of interest can be defined in two ways:
var AOI = /* color: #ffc82d */ee.FeatureCollection(
[ee.Feature(
ee.Geometry.Polygon(
[[[36.73002561679046, -1.0239043411067337],
[36.73002561679046, -1.119331362465192],
[36.85671171298187, -1.119331362465192],
[36.85671171298187, -1.0239043411067337]]], null, false),
{
"system:index": "0"
})]);
The code has been provided below to execute the steps above.
var chirps = ee.ImageCollection("UCSB-CHG/CHIRPS/DAILY");
var precip = chirps.filterDate('2010-01-01','2021-02-28');
var AOI_Rainfall = AOI.select([]);
print(AOI_Rainfall);
AOI_Rainfall.evaluate(function (featureCollection) {
featureCollection.features.forEach(function (feature) {
var grahic = ui.Chart.image.series(
precip.limit(5000),ee.Geometry(feature.geometry),ee.Reducer.mean(),1000).setOptions({
title: 'Chirps Precipitation ' + feature.geometry.coordinates,
hAxis: {title: 'Day'},
vAxis:{title:'rainfall (mm/day)'}
});
print(grahic);
});
});
Map.addLayer(AOI);
Map.centerObject(AOI);