Union Pacific Corp. said it will consolidate operations of its energy and mining subsidiary in Fort Worth, Texas, closing regional offices in Denver and Houston and cutting 400 jobs.

The moves follow Union Pacific's sales last month of two of the energy unit's businesses and are part of a company-wide consolidation of operations intended to eliminate overhead and cut costs.It sold its Wilmington refinery to Ultramar PLC, a British company, on Sept. 8 for $440 million. On Sept. 21 the company sold its Calnev Pipeline Co. to GATX Terminals Corp. of Chicago for $105 million.

Union Pacific said that it expects the layoffs and asset sales to yield annual savings of $45 million.

A Union Pacific spokesman said the company has 375 employees in the Denver office and 325 in the Houston office.

The spokesman said a total of 400 jobs throughout the company will be eliminated. The number of layoffs in Denver and Houston and elsewhere in the company will be based on how many employees participate in a voluntary early retirement program.

"This is part of our ongoing program to keep our companies as tightly managed as possible," Drew Lewis, Union Pacific chairman, said in a statement, adding that the administrative reorganization will help the unit "to remain among the lowest cost producers in its industry."

The mining and energy unit, Union Pacific Resources, had 1987 net earnings of $183 million on sales of $1.4 billion.