01 Computers and Programs
01 Computers and Programs
• A taste of Python
• A taste of Python
4.9.2023
• Lecturers
• Assistants
• Mikko Kangasmaa
• Aino Schulz
• Veeti Sihvola
• Leevi Tuikka
• Geo-Python/AutoGIS 1 (Period I)
https://geo-python.github.io
• On-site lessons
• Mondays 9:15-12:00
• Thursdays 12:15-16:00
• Fridays 10:15-14:00
• You can feel free to attend either work session (or both)
PERIOD 1:
• GEOG-329-1, Automating GIS-processes 1, Geo-Python
• Introduction to programming, data analysis and visualization
PERIOD 2:
• GEOG-329-2, Automating GIS-processes 2, Geography
• Spatial data management, analysis and visualization
5 + 5 ECTS
2
longitudinal profile 1.8). The Boreal surface is a high-elevation, low-
h (km) model fit relief plateau that dips to the west at 1◦ (Fig-
ure 1.8b). The Chagoopa Plateau is an interme-
1 diate topographic ‘‘bench’’ that is restricted to
Introduction to Quantitative Geology
bedrock alluvial
the major river canyons and inset into the Bo-
real Plateau (Webb, 1946; Jones, 1987). Figure 1.8b
0
0 5 10 15 20 maps the maximum extents of the Chagoopa
x (km) and Boreal Plateaux based on elevation ranges
of 1750--2250 m (Chagoopa) and 2250--3500 m a.s.l.
Fig 1.6 (a) Shaded-relief image of the Hanaupah Canyon (Boreal). Associated with each surface are promi-
drainage network and alluvial fan. Location of longitudinal nent knickpoints along major rivers. Knickpoints
profile shown as white curve. (b) Longitudinal profile of main along the North Fork Kern River, for example
Hanaupah Canyon channel, together with best-fit to Eq. (1.8).
Diffusion
•
(Figure 1.9b), occur at elevations of 1600--2100 m
Introduction to Quantitative Geology
and 2500--3300 m a.s.l. The stepped nature of the
Advection 2
@h @ h (GEOM2021), Master’s Program in Geology
Sierra Nevada topography is generally considered
= (a) to be the result of two pulses of Cenozoic and/or
bedrock
@t @x 2 and Geophysics
late Cretaceous uplift (Clark et al., 2005; Pelletier,
channel 2007c). According to this model, two major knick-
t3
•
t2 t1
Basic geostatistics and applying numerical
points were created during uplift, each initiating
a wave of incision that is still propagating head-
t1 models written in Python to explore
(b) ward towards the range crest.
alluvial
channel t2t1 geochronological data and geological
Recent work has highlighted the importance
t2 tt3
3 of abrasion in controlling bedrock channel evo-
processes
lution. In the abrasion process it is sediment, not
water, that acts as the primary erosional agent.
Diffusion
Fig 1.7 Schematic diagrams of the evolution of (a) bedrock
and1.7,
Fig. (b) alluvial channels
Pelletier, 2008through time, illustrating the
• 5 ECTS
In the stream-power model, the erosive power is
assumed to be a power function of drainage area.
advective behavior of bedrock channels and the diffusive Although sediment flux increases with drainage
behavior of alluvial channels. area, upstream relief also plays an important role
in controlling sediment flux. As such, the stream-
power model does not adequately represent the
throughout the reach. If drainage area is uni- abrasion process. Sklar and Dietrich (2001, 2004)
form and n = 1 is assumed, the erosionPython ratefor geo-people
developed a saltation-abrasion model to quan-
www.helsinki.fi/yliopisto 8
is proportional to the channel slope according tify this process of bedrock channel erosion. In-
Who are you?
• We’d like to know a bit about who you are, and ask that you
direct your web browser or phone to a real-time poll at
https://geo-python.github.io/poll
• See https://geo-python-site.readthedocs.io/en/latest/lessons/L1/
motivation.html
1. Define a question
7. Publish results
8. Retest (frequently done by other scientists)
1. Define a question
7. Publish results
8. Retest (frequently done by other scientists)
1. Define a question
7. Publish results
Output
CPU Devices
Input
Devices
Main Secondary
Memory Memory
You don’t have to know all the details of how a computer works to be a successful
programmer, but understanding the underlying principles will help you master
the steps we go through to put our programs into action. It’s a bit like driving a
car. Knowing a littlePython
aboutforinternal
geo-peoplecombustion engines
www.helsinki.fi/yliopisto
helps to explain why you 23
have to do things like fill the gas tank, start the engine, step on the accelerator,
What is a computer?
Output
CPU Devices
Input
Devices
Main Secondary
Memory Memory
•
software engineering, web and multimedia design, management information
Information
systems, and computer security.can be input,
Wherever modified
computing is done,into a new/useful
the skills and form
and output
knowledge of computer sciencefor our applied.
are being interpretation
You don’t have to know all the details of how a computer works to be a successful
programmer, but understanding the underlying principles will help you master
the steps we go through to put our programs into action. It’s a bit like driving a
car. Knowing a littlePython
aboutforinternal
geo-peoplecombustion engines
www.helsinki.fi/yliopisto
helps to explain why you 24
have to do things like fill the gas tank, start the engine, step on the accelerator,
What is a computer?
Output
CPU Devices
Input
Devices
Main Secondary
Memory Memory
•
systems, and computer security. Wherever computing is done, the skills and
Controlled by a computer program that can be
knowledge of computer science are being applied.
modified
You don’t have to know all the details of how a computer works to be a successful
programmer, but understanding the underlying principles will help you master
the steps we go through to put our programs into action. It’s a bit like driving a
car. Knowing a littlePython
aboutforinternal
geo-peoplecombustion engines
www.helsinki.fi/yliopisto
helps to explain why you 25
have to do things like fill the gas tank, start the engine, step on the accelerator,
What are computers good at?
• Repetitive calculations
• Repetitive calculations
• Calculate pi
• Calculate pi
Fortran punchcard
Fortran punchcard
• A program is a detailed list
of step-by-step instructions
telling the computer exactly
what to do
2. Determine specifications
3. Create a design
• 70°F is lovely
• 90°F is hot
• Before you can solve a problem, you must figure out exactly
what should be solved
2. Determine specifications
• Before you can solve a problem, you must figure out exactly
what should be solved
2. Determine specifications
3. Create a design
3. Create a design
• Now you can put your new Python code to the test
(literally) by running it to see whether it reproduces the
expected values
• Now you can put your new Python code to the test
(literally) by running it to see whether it reproduces the
expected values
• What is a computer?
• What is a program?
• What is a computer?
• What is a program?
• What is a computer?
• What is a program?
Zelle, J. M. (2010). Python programming: an introduction to computer science (2nd ed.). Franklin, Beedle &
Associates, Inc.