Monthly Evapotranspiration

What is the monthly variability in ET?

Step 1: import the mod16 data

Step 2: Set the date variables

// set start and end year
var startyear = 2000;
var endyear = 2014;

// make a date object
var startdate = ee.Date.fromYMD(startyear, 1, 1);
var enddate = ee.Date.fromYMD(endyear + 1, 1, 1);

// make a list with years
var years = ee.List.sequence(startyear, endyear);
// make a list with months
var months = ee.List.sequence(1, 12);

Step 3: Set the geography

// Specify Country names
var country_names = ['Indonesia'];

// Get the country boundaries
var countries = ee.FeatureCollection('ft:1tdSwUL7MVpOauSgRzqVTOwdfy17KDbw-1d9omPw');

// Filter for country
var Indonesia = countries.filter(ee.Filter.inList('Country', country_names));

// Get the geometry
var Indonesia = Indonesia.geometry();

// Get ET
var ET ="ET")

Step 4: Calculate monthly precipitation

var monthlyET = ee.ImageCollection.fromImages( (y) {
 return {
 var w = ET.filter(ee.Filter.calendarRange(y, y, 'year'))
 .filter(ee.Filter.calendarRange(m, m, 'month'))
 return w.set('year', y)
 .set('month', m)
 .set('system:time_start', ee.Date.fromYMD(y, m, 1));


Step 5: Calculate monthly precipitation

var meanMonthlyP =  ee.ImageCollection.fromImages( (m) {
    var w = monthlyPrecip.filter(ee.Filter.eq('month', m)).mean();
    return w.set('month', m)
            .set('system:time_start',ee.Date.fromYMD(1, m, 1));


Step 6: Create and plot the chart

var title = {
title: 'Monthly ET',
hAxis: {title: 'Time'},
vAxis: {title: 'ET (mm)'},

var chartMonthly = ui.Chart.image.seriesByRegion({
imageCollection: meanMonthlyET,
regions: Indonesia,
reducer: ee.Reducer.mean(),
band: 'ET',
scale: 2500,
xProperty: 'system:time_start',
seriesProperty: 'SITE'


See an example here

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