Google Earth Engine: Analyzing Land Surface Temperature Data Training Release 2.0.0
International Research Institute for Climate and Society, Earth Institute, Columbia University
Pietro Ceccato Valerie Pietsch
Yung-Jen Chen Benjamin Marconi Carolyn Balk Alice Stevenson May 24, 2017
2
CONTENTS
1.1 Definition 1.2 Interpretation 1.3 Access 1.4 Analyses 1.5 Case Study – Brazil 1.6 Exercise 1.7 Validation of MODIS Land Surface Temperature 1.8 Summary 1.9 References
1 5 5 6 8 9 10 11 12
3
Google Earth Engine: MODIS Land Surface Temperature (LST) Training MODIS Land Surface Temperature (LST) The Moderate Resolution Imaging Spectroradiometer (MODIS) is an instrument carried by NASA’s Aqua and Terra satellites. It captures images of Earth’s surface in 1-2 day intervals in 36 spectral bands. The spatial resolution is 1000m, and the data extends from March 5, 2000 to the present. MODIS images can be used to analyze land surface changes over time, including land surface temperature. Why was it developed? This Google Earth Engine map displays global land surface temperature over a user-input short-term period. The tool also provides land surface temperature (LST) long-term and short-term time series for a user-specified region over user-specified time periods. What is the tool used for? The tool is used for analysis of global land surface temperature trends, with possible applications to climate change, agriculture, water resources, etc. What can the current tool not be used for? The Terra and Aqua satellites were launched in 1999 and 2002, respectively. Therefore, the tool can only be used for analyzing temperature data from March 5, 2000 to the present, with about a month delay between satellite imaging and availability of data. It cannot be used for future temperature projections.
1.1 Definition The Google Earth Engine – MODIS LST tool can be modified to output a time-series of LST for a user-defined region. This region can be defined through use of the geometry tool shown in the image below. This section will go through an example for Brazil.
4
The region is imported into the map through the following code: // Import region var region = geometry;
Alternatively, a region can be selected using Google Fusion Tables. Specific countries can be accessed from the ‘Countries.csv’ Google Fusion Table available publicly at: https://www.google.com/fusiontables/data?docid=1tdSwUL7MVpOauSgRzqVTOwdfy17KDbw -1d9omPw#rows:id=1. The code below selects Brazil from this file. Other data layers can be uploaded to Google Fusion Tables and accessed similarly, or public tables can be searched at: https://research.google.com/tables. //Choose country using GEE Feature Collection var region = ee.FeatureCollection('ft:1tdSwUL7MVpOauSgRzqVTOwdfy17KDbw-1d9omPw') .filter(ee.Filter.eq('Country', 'Brazil'));
This layer is then added to the map, showing the outline of the country. //Add region outline to layer - for selected countries Map.addLayer(region)
Following this region selection, the MODIS LST day and night image collections are uploaded into Google Earth Engine (GEE), as follows: // Collect bands and scale var modisLSTday = ee.ImageCollection('MODIS/MOD11A2').select('LST_Day_1km'); var modisLSTnight = ee.ImageCollection('MODIS/MOD11A2').select('LST_Night_1km');
5
The imported MODIS Land Surface Temperature data is expressed in degrees Kelvin. It is then converted to degrees Celsius, for both the day and night datasets. var modLSTday = modisLSTday.map(function(img) { return img.multiply(0.02).subtract(273.15).copyProperties(img,['system:time_start','syst em:time_end']); }); var modLSTnight = modisLSTnight.map(function(img) { return img.multiply(0.02).subtract(273.15).copyProperties(img,['system:time_start','syst em:time_end']); });
The Google Earth Engine – MODIS LST tool provides a map of short-term (1 year) average LST, a time series of long-term (14 year) average LST, and a time series of short-term (1 year) average LST. These long and short-term periods can be input by the user for a desired analysis period by manipulating the code below, where collection05 is the long-term period and collection01 is the short-term period. // Select dates var collection05night '2016-03-31')); var collection05day = '2015-03-31')); var collection01night '2015-12-31')); var collection01day = '2015-12-31'));
= ee.ImageCollection(modLSTnight.filterDate('2000-01-01', ee.ImageCollection(modLSTday.filterDate('2000-01-01', = ee.ImageCollection(modLSTnight.filterDate('2015-01-01', ee.ImageCollection(modLSTday.filterDate('2015-01-01',
Finally, the MODIS LST data sets are “clipped” to the user-specified region, in order to be displayed only in that region. //Clip to Specified Region var clipped05night = collection05night.mean().clip(region) var clipped05day = collection05day.mean().clip(region) var clipped01night = collection01night.mean().clip(region) var clipped01day = collection01day.mean().clip(region)
The LST time series are then charted and display in the GEE Console. In this case, all of Brazil is too large a region for Google Earth Engine to create a time series. Therefore, a smaller region must be chosen through use of the geometry tool (or uploading a shapefile), here called ‘small_region’ and shown in purple: (NOTE – Rename ‘geometry’ import to ‘small_region’)
6
// Charts Long-Term Time Series var TS5 = ui.Chart.image.series(collection05night, small_region, ee.Reducer.mean(), 1000, 'system:time_start').setOptions({ title: 'LST Long-Term Time Series', vAxis: {title: 'LST Celsius'}, }); print(TS5); // Charts Short-Term Time Series var TS1 = ui.Chart.image.series(collection01night, small_region, ee.Reducer.mean(), 1000, 'system:time_start').setOptions({ title: 'LST Short-Term Time Series', vAxis: {title: 'LST Celsius'}, }); print(TS1);
7
Finally, the map center is set and the short-term temperature data is added to the GEE map, at a range from 0 to 40°C, on a scale of color palette: blue, green, yellow, orange, red. Other color codes can be found at: http://www.nthelp.com/colorcodes.htm. //Set Center of Map and Add Clipped Image Layer Map.setCenter(-50, -10, 3); //lat, long, zoom Map.addLayer (clipped01day, {'min': 0, 'max': 40, 'palette':" 0000ff,32cd32,ffff00,ff8c00,ff0000 "});
8
1.2 Interpretation The MODIS Land Surface Temperature map runs on a scale of 0 to 40°C, where blue indicates colder values and red indicates warmer values. White indicates values in the middle of the spectrum, around 20°C. The temperature values displayed on the map are average daytime temperatures over a short-term period (‘collection01day’). The LST time series charts display average nighttime LST over time for the user-specified geometrical “small region”.
1.3 Access The Google Earth Engine – MODIS LST Code can be accessed at https://code.earthengine.google.com/185a8ebc3b8adbebdf91877e0bc31f97 Google Earth Engine access can be requested through the form at https://signup.earthengine.google.com.
1.4 Analyses Users can choose to map average daytime or nighttime temperatures over a short-term or long-term period, as desired. The user can also choose to chart time series for average daytime or nighttime LST over any specified time periods. In addition, the user can also create temperature anomalies. In the world of climate, the term “anomaly” means the difference between the value of a quantity and its climatological mean value. A “monthly anomaly” is the difference between the original monthly value of a quantity in a given month and the monthly climatological value for that month of the year.
9
Here, for months i and years j, r’ij is the monthly anomaly, rij is the original monthly value, and the remainder of the equation is the calculation of the monthly climatology (which is subtracted from the original monthly values). Monthly anomalies (of temperature, for example) indicate the difference (positive or negative) between a monthly temperature value and its “normal” value for that month of the year, in terms of the original units of the quantity (e.g., degree Celsius or degree Kelvin). Calculating anomalies is one way to remove the annual cycle from a time series. This can be a useful thing to do in some types of analyses, such as the calculation of correlations between two-time series. If the annual cycle is left in the time series, a high correlation between two variables may sometimes be the result of this annual cycle, which may mask other variations of greater interest to the analysis. In Google Earth Engine, the script to compute monthly anomalies for a single location, a point with Longitude -60.22 [ 60° 13’ 12” West] and Latitude -1.73 [1° 43’ 48” South], is as follow:
Imports (1 entry) var point: Point (-60.22, -1.73) var LST = ee.ImageCollection('MODIS/MOD11A2').select('LST_Day_1km'); var modLSTday = LST.map(function(img) { return img.multiply(0.02).subtract(273.15).copyProperties(img,['system:time_start','system:time_end'] ); }); var means = ee.ImageCollection(ee.List.sequence(1, 12) .map(function(m) { return modLSTDay.filter(ee.Filter.calendarRange(m, m, 'month')) .mean() .set('month', m); })); //Define time period (in this example for three years) var start = ee.Date('2012-01-01'); var months = ee.List.sequence(0, 36); var dates = months.map(function(index) { return start.advance(index, 'month'); }); print(dates); //Group by month, and then reduce within groups by mean() the result is an ImageCollection with one //image for each month. var byMonth = ee.ImageCollection.fromImages(
10
dates.map(function(date) { var beginning = date; var end = ee.Date(date).advance(1, 'month'); var mean = modLSTDay.filterDate(beginning, end) .mean() .set('date', date); var month = ee.Date(date).getRelative('month', 'year').add(1); return mean.subtract( means.filter(ee.Filter.eq('month', month)).first()) .set('date', date);
})); print(byMonth);
//Map out results Map.addLayer(ee.Image(byMonth.first())); //Chart the Anomalies var chart = ui.Chart.image.series({ imageCollection: byMonth, region: point, reducer: ee.Reducer.mean(), scale: 10, xProperty: 'date' }); print(chart);
This script is also available at: https://code.earthengine.google.com/34c57a5e8eaf6e76f1f59df51d7c4052 The resulting chart shows the temperature anomalies for a single location point with coordinates: -60.22 (for Longitude 60.22 West) and -1.72 (for Latitude 1.72 South) during the time period Jan 2012 to Jan 2015.
11
1.5 Case Study – Brazil Brazilian water managers want to assess the length and timing of the most recent severe drought event in Brazil, in order to better prepare for future droughts. The answer can be obtained by selecting Brazil as the target country from the Google Fusion Table ‘Country.csv’ feature collection. The most recent drought in Brazil occurred in January 2015, so the user could input January 2015 as the short-term time series and the 2014-2015 period as the long-term time series: // Select dates var collection05night '2015-12-31')); var collection05day = '2015-12-31')); var collection01night '2015-01-31')); var collection01day = '2015-01-31'));
= ee.ImageCollection(modLSTnight.filterDate('2014-01-01', ee.ImageCollection(modLSTday.filterDate('2014-01-01', = ee.ImageCollection(modLSTnight.filterDate('2015-01-01', ee.ImageCollection(modLSTday.filterDate('2015-01-01',
1.6 Exercise Disaster managers in Brazil want to assess the most recent dry season in order to better prevent future natural fires. The dry winter season extends from about June to November. What was the temperature like during this season in 2002? 12
// Select dates var collection05night '2003-12-31')); var collection05day = '2003-12-31')); var collection01night '2002-12-31')); var collection01day = '2002-12-31'));
= ee.ImageCollection(modLSTnight.filterDate('2000-01-01', ee.ImageCollection(modLSTday.filterDate('2000-01-01', = ee.ImageCollection(modLSTnight.filterDate('2002-01-01', ee.ImageCollection(modLSTday.filterDate('2015-01-01',
Answer: 2000-2002 show peak temperatures over 35°C during the dry season. During 2002, the peak land surface temperatures were reached during the August-September range. Temperatures rose most steadily during July-August, and a short rise occurred again in October after a temporary drop in temperatures during September. This trend of temperatures rising during July-August and peaking in August-October appears to be consistent over the longer time series of 2000-2003.
1.7 Validation of MODIS Land Surface Temperature The Land Surface Temperature provided by MODIS sensor corresponds to the land surface temperature (Ts) and is different from the air temperature (Ta) usually used for applications in health. However, it is possible to use the Ts to retrieve Ta. 13
Comparisons between night MODIS Ts data with minimum Ta shows that MODIS night-time products provide a good estimation of minimum Ta over different ecosystems (with ΔTs-Ta centered at 0°C, a mean absolute error (MAE)=1.73°C and a standard deviation = 2.4°C). Comparisons between day MODIS Ts data with maximum Ta showed that ΔTs-Ta strongly varies according to the seasonality, the ecosystems, the solar radiation, and cloud-cover (Vancutsem et al., 2010) (see figure below).
Minimum and maximum temperature profiles derived from stations (green) and MODIS satellite measurements (black) over several years for 4 stations, i.e. Asmara in Eritrea (a), Shire in Ethiopia (b), Tsabong in Botswana (c), and Antsirabe in Madagascar (d). The figure above shows that MODIS Ts during the night is a good estimation of the min Ta. However, MODIS LST during the day fluctuates according to the season and location. Estimation of maximum Ta is more difficult and requires calibrations/corrections. Two factors proposed in the literature to retrieve maximum Ta from Ts, i.e. the Normalized Difference Vegetation Index (NDVI) and the Solar Zenith Angle (SZA) do not provide strong solution to estimate Maximum Ta (Vancutsem et al., 2010). Further research on robust methods to retrieve maximum Ta is still needed. The user can nevertheless use the MODIS LST during the day to estimate the spatial distribution of temperature and in special cases when for example the temperature of the water or the soil or the top of canopy is of interest for special diseases, e.g. monitoring the distribution of schistosomiasis (Manyangadze et al., 2016).
14
1.8 Summary The Google Earth Engine – MODIS Land Surface Temperature (LST) code is to be used in assessment of historical temperatures. It enables the user to access information on any time scales between March 2000 and the present, at any location either input by country or by geometrical selection of a region.
15
1.9 References "Land Surface Temperature and Emissivity Daily L3 Global 1 Km Grid SIN." Land Processes Distributed Active Archive Center (LANDAAC) - MOD11A1. USGS, n.d. Web. 20 Apr. 2016. "Late Dry Season Fires in Brazil: Natural Hazards." NASA Earth Observatory. N.p., n.d. Web. 20 Apr. 2016. "MODIS: Moderate Resolution Imaging Spectroradiometer." NASA Goddard Space Flight Center. N.p., n.d. Web. 20 Apr. 2016. Manyangadze, T., Chimbari, M.J., Gebreslasie, M., Ceccato, P., Mukaratirwa, S. (2016). Modelling the spatial and seasonal distribution of habitats of schistosomiasis intermediate host snails using MAXENT in Ndumo area, KwaZulu-Natal Province, South Africa. Parasites and Vectors 9:572 DOI 10.1186/s13071-016-1834-5. Vancutsem, C., Ceccato*, P., Dinku, T., Connor, S.J. (2010). Evaluation of MODIS Land surface temperature data to estimate air temperature in different ecosystems over Africa. Remote Sensing of Environment, 114(2): 449-465
16