After weeks of hazy, smoky skies from fires burning around the state, air quality in the Bay Area is about to improve.

Forecasters said Thursday that increasing winds blowing in from the ocean should within the next fews days clear out much of the smoke now hanging over the region.

“The overall trend going into the weekend is for improving conditions,” said Charley Knoderer, supervising meteorologist for the Bay Area Air Quality Management District in San Francisco.

“It’s a little bit of good news for now.”

Good morning! Here's your morning HRRR-Smoke model loop showing how smoke may move across the area today. pic.twitter.com/ZDWoe1H7DE — NWS Sacramento (@NWSSacramento) August 9, 2018

Over the past few weeks, there have been occasional breezes blowing in from the ocean, called onshore winds, but they have been weaker than those that were expected starting late Thursday into Friday morning, he said. Related Articles California fires: See how smoke is spreading across the West

Here’s how you can track California’s wildfires

California Wildfires: It’s a people problem

But in the days ahead, not only will the onshore winds be blowing stronger — up to about 15 mph — but other winds at higher elevations are forecast to blow from the south to the north, pushing smoke into the northern Sierra Nevada and rural southeastern Oregon.

“It’s going to prevent the smoke from blowing over us,” he said. “If the forecast is right, we should see the skies a little more clearer.”

The air district continued a “Spare the Air” alert in the nine Bay Area counties Thursday, the sixth of the year, but did not issue one for Friday.

The upcoming weather trends should improve air quality even in the worst places, such as Sacramento, Chico and the Sacramento Valley.

“Everybody is going to get some relief in Northern California,” said Knoderer. “I’m not sure about Southern California.”

Latest forecast of smoke drift through Thursday indicates little change in near surface smoke across the #BayArea and Central Coast through Thursday morning, but then decreasing smoke by Thursday afternoon. #CAwx #CAWildfires pic.twitter.com/6h4oWWRL8S — NWS Bay Area (@NWSBayArea) August 9, 2018

But for the Sacramento Valley and other inland areas that have been bearing the brunt of the smoke, the changing weather is a double-edged sword.

Stronger winds from the ocean help blow away smoke, but they also can fan flames on active fires, said Michelle Mead, a forecaster with the National Weather Service office in Sacramento.

“We’re going to see some temporary breaks in the smoke,” Mead said. “It will clear out the valley temporarily, but it will result in the fires picking up again.”

Meanwhile a high-pressure zone that has been driving much of the hot weather recently will fade, giving way to a low-pressure trough that will bring cooler temperatures as well over the weekend, forecasters say. Those milder temperatures not only will allow people to go outside more comfortably, but also will help to reduce air pollution.

Last weekend, temperatures in San Jose were in the high 90s. This weekend, they will be in the mid-80s, a drop of about 15 degrees, and falling some days next week into the 70s. Similarly, temperatures in Livermore and much of the East Bay, which has seen the mercury hover near 100 in recent days, will drop next week into 80s, with Oakland seeing 70s. San Francisco’s temperatures over the weekend and into next week will peak in the 60s, with similar cool temperatures along much of the coast and Monterey Bay.

Lower temperatures help reduce air pollution because there are essentially two types that California regularly suffers. The first, soot, or particulate matter, increases when fires are burning. The second, ground level ozone, is formed when emissions from cars, factories and other combustion sources combine with gases that evaporate from fossil fuels like gasoline. When temperatures are hotter, those chemicals cook in the air, causing smog. When temperatures are cooler, less smog is formed.

Temperatures in recent weeks have been blazingly hot.

On Wednesday, the National Oceanic and Atmospheric Administration reported that July 2018 was the hottest month ever recorded in California since modern measurements began 123 years ago, with an average statewide temperature of 79.7 degrees.

Death Valley was the hottest place, with an average July temperature of 108.1 degrees. That searing total, NOAA reported, set an all-time record for highest monthly average temperature ever recorded at any weather station in the world.

Start your day with the news you need from the Bay Area and beyond.

Sign up for our Morning Report weekday newsletter.

The hot weather has increased the risk of fires, drying out trees, grasses and shrubs. California’s fire season, which is only half over for 2018, also has been exacerbated by the recent five-year drought, experts say, which left far more dead brush and vegetation than normal.

And climate change continues to warm the planet. The 10 hottest years on record globally have all occurred since 1998.