Washington's official thermometer at National Airport was out of whack, possibly for much of the last two years, running about two degrees warmer than it should have and establishing several heat records that are now of dubious value, according to National Weather Service officials.

The disclosure means that while Washingtonians suffered through the summer of 1980, the hottest ever recorded here, their discomfort may not have been as unprecedented as they were told at the time.

"We found a lot of things that were really wrong with it," said Don Liddy, the weather service's chief technician here. He said the thermometer, housed in a silver-painted metal shelter just off the main north-south runway at the airport, was corrected late last December by turning it down "about two degrees," after a routine check revealed serious problems.

Small deviations of a few tenths of a degree occur from time to time and are routinely corrected, Liddy said, but two degrees is a "major" deviation and rarely occurs.

Since the correction, the airport temperatures, which form part of the official meteorological record for Washington, have been running closer to temperatures elsewhere in the area.

Temperatures at the airport historically have tended to be higher than those in the surrounding suburbs because of the "heat island" effect of urban congestion near the airport. But several weather service observers noted that those inflated temperatures ran even higher in much of 1980 and 1981.

They say the thermometer likely had been out of adjustment during most of that time, but Liddy says it is difficult to fix the exact time span.

Several heat records were broken in the summer of 1980, some by only one or two degrees. A record of 103 degrees was set on July 16, breaking the old record by two degrees. Record temperatures of 102 and 101 degrees also were measured on July 17 and Sept. 2, respectively. July, August and September that year were the hottest months ever recorded, and the year as a whole went down as the warmest in the 110-year history of the weather service here.

"I would be highly suspicious of those records now," said Liddy. He said the correct temperatures, whatever they were, "are lost data now. We'll just have to live with it."

Liddy said technicians discovered the thermometer's malfunction during a routine maintenance check "some time between Christmas and New Year's" last December.

He said the adjustment was made by resetting the instrument's points of calibration to jibe with those on the master thermometer.

Liddy said he does not know the exact cause of malfunction.

Asked if routine maintenance checks should have caught the temperature irregularity earlier, Liddy said the technician responsible for them is no longer on his staff. Another spokesman said the technician's departure had nothing to do with the faulty thermometer.