The weather is largely beyond our control but factors heavily in our performance. There are some things that can be done to mitigate high heat and humidity such as training in the early morning or late evening. On cold days with minimal sunlight training can be done midday. Competitive events with fixed dates and start times, set months in advance with the best intentions, do not allow the luxury of shuffling a weekly schedule or altering training times to take advantage of optimal weather.
The temperature, humidity, winds, and precipitation at the time of training or a competitive event all need to be factored in and plans and expectations adjusted accordingly before starting. Non-optimal temperature and humidity will exact a performance penalty for the entirety of the course. Extreme temperatures and precipitation are also a concern for health and safety and can lead to hypo/hyperthermia. High humidity and wind will dehydrate us more quickly than optimal weather. Assuming the same start and finish points, a headwind or elevation changes will exact a penalty for half of the course while providing a performance enhancer for the other half.
Unfortunately training plans and training aides are set for optimal conditions. In less than perfect conditions real effort will be understated by pace metrics. Heart rate should reflect the higher level of effort but will not reflect dehydration and other conditions. Of course our bodies will know and calculate the pace we can do. Relying too heavily on a training aide such as pace will lead to exhausting greater effort in a shorter amount of time than intended. This will hamper our ability to complete training or an event at best, and will lead to health and safety concerns at worst. Too much effort too soon will exact a larger total penalty in the second half than even - albeit slower, pacing throughout would have.
Not every day or event is made for meeting a training target or setting a personal record. These days are useful nonetheless as they stress our bodies in different ways we can adapt to, provided our effort is not too great or too little.