The weather in the western U.S. state of California has helped firefighters gain greater control of a massive wildfire that is burning near the populous city of Santa Barbara .