A federal judge yesterday found the District government in contempt for failing to carry out a court order to process child welfare applications within 45 days, and he threatened to appoint a special master to oversee compliance.

The ruling by U.S. District Court Chief Judge Aubrey E. Robinson Jr. is based on data for 1982. But since then, District officials said yesterday, the situation has improved substantially.

"We've finally figured out how to do it all," said Audrey Rowe, the D.C. commissioner for social services, who is in charge of the welfare payments. "I don't think we are going to have any problem showing compliance."

Under an order issued by Robinson in 1972 the District must follow federal guidelines requiring that applicants for Aid for Families with Dependent Children (AFDC) receive their first checks or denial notices within 45 days.

According to 1982 data cited by Robinson yesterday, the District failed to meet the time limit for about half its AFDC applications, which now average 1,100 per month.

Officials said the program currently aids 22,600 families, including about 60,000 people -- almost 10 percent of the District's population. It costs $80 million a year -- 52 percent from District revenues and 48 percent from the federal government. AFDC is the District's second most expensive welfare program after Medicaid and has the third largest number of recipients after Medicaid and food stamps.

Robinson found the District in contempt of his AFDC order once before, in 1978, and he set up an elaborate reporting system to enforce it.

However, lawyers for Neighborhood Legal Services, the D.C. affiliate of the federal Legal Services Corp., which brought the case, charged that the District failed to file many of the required reports. They presented evidence, which Robinson found persuasive, of "inordinate failure" to meet the 45-day limit.

Although he did not rule on it, Robinson said he found "troubling" the plaintiff's "steadfast assertion that the District continues to process AFDC applications beyond the allowable 45 days.

"Failure to comply with the applicable rules and regulations has been a chronic problem for the District of Columbia," Robinson said, adding that he "is becoming convinced that threats of contempt citations have lost their force."

He said city officials must submit a report by Sept. 20 showing "how they wish to proceed" to demonstrate that they are in "100 percent compliance" with the time limit.

"Should this last attempt at more traditional adjudication fail," Robinson said, "then the court stands ready to seek the aid of a special master" to supervise the AFDC program closely.

"We're very pleased," said Christopher R. Whittingham, an attorney for Neighborhood Legal Services, referring to Robinson's threat to appoint a special master. "We think it will give them a powerful incentive to comply with the court order.

"The lawyers have filed a lot of papers in this case," he added, "but it is really about people who are at the subsistence level and need their checks to pay the rent each month."

In its court filings, the District said it had problems meeting the time limit in 1982 because of a new computer system and difficulties in training and keeping staff.

Yesterday, John M. Bayne, deputy administrator of the city's income maintenance administration, said the computer system has been "straightened out," staff turnover has been reduced, and a new quality assurance division has improved performance by making random checks.

Bayne noted that Robinson's original order allows some flexibility from the 45-day rule if applicants take more than 10 days to submit required documentation, such as birth certificates or citizenship papers. With that taken into account, Bayne said, recent studies show the city meets the time limit in 95 percent of cases and "is approaching 100 percent."

"We've had problems in the past; that's clear," Bayne said. "But in the last year we have shown steady improvement."