GEE Tutorials

Google Earth Engine Tutorial: Map Flood Depth with GloFAS Data

Credit: Youtube Channel “Terra Spatial, Learn how to map flood depth and extent using GloFAS dataset for flood risk assessment and management.”

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

Introduction

Google Earth Engine (GEE) is a powerful platform for geospatial analysis, enabling users to access and process large-scale environmental datasets. One such dataset is the Global Flood Awareness System (GloFAS), which provides flood forecasts and historical flood data. This tutorial demonstrates how to map flood depth using GloFAS data in GEE, leveraging its scripting capabilities and visualization tools.

Setting Up Google Earth Engine

To begin, ensure you have access to a Google Earth Engine account. Install the GEE Python API by running pip install earthengine-api and authenticate using earthengine authenticate. Once installed, you can write scripts in JavaScript or Python to query and analyze GloFAS data.

Accessing GloFAS Data

GloFAS data is available in GEE through the ECMWF/GLOFAS/PEAK_FLOWS dataset. This dataset includes flood depth, river discharge, and other hydrological parameters. Use the following code snippet to load the dataset:

var glofas = ee.ImageCollection('ECMWF/GLOFAS/PEAK_FLOWS');

Next, filter the dataset by location and date to retrieve relevant flood events. For example:

var region = ee.Geometry.Rectangle([10, 40, 15, 45]);
var filtered = glofas.filterDate('2020-05-01', '2020-05-31').filterBounds(region);

Processing Flood Depth Data

Once you have retrieved the GloFAS data, select the flood depth band. This band typically contains the depth of water in meters. Use the following code to extract the data:

var floodDepth = filtered.select('floodDepth');

Aggregate the data to a single image for the selected date range. This can be done using reduce functions or by taking the mean:

var meanFloodDepth = floodDepth.mean();

Visualization and Mapping

Visualize the flood depth data on a map using GEE’s Map.addLayer method. Define a visualization palette for better contrast, such as a gradient from blue (low depth) to red (high depth). Example code:

Map.addLayer(meanFloodDepth, {palette: ['blue', 'green', 'red'], max: 10}, 'Flood Depth');

Adjust the map center to the area of interest using Map.setCenter and explore the data interactively. You can also export the flood depth image as a GeoTIFF or other raster formats for further analysis.

Python Code Example

If you are using Python, here is a sample script:

import ee
ee.Authenticate()
glofas = ee.ImageCollection('ECMWF/GLOFAS/PEAK_FLOWS')
region = ee.Geometry.Rectangle([10, 40, 15, 45])
filtered = glofas.filterDate('2020-05-01', '2020-05-31').filterBounds(region)
flood_depth = filtered.select('floodDepth')
mean_depth = flood_depth.mean()
Map.addLayer(mean_depth, {'palette': ['blue', 'green', 'red'], 'max': 10}, 'Flood Depth')

FAQ

What is the spatial and temporal resolution of GloFAS data?

GloFAS data typically has a spatial resolution of 0.1 degrees and provides daily or hourly flood forecasts depending on the dataset version.

How accurate is GloFAS flood depth data?

GloFAS data accuracy depends on the underlying hydrological models and input data. While it is useful for large-scale monitoring, ground-truthing is recommended for localized applications.

Can I access historical GloFAS data in Google Earth Engine?

Yes, GloFAS data covers historical periods, and GEE allows filtering by dates to retrieve past flood events.

How do I handle large datasets in GEE?

Use GEE’s built-in functions like filter(), reduce(), and clip() to minimize computational load. Exporting data as files or using client-side processing can also help.

Is the flood depth data in GloFAS available for all regions?

GloFAS covers most of the world, but data availability may vary in remote or under-sampled regions. Check the dataset documentation for coverage details.

Similar Posts

Leave a Reply

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