Revised Chandler Burning Index calculated by a virtual sensor

Moderator: Mattk

Post Reply
User avatar
d_l
Expert Boarder
Expert Boarder
Posts: 133
Joined: Fri Mar 13, 2009 12:58 am
Location: Reno, Nevada USA
Contact:

Revised Chandler Burning Index calculated by a virtual sensor

Post by d_l » Sat Jan 18, 2020 11:34 pm

I previously had posted a way to compute the Chandler Burning Index with a virtual sensor. On another weather forum, it was suggested that the CBI should never be below 0 or above 100 even though the raw formula will calculate these extremes under certain weather conditions. Note that there is another popular PHP program which calculates the CBI, but does not limit the output to the 0 to 100 range. I couldn't find any "official" CBI definitions to confirm these limits, but it does seem that the the constriction of the numerical ranges of the higher fire severity categories suggests that the 100 numerical cap is valid.

I reworked my old AWK conversion script to impose these limits. Although this new script is fairly simple, it took some trial-and-error programming/recompute attempts to get it to work. The AWK/GAWK manuals do not fully address how to arrange the elements of multiple conditional tests, equations, and printfs within a compact Meteohub-type AWK script. Nor do they address the immensely significant fact that the Meteohub's internal calculations are computed at full values and then divided by 100 before being displayed as a Meteohub sensor value. This CBI virtual sensor is also programmed to round up values greater or equal than x.5 and round down those below to yield a "decimal integer".

First of all, this computation is still using Meteohub version 4.6t (I don't update often), but I think it should run correctly on later versions.

These are the updated "how-to" settings:

For your virtual sensor, define the following:
New ID - data#
Name - CBI or what ever you wish
Trigger - th#
Conversion - awk ' { cbi = ((110 - 1.373 * $4) - 0.54 * (10.20 - $3 / 10)) * (124 * 10 ** (-0.0142 * $4)) / 60; if (cbi < 0) cbi = 0; if (cbi > 100) cbi = 100; cbi = int (cbi -- 0.5) * 100; printf ''%i'', cbi } '

Simply copy and paste the AWK script into the conversion box in order to avoid entry mistakes.

The Chandler Burning Index formula is CBI = (((110 - 1.373*RH) - 0.54 * (10.20 - T)) * (124 * 10^(-0.0142*RH)))/60. Note that the temperature value as output by the Meteohub must be divided by 10 and the overall index number multiplied by 100 to produce the correct CBI value. I also could not get the exponentiation symbol "^" to work. It errored as "_". So I switched the formula to a double asterisk "**" which is supposed to be equivalent to "^".

For now, I've been plotting the CBI on a simple 24 hr graph with an explanation of the different color code levels underneath the graph - https://www.tceweather.com/firedanger_graph.html.

Post Reply