Scientists are worried about a Donald Trump presidency — and with reason. Trump has bashed the National Institutes of Health. He’s denied global warming. He’s spread nonsense about vaccines. My colleague Brian Resnick wrote an in-depth story on this fear.

But the biggest, most consequential question of all is what a Trump presidency might mean for science funding. The federal government currently spends $150 billion or so per year on research and development (R&D), funding one-third of all science in this country — everything from cancer research to the fundamentals of cell biology to solar power to supersonic flight to how to reduce fertilizer use. We can thank federal research for things like microprocessors, the internet, GPS.

Yet Trump hasn’t given much indication of what he wants to do here. And Congress, which controls the R&D budget, has been inconsistent: Republicans originally pushed hard to slash the discretionary spending budget, which squeezed science. But they’ve let funding rise more recently.

One of the people following this issue most closely is Matt Hourihan, the director of the R&D Budget and Policy Program for the American Association for the Advancement of Science (AAAS). He recently had a long series of tweets trying to game out what might happen with science funding. It’s complicated, but there’s decent reason to think some (though not all!) programs could survive the Trump era:

1/ Seeing lots of concern that #science funding will be slashed under a President Trump. Thinking this through a bit. #Elections2016 — Matt Hourihan (@MattHourihan) November 9, 2016

2/ Three levels to consider: discretionary spending; President's budget; and approps (budget process 101: https://t.co/nWFodm34uj) — Matt Hourihan (@MattHourihan) November 9, 2016

3/ Start with the President's budget: honestly, who knows. Candidate Trump was mixed on biomed research, NASA. Skeptical on #climate. — Matt Hourihan (@MattHourihan) November 9, 2016

4/ On the other hand, Trump pro infrastructure, pro vets, which may bode well for DOT and VA R&D. And of course Defense S&T is very big deal — Matt Hourihan (@MattHourihan) November 9, 2016

5/ Could be surprises but if Trump Admin is serious about trimming nondefense discretionary $$$, will necessitate some cuts somewhere — Matt Hourihan (@MattHourihan) November 9, 2016

6/ Might expect targets on obviously partisan things like social sci, climate sci, EPA. Maybe low-carbon tech to a degree. Unpredictable. — Matt Hourihan (@MattHourihan) November 9, 2016

7/ Can’t imagine Trump Admin wanting to invest in advanced manufacturing to extent Obama did. But could be of interest given campaign themes — Matt Hourihan (@MattHourihan) November 9, 2016

8/ Of course, presidents only propose, up to Congress to dispose. Appropriators actually do OK by #science...when they have the fiscal room. — Matt Hourihan (@MattHourihan) November 9, 2016

9/ For example, whatever candidate Trump has said about #NIH and #NASA, these have proved popular lately with appropriators. pic.twitter.com/ghkYYjlLHS — Matt Hourihan (@MattHourihan) November 9, 2016

10/ Murkier elsewhere. What happens to USDA? Controversial NSF directorates? NOAA research and satellites? — Matt Hourihan (@MattHourihan) November 9, 2016

11/ At #Energy Dept, efficiency and renewable R&D approps could have rough patch, perhaps to benefit of nuclear, fossil/CCS, grid technology — Matt Hourihan (@MattHourihan) November 9, 2016

12/ Office of Science at Energy Dept has decent support. ARPA-E? A lot depends on spending caps. And, again, DOD will probably be fine…? — Matt Hourihan (@MattHourihan) November 9, 2016

14/ The question that may matter MOST for science funding, unfortunately, is what happens to the discretionary budget overall. — Matt Hourihan (@MattHourihan) November 9, 2016

15/ Federal #science funding has been very stable as a share of the discretionary budget for decades. Seems baked into the cake. pic.twitter.com/Nm7x7vxZKb — Matt Hourihan (@MattHourihan) November 9, 2016

16/ Also: nondefense budget has been more stable compared to defense. One reason fed research has been stable relative to GDP long-term. pic.twitter.com/dXdeRfcICe — Matt Hourihan (@MattHourihan) November 9, 2016

17/ That last chart will surprise some. I've heard many say they believe fed support for basic research has declined long-term. It hasn’t. — Matt Hourihan (@MattHourihan) November 9, 2016

18/ To quote [apocryphal] Twain: "It ain’t what you don’t know that gets you into trouble. It’s what you know for sure that just ain’t so." — Matt Hourihan (@MattHourihan) November 9, 2016

19/ Anyway: discretionary spending was clobbered, then recovered somewhat. Spending caps have pulled #science agency $$$ along with them. pic.twitter.com/Z8qbPZPrx8 — Matt Hourihan (@MattHourihan) November 9, 2016

20/ Starting next year, the current budget deal runs out, and the spending caps will drop by about 2.3%, adjusting for purchasing power. pic.twitter.com/1A26O81PIz — Matt Hourihan (@MattHourihan) November 9, 2016

21/ That will mean another tight year for #science funding...unless Congress raises the caps. As they have regularly. — Matt Hourihan (@MattHourihan) November 9, 2016

22/ Key element of those budget deals, however, was keeping defense and nondefense moving together. Trump campaigned on breaking that link. — Matt Hourihan (@MattHourihan) November 9, 2016

23/ Some R’s would be happy with that…but not all. And D’s will oppose, and bring their filibuster if they can. — Matt Hourihan (@MattHourihan) November 9, 2016

24/ You have other things like tax cuts, Obamacare repeal, debt ceiling, infrastructure package complicating the situation. — Matt Hourihan (@MattHourihan) November 9, 2016

25/ Concerning to think nondefense discretionary could be used to pay for other stuff. It’s already heading down thanks to current caps. — Matt Hourihan (@MattHourihan) November 9, 2016

26/ But Congress has found ways to pay for defense + nondefense spending increases three times before. Not impossible it could happen again. — Matt Hourihan (@MattHourihan) November 9, 2016