From Forbes:
Since 1998, more than 31,000 American scientists from diverse climate-related disciplines, including more than 9,000 with Ph.D.s, have signed a public petition announcing their belief that “…there is no convincing scientific evidence that human release of carbon dioxide, methane, or other greenhouse gases is causing or will, in the foreseeable future, cause catastrophic heating of the Earth’s atmosphere and disruption of the Earth’s climate.” Included are atmospheric physicists, botanists, geologists, oceanographers, and meteorologists.
So where did that famous “consensus” claim that “98% of all scientists believe in global warming” come from? It originated from an endlessly reported 2009 American Geophysical Union (AGU) survey consisting of an intentionally brief two-minute, two question online survey sent to 10,257 earth scientists by two researchers at the University of Illinois. Of the about 3.000 who responded, 82% answered “yes” to the second question, which like the first, most people I know would also have agreed with.
Then of those, only a small subset, just 77 who had been successful in getting more than half of their papers recently accepted by peer-reviewed climate science journals, were considered in their survey statistic. That “98% all scientists” referred to a laughably puny number of 75 of those 77 who answered “yes”.
https://www.forbes.com/sites/larrybell/2012/07/17/that-scientific-global-warming-consensus-not/#4f47ffdc3bb3