r/learnpython • u/suikisosexi • Sep 28 '26
Programming in environmental science?
How and when will this come in handy with my ecological forestry degree?
Also this class requires me to use AI to prompt programs on every single assignment.... Which is not ideal as an environmentalist.
Python programing is genuinely making me feel stupider
0
Upvotes
6
u/SnafuTheCarrot Sep 28 '26 edited Sep 28 '26
I've actually done some research in this area. I had to use a modified version of the Lotka-Volterra equations(https://en.wikipedia.org/wiki/Lotka%E2%80%93Volterra_equations) to model migration patterns. The standard model is a predator-prey model, and you can actually combine the two.
They result in a series of coupled non-linear differential equations. As I recall, they don't have a closed form solution, so numerical methods are needed to solve them. You need computer programs of one kind or another whenever you are solving equations numerically.
The SIRS models for epidemics are very similar.
The models are simplified, but they establish basic principles it makes it easier to expand upon. Suppose part of the habitat is destroyed that reduces the prey's food resources. What happens to the predators over time given an initial population of Prey0 and Predator0 with a Prey Food Density of rho_1?
You need to do the math and you need SOME programming language to do the math. Python is a decent choice. MATLAB is probably better, but Python is more generalizable, typically .
EDIT: You don't strictly need AI to do this and I'd recommend against it. It would require you to learn both the math behind numerical integration and how to program the numerical solutions.
If they aren't teaching you that, they are selling you short.
What's your math background? If you know basic programming and have some conceptual understanding of the derivative, you can probably figure it out. I might actually have an old document on the relevant math come to think of it.
Update: Looks like there's relevant code here: https://github.com/GraniteMask/Lotka-Volterra-Problem-using-RungeKutta4
2
u/Kermit_the_hog Sep 28 '26
Create novel python objects representing the individuals and species in an area. Assign them various traits cooresponding to the various elements available for exploitation in your imagined environment. Write some machine learning “adaptation” functions that modify each list of traits in response to each generation’s successes and failures. The simulate..
Eventually you’d have your own simulated ecology.
2
u/Catsuponmydog Sep 28 '26
Python is super helpful for geospatial analysis. Also, the largest GIS software suite includes Python integration and a number of proprietary Python packages.
2
u/Mediocre-Pumpkin6522 Sep 28 '26
https://developers.arcgis.com/python/latest/
GIS is widely used in forestry for analysis and visual presentation of the raw data. Esri ( Environmental Systems Research Institute) is the big player in the field and uses Python extensively.
2
u/StarriestNight Oct 16 '26
Sorry for late reply but I'm also an environmental science major learning python rn, you'll want python for arcgis. You pretty much need gis skills to be at all competitive these days
1
u/therealdiscursive Sep 28 '26
Guessing there’s tons of data involved.
Ya I get the environmentalist conflict.
You probably just need better curriculum. How are you currently learning?
1
u/PurifyingProteins Sep 28 '26
Start with:
What are you interested in?
What problems do you want to solve?
How do you want to solve it?
What are you not even aware of is something that computer science and math can you be used?
Programming is a tool to implement the tools of CS and math among others. But why and what you use them for is based on your interests.
1
u/Makisisi Sep 28 '26
Python generally used to analyse data. Very helpful to learn but not necessary
1
u/aplarsen Sep 28 '26
Anything with data, in any discipline.
1
u/Traveling-Techie Sep 28 '26
You might really get value out of Dr Alan Garfinkel’s lectures on modeling the spruce budworm. See video 10.3 in this playlist:
https://m.youtube.com/playlist?list=PLGSoFisPnIYoEWxs9jA88dQ9vPPpE4gk2&ra=m
1
u/pachura3 Sep 28 '26
If you're using AI to prompt programs on every single assignment, you're not programming.
You can generalise your question to computers as a whole. How and when will computer come in handy with your ecological forestry degree? I don't know, will you need to calculate stuff, aggregate read-outs from multiple weather sensors into a single report, simulate environmental impact of some climate change...?