A critical cog in the machinery that drives the theory of global warming is a small white box not too far from where you live. Inside the box sits a thermometer that tracks the local temperature, which in turn becomes part of a data trail for the monitoring of climate change on Earth.

But there's a problem: Nearly every single weather station the U.S. government uses to measure the country's surface temperature may be compromised. Sensors that are supposed to be in empty clearings are instead exposed to crackling electronics and other unlikely sources of heat, from exhaust pipes and trash-burning barrels to chimneys and human graves.

The National Climate Data Center (NCDC) uses this massive network of sensors to determine daily highs and lows at the 1,219 weather stations in its Historical Climatology Network (HCN). The network has existed since 1892, but only in the last decade has it come under intense scrutiny to determine whether the figures it measures can be trusted.

For the past three years, a group of zealous laymen has visited and photographed nearly every one of the weather stations to determine whether they have been placed properly. And what they found is a stunning disregard for the government's own rules: 90 percent of the sensors are too close to potential sources of heat to pass muster, including some very odd sources indeed:

• A sensor in Redding, Calif., is housed in a box that also contains a halogen light bulb, which could emit warmth directly onto the gauge.

• A sensor in Hanksville, Utah, sits directly atop a gravestone, which is not only macabre but also soaks up the sun's heat and radiates it back to the thermometer at night.

• A sensor in Marysville, Calif., sits in a parking lot at a fire station right next to an air conditioner exhaust, a cell phone tower and a barbecue grill.

• A sensor in Tahoe City, Calif., sits near a paved tennis court and is right next to a "burn barrel" that incinerates garbage.

• A sensor in Hopkinsville, Ky., is sheltered from the wind by an adjoining house and sits above an asphalt driveway.

• Dozens of sensors are located at airports and sewage treatment plants, which produce "heat islands" from their sprawling seas of asphalt and heavy emissions.

"So far we've surveyed 1,062 of them," said Anthony Watts, a meteorologist who began the tracking effort in 2007. "We found that 90 percent of them don't meet [the government's] old, simple rule called the '100-foot rule' for keeping thermometers 100 feet or more from biasing influence. Ninety percent of them failed that, and we've got documentation."

Watts, who has posted pictures of the sensors on his Web site, SurfaceStations.org, says he believes that the location of the sensors renders their recorded temperatures inaccurate, which in turn brings some of the data behind global warming theory into question.

"It's asinine to think that this wouldn't have some kind of an effect," Watts told FoxNews.com.

But climate scientists who analyze the data say that they are able to account and adjust for the faulty locations by comparing warming trends they spot at bad sites to trends they see at good ones.

"If you use only the sites that currently have good siting versus those that have not-so-good siting, when you look at the adjusted data basically you get the same trend," said Jay Lawrimore, chief of the climate monitoring branch at NCDC.

Lawrimore admitted that Watts' volunteers had discovered real problems with sensor siting, but he said that even when those sites' heat readings were adjusted down, they still showed a steady overall rise in temperatures.

"The ultimate conclusion, the bottom line is that there really isn't evidence that the trends have a bias based on the current siting," he said.

And surface station data is only a small subset of information confirming the warming of the climate, Lawrimore said.

Changes in air temperature, water temperature, glacier melt, plant flowering, tree growth and species migration, among many others, show the same worldwide trend -- a 0.7 degree Celsius jump (1.2 degrees Fahrenheit) in the past century.

"There's a certain amount of uncertainty in the calculation of trends, but not to the extent that we don't know the climate is warming," he said.

Watts readily agrees that temperatures are on the rise worldwide, but he believes the magnitude of the increase is in question, and he says his research puts the 1.2-degree global figure in doubt.

But a team of three climatologists has completed a study of Watts' data on HCN siting and found the warming trend to be confirmed.

In fact, the three NCDC scientists, Matthew Menne, Claude Williams and Michael Palecki, say they found that instrument updates in the 1980s have created a cooling bias, and that adjusted and cleaned up data from even the bad sites is "extremely well aligned" with measurements from instruments that meet the "highest standards for climate monitoring."

"We find no evidence that the [contiguous U.S.] temperature trends are inflated due to poor station siting," reads the study, which is set to be published in a forthcoming volume of the "Journal of Geophysics Research -- Atmospheres."

"It's all objective analysis based on statistics," said Matthew Menne, the lead author of the study.

But Menne's study was conducted using information on only 43 percent of the weather stations. Watts, who has now compiled information on 80 percent of the stations and cleaned up his old information, contends that a more complete data set would furnish different results, and he plans to conduct a study of his own under the aegis of Roger Pielke Sr., a research scientist at the University of Colorado in Boulder.

A better test of the network's data is on the horizon. In the past eight years, the NOAA has established a hi-tech system that sends information via satellite and abides by all of its own rules for siting. Each sensor is ideally placed in open areas far from other structures, a fact that pleases both government scientists and longstanding critics like Watts.

"I'm convinced that the new system, the Climate Reference Network, will provide a reasonably accurate set of readings," Watts said.

But data has only begun to be collected from CRN, a regional network of just 114 climate sensors that went fully online in 2008. It will take at least a decade, and as many as 30 years, until the information it collects becomes statistically significant.

In the meantime, and for many years past, the challenged data from NCDC has been providing information for a number of top climate research centers, including the U.N.'s International Panel on Climate Change, NASA's Goddard Institute for Space Studies, and the Hadley Climate Research Unit, headed until recently by Phil Jones, who resigned in the wake of the climate-gate scandal.

With mounting pressure on climate research facilities, scientists at the NCDC hope that their data won't be discounted because of the troubling images Watts has compiled.

"These photos show a current snapshot of these stations," said Menne. "We wouldn't want to dismiss 100 years of climate records based on a photograph from the year 2009."