SACRAMENTO, Calif. (AP) — Even as firefighters battle a gigantic wildfire in and around Yosemite National Park, environmental scientists are moving in this weekend to begin critical work protecting habitat and waterways before the fall rainy season beings.

Members of the federal Burned Area Emergency Response team will begin hiking the rugged Sierra Nevada terrain before embers cool as they race to identify areas at the highest risk for erosion into streams, the Tuolumne River and the Hetch Hetchy Reservoir, San Francisco’s famously pure water supply.

Now the third largest fire in California history, the inferno that started Aug. 17 when a hunter’s illegal fire swept out of control has burned 385 square miles of timber, meadows and sensitive wildlife habitat. It has cost $81 million to fight, and officials say it will cost tens of millions of dollars to repair the environmental damage alone.

About 5 square miles of the burned area is in the watershed of the municipal reservoir serving 2.8 million people – the only one in a national park.

“That’s 5 square miles of watershed with very steep slopes,” said Alex Janicki, the Stanislaus National Forest BAER response coordinator. “We are going to need some engineering to protect them.”

So far the water remains clear despite falling ash, and the city water utility has a six month supply in reservoirs closer to the Bay Area.

The burned area represents 1 percent of the Hetch Hetchy watershed, said Tyrone Jue, spokesman for the San Francisco Public Utilities Commission. He said that because the sheer walls around the reservoir are granite with little vegetation, he believes that little stabilization work will need to be done.

However initial satellite imagery and recent visits to the burned area show that the Tuolumne Canyon above the reservoir “burned pretty hot,” Janicki said.

Jue said the utility will await word from the BAER team, which will be made up of hydrologists, botanists, archeologists, biologists, geologists and soil scientists from the U.S. Forest Service, Yosemite National Park, the Natural Resource Conservation and the U.S. Geological Survey.

The team also will look at potential for erosion and mudslides across the burn area, assess what’s in the path and determine what most needs protecting.

“We’re looking to evaluate what the potential is for flooding across the burned area,” said Alan Gallegos, a team member and geologist with the Sierra National Forest. “We evaluate the potential for hazard and look at what’s at risk — life, property, cultural resources, species habitat. Then we come up with a list of treatments.”

In key areas with a high potential for erosion ecologists can dig ditches to divert water, plant native trees and grasses, and spray costly hydro-mulch across steep canyon walls in the most critical places.

Federal officials have amassed a team of 50 scientists, more than twice what is usually deployed to assess wildfire damage. Janicki hopes that with so many people performing assessment they will have a preliminary report ready in two weeks so that remediation can start before the first storms.

Burning chaparral damages soil by releasing volatile oils that saturate soil and make it water repellant. When soils become repellant they don’t soak up rain and are washed away in the runoff. Debris flows after fires can be as thick as concrete, taking out everything in their paths.

“It looks like a real mosaic right now,” Janicki said. “There’s going to be a lot of ground that has high burn severity, and other areas that don’t.”

Within the burned area are 400 miles of unpaved roads with countless culvert crossings, and engineers will be using water flow data that scientists collect to determine how to protect them from potential debris that could clog them and cause roads to wash out.

Fire officials still have not released the name of the hunter responsible for starting the blaze. On Friday Kent Delbon, the lead investigator, would not characterize what kind of fire the hunter had set or how they had identified the suspect.

“I can say some really good detective work out there made this thing happen,” he told the Associated Press.

Delbon said the Forest Service announced the cause of the fire before being able to release details in order to end rumors started by a local fire chief that the blaze ignited in an illegal marijuana garden.