BEVERLY HILLS, Calif. (AP) _ Texas oilmen who poked around this glitzy city of movie stars, moguls and megabucks found something they liked on the athletic field of Beverly Hills High School.

On Wednesday, Wainoco Oil Corp. of Houston announced it will buy the 16 oil wells on the field and leases on 400 acres in the heart of the city from Waverly Oil Co. of Los Angeles for $17 million.

The wells produce up to 1,500 barrels of oil a day and 1.1 million cubic feet of gas daily. Their estimated reserves are 3.5 million barrels of oil and 3.4 billion cubic feet of gas.

The oil and gas site is bordered on the west by Century City and on the east by Beverly Drive. Olympic Boulevard marks the south border and Elevado Avenue and Bedford Drive the north and northeast.

The area, known as Beverly Hills West Field, is a major source of revenue for the city and its school district. During its last fiscal year, Beverly Hills earned $1.6 million in royalties from the oil property and the school district reaped $1.3 million.

John B. Ashmun, president of Wainoco, said the purchase will double the Houston company's oil reserves and daily oil production.

''In addition, we believe that there is significant potential for development and exploration under Waverly Beverly Hills West Field leases,'' Ashmun said in a statement without elaborating.

Under the agreement, subject to approval by directors of both companies, Wainoco will pay $13.5 million in cash and $3.5 million in company stock for Waverly's oil and gas properties.

Waverly, owned by the Federal Deposit Insurance Corp., First Interstate Bank of Denver and Bank of California, was formed last November by bank creditors of Beverly Hills Oil Co.

That company, founded more than 25 years ago, had earlier filed for protection from creditors under Chapter 11 of the U.S. Bankruptcy Code when it was unable to make loan payments to two banks and ran up $40 million in debts.

Wainoco's 1984 revenue was $45.4 million. The company plans to set up a California office after the acquisition is completed next month.