Visualizing Land Surface Temperature (LST) Trends using Google Earth Engine

Ravi Pandey
3 min readAug 17, 2023

--

Ravi Pandey

Date: August 17, 2023

Land Surface Temperature (LST) is a crucial environmental parameter that provides insights into the thermal characteristics of the Earth’s surface. Monitoring LST trends over time can reveal valuable information about changes in land cover, urbanization, and climate patterns. In this tutorial, we will use Google Earth Engine to visualize LST trends using MODIS satellite data and create animations and time series charts to gain insights into temperature variations over a specific region of interest.

Introduction

Google Earth Engine is a powerful platform for analyzing and visualizing geospatial data. We will use the platform’s capabilities to retrieve MODIS LST data, process it, and visualize trends for a selected region of interest (ROI).

Getting Started

To get started, you need a Google Earth Engine account. If you don’t have one, sign up at [Google Earth Engine](https://earthengine.google.com/). Once you have access, open the Earth Engine Code Editor.

Importing Data and Defining the ROI

First, import the necessary MODIS LST data and define your region of interest (ROI). The following lines of JavaScript code achieve this:

// Import image collection
var modis = ee.ImageCollection(‘MODIS/006/MOD11A2’);

// Define the Region of Interest (ROI)
var roi = ee.FeatureCollection(“users/ravipandey336/FRA_adm0”);

Setting Up Time Period and Looping Through Years

Specify the start and end years for your analysis. We will then loop through each year within this range, filtering the MODIS LST data accordingly:

// Define the start and end years
var startYear = 2018;
var endYear = 2022;

// Create an empty list to store animations
var animations = [];

// Loop through each year
for (var year = startYear; year <= endYear; year++) {
// … (code for processing each year’s data)
}

Processing LST Data

Inside the loop, we will process the LST data for each year. We’ll multiply the LST values, convert them to Celsius, and copy relevant properties from the original image:

// … (inside the loop)
// Filter the LST collection to include only images from the current year
var modLSTday = modis.filterDate(dateRange).select(‘LST_Day_1km’);

// Process the data
var modC = modLSTday.map(function(image) {
return image
.multiply(0.02)
.subtract(273.15)
.copyProperties(image, [‘system:time_start’]);
});

Creating Animations

Now, we will clip the processed LST data to the ROI, define visualization parameters, and create animations for each year:

// … (inside the loop)
// Clip to ROI
var LSTclip = modC.mean().clip(roi);

// Create visualization parameters
var visParams = {
min: 0,
max: 40,
palette: [‘blue’, ‘limegreen’, ‘yellow’, ‘darkorange’, ‘red’]
};

// Add the animation to the list
animations.push(LSTclip.visualize(visParams).set({year: year}));

Displaying Animation and Time Series Chart

After processing the data and creating animations, we can display the first year’s animation and create a time series chart:

// Display the first year’s animation
Map.addLayer(animations[0], {}, ‘Animation’);

// Create a time series chart for the first year
var firstYearLST = ee.ImageCollection.fromImages([animations[0]]);
var firstYearChart = ui.Chart.image.series({
imageCollection: firstYearLST,
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 ‘ + startYear,
vAxis: {title: ‘LST Celsius’}
});

// Display the time series chart
print(firstYearChart);

Conclusion

By following this tutorial, you have learned how to use Google Earth Engine to visualize LST trends over a specific region of interest. You have created animations and time series charts to explore temperature variations and gain insights into environmental changes over time. This kind of analysis can provide valuable information for scientific research, land management, and policy decision-making.

Remember that this is just a starting point. You can customize the code to analyze different time periods, regions, and parameters, allowing you to explore a wide range of environmental phenomena using satellite data and geospatial analysis techniques.

Happy coding!

Full code: https://code.earthengine.google.com/c37572378feca48d6490cdd491b6609a

--

--