Fire Danger graphic by the Southwestern Weather Network

Would you like one of these for your site?

The calculation is for the Chandler Burning Index.

(This one is live from’s stickertags file. It actually changes during the day. SLOweather’s is more boring. And I used .htaccess to redirect this url to the php script so that all forums would show it.)

If so, you can download the current version of the script and the 5 required images HERE.

This is third version of this script, and has become a collaboration of a few members of the Southwestern Weather Network. I wrote the original script around Anole’s stickertags.txt data file. Ken from Saratoga weather added a mod that shows the current temp/RH and CBI value under the sign.

And, just today, Randy from added in Anole’s clientraw code, opening up its use to Weather Display users.

All feedback is welcome.


Y’know, I dunno how it will work with a station that uses metric units. Probably have to be minorly edited to use the native temp in C without converting it. Your mileage may vary… :slight_smile:

After the initial release of this script, I had a question in email from a Southwestern Weather Network member regarding the implementation of the CBI on the SWN mesomap. He wanted to know why the CBI reported LOW, when intuitively, it seems like the Fire Danger should be higher.

Since I thought others might have the same question, here’s my response:

Welcome to the arcane world of fire weather indices. Over the last few months, I’ve been studying all of the indices I can find, and writing
PHP scripts to implement those for which I have sufficient information (both equations and weather data). Currently, I’m working with the
Chandler, Fosberg, Angstrom and Nesterov indices, (and modifications of a couple of those), the Canadian Fire Weather Index, as well as some
indirectly related ones like equilibrium moisture content, 2 different fuel moistures, the Keetch-Byram Drought index, and various component
calculations, like the Ignition and Spread Indices.

(Since I first wrote this, I put up a fire weather index page on a client’s site, with implementations of the indices I already have written. You can see that page HERE.

Some, like the Chandler Burning Index (CBI), are based solely on humidity and temperature. Predictive CBI is based on the predicted high temp and low RH and can be done for whatever time period for which you have the data. I believe the NWS CBI is for an average of the next 30 days.

I have started a script that uses my Wxsim forecast output and creates CBI values and graphics for each of the the next 5 days. Unless I’ve broken it, you can see the test output HERE.

After I released the first version of my script, Ken from added the calculation to the rotation on our SWN mesomap. You can see it in action at

The way it’s implemented on the SWN map is with the current RH and temp as reported by our sites. So, when the temps cool off a bit, and the RH goes up, you may indeed have a night time CBI of LOW, when at 2 in the afternoon, you had EXTREME.

You can check your current CBI with the temp in F and the RH in percent at any time at:

Some of the other indices have a bit of “memory” and depend on what the
conditions were in the past to calculate the current value. It could include yesterday’s value (and by extension, the value from the day before, et al), or the number of days since the last rain.

And, when you talk about “FWI”, or Fire Weather Index, it gets a little more confusing. It depends on whether it’s the Fosberg FWI or a modification thereof, which is a fairly simple calc with no memory, or the Canadian FWI. The CFWI is quite complex, has multiple component equations, and memory. I’m still wading through all of the calcs for that one (about 35 equations and comparisons, as I recall).

As far as I can tell, Brian is using the Canadian FWI calcs in WD. That is probably reporting a higher fire danger than the current CBI.

Watch the SWN map during the day as the temps rise and the RH drops, and you’ll see the CBI change for most of the stations. (Don’t watch
SLOweather. We’re too close to the coast, and our CBI rarely even gets up to Moderate.)

FWIW, CBI 0-50 = LOW, 50-75 = MODERATE, 75-90 = HIGH, 90-97.5 = Very HIGH, and >97.5 = EXTREME. The CBI is linearly sensitive to temperature, but exponentially sensitive to RH, so a small change in RH can make a big change in the CBI number.

I did make provisions in the script for metric use Chris (figured not everybody is doing things backward :))

From the script:

// If Celsius units desired, use
// $ntemp = round($cTemp,1);

Hope this helps.

BTW… it is really easy to make up your own graphic to use with this.

I’m using it as a Fire Weather Index (Using WD FWI Index)

below is one of my current creations…


BTW… I use slightly different script that integrates with my whole site settings scheme.

Below is the snippet of code that does this…


// Settings file contains whole site configruation info
// including current template/colors, image types, locations
// and other settings that are passed in the $SITE[] array.


// Calculate which Image to use
// Note that images are defined by the $SITE[‘fwi-XXXX’]
// Variable which allows for multiple templates color
// schemes etc…

$fwi = $wdclientextra[635];
$fwi_image = $SITE[‘fwi-low’];
$fwi_text = ‘FWI = ’ . $fwi . ’ - Low’;
if ($fwi >= 7 && $fwi <=16) {
$fwi_image = $SITE[‘fwi-moderate’];
$fwi_text = ‘FWI = ’ . $fwi . ’ - Moderate’;
if ($fwi >= 17 && $fwi <= 24) {
$fwi_image = $SITE[‘fwi-high’];
$fwi_text = ‘FWI = ’ . $fwi . ’ - High’;
if ($fwi >= 25 && $fwi <=30) {
$fwi_image = $SITE[‘fwi-vhigh’];
$fwi_text = ‘FWI = ’ . $fwi . ’ - Very High’;
if ($fwi > 30 ) {
$fwi_image = $SITE[‘fwi-extreme’];
$fwi_text = ‘FWI = ’ . $fwi . ’ - Extreme’;

// Display Image
// Passing Image Name, Alt text, Frame Type, Image Positioning


Ok, must have something wrong on my page. If I call up the script by itself,, it works great. When I put it in my website, , I get the following error -
Warning: Unexpected character in input: ‘’ (ASCII=30) state=1 in on line 3

Warning: Unexpected character in input: ‘’ (ASCII=21) state=1 in on line 3

Parse error: syntax error, unexpected ‘@’ in on line 3

Any help would be appreciated.

Nevermind. Got it fixed.