Until 4 p.m. Wednesday, Robbie Ray is just riding out the storm. If it ends somewhere other than the visitors’ dugout at Yankee Stadium with the Diamondbacks, though, he has a preference.

“If I get sent somewhere, I definitely want to compete for a World Series,” Ray said. “So, that’s definitely a big part of it.”

Especially with Marcus Stroman off the market, Ray is one of the most attractive pitching commodities said to be available ahead of Wednesday’s trade deadline. Diamondbacks general manager Mike Hazen has left his options open, and Ray seems the most likely candidate to be dealt. The Yankees, as they are with every other pitcher whose name pops up in rumors, are among the most likely suitors, with Clint Frazier’s name surfacing Tuesday morning as part of a potential deal.

Though Ray is not an unquestioned ace, he would give much-needed help to a Yankee rotation whose flaws were exposed in full force last week in Minnesota and Boston, and which just lost the injured CC Sabathia indefinitely.

Ray, who has a 3.91 ERA, holds eye-popping strikeout numbers — he’s on track for his third straight year with at least 12 per nine innings — though control has been an issue throughout his career.

In recent weeks, with the specter of a potential trade looming, Ray has turned in a series of strong outings, recording a 3.26 ERA in five starts this month. During that time, reports featuring his name have only grown in number, and he has gotten used to reporters huddling around his locker asking about his next destination.

“I know it’s gonna happen in the next couple days, so I’m ready for those questions,” Ray said, “but I’m also ready for it to end.”

Ray said he has put little thought into playing for the Yankees and tries to avoid trade rumors as much as possible, though his wife and agent keep him updated. He has his preferences and no enthusiasm to share them publicly. The Diamondbacks, he said, haven’t told him much.

Pitching in Yankee Stadium, which Ray has never done, would be little adjustment, he said, since he’s spent the last five years at Chase Field, also a hitter’s park.

“I think it’s the same approach anywhere,” Ray said. “You get ahead of guys, pound the zone and you put ’em away.”

As for the specifics of that approach?

“Works his ass off,” Diamondbacks catcher Alex Avila told The Post. “Pitches his ass off every time he’s out there. He’s got a devastating slider mixed with a really good fastball. He’s that type of guy that’s gonna give you some innings and punch out a lot of hitters. So, he’s been huge for us.”

A Tennessee native, Ray hasn’t spent much time in New York — “It’s crowded,” he joked, when asked about the city — but said he would have little problem here. The biggest adjustment would be shaving his beard.

“I don’t know if I’ve been clean-shaven for five, six years,” Ray said. “It’s a sacrifice.”