When the novel coronavirus first began to spread, the news was abuzz with predictions of mass infections overwhelming hospitals, and dizzying death tolls.

We were told COVID-19 would kill millions in the United States alone, with carnage rivaling post-apocalyptic pandemic blockbusters, and dying patients would be left on the streets. We hoarded toilet paper and canned goods like the end was truly nigh.

Though no death or sickness should be belittled, and each life lost is a tragedy to be mourned, overall, the coronavirus panic was overblown. As Americans’ lives gradually—finally—begin returning to normal, it seems ludicrous to us how fervently we believed the doomsday prophecies trumpeted by media outlets hungry for clicks and viral views (pun intended).

This is a lesson we should apply to other contentious issues, such as climate change, that involve questionable data modeling.

The trouble with data models is that they’re purely statistical in nature, not scientific, and their results change based on the criteria used to design them. Besides, infectious disease modeling is often intended for short-term projections, not long-term forecasts, and is meant to be understood in the context of “confidence intervals,” suggesting a range of possible outcomes rather than absolute certainty. Because our understanding of new diseases, public behavior, and government policies changes rapidly, so too does the validity of model projections. They are what some scientists describe as “wrong but useful.”

Scientists in all specialties should carefully heed this lesson from COVID-19—especially those in climate science. Much attention is attracted by mind-boggling headlines and sound bites claiming catastrophic global warming is on the horizon, but the data models used to justify big-government climate programs are just as faulty as the COVID-19 models that contributed to mass panic.

Most global climate change organizations use the “Model for the Assessment of Greenhouse Gas Induced Climate Change,” a data modeling system that projects a range of possible climate scenarios, each called representative concentration pathways (RCP). The fundamental flaw in these models is twofold.

Climate models are built on unrealistic criteria. For example, RCP8.5—the highest and least likely in the range of projections—is calculated based on an improbable near-total global switch to coal (pdf) for power generation. Since the models were designed, coal consumption has plummeted, replaced largely by natural gas. There’s no sign of this trend coming to an end any time soon, making these projections highly suspect.

These models are also widely misunderstood, since the media fixates on the worst-case-scenario estimate as gospel—rather than carefully explaining the full range of possibilities. Most of the frightening headlines predicting massive heat waves and sea-level rise are based on RCP8.5, not on the more reasonable “business as usual” projections—or the more measured projections by organizations such as the Energy Information Administration that are more reflective of current energy trends.

So, what can the coronavirus data teach us about climate scientists’ attempts to project future temperature changes? Several things.

First, climate models must use realistic criteria, taking into account real-world trends in our energy sources, technological advancements that reduce greenhouse gas emissions, and humanity’s growing resiliency to our natural surroundings. Otherwise, it’s all “garbage in, garbage out.”

Second, the right models should be used for the right purpose. Some are designed for short-term projections, and others for long-term extrapolation. Most are designed to address a range of possibilities based on our limited current knowledge, not to precisely predict the future.

Finally, scientists—and, most especially, the media—must honestly acknowledge the limitations of data modeling. Even the most sophisticated number-crunching can’t foresee what will happen generations from now. Models should serve as a guideline at best and not, in the case of climate change or public health, a cause for fatalistic alarm. Data should drive policymakers to use sound judgment—to be prepared for all possible outcomes, not to assume the worst and instill hysteria.

Judicious discussions of confounding variables and statistical constraints aren’t sexy, and they don’t drive clicks to news outlets that desperately need readers and revenue. But the public deserves to know the truth.