calc_week_temperature optimization