TORONTO -- When Canada's Lanni Marchant and Krista DuChene stepped up to the marathon start line at the 2013 world championships, it was 2 o'clock in the afternoon, the sun was high, and the temperature in Moscow had soared to a sizzling 35 degrees with the humidex.

It was the perfect storm of hot air and little shade, the type of conditions that cause the body to shut down. And 23 women -- a third of the field -- didn't make it to the finish line that day.

DuChene collapsed 12 kilometres in, and was whisked to hospital in an ambulance ride she barely remembers.

Marchant experienced cramping so severe that, at the suggestion of a fellow racer, she stabbed her contorted left thigh muscle with a safety pin to try relieve the spasms. She would eventually cross 44th of the 46 runners who finished.

"It was hot, girls were dropping within the first 5K, literally just collapsing in front of us," Marchant said.

It's a scene that athletes, particularly in endurance events, could face in two years at the Olympics and Paralympics in Tokyo, where the heat was blamed for 116 deaths last month, a fourfold increase from July of last year.

The thermometer hit 41 C just outside Tokyo on July 23, the highest-ever recorded temperature in Japan. The record heat wave has Olympic organizers bracing for the worst.

Meteorologist Doug Charko, who's worked with the Canadian team at five Olympic Games, spent last week in Japan gathering data.

"Certainly average conditions in Tokyo are very warm and humid compared to Canadian standards, so even going in we knew that heat is what we're going to be focusing on," Charko said.

Tokyo's organizing committee is implementing measures to deal with Mother Nature. The marathons will start at 7 a.m., the triathlons at 8 a.m., and the race walking events at 6 and 7 a.m., to minimize athletes' exposure to extreme conditions. Trees are being planted along the marathon course for shade. There will be misting stations. A layer of solar heat-blocking pavement is being laid down on roadways. The idea of implementing daylight saving time was recently floated.

Canadian athletes say they'll be prepared for whatever the weather throws at them.

Half an hour before his race, you'll likely find Evan Dunfee immersed in an ice bath. The race walker who famously finished fourth at the Rio Games -- he was in third before he was bumped by Japan's Hirooki Arai of Japan late in the race -- has a detailed protocol for hot, humid weather that includes submerging himself in an ice bath and doing his warm up in an ice vest.

"The big thing is keeping your core temperature under that critical level where your body starts to shut down because it thinks you're in danger," said Dunfee, who takes in about four litres of water in a 50K race. "We use a few strategies to trick our body . . . bring that core temperature down a degree or two just to prolong in the race how long it takes to build back up towards that critical temperature."

Dunfee and Canadian teammate Inaki Gomez went 1-2 in the 20K race walk on a hot day at the 2015 Pan American Games in Toronto. He credited their pre-race cooling as their "secret weapon."

"We were wearing ice vests and doing our pre-cooling, and nobody else was doing it, and I was looking around and going 'Well, why aren't you guys. . . ?' And then in the race, guys just seemed scared of (the heat), and Inaki and I weren't, and we pushed the pace early and it paid off."

Marchant, the Canadian record-holder in the women's marathon, said to prepare the 2016 Rio Olympics, she rescheduled her workouts in London, Ont., for the hottest time of the day, and monitored her heart rate between intervals.

"In the marathon, you need to find that zone where your system isn't cooking on the inside," she said. "But even in Rio, I took a bottle (10 ounce bottles of water) every 5K, I ran through the misters, and by 20K I was getting chill bumps for being dehydrated. And I would pour water on myself and it would evaporate immediately. It was so hot."

Dunfee said he once raced in 38 C in Australia.

"I think the majority of us that did that race kind of went 'Well, we got through that, so we're probably fine for anything,"' he said of the 2012 race.

Justyn Knight, who was ninth in the 5,000 metres in his world championship debut last summer in London, said competing in the NCAA (for Syracuse) was a great lesson on racing in heat.

"Oh man, every time we went to Florida, it was so hot it was ridiculous," Knight said. "I remember one (10,000-metre) race, it was just the worst, when we went to Tallahasee . . . They have water cups for the 10ks, I just remember grabbing the cup and it's very hard to drink water while running, and I ended up just pouring it on myself.

"The one thing I will do before my race is dump a cup of water on my head, just to make sure my skin's wet."

Tokyo hosted the 1964 Olympics in October, to avoid the hottest months, but that was before the increased demands of sponsors and broadcasters who don't want the Games battling for viewers with the NFL, NBA and NHL.

In Japan last week, Charko gathered data on everything from the temperature inside and outside each venue, the humidity, air pollution, and wind and sea currents to help athletes and teams prepare for what they might face.

Canada's track team will get a taste of challenging conditions at next summer's world championships, Sept. 28 to Oct. 6 in Doha. To beat the heat in the Persian Gulf state, the marathons, the 20 and 50K race walk events, and the final events of the heptathlon and decathlon will start around midnight. There's been talk of air conditioning the stadium much like the stadiums at the 2022 World Cup in Qatar.

The Olympics are July 24-Aug. 9, while the Paralympics are Aug. 25 to Sept. 6.