if(k > 0 &&
temperature_thresholds[k] < temperature_thresholds[k-1]) {
fprintf(stderr, "The temperature thresholds have to be increasing.\n");
if(k > 0 &&
temperature_thresholds[k] < temperature_thresholds[k-1]) {
fprintf(stderr, "The temperature thresholds have to be increasing.\n");