Running real-time forecasting using WRFx and WRF-SFIRE

From openwfm
Revision as of 19:39, 22 October 2025 by Afarguell (talk | contribs)
Back to the WRF-SFIRE user guide.

IN CONSTRUCTION

For description and instructions on how to set up WRF-SFIRE and WRFx to run a real wildfire event, access the Running WRF-SFIRE with real data in the WRFx system page.

Fire initialization package

To run WRF-SFIRE using WRFx with real-time data, WRFxPy needs to be extended with the fire_init module. The module is currently private, but it is planned to be made public once the publications are completed. If you require access to it before then, contact Angel Farguell (angel.farguellcaus@sjsu.edu).

The package utilizes the bounding box of the fire grid to retrieve past and current National(NIFC) airborne infrared fire perimeters, as well as recent (within the last 48 hours) VIIRS satellite hotspots, from ArcGIS services. The services used are:

The information collected can also be visualized on this ArcGIS website.

The fire data processing involves estimating the fire arrival time to perform a 2-hour spin-up of the WRF-SFIRE model using the most recent fire information. The fire arrival time is estimated between two consecutive mapped perimeters (at times t1 < t2) by treating them as time level sets of the arrival-time field T. Over the short gap between perimeters, we assume an approximately constant rate of spread, so T satisfies an Eikonal model with evolution linear along local normals. For each grid cell inside the newer perimeter but outside the older one, we compute its nearest distances d1 to the older perimeter and d2 to the newer one. Along the approximate normal streamline, the spatial progress fraction d1/(d1+d2) equals the temporal progress fraction (T-t1)/(T-t2). This yields a distance-weighted convex blend:

T = (d2/(d1+d2)) * t1 + (d1/(d1+d2)) * t2,

clipped to [t1, t2] and applied only in the annuli between perimeters, producing a smooth interpolation of arrival time for WRF-SFIRE spin-up.

The two consecutive states are defined differently depending on the fire data available:

  • No fire data available: WRFxPy will run a high-resolution weather simulation, including fuel moisture modeling.
  • Only current perimeter available: WRFxPy will start a fire everywhere around the current perimeter (create a second perimeter inside the current one).
  • Only hotspots available: WRFxPy will start a fire based on the timing of hotspots, creating two consecutive perimeters at two different times using the alpha-shape algorithm.
  • Current perimeter and hotspots available: the hotspots are converted into a perimeter using the alpha-shape algorithm, and the progress is estimated using both sources of data.

How to use WRFxPy with fire_init add-on

To add fire_init

1. Clone the repository in the src folder of WRFxPy by doing:

cd src 
git clone git@github.com:wirc-sjsu/fire_init.git

2. Install the ArcGIS Python environment. The currently preferred process is to have conda find the versions for you:

conda create -n arcgis python=3 netcdf4 pyproj
conda activate arcgis
conda install -c esri arcgis
conda install -c conda-forge lxml scipy simplekml
pip install shapely

On Linux x86-64, you can also use versions specified in a yml file:

 wget https://demo.openwfm.org/web/wrfx/arcgis.yml
 conda env create --name arcgis --file arcgis.yml

3. Activate the real-time option in the job JSON file by adding:

use_realtime: true

How does it work

While geogrid and acquisition+ungrib are running, WRFxPy also acquires the ArcGIS data. Then, after all these parallel processes are complete, the metagrid and processing of the real-time information are performed. Finally, after these two processes, the real run is executed, and subsequently, the fire data information is added to the wrfinput files, and the namelist options are adjusted to utilize the spin-up time using the fire_perimeter_time option in WRF-SFIRE.