GEE Tutorials

Google Earth Engine Tutorial: Analyze Rainfall Intensity and Wet Days

Credit: Youtube Channel “Terra Spatial, Tutorial on analyzing rainfall intensity and wet day patterns using NOAA CDR data.”

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

Google Earth Engine Tutorial: Analyze Rainfall Intensity and Wet Days

Google Earth Engine (GEE) offers powerful tools for analyzing environmental data, including precipitation trends. This guide walks you through a practical approach to assessing rainfall intensity and wet days using GEE.

1. Accessing Rainfall Data

Begin by selecting a rainfall dataset. GEE supports multiple sources, such as:

  • GPM IMERG: High-resolution precipitation data (e.g., users/earthengine/datasets/gpm/IMERG_V06)
  • CHIRPS: Climate Hazards Group InfraRed Precipitation with Station data (e.g., CHIRPS/2.0/precipitation)
  • ERA5: Reanalysis data from the European Centre for Medium-Range Weather Forecasts

Use the ee.ImageCollection function to load the dataset. For example:

var dataset = ee.ImageCollection("GPM/IMERG_L3/3IMERG6");
var rainfall = dataset.select("precipitation");

2. Filtering by Time and Region

Select a specific time range and define your area of interest (AOI) with geometry:

var startDate = '2020-01-01';
var endDate = '2020-12-31';
var aoi = geometry; // Replace with your defined region

var filtered = rainfall.filterDate(startDate, endDate)
                      .filterBounds(aoi);

3. Calculating Rainfall Intensity

To compute average rainfall intensity, aggregate the data using mean() and apply a scale factor if needed:

var intensity = filtered.mean().multiply(1000); // Convert from mm/h to mm/day
Map.addLayer(intensity, {min: 0, max: 20, palette: ['blue', 'green', 'red']}, 'Rainfall Intensity');

4. Identifying Wet Days

A wet day is defined as a day where rainfall exceeds a threshold (e.g., 1 mm/day). Create a binary map using gt() (greater than):

var wetDays = filtered.map(function(img) {
  return img.gt(1).rename('wet');
});

var wetDaysSum = wetDays.reduce(ee.Reducer.sum());
Map.addLayer(wetDaysSum, {min: 0, max: 365, palette: ['white', 'black']}, 'Wet Days');

5. Exporting Results

Export the analysis to your Google Drive or Cloud Storage. For example:

Export.image.toDrive({
  image: intensity,
  description: 'Rainfall_Intensity',
  fileNamePrefix: 'rainfall_intensity',
  region: aoi,
  scale: 1000,
  maxPixels: 1e10
});

6. Visualizing and Interpreting Data

Use the GEE Map to visualize rainfall intensity and wet days. Adjust the color palette and scale to highlight patterns. For deeper analysis, use the Chart API to plot time-series data.

FAQ

Q: What datasets are suitable for rainfall analysis in GEE?

A: Common datasets include GPM IMERG, CHIRPS, and ERA5. Choose based on spatial resolution, accuracy, and time coverage requirements.

Q: How to define a wet day threshold?

A: A wet day typically corresponds to rainfall > 1 mm/day. Adjust thresholds based on local climate conditions or studies.

Q: Can I analyze rainfall for multiple years?

A: Yes, use filterDate with a multi-year range (e.g., startDate: '2010-01-01', endDate: '2020-12-31').

Q: What if the dataset has missing values?

A: Use mask() or filter(ee.Filter.notNull()) to exclude null values before analysis.

Q: How to calculate seasonal rainfall trends?

A: Group data by season using filter(ee.Filter.calendarRange()) and compute averages for each season.

Similar Posts

Leave a Reply

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