Skip to main content

Spark

The Spark toolkit

Spark is a toolkit for the end-to-end processing, simulation and analysis of wildfires. Users can design custom fire propagation models by building on Spark’s computational fire propagation solver and incorporating various input, processing and visualisation components, each tailored for wildfire modelling.

The Spark fire simulation workflow; input, processing, visualisation and output.
The Spark fire simulation workflow

Easily source input data

Many types of input and output data formats can be used including text files, comma separated variable (CSV) files, most raster image types, ESRI raster and vector formats (vector formats are converted to raster in the framework) and GDAL raster data types. Once the data layers are imported, the first (optional) step of the processing stage runs a user defined initialisation model over the data layers. Possible uses of this stage could include defining land classifications from input data sets or creating fuel map layers, ready to use in the propagation solver.

Configurable fire propagation model

The Spark propagation solver can simulate the propagation any number of closed fire perimeters over an unbounded spatial area. Under the hood, the solver uses high-performance OpenCL technology, allowing it to run models quickly and scalably on both GPU-accelerate desktops and compute-cluster hardware. The underlying algorithm uses the raster-based level set method. A key feature of this method is the ability to control exactly how the fire perimeter is propagated, which Spark enables by allowing the user to define the speed function that controls the outward propagation at each point on the perimeter. The speed function is input directly as a C function in the Spark framework. Examples of speed functions for several fuel types are available in the model library.

User-defined input layers

The speed function can be linked to any number of named user-defined layers. For wildfire modelling these layers will typically include fuel parameters, topography and meteorological conditions such as temperature and relative humidity. The speed function can be written in a concise and clear manner using the given name for each layer. For example, if the propagation depends on the current moisture level from a user-defined layer named moisture the speed function could, for example, be set to speed = 1 + moisture. User-defined layers can be static, such as elevation maps, or can be time varying, such as gridded temperature or moisture predictions. The framework handles all spatial and temporal interpolation of the layers, ensuring that the speed function uses the correct value for each point on the perimeter.

Fig_layers

Spark also uses a classification layer corresponding to a particular fuel type, or other classification, within the domain. Each classification can be used to run a corresponding speed function, allowing multiple speed functions for different fuel types to be defined over the domain. For example, cells with a classification value of 1 may be grassland, with a corresponding grassland speed function. Cells with a classification 2 may be forest, with a different speed function. The framework will automatically use the speed function corresponding to each classification within each cell to update the fire perimeter.

On-the-fly visualisation and analysis

The framework can periodically suspend the simulation to allow analysis, visualisation or output of the simulation results. There are a number of built-in modules for data analysis ranging from inspection of point values, data plotting and statistical calculations over the domain to image analysis using OpenCV. This analysis can be performed on individual simulations or over ensemble sets of simulations. Both the propagation and the resulting analysis can be interactively visualised in a graphical user interface (GUI) using OpenLayers or a range of two and three dimensional display types.

Solid foundation

The framework is based on the CSIRO Workspace platform. Workspace is a cross-platform application development framework, built on the Qt toolkit, that allows individual operations to be connected and managed in a workflow environment. Each modular component within Spark is implemented as a Workspace operation, allowing solver workflows to be rapidly constructed in a GUI environment. A range of number of open-source modules are included in Workspace, such as OpenCV, NetCDF, GDAL and Python which are fully compatible with the Spark framework. Complex user interfaces can also easily be build in Qt designer and used with  Workspace workflows, such as the spark-gui demo application.

The Spark propagation solver is implemented as an individual operation, shown in the figure above at the centre of the workflow. The solver runs within a loop, returning control to the external workflow environment after a given period of simulation time, allowing the results to be analysed or visualised. Configuration operations, on the left hand side of the workflow, control the input conditions for the solver. An additional feature of the framework are processor operations, which are computational sub-solvers that run independently of the solver. The workflow shown above uses a wind generation processor which creates the wind field for the perimeter propagation algorithm. Processor operations can be developed independently from the framework and used directly with the solver. In the example shown above, the solver results are visualised by displaying the arrival time of the perimeter as a raster layer over a ground image.