Heat Index calculation

What calculation is used to define the current heat index?

I’m using one from NOAA’s site and am getting different results from the same data.
–Sam

1 Like

Post your formula and let us see what it is doing.

Here is what I use.

// Heat Index Temperature //
// e.Observations.prototype._getHeatIndex
WeatherCalc.calcHeatIndex = function(T, RH) {
	// (air temp in C, humidity)
    var F = _convertCToF(T);
    RH = parseInt(RH, 10);
    if (RH < 40 || F < 80) return T;
    var r = 61 + 1.2 * (F - 68) + .094 * RH,
        s = .5 * (F + r),
        n = 0;
    if (s > 79) {
        if (n = -42.379 + 2.04901523 * F + 10.14333127 * RH - .22475541 * F * RH - 6.83783 * Math.pow(10, -3) * Math.pow(F, 2) - 5.481717 * Math.pow(10, -2) * Math.pow(RH, 2) + 1.22874 * Math.pow(10, -3) * Math.pow(F, 2) * RH + 8.5282 * Math.pow(10, -4) * F * Math.pow(RH, 2) - 1.99 * Math.pow(10, -6) * Math.pow(F, 2) * Math.pow(i, 2), RH <= 13 && F >= 80 && F < 112) {
            var o = (13 - i) / 4,
                l = Math.sqrt((17 - Math.abs(F - 95)) / 17);
            n -= o * l;
        } else if (RH > 85 && F >= 80 && F <= 87) {
            var c = (RH - 85) / 10,
                u = (87 - F) / 5;
            n += c * u;
        }
    } else n = s;
    return _convertFToC(n);
},

My HeatIndex and WindChill functions. I know the WChill can be optimized, but just running like it is for now.

double Functionsqt::calcHeatIndex(double inTemp, double inWspd) {
    double myHidx = 0.0;

    myHidx = 35.74 + (0.6215 * inTemp) - (35.75 * pow(inWspd,0.16)) + (0.4275 * inTemp * pow(inWspd,0.16));

    return myHidx;
}

double Functionsqt::calcWindChill(double inTemp, double inHumid) {
    double myWChill = 0.0;

    myWChill = 0.5 * (inTemp + 61.0 + ((inTemp-68.0)*1.2) + (inHumid*0.094));

    if( myWChill >= 80.0 ) {
        myWChill = -42.379 + 2.04901523 * inTemp;
        myWChill = myWChill + 10.14333127 * inHumid;
        myWChill = myWChill - 0.22475541 * inTemp * inHumid;
        myWChill = myWChill - 0.00683783 * inTemp * inTemp;
        myWChill = myWChill - 0.05481717 * inHumid * inHumid;
        myWChill = myWChill + 0.00122874 * inTemp * inTemp * inHumid;
        myWChill = myWChill + 0.00085282 * inTemp * inHumid * inHumid;
        myWChill = myWChill - 0.00000199 * inTemp * inTemp * inHumid * inHumid;

        if( (inHumid < 13.0) && ((inTemp > 80.0) && (inTemp < 112.0) ) ) {
            myWChill = myWChill - ((13.0-inHumid)/4.0)*sqrt((17-fabs(inTemp-95.0))/17.0);
        } else {
            if( (inHumid > 85.0) && ( (inTemp > 80.0) && (inTemp < 87.0) )) {
                myWChill = myWChill + ((inHumid-85.0)/10.0) * ((87.0-inTemp)/5.0);
            }
        }
    }

    return myWChill;
}
1 Like

Those are strange formulas. The heat index does not use humidity and the wind chill does not use wind.

Like I said… got it from Noah… I mean NOAA:

https://www.weather.gov/epz/wxcalc_heatindex

https://www.weather.gov/epz/wxcalc_windchill

2 Likes

Hang about. The heat index shows it uses humidity but the formula you posted is using wind.

Ugh… again… looks like I’m transposing the function names…

2 Likes