Energy-cost anxiety has gripped local governments in the Washington area and nationally. As soaring energy prices gobble up budgets, officials are trying everything from reducing ventilation in schools to hooking up powerful computers that control every energy-using device in whole complexes of buildings.

"It's a battle, and we're trying everything under the sun," said Carroll Harvey, director of the District of Columbia's Department of General Services, which is responsible for an energy-consuming empire of 2,120 government, school and public housing buildings. "It's obvious from these [rising] costs that if we don't do something we'll be swallowed."

Dennis Bass, director of energy programs for the National League of cities, said that rising energy costs are now considered as troublesome by U.S. city officials as crime and other traditional major problems. In Alburquerque this year officials expect energy costs to surpass salaries.

In the Washington area, new cost-cutting tactics saved, or more precisely avoided spending, more than $4 million that local governments would otherwise have had to pay out last year for electricity, natural gas, heating oil and gasoline.

But as impressive as those sayings are for programs in their infancy, they're just a drop in the bucket. The District of Columbia, for example, expects to save $2 million in building-energy costs with an ambitious program this year, but its energy budget is still forecast at $82 million -- up 24 percent from $66 million last year.

Energy costs that took 2 percent of the D.C. budget in 1973 before the Arab oil embargo now consume 5 percent, and that is a fairly typical figure for this area.

Montgomery County, for example, spent $12 million or nearly 5 percent of its total operating budget last year on energy, and officials expect to spend $13.8 million this year despite rigorous cost cutting. The Fairfax County school system spent $13 million or well over 5 percent of its budget on energy last year, and energy costs are expected to rise at least $1 million this year despite cost-cutting efforts.

As governments struggle to get a handle on those costs, particularly with computerized management systems, workers are finding that they have to surrender another small measure of control over their lives: A school secretary in Arlington who could warm her office by changing a thermostat on the wall has yielded that power to an "energy czar" seated at a computer terminal miles away, and guards in the District who often controlled night building temperatures to suit their own comfort no longer have that luxury.

Mary Anne Kirgan, a contractor who is installing energy-management computers in D.C. government buildings, said she asked a city official what to do when night guards wanted more heat and was told: "Don't kill 'em but cut 'em back."

Kirgan installed a small $9,660 "microprocessor" computer in the old Gales School at 65 Massachusetts Ave. NW, where the city's Department of Transportation is located, it saved $8,100 in oil heat costs during the first seven weeks.

Because the building is in bad repair, Kirgan said, some areas remain cold during the day and there is pressure by employes to override the computer program and turn up the thermostat.

"You always have the problem of who gets the final control," she said. "What really makes a system effective is when the top guy is not going to call down and override it."

While government officials recognize that personal comfort and control are sometimes sacrificed, they are committed to the programs because the stakes are so high and the savings relatively easy to achieve.

In Arlington, officials hooked up a $46,000 Intelligent Systems Corp. computer to two schools and a career center, recovering the computer's cost in eight months. Electric heat in one school had been gulping $13,000 worth of kilowatts a month during the winter; the computer halved that. $1

"It's almost like stealing," said Ken Buglass, director of facilities for the county school system.

Buglass saved $19,000 at another school by, among other things, reducing ventilation. When energy was cheap, many schools used 15 cubic feet of fresh air per minute per student -- air that often had to be heated or cooled. Four cubic feet is now acceptable, according to the National School Public Relations Association.

Buglass saved 12 percent on another school's heating and air-conditioning bill by covering and insulating walls made of block glass.

In Montgomery County, officials saved $69,000 in gasoline costs by a number of measures, including keeping careful records on official gasoline use and then follow up on "who's using the most gas and why," according to a spokesman.

Taking a blunter approach to the same problem, D.C. officials started filling gasoline tanks of many of the city's 4,500 vehicles only halfway. City energy aide Chuck Clinton said, "People realized it was a hassle to go back to the pump so they tended to be much more judicious."

Another ingenious cost-cutting move in the District came after an energy auditor noticed that kilowatt-gobbling microwave ovens were cooking hot dogs in a high school cafeteria at the same time a sewing class was using electric sewing machines. Simultaneous demands for electric current are billed at high rates, and the school saved on its electric bill by moving the sewing class to an earlier hour.

Prince George's County, where officials saved $697,000 last year with conventional methods such as setting back thermostats, is the only major jurisdiction in the area wihtout computerized energy saving or plans to install it.

"I hope to get computers, but it's just a matter of getting the funding," said Charles Freed, the county school system's assistant maintenance chief. "You can't always convince people what they can save just by talking to 'em."

