Increases in energy and housing costs drove consumer prices up another 1 percent in July, and lifted inflation so far this year to an annual rate of 13.1 percent.

The overall increase came despite a second straight monthly decline in supermarket prices that saw another round of price custs in beef and other meat.

The labor Department reported separately that consumer prices in the Washington metropolitan area rose 2 percent during June and July combined, essentially keeping pace with the national rate.

Supermarket prices locally fell in July, dipping 0.6 percent over the month after soaring 1.1 percent in June. Food prices locally are sampled every month, but retail prices of other goods and services are compiled bi-monthly.

The increases nationally cut further into workers' purchasing power. The Labor Department's index of average hourly earnings, adjusted for inflation, edged down 0.3 percent in July to a level 3.5 percent below a year ago.

The day's reports were another disappointment for President Carter, who is trying simultaneously to slow inflation and avoid a serious recession. Continued high inflation means money and credit will stay tight, worsening the business slump.

Yesterday's figures also supported assertions by food industry leaders that grocery prices already had begun to decline when Carter launched his "jawboning" campaign against the industry two weeks ago.

The president called food industry leaders to the White House to complain that they weren't passing on decreases in wholesale prices fast enough. The industry called his action a political gesture.

The July figures also appeared to heighten the doubts that the administration will meet its goal of holding the inflation rate for all of 1979 to no more than 10.6 percent.

The president told a radio audience in Davenport, Iowa, earlier this week that, "I hope that at the end of this year you'll see the inflation rate turning around and start going down again. I believe we will see that happen."

The administration issued no formal statement on yesterday's statistics. However, William Cox, the Commerce Department's deputy chief economist, noted that auto, gasoline and mortgage costs have slowed since the July figures were collected.

The Labor Department's report yesterday showed about two-thirds of the July increase stemmed from higher energy and home-ownership costs, both of which have been rising sharply all year.

Energy prices soared 4.2 percent over the month, combining a 5 percent jump in gasoline prices and a 1.7 percent rise in prices charged by natural gas and electric utilities.

At the same time, the explosion in energy prices sent ripples through other parts of the economy. Largely because of an increase in the cost of jet fuel, transportation costs soared, rising 1.8 percent.

The figures showed that over the past 12 months the retail price of gasoline has risen 42 percent. And the July figures reflect virtually none of the new round of crude-oil price increases announced by exporters in June.

The department's overall housing index rose a substantial 1.2 percent in July, marking the sixth month in a row of exceptionally large increases. The jump reflected higher mortgage rates and house prices.

The only bright spot in the report came in food prices, which posted a scant 0.1 percent rise in July after rising on 0.2 percent in June. (The food index includes both supermarket prices and restaurant prices.)

The figures showed a sharp 2.7 percent decline in the index for meats, poultry, fish and eggs, with a second monthly dip in beef prices. Egg prices declined 4.5 percent, but prices of fresh fruits and vegetables rose.

The other major element in the inflation picture was a continuing sharp rise in medical costs. Prices charged by physicians and hospitals rose 1.2 percent and 1 percent, respectively, reversing a previous trend toward moderation.

he July figures brought the overall consumer price index to 218.9 percent of its 1967 average. That means it took $218.90 to buy the same goods and services last month that cost $100 just 12 years ago.

Over the past 12 months, the index has gone up by 11.3 percent. A narrower inflation measure, the consumer price index for urban wage earners and clerical workers, rose 1.2 percent in July, up 11.5 percent from July 1978.