Sign up for California Today for the latest news on the June 5 primary and more here.

Jess Phoenix has spent the past decade working as a geologist, traveling to every continent but Antarctica and climbing the slopes of erupting volcanoes. It’s a far cry from the staid halls of the United States Capitol, where she hopes to replace a Republican congressman who oncesaid that California had “embarked on a rash mission to curtail global warming.”

Ms. Phoenix, 36, has specialized in the study of volcanoes since a stint in 2008 at the Hawaiian Volcano Observatory, where she found her field work on Mauna Loa and Kilauea so exhilarating that she changed her initial plans to conduct research on subduction zones and plate tectonics.

Now, she is one of several Democrats looking to challenge Representative Steve Knight in California’s 25th District in November — and one of hundreds of scientists seeking public office this year, many of them motivated by opposition to the Trump administration’s environmental policies.

She has received advice and resourcesfrom 314 Action, a nonprofit group working to elect people with expertise in science and math fields. The group, named after the first three digits of the mathematical constant pi, said it had trained 1,500 prospective candidates in the past year and a half, including around 450 who are currently running for state or federal office. Joshua Morrow, the executive director, argued that scientists would bring to the government “a common-sense approach to problem solving,” as well as an instinct for collaboration and a tendency to follow where the facts lead.

“If we’re going to really address issues like climate change and technology in a meaningful way,” Mr. Morrow said, “we have to have people with that experience elected.”

Ms. Phoenix’s first test will come in the California primary on June 5. The top two vote-getters, regardless of party, will advance to the general election in November. The district includes Santa Clarita, Simi Valley and Lancaster.

The likeliest outcome, election forecasters say, is that the finalists will be Mr. Knight and one of three Democrats: Ms. Phoenix; Bryan Caforio, a lawyer who lost to Mr. Knight in 2016; or Katie Hill, the executive director of a homeless services organization.

Ms. Phoenix spoke with The New York Times on May 23 and 28. Parts of the interviews have been edited and condensed.

What’s the most exciting thing you’ve done as a volcanologist?

I’ve done work in Ecuador on the Reventador volcano — we were inside the caldera and basically on the slopes of the dome of the volcano that’s active. The walls of the caldera are the part of the volcano where it got very, very big in the past and then collapsed on itself. The area where the cone is building up now, you can walk right up to the slope of that. You’re in range of lava bombs that are being ejected.

What was the most dangerous situation you found yourself in?

The main dangers that we would see are things that you wouldn’t count on a volcano for producing. Working in Hawaii, we got a flat tire one time on the slope of Mauna Loa. … In Sinaloa, Mexico, we ran into narco traffickers while trying to get samples off volcanoes that are not currently erupting. I had to explain in Spanish that no, there isn’t gold, I’m just studying volcanoes. The narcos get a bit scared when you say “volcanoes,” and then you have to explain, “No, they’re not going to erupt, you’re fine.”

That’s what makes field science so incredible, though, is that you’re always learning and always adapting. It teaches you so much about how to solve problems creatively and about the planet itself.

Before this race, had you ever considered running for office?

No. It was not on my radar at all, and I think that is a pretty strong testament to how upside down our political world is at the moment when you have volcano scientists running for Congress.

What made you decide to run?

My representative, Steve Knight, is on the House Science Committee, and he has said that climate change preparations are foolish. That, to me, is the wrong kind of person to have on the science committee. There are folks on the science committee who think seas are rising because of rocks falling into the ocean. That complete ignorance of and rejection of scientific facts is very dangerous for our country.

This isyour first run for political office. Has there been a learning curve?

An extremely steep one, especially because in politics there’s an entire industry that’s been built up around campaigns. Everyone wants to offer you advice — for a price, of course. Citizens United unleashed this flood of money into the political landscape in an unprecedented way, and people have a very vested interest in candidates raising money in the large-donorfashion. Grass-roots approaches like what I’ve taken are very different from the norm.

I’ve been trying something, seeing whether it works or not, and then adapting.

A lot of the attention on the Democratic side of this race has been focused on your opponents Bryan Caforio and Katie Hill. How have you been working to distinguish yourself from the pack?

I’m distinguishing myself by virtue of the fact that I actually have a forward-thinking vision for the community. I want to make our community a global hub for green technology and also emphasize cybersecurity. They talk about defeating Trump, but we have to define what we want to be as a community and how we want to move forward together with everybody, not just Democrats or just Republicans.

I do my own research. I talk to people in the community. I listen to what they have to say, and then I analyze issues independently. I think that really resonates with a lot of people.

If you’re elected, what issues would you focus on beyond science?

We need to address climate change because it is a national security threat. It’s both an environmental issue and an economic and public safety issue as well. Things that people can do to help mitigate the effects of natural and man-made disasters — I think that’s going to be a big focus.

I look at everything as systems. I’m thinking we need to make sure that we have Medicare for all, a universal health care approach to caring for people in our country, and then we also need to have really strong public education. To me, those two things are the bedrock of American success.

Why do you think it’s important to have more scientists in the government?

We need to have Congress in particular be more representative of the country as a whole, and that means getting different voices into the conversation. We can’t continue to let lawyers and businesspeople be our only representatives in Congress.

I hope to bring evidence-based policymaking to D.C., because that’s a pretty unique thing in this day and age, and it shouldn’t be.

Maggie Astor is a political reporter based in New York. Previously, she was a general assignment reporter and a copy editor for The Times and a reporter for The Record in New Jersey. @MaggieAstor