"Look," said R. Hal Silvers, the county's emergency and energy chief, "Computers are not the complete answer. The investment cost is high."

But other jurisdictions are placing big bets on new computer technology. D.C is undertaking a five-year, $17.3 million energy-saving campaign of building improvements and computerized energy control that officials hope will save $44.5 million by 1985. The calculations are made in current dollars at current energy prices.

The city already has Honeywell, IBM and other computers controlling energy use in its new courthouse, the city's 15 largest schools, the Martin Luther King Jr. Library, D.C. General Hospital, the city jail and other major buildings. The computers cost $455,000 and are saving $350,000 a year in current dollars and at current energy prices, officials said.

"You pay for these things in a year and a half and after that it's all gravy," said Brij Malhotra, chief of programming, management and budget in the Department of General Services.

The city's IBM energy computer saved $3,830 in electricity at the jail during the first 17 days of February by periodically shutting down big electric fans in the heating system and by balancing heat deliveries to different parts of the building according to a complex preprogrammed set of priorities, according to a printout provided by the computer. It measures its own daily saving. Fairfax County installed a $600,000 computer to control energy costs in seven schools, and officials expect it to pay for itself within two years. In Alexandria, the new courthouse to be dedicated May 1 contains a computer that will aid a system designed to collect body and lighting heat and send it to cold spots in the building. Montgomery County officials, who installed computerized energy control in 20 schools in three years, report savings or 22 to 33 percent on electric and oil bills. The computer installation in the first three schools cost $101,097 and saved slightly more than that during the first year of operation.

"It works great," said the Montgomery school system's energy manager, Ray Pratt.

In Arlington, the computer system works this way:

Building chief Buglass, a retired Air Force lieutenant colonel, sits in front of a blue computer terminal screen in his office located in a nondescript cinderblock building tucked away behind a school bus parking lot.

By pressing keys on his console, Buglass can call up on the screen, which resembles an oversized television set, temperature readings and the exact status of every boiler, air handler, lighting system or other energy-using device at Henry Elementary, Jefferson Intermediate School, and the county Career Center.

Furthermore -- and this is the important point -- he can actually control all those systems directly from his console through open telephone connections to the three distant locations. All he has to do is press some keys to shut off an air handler here, reprogram a boiler cycle there.

"I'm still doing a lot of planning and experimenting with this thing," he says as ranks of numbers parade down his screen, telling him everything from the temperature on a wall sensor in the Henry Elementary School gym to the status of the building water heater, which runs weekdays only, from 6 a.m. to 4 p.m.

"It's easy for me to turn things on and off. They don't know at the schools when I do it. Oh, after a while they might call and say, 'It's stuffy in here.'"

Buglass had the computer installed in late 1979, hooking it up first to Henry Elementary, which was built in the early 1970s with electric resistance heating, possibly the most expensive way to heat a big building. Then he hooked it up to the two other schools, and plans to add three more schools each year. So far he has saved $120,000.

Buglass said he places the comfort of school occupants first and does not subscribe to the "scream management" approach, which he defined as "keeping things off and reduced till people in the school start calling and screaming."

A few moments later Margaret Roberts, his secretary, walked up and said, "Mr. Buglass, while you're playing with that, Henry's cold. Clare got a call."

"Well, we'll give them a little more heat," replied Buglass. Turning to his visitor, he added: "I had shut 'em down around 8 or 8:30 because if you let 'em go full tilt on a day like this [it was 50 degrees outside], they'll get to hot."

He examined his screen, punching some keys.

"That's interesting," he said. "Their temperatures look all right to me. You know, people have different tolerances for heat and some like to have it at 75." Nevertheless, Buglass gave Henry a little puff of heat.

Shortly thereafter at the school itself, a low-slung concrete building, Lorraine Rutz, a secretary in the principal's office, explained that she had called Buglass because, "There's cold air blowing in from someplace." She pointed at the ceiling, where there was an open space between two ceiling panels. "Of course," she added, "just because it's cold in here doesn't mean it's cold everywhere in the building."

At Thomas Jefferson Intermediate School, a large modern brick building with very few windows, principal Joseph Macekura said the computer energy management of the building works well. "The overall service is satisfactory," he said. "There are bugs -- the problems occur usually when there's a sudden drastic change in external temperature.

"Occasionally when it's either a bit cold or hot, all we do is call [Buglass' office] and they adjust it. On a Monday, if you've had a very cold weekend, sometimes it'll be cold in the morning. We call in and in one and a half hours, at the most, the temperature is back up."