(CNN) -- In staging their Fourth of July fireworks show, authorities in Ocean City, Maryland, have faced challenges in recent years from Mother Nature.
Fireworks light up the sky over Milwaukee, Wisconsin, during the city's 2008 Fourth of July festivities.
In 2005, thick fog veiled the celebration. Spectators couldn't see the detailed patterns and colors of the fiery blasts -- they only saw the clouds and haze get brighter.
Thunderstorms erupted the next two years, delaying the show in 2006 and then forcing its cancellation in 2007. That year, storms brought winds that were just too strong.
"We start taking a hard look at the direction and speed of the wind when it gets to 15 or more knots [about 17 mph]," said Ocean City Fire Marshal Sam Villani. "At 20 knots, we consult the shooters ... to see if our perimeter is safe for the crowds. Twenty-knot [23 mph] sustained winds would probably be our cutoff."
As millions gather across the United States on Saturday to celebrate America's birthday with fireworks displays, fire officials will be watching weather forecasts and preparing to make sure revelers are as safe as possible.
More fires are reported on the Fourth of July than any other day of the year, and more than half of those are caused by fireworks.
The safest way to enjoy fireworks is to attend a public display conducted by trained professionals.
Do not use consumer fireworks.
Don't pick up unexploded fireworks; they may still be active.
For more tips, visit http://www.nfpa.org
Source: The National Fire Protection Agency
They often start by banning spectators from a safety zone, or perimeter, around the launch site to protect them from drifting embers that can get as hot as 1,200 degrees Fahrenheit. For that reason, fireworks launches over harbors, rivers and other bodies of water can often be larger in scale.
"For a venue like New York Harbor, it is common for [launch] barges to be located on the water, well away from land," said Guy Colonna, division manager with the National Fire Protection Agency. "Even if the winds increase, it's possible...[for] the safety of the display not to be compromised."
Fireworks shows originating on land have stricter standards for the size of the perimeter, depending on wind speed, because spectators are generally closer to the explosives, Colonna said.
Strong winds can make safety trickier. According to the Boston Globe, hundreds of people at a 2005 Fourth of July fireworks show in Canton, Massachusetts were accidentally showered with glowing embers when winds shifted about 10 minutes after the event began.
High winds can even cancel a fireworks celebration. Rain, however, will not necessarily stop a show, said Philip Butler of Fireworks by Grucci, a Long Island, New York-based fireworks production company that has choreographed shows for presidential inaugurations and the Olympics.
Fireworks don't extinguish in the rain, and as long as operators "keep the powder dry," they will explode, Butler said. Moisture can cause them to change colors, though. "A brilliant blue may appear as a royal blue," he said.
Weather challenges are nothing new for Grucci. In preparing for a large show in Dubai, the production company once faced 105-degree heat and a sandstorm.
"They told us to simply kneel down and cover our heads with our capes and ride it out," Butler said.
Ideal conditions for fireworks are calm winds, comfortable temperatures and clear night skies, Butler said. "When the sky is black and clear, it's like a painter's canvas for us."
Some commonly asked questions about fireworks:
Do fireworks still work when it snows?
Yes. For many New Year's Eve celebrations in cold-weather states, it's often snowing during fireworks shows. Fireworks production companies say the snow acts as a prism, reflecting and shifting the colors.
What's the biggest danger that spectators face from fireworks?
Statistics show the vast majority of fireworks-related injuries are caused by over-the-counter fireworks instead of burning debris from public fireworks celebrations. The risk of fireworks injury is 2½ times higher for children than for the general population, according to the National Fire Protection Agency. The biggest culprit? Sparklers.
The National Fire Protection Agency advises against using your own fireworks. "Leave it to the professionals."
For a Fourth of July weather forecast for your area, visit CNN.com/weather.