compare gpm with chirps

Two different rainfall products

Step 1: select your area and import the data

// filter province
var Anuradhapura = table.filter(ee.Filter.eq("NAME_1","Anuradhapura")).geometry();

// import rainfall data
var gpm = ee.ImageCollection("NASA/GPM_L3/IMERG_V05").select("precipitationCal");
var chirps = ee.ImageCollection("UCSB-CHG/CHIRPS/DAILY");

Step 2: Filter for period of interest

// select period of interest
gpm = gpm.filterDate("2017-11-01","2017-12-01");
chirps = chirps.filterDate("2017-11-01","2017-12-01");

Step 3: Calculate the total amount of rain for your period

var gpmSum = gpm.mean().multiply(24*30).clip(Anuradhapura)
var chirpsSum = chirps.sum().clip(Anuradhapura);

Step 4: Add the data to them map



Step 5: calculate the mean rainfall for your aoi.

var meanGPM = gpmSum.reduceRegion({reducer:ee.Reducer.mean(),geometry:Anuradhapura,scale:25000,crs:"epsg:32644"});
var meanCHIRPS = chirpsSum.reduceRegion({reducer:ee.Reducer.mean(),geometry:Anuradhapura,scale:10000,crs:"epsg:32644"});


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s