Depends on what aspects of your scientific training you want to re-engage with. Do you want to be writing & publishing, giving talks, doing experiments, or building predictive statistical models? And what kind of software do you want to continue writing? Application development? More full-stack, with both backend and frontend? It is indeed hard to imagine places where you can find a strong mix of both.
If you want to mix earth sciences with development, you could look for positions on the Google Earth Engine team, or check out weather companies that do R&D like Purple Air. I imagine there’s plenty of software work mixed with earth sciences in the oil, gas, and mining industries; aviation & ocean shipping; hydroelectric, solar, and wind power maybe.
Being an earth sciences researcher is highly likely to involve writing software, whereas the average SWE role is not likely to need research, so my instinct would be to say just look research roles. Do most of today’s earth sciences researchers not spend a lot of their time at least writing statistical software in Python or R? My brother’s an anthropologist, and over the last decade his job has become more and more writing software to process datasets and do statistics.
If you’re just looking for a scientific mindset and a role that does experimentation, many companies (especially growing startups) have data science departments that, at a minimum, drive A-B testing experiments. Occasionally you can find applied research positions that are listed as just SWE roles, but those might be hard to find - I’d start by asking academic departments for leads.