Were it not for dissent, science, like politics, would have stayed in the dark ages. All the great heroes of the discipline - Galileo, Newton, Darwin, Einstein - took tremendous risks in confronting mainstream opinion. Today's crank has often proved to be tomorrow's visionary.

But the syllogism does not apply. Being a crank does not automatically make you a visionary. There is little prospect, for example, that Dr Mantombazana Tshabalala-Msimang, the South African health minister who has claimed Aids can be treated with garlic, lemon and beetroot, will be hailed as a genius. But the point is often confused. Professor David Bellamy, for example, while making the incorrect claim that wind farms do not have "any measurable effect" on total emissions of carbon dioxide, has compared himself to Galileo.

The problem with The Great Global Warming Swindle, which caused a sensation when it was broadcast on Channel 4 last week, is that to make its case it relies not on future visionaries, but on people whose findings have already been proved wrong. The implications could not be graver. Just as the government launches its climate change bill and Gordon Brown and David Cameron start jostling to establish their green credentials, thousands have been misled into believing there is no problem to address.

The film's main contention is that the current increase in global temperatures is caused not by rising greenhouse gases, but by changes in the activity of the sun. It is built around the discovery in 1991 by the Danish atmospheric physicist Dr Eigil Friis-Christensen that recent temperature variations on Earth are in "strikingly good agreement" with the length of the cycle of sunspots.

Unfortunately, he found nothing of the kind. A paper published in the journal Eos in 2004 reveals that the "agreement" was the result of "incorrect handling of the physical data". The real data for recent years show the opposite: that the length of the sunspot cycle has declined, while temperatures have risen. When this error was exposed, Friis-Christensen and his co-author published a new paper, purporting to produce similar results. But this too turned out to be an artefact of mistakes - in this case in their arithmetic.

So Friis-Christensen and another author developed yet another means of demonstrating that the sun is responsible, claiming to have discovered a remarkable agreement between cosmic radiation influenced by the sun and global cloud cover. This is the mechanism the film proposes for global warming. But, yet again, the method was exposed as faulty. They had been using satellite data which did not in fact measure global cloud cover. A paper in the Journal of Atmospheric and Solar-Terrestrial Physics shows that, when the right data are used, a correlation is not found.

So the hypothesis changed again. Without acknowledging that his previous paper was wrong, Friis-Christensen's co-author, Henrik Svensmark, declared there was a correlation - not with total cloud cover but with "low cloud cover". This, too, turned out to be incorrect. Then, last year, Svensmark published a paper purporting to show cosmic rays could form tiny particles in the atmosphere. Accompanying the paper was a press release which went way beyond the findings reported in the paper, claiming it showed that both past and current climate events are the result of cosmic rays.

As Dr Gavin Schmidt of Nasa has shown on www.realclimate.org, five missing steps would have to be taken to justify the wild claims in the press release. "We've often criticised press releases that we felt gave misleading impressions of the underlying work," Schmidt says, "but this example is by far the most blatant extrapolation beyond reasonableness that we have seen." None of this seems to have troubled the programme makers, who report the cosmic ray theory as if it trounces all competing explanations.

The film also maintains that manmade global warming is disproved by conflicting temperature data. Professor John Christy speaks about the discrepancy he discovered between temperatures at the Earth's surface and temperatures in the troposphere (or lower atmosphere). But the programme fails to mention that in 2005 his data were proved wrong, by three papers in Science magazine.

Christy himself admitted last year that he was mistaken. He was one of the authors of a paper which states the opposite of what he says in the film. "Previously reported discrepancies between the amount of warming near the surface and higher in the atmosphere have been used to challenge the reliability of climate models and the reality of human-induced global warming. Specifically, surface data showed substantial global-average warming, while early versions of satellite and radiosonde data showed little or no warming above the surface. This significant discrepancy no longer exists because errors in the satellite and radiosonde data have been identified and corrected."

Until recently, when found to be wrong, scientists went back to their labs to start again. Now, emboldened by the denial industry, some of them, like the film-makers, shriek "censorship!". This is the best example of manufactured victimhood I have come across. If you demonstrate someone is wrong, you are now deemed to be silencing him.

But there is one scientist in the film whose work has not been debunked: the oceanographer Carl Wunsch. He appears to support the idea that increasing carbon dioxide is not responsible for rising global temperatures. Wunsch says he was "completely misrepresented" by the programme, and "totally misled" by the people who made it.

This is a familiar story to those who have followed the career of the director Martin Durkin. In 1998, the Independent Television Commission found that, when making a similar series, he had "misled" his interviewees about "the content and purpose of the programmes". Their views had been "distorted through selective editing". Channel 4 had to make a prime-time apology.

Cherry-pick your results, choose work which is already discredited, and anything and everything becomes true. The twin towers were brought down by controlled explosions; MMR injections cause autism; homeopathy works; black people are less intelligent than white people; species came about through intelligent design. You can find lines of evidence which appear to support all these contentions, and, in most cases, professors who will speak up in their favour. But this does not mean that any of them are correct. You can sustain a belief in these propositions only by ignoring the overwhelming body of contradictory data. To form a balanced, scientific view, you have to consider all the evidence, on both sides of the question.

But for the film's commissioners, all that counts is the sensation. Channel 4 has always had a problem with science. No one in its science unit appears to understand the difference between a peer-reviewed paper and a clipping from the Daily Mail. It keeps commissioning people whose claims have been discredited - such as Durkin. But its failure to understand the scientific process just makes the job of whipping up a storm that much easier. The less true a programme is, the greater the controversy. www.monbiot.com