If it wasn't for a plumber's son from Dalkeith, the Second World War may have turned out very differently indeed.

British Royal Air Force meteorologist Group Captain James Stagg may not be as well known as many war heroes but, without his advice to the supreme commander of the Allied forces in Europe, General Dwight D Eisenhower, on what date to strike, the D-Day landings in Normandy could have been a disaster.

The story of how Stagg's forecast helped carve out history forms the backbone of Pressure, a new play by actor and writer David Haig, which has its world premiere at the Royal Lyceum Theatre in Edinburgh this week before transferring to Chichester. With Haig also taking the lead role of Stagg, the little-known story has clearly become a labour of love for its author and star.

"It's a story that is very seldom told," says Haig, "but about a subject that everybody knows quite a lot about. James Stagg is an unsung hero, and he's a Scots hero. The essence of the story is that Stagg persuaded Eisenhower to delay the attack because of the appalling weather, because he instinctively understood British weather.

"The American weathermen, led by Irving P Crick, who was the first celebrity weatherman, thought it was going to be a glorious day, and if Stagg hadn't got it right, that would've cost 70 to 80,000 lives."

In Pressure, the action is compressed into one room in Portsmouth, where Stagg, Eisenhower and Eisenhower's lover and confidante Kay Summersby are holed up during a four-day countdown to D Day.

Haig explains: "Each of these three protagonists becomes inter-dependent in a very interesting way. They help each other through this decision during the countdown, and I think it's safe to say that the name of the play is the most accurate that I've ever come up with.

"They had 350,000 lives at stake, and everything was in place except the weather. If this hadn't come off, the war would have been lengthened for at least another year."

As an actor, Haig has been seen in Four Weddings And A Funeral, The Thick of It, and more recently in the remake of political sit-com, Yes, Prime Minister. Onstage, he has appeared frequently on the West End and at Chichester Festival Theatre, where he worked with the director of Pressure, John Dove. Haig recently won an Olivier Award for playing the title role in Alan Bennett's play, The Madness of George III, and most recently played King Lear at the Theatre Royal in Bath.

Prior to Pressure, Haig combined his two jobs in My Boy Jack, a play about Rudyard Kipling's relationship with his son. "My Boy Jack was easier to do," says Haig, "because the character reminded me of my father, so it was quite a personal journey.

"With Pressure I was writing from quite a distance, because I had no personal relationship with the characters involved, so it took quite a while for John to persuade me to do it. Then I thought, this is great, because so often I'm either cast comedically, or as characters with this huge burning energy that goes all over the place, like Lear and King George.

"James Stagg has a huge energy as well in his love of weather, but he's all restraint, so it's been good to find somewhere to channel the energy, but it's very different."

In previous readings of the story, Stagg has been little more than a bit-part player. This was certainly the case in the 1962 film, The Longest Day, which featured the likes of John Wayne, Sean Connery, Kenneth More and Henry Fonda as part of its all-star cast. Stagg was played by English actor Patrick Barr.

"It's astonishing that Stagg's role in all this hasn't been picked up more than it has," says Haig. "There's lots of research you can do about it. It's all there. It's just that nobody has chosen to put Stagg at the story's centre."

It is the weather, however, that shapes things.

"The weather is the play's fourth main character," says Haig. "If I had to define it, I would say it's a thriller about the weather."

Pressure, Royal Lyceum Theatre, Edinburgh, May 1-24.

www.lyceum.org.uk