Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 48

Fire Weather Index Calculation on

Google Cloud Platform


Prepared by Josef Matondang
Engineering Staff - WP 3.2
Background

Current version of InaFDRS uses Canadian Fire Weather Index system as an input.

The weather data used as an input for the FWI system is derived from ECMWF ERA5
Real Time Data.

ERA5 Real-time + Ensemble Data is only free for meteorological agency, others need
commercial license.

PTPSW’s license for ECMWF Real-time + Ensemble is about to expire, an alternative is


needed to sustain the operation of InaFDRS.
Canadian Fire Weather Index System

Uses only weather data observed at noon local time and calculates the fire danger indices
with three moisture codes from different fuels:

Fine Fuel Moisture Code (FFMC), represents the moisture content of litter and other
cured fine fuels weighing about 0.25 kg/m^2;

Duff Moisture Code (DMC), represent the moisture content of loosely compacted
decomposing organic matter weighing about 5 kg/m^2;

Drought Code (DC), represents a deep layer of compact organic matter weighing 25
kg/m^2;
Canadian Fire Weather Index System (cont’d)

From the moisture codes, intermediary indices are calculated and one final Fire Weather
Index is used for fire management agencies:

Initial Spread Index (ISI), represent the rate rate of spread alone without influence of
fuel;

Buildup Index (BUI), represents the total fuel available to the spreading fire; and

Fire Weather Index (FWI), represents the intensity of the spreading fire as energy output
rate per unit length of fire front.
European Centre for Medium-Range Weather Forecasts (ECMWF)

The European model provides hourly, 0.1 arc degree resolution weather data that
includes, but not limited to:
- Hourly (total) precipitation
- Temperature
- Dew-point temperature (to derive relative humidity)
- Wind speed (u-component and v-component)

Two types of data are available, ERA5 Reanalysis and Ensemble data, providing
prediction for the future.
Fire Weather Index Calibration for Indonesia

The calculation of FWI System in Indonesian Fire Danger Rating System still uses the
equation provided by CFFDRS, although the value interpretation has been calibrated
to match local climates and fuel types.

Scientific studies were done to calibrate the FWI System through historical fire
occurrence (FFMC), historical fire load (FWI), visibility in haze events (DC), constant
day length/drying factor (DC/DMC), and intensity of fire (ISI).
Indonesian Fire Weather Index Classification

Classes FFMC DMC DC BUI ISI FWI


Low < 72 <4 < 140 <6 <1 <1
Moderate 73 - 77 5 - 14 140 - 260 7 - 19 2-3 1-6
High 78 - 82 15 - 29 260 - 350 20 - 33 4-5 6 - 13
Extreme > 82 > 29 > 350 > 33 >5 > 13
Google Cloud Platform
Google Earth Engine

Google Earth Engine combines a multi-


petabyte catalog of satellite imagery
and geospatial datasets and the
computing platform to use these data
for real world applications.
The Earth Engine API is available in
Python and JavaScript, simplifying the
use of Google Cloud Ecosystem for
geospatial analysis.
Google Cloud Storage

RESTful online file storage web service for storing and accessing data on Google Cloud
Platform
Store GeoTIFFs in a cloud optimized format with Google Earth Engine and re-access
the image for future use
Low latency, high durability, unlimited storage with no
minimum object size
Google Cloud Project: Service Account

Applications running in Google Cloud can have its own Project. Create a Service
Account for the application and assign resources (Earth Engine API and Google Cloud
Storage) to be used by the Service Account
Multiple service accounts can be used for different purposes (e.g., for downloading and
processing the daily FWI inputs, computing the fuel moisture codes and indices, and
exporting / download the data)
Use microservices approach to create a modular, simpler-to-manage applications for
devops team.
Way Forward:
Serverless
Application
Google Cloud Functions

Scalable pay-as-you-go functions as a service (FaaS) to run code with zero server
management
Run open source runtimes (Python, JavaScript, etc) and configure function with runtime
variables.
Google Cloud PubSub and Google Cloud Scheduler

PubSub: fully-managed real-time messaging service, providing reliable, many-to-many,


asynchronous messaging between applications. Commonly used to trigger event-driven
systems / applications.
CloudScheduler: enterprise-grade cronjob scheduler, trigger a PubSub topic with a
cronjob
Google Earth Engine Weather
Datasets
ERA5 Reanalysis (ECMWF)

ERA5 is a weather reanalysis produced by the ECMWF to provide a complete


historical weather data using available observation data and a weather model to fill the
missing pieces.
Provides hourly reanalysis data of temperature, dew-point temperature, two wind
speed components (10m above ground) and hourly precipitation data.
ERA5 Reanalysis Data is free to use, available to be used in Google Earth Engine.
Global Forecast System (NOAA)

Global Forecast System (GFS) is a weather forecast model produced by the National
Center for Environmental Prediction (NCEP) NOAA
Provides hourly forecast, updated every 6 hours with a spatial resolution of 0.25 arc
degrees
Provides temperature, relative humidity (2m above ground), two wind speed
components (10m above ground) and total precipitation on the surface.
Data is free to use, in public domain, available to be downloaded from Google Earth
Engine
GFS Prediction Parameters for FWI Inputs
Name Units Min Max

temperature_2m_above_ground °C -69.18 52.25

relative_humidity_2m_above_ground % 1 100.05

