(temp, humidity)
return temp + (0.555 * (saturation_pressure - 10.0))
Calculate Humidity Index as per Canadian Weather Standards
Calculate Humidity Index as per Canadian Weather Standards
Calculate Humidity Index as per Canadian Weather Standards
def cadhumidex(temp, humidity):
    "Calculate Humidity Index as per Canadian Weather Standards"
    if temp is None or humidity is None:
        return None
    # Formulas are adapted to not use e^(...) with no appreciable
    # change in accuracy (0.0227%)
    saturation_pressure = (6.112 * (10.0**(7.5 * temp / (237.7 + temp))) *
                           float(humidity) / 100.0)
    return temp + (0.555 * (saturation_pressure - 10.0))
def cadhumidex ( temp , humidity ) : if temp is None or humidity is None : return None # Formulas are adapted to not use e^(...) with no appreciable # change in accuracy (0.0227%) saturation_pressure = ( 6.112 * ( 10.0 ** ( 7.5 * temp / ( 237.7 + temp ) ) ) * float ( humidity ) / 100.0 ) return temp + ( 0.555 * ( saturation_pressure - 10.0 ) )