Shaun Levick https://www.geospatialecology.com

Environmental Monitoring and Modelling

Objective

The objective of this lab is to delve deeper into climate variables with Google Earth Engine. By the end of this lab you will be able to explore long-term trends in temperature data for specific regions of interest.

Acknowledgments

  • hiyer09
  • Google Earth Engine Team
  • International Research Institute for Climate and Society, Earth Institute, Columbia University

Monitoring land surface temperature (LST) with MODIS imagery

Calling MODIS LST datasets

The MOD11A2 V6 product provides an average 8-day land surface temperature (LST) in a 1200 x 1200 kilometer grid. Each pixel value in MOD11A2 is a simple average of all the corresponding MOD11A1 LST pixels collected within that 8 day period. The 8 day compositing period was chosen because twice that period is the exact ground track repeat period of the Terra and Aqua platforms. In this product, along with both the day- and night-time surface temperature bands and their quality indicator (QC) layers, are also MODIS bands 31 and 32 and eight observation layers. The product is available from 05/03/2000 to present.

  • Let's start by defining a region of interest (roi).
  • For this lab we will work in the agricultural lands south west of Tamworth in New South Wales, Australia. Use the geometry tool to draw a polygon and define your region of interest (roi). Remember to rename the 'geometry' to 'roi'.

  • Next we will use some code to extract the bands we need from the MOD11A2 product. We are interested in the bands that contain the estimated temperature data.

// Import image collection
var modis = ee.ImageCollection('MODIS/006/MOD11A2');
  • Specify the dates of interest
// A start date is defined and the end date is determined by advancing 1 year from the start date.
var start = ee.Date('2015-01-01');
var dateRange = ee.DateRange(start, start.advance(1, 'year'));

// Filter the LST collection to include only images from time frame and select day time temperature band

var modLSTday = modis.filterDate(dateRange).select('LST_Day_1km');

The MODIS product temperature estimates are expressed in degrees Kelvin. From an ecological/environmental perspective we are typically more comfortable working in degree Celsius. Examine the code below to see how this conversion can be achieved by making and applying a Function.

// Scale to Kelvin and convert to Celsius, set image acquisition time.
var modC = modLSTday.map(function(image) {
  return image
    .multiply(0.02)
    .subtract(273.15)
    .copyProperties(image, ['system:time_start']);
});
  • Now we can plot the temperature data for our region of interest over time.
// Chart the time-series
var temp_trend = ui.Chart.image.series({
  imageCollection: modC,
  region: roi,
  reducer: ee.Reducer.median(),
  scale: 1000,
  xProperty: 'system:time_start'})
  .setOptions({
    lineWidth: 1,
    pointSize: 3,
    trendlines: {0: {
        color: 'CC0000'
      }},
     title: 'LST  Time Series',
     vAxis: {title: 'LST Celsius'}});
print(temp_trend);
  • Lastly, we can also map the temperature patterns spatially.
//Clip to roi
var LSTclip = modC.mean().clip(roi);

// Add clipped image layer to the map.
Map.addLayer(LSTclip, {
  min: 0, max: 40,
  palette: ['blue', 'limegreen', 'yellow', 'darkorange', 'red']},
  'Mean temperature');

Exercise

  • In the example above we used daytime temperature, but the MODIS product also contains nighttime temperatures. Modify the code above to plot charts and maps of night time temperature and compare with the daytime results.
  • Now try to modify the code further to plot NDVI as a time series and as a map for the same area of interest. Hint: have a look in the Earth Engine catalogue for the MOD13Q1.006 Terra Vegetation Indices 16-Day Global 250m collection.

GEARS - Geospatial Ecology and Remote Sensing - https://www.geospatialecology.com

(c) Shaun R Levick