u_component_of_wind_10m_above_ground m/s -60.73 59.28

v_component_of_wind_10m_above_ground m/s -63.78 59.39

total_precipitation_surface kg/m^2 0 626.75


Global Satellite Mapping of Precipitation (JAXA)

Uses Global Precipitation Measurement constellation and algorithm developed by


Japan Aerospace Exploration Agency (JAXA) to create hourly precipitation map.
The data is owned by JAXA Global Rainfall Watch System and accessible in Google
Earth Engine, all rights reserved to JAXA.
Hourly precipitation rate, controlled by rain gauge is provided with a spatial resolution
of 0.1 arc degrees (11.1 km).
Minimum Viable Product
Architecture
Overall Proposed System Architecture
Daily High Resolution Weather Data Service
Fire Weather Index Calculation Service

Fire Weather Index pulls daily weather data


from a GCS bucket
Finds yesterday’s moisture code in a GCS
bucket
Calculates today’s moisture codes and indices,
export fuel code GeoTIFFs to GCS bucket,
FWI shapefile to separate GCS bucket
Implementation
Google Cloud Platform - GEE FWI NEOnet
Google Cloud Storage Buckets Google Cloud Platform Service Accounts
fwi-bicubic-rasters GCS Service Account
Storing GeoTIFFs of GFS and GSMaP data export@gee-fwi-neonet.iam.gserviceaccount.com
interpolated to a 1 x 1 km grid
GCS and EE API Service Account
fwi-bicubic-codes calculate@gee-fwi-neonet.iam.gserviceaccount.com
Storing GeoTIFFs of moisture codes and indices
from FWI Calculation

fwi-bicubic-shapefiles
Storing SHP of the FWI indices and codes in 1 km
resolution
FWI Inputs Python Module
Use Global Forecast System for temperature,
relative humidity, and wind speed (u component and
v component) at noon WIB;

Use GSMaP for 24-hour rainfall data at noon WIB;

Interpolate the weather data to a 1 km resolution


grid; and

Export the FWI Inputs GeoTIFF in the specified


GCS bucket.
FWI Calculator Python Module
Use ee.Geometry as a boundary input;

Initial fuel codes can be an integer or ee.Image;

Calculates the drying factor and day length based on


month and latitude;

Calculates FFMC, DMC, DC, ISI, BUI, and FWI;

Preprocess function resample the codes and indices


to a certain EPSG code and scale; and

Export the FWI codes and indices as GeoTIFF in the


specified bucket.
Proof of Concept Notebooks
Operational GFS and GSMaP Metadata Access the Google Drive folder to learn more about
the Notebook:
Daily Raster Input Notebook
FWI Interpolation - Google Drive
Historical Daily Inputs Notebook

Historical Fire Weather Index Calculation Notebook

Animation Timelapse

FWI Shapefiles Exporter


Animation Timelapse

Rain past 24 hours (mm) Fine Fuel Moisture Code Fire Weather Index
Fire Weather Index Calculator Application
Environment variables define the parameters
required, no need to code to add more provinces

Private key is shared inside a /config/key/ folder,


shared among the Docker containers

Two sets of services for each province, running daily


weather data updater and daily FWI calculator
Daily Task Scheduler

Daily update is done through cron scheduler provided by APScheduler’s


BlockingScheduler
Every day at 08:00 AM WIB, weather data inputs will be exported to the Google Cloud
Storage bucket
Every day at 08:15 AM WIB, fire weather index GeoTIFF and Shapefile will begin
processing and eventually exported to the respective Google Cloud Storage bucket.
Access the Git repository on: https://gitlab.nodc.id/josefmtd/docker-fwi
Daily Weather Data Inputs
Get the environment variables for Sumatera Selatan;

Gather weather data from GFS and GSMaP;

Interpolate weather data to 1 x 1 km grid and project


to a certain EPSG code; and

Export the GeoTIFFs of each weather data input.


Daily Fire Weather Indices
Get the environment variables for Sumatera Selatan;

Read yesterday fuel codes and today’s weather data


inputs;

Calculate the moisture codes and indices; and

Export the GeoTIFFs and SHP files.


Download Shapefiles in Windows
Download new file every day at 08:20 WIB

Convert position from Lat/Lon to UTM


(EPSG:32748)

Rebuild shapefiles and create ZIP file

Remove all intermediary files


Results
Temperature and Relative Humidity (June 6th, 2021)
Wind Speed and 24-hour Rain (June 6th, 2021)
Fine Fuel Moisture Code (FFMC)
Duff Moisture Code (DMC)
Drought Code (DC)
Buildup Index (BUI)
Initial Spread Index (ISI)
Fire Weather Index (FWI)
Conclusions
Dockerized Python Container
Application is a way to create a
production ready environment
from a finalized Jupyter Lab
workflow
Google Cloud Platform
services complements
Google Earth Engine
capabilities to produce rapid
prototype of geospatial
applications
Cloud Native
Architecture.
Serverless and
easy-to-implement
What Next?

Engineering:
- Cloud-native Architecture (serverless, full cloud solution)
- Different weather inputs and preprocessing method (netCDF + xarray)

Scientific:
- Recalibrating the FWI System by leveraging Google Earth Engine datasets
- Novel algorithm for fire prediction based on FWI and Machine Learning / Artificial
Intelligence

You might also like