Indicador de Clima é uma estimativa sobre o quanto agradável é o clima de uma cidade ou país específicos. Os valores estão no intervalo [-100, +100] (maior é melhor). Cidades com um valor de 100 têm temperaturas moderadas e baixa humidade e nenhuma outra condição meteorológica importante que normalmente não é apreciada pela maioria das pessoas. No entanto, algumas pessoas preferem climas mais frios enquanto outras preferem climas mais quentes e algumas pessoas apreciam condições húmidas, portanto este indicador é uma recomendação geral, que não deverá ser considerada cegamente.
As fórmulas atuais para calcular este indicador estão sujeitas a alterações.
Estas fórmulas escritas na linguagem de programação Java são as seguintes:
public double getHumidex() {
return temp_high_avg + 0.5555 * (6.1 * Math.exp(5417.7530 * (1 / 273.16 - 1 / (dewpoint_high_avg + 273.15))) - 10);
}
public double getRanking() {
//first it is calculated in range [-30, 30] then multiplied
double base = 30;
if (dewpoint_low_avg < 10) {
base -= Math.pow(0.25 * (10 - dewpoint_low_avg), 1.2);
}
//26 Severely high. Even deadly for asthma related illnesses
//24 Extremely uncomfortable, fairly oppressive
//21 Very humid, quite uncomfortable
//18 Somewhat uncomfortable for most people at upper edge
if (dewpoint_high_avg > 18) {
base -= Math.pow( (dewpoint_high_avg - 18), 1.2); // 10^1.2 = 15.8
}
//http://courses.washington.edu/me333afe/Comfort_Health.pdf
//37.7 very uncomfortable
//32 uncomfortable
//12 uncomfortable
//0 very uncomfortable
if (temp_high_avg > 31) {
base -= Math.pow(temp_high_avg - 31, 1.5); // 10 ^ 1.4 = 25, 10 ^ 1.5 = 31.6
}
if (temp_low_avg < 8) {
base -= Math.pow( (8 - temp_low_avg) / 2, 1.55); // -20c, 30/2=15 , 15 ^ 1.6 = 76
}
double humidex = getHumidex();
//humindex > 31 yellow
//humindex > 40 orange
//humindex > 46 red
if (humidex > 31) {
base -= (humidex - 31) / 4.0;
}
if (base < -30) {
base = -30.0;
}
if (base > 30) {
base = 30.0;
}
base = base * 100 / 30.0;
return base;