Energy secretary James Schlesinger met with Canadian officials here today in an effort to iron out an agreement on a pipeline to transport Alaskan natural gas across Canada to the midwestern United States.

"The atmosphere is good," Schlesinger told reporters during a lunch break. "The trends are favorable."

The talks are to continue Friday over what Schlesinger described as "some still unresolved problems."

Asked if he was optimistic about the outcome, Schlesinger replied, "I'm always optimistic.

Allen MacEachen, a senior Cabinet minister and chief negotiator for Canada in the pipeline talks, was equally noncommital. He said he did not expect an agreement to be signed today. But observers were hopeful that the major issues would be resolved before Schlesinger returned to Washington.

Canada is pressing the United States for compensation for social and economic costs and provision for a future linkup with Canadian gas sources if the pipeline is built across Canadian territory.

U.S. officials have argued that such conditions will add to the costs of the gas for the American consumer. They say that if Canada pushes too hard they will recommend a rival pipeline tanker project that would go around Canada.

The rival project would involved construction of a pipeline alongside the existing trans-Alaska oil pipeline to the port of Vadez, where the gas would be liquefied and shipped to the lower 48 states by tanker.

President Carter was required by law to make a recommendation to Congress by today on the transport of Alaskan gas, but he has asked for an extension.