GEE Tutorials

Google Earth Engine Tutorial: Map Heatwave Frequency and Intensity

Credit: Youtube Channel “Terra Spatial, Tutorial on mapping heatwave frequency and intensity patterns using ERA5-Land dataset.”

You can see all the tutorials from here: Techgeo Academy.

Google Earth Engine (GEE) is a powerful platform for analyzing geospatial data, especially for large-scale environmental studies. Mapping heatwave frequency and intensity involves identifying periods of prolonged extreme heat and quantifying their severity over time. Below is a step-by-step guide to achieve this using GEE.

Step 1: Initialize the Google Earth Engine API

First, ensure you have access to the GEE API. Install the Earth Engine Python client or use the GEE Code Editor. For this example, we’ll use JavaScript in the Code Editor.

Step 2: Load Temperature Data

Use temperature datasets like the ERA5 Land or MODIS Land Surface Temperature. For example, load the ERA5 Land dataset:

var dataset = ee.ImageCollection("ECMWF/ERA5_LAND/DAILY_AGGR");
var temperature = dataset.select('temperature_2m'); // Select 2m air temperature

Step 3: Define Heatwave Criteria

Specify thresholds for heatwaves. A common approach is to define a heatwave as a period of ≥5 consecutive days where daily maximum temperatures exceed a specific percentile (e.g., 90th percentile for the region and season).

var threshold = temperature.select('t2m').reduce(ee.Reducer.percentile([90])).rename('threshold');

Step 4: Calculate Heatwave Frequency and Intensity

Loop through the dataset to detect heatwave events. Use time ranges and spatial filters to count occurrences and measure intensity:

var heatwaveFrequency = temperature.map(function(image) {
  return image.select('t2m').gt(threshold).rename('heatwave');
}).and(temperature.map(function(image) {
  return image.select('t2m').gt(threshold).rename('heatwave');
}));

This is a simplified example. More advanced techniques involve using ee.Algorithms.Temporal for temporal analysis and image.reduceRegion for spatial aggregation.

Step 5: Visualize and Export Results

Use the GEE Code Editor to visualize the heatwave map and export the results as a GeoTIFF for further use in GIS software:

Map.addLayer(heatwaveFrequency, {palette: ['red', 'green']}, 'Heatwave Frequency');
Export.image.toDrive({
  image: heatwaveFrequency,
  description: 'heatwave_frequency',
  fileNamePrefix: 'heatwave_frequency',
  folder: 'GEE_Exports',
  region: geometry,
  scale: 1000,
  maxPixels: 1e10
});

FAQ

What datasets are best for heatwave analysis in GEE?

ERA5 Land and MODIS datasets provide high-resolution temperature data. For long-term trends, consider using NOAA/ERSST/V4 for sea surface temperatures or ECMWF/ERA5/RECORDS for historical data.

How do I determine the heatwave threshold?

Use historical temperature data to compute percentiles (e.g., 90th percentile for the region and season). This can be done with ee.Reducer.percentile() or by creating a custom function for seasonal analysis.

Can I analyze heatwaves for a specific region?

Yes. Define a region using geometry (e.g., a polygon or a country boundary) and clip the data to this region with image.clip(geometry).

How long does the analysis take?

Processing time depends on the dataset size and computational load. For global datasets, it may take minutes, while region-specific datasets can be faster. Use the evaluate() function for progress tracking.

Can I export heatwave data in another format?

Use Export.image.toDrive() for Google Drive or Export.image.toCloudStorage() for cloud storage. For alternative formats like GeoJSON or CSV, use Export.table.toDrive() with spatial aggregation.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *