Home
Research Projects
Classes GEOS 293/393 Hawaii Field Course GEOS 436/636 Beyond the Mouse GEOS 602 Geophysical Fields GEOS 620 Geodynamics GEOS 655 Tectonic Geodesy GEOS 692 Geophys. Seminar
Current & Past Students
Student Opportunities
Curriculum Vitae
Recent Publications
Info for Surveyors
Personal Info

Climb higher, beyond the mouse...


Beyond the Mouse: Computer Programming and Automation for Geoscientists

GEOS 436/636
Fall 2017
Tu-Th 3:40-5:40, Reichardt 316 (G&G Computer Lab)

Instructor: Jeff Freymueller

x7286 Elvey 413B jfreymueller@alaska.edu

TA: Shanshan Li

sli11@alaska.edu
Office 413H Elvey
Office Hours: By appointment

Last Updated: August 25, 2017

Contents

Introduction
Course Topics
Prerequisites
Textbook
Student Learning Outcomes
Grading Scheme
Policies and Make-up Labs
Detailed Schedule

Introduction

[return to top]

In the (geo)sciences - as in many other disciplines - we collect data which need to be analyzed in ways that depend on the problem posed. The ability to modify your working environment according to your needs instead of having it dictate how you approach a problem is invaluable. This is especially true in a setting that is supposed to generate fresh knowledge. Also, we do not want to waste time by repeating the same steps again and again, and ... again. Doing repetitive, boring tasks leads to errors. A computer (the machine, and earlier the person) exists to perform such routines rapidly, reliably and repetitively: it takes in data, manipulates the data following your commands, and produces a result. The point of writing computer programs is to automate an intellectual challenge that has been solved and make it reusable at all times - for yourself and ideally for others. 21st century scientific research frequently involves manipulation or analysis of very large data sets, or the development of numerical models; this work can only be used effectively by scientists who can make software tools themselves. Accordingly, the geophysics graduate curriculum now expects students to be able to write simple computer programs. This course will teach you the basic techniques and skills to do this.

This course will teach you how to make simple tools that will allow you to read in and massage data in exactly the way you want, and plot or visualize the results. We will start out manipulating your thinking, introduce you to programming in general, and then take off into specific working environments namely Unix/Linux and Matlab while teaching you how to map your data using GMT and create simple web pages by writing the HTML yourself. All of this is easier than you might think - you simply have to get up over the initial part of the learning curve. We will cover many things in a short amount of time, which means that we will give you many pointers that you can follow up on depending on your needs. There is a tremendous amount of reference material (and examples to adapt) available on the web. We encourage you to play with the tools we are teaching you to use beyond the course assignments, and do things with them that are fun for you. The more you do, the more you will learn.

The use of scripting and well-documented tools is not just my idea; it is widely accepted as a good practice. The paper "Ten Simple Rules for Reproducible Compuational Research" by Sandve et al. (2013) is a good example.

Course Topics

[return to top]

Prerequisites

[return to top]

Textbook

[return to top]

Essential MATLAB For Engineers and Scientists, 5th edition. There is now a 6th edition, and that or the 3rd or 4th Edition are both OK, although we will have to confirm the section numbers as sometims they change.

Student Learning Outcomes

[return to top]

By actively participating in this course you will become significantly more proficient at:

Grading Scheme

[return to top]

This 2 credit class is pass/fail. The class assignments are primarily lab exercises, specifically computer programs written in the computer lab. We use software that is available to students at no cost (for use within the UAF network), so all students could also install and use it on their own computer if they wish. The computer lab is also available for students to use at other times, if they need to finish an assignment outside of lab. During the first third of the semester, additional short homework assignments will be given outside of lab (these do not require any particular computer or software).

Grading is based on weekly lab exercises, homework assignments, a final project, and the presentation of that project in the form of a web page or pages. There will be a total of 12 graded lab assignments, equally weighted, and all other assignments except for the final project itself are scored points equivalent to a lab assignment or a fraction of that.

Graduate Students

Undergraduate Students

Passing >= 65%

The homework and lab exercises consist of basic application of methods and practices presented in class. The labs help you apply things taught in class. The complexity of the labs varies. Usually they consist of a simple introduction problem to get you used to the environment, understand new commands, etc. In a second part you will apply this in a slightly more complex way to data, or simply write more complex code.

The final project will (hopefully) be specific to your research project. We want to encourage you to set up an efficient and safe environment in which you apply the methods and tools introduced in class.

Graduate students are expected to carry out a complete project within their own field of specialization (this can and should be something that helps them in their own research). The project will be presented in the form of a web page or pages, for which the student will write the HTML using the templates provided in class and used in one of the labs. Undergraduates will substitute a presentation of some of their own work from the labs in place of an independent project, also presented in the form of a web page or pages.

There are several styles of project that a student could take on, depending on their needs. Flexibility in this regard is beneficial for the students, as they learn more by doing more, and do more when they are excited about and see the relevance of the project. The project must be implemented in code using one of the tools used in the class (or a different tool with instructor permission). The students must turn in complete code, raw data files, etc, so that the instructor could run their code and replicate their results. Code must be adequately commented. All of the code and data files should be linked on the web page or pages. Sample projects include one of these, at a minimum: (a) reading in data and doing useful manipulation and visualization of the data; (b) constructing a coherent suite of scientific figures or visualizations of data; (c) developing and running a numerical model; (d) writing a program or programs to automate a task that must be done repeatedly (for example, a data processing or analysis task), and using this program to run a substantial amount of data.

In the beginning of the semester you will provide us with a snapshot of your project directory (If you have one). Send rudimentary data files, and any scripts/programs should be executable. If you do not have such a project directory, make one up! (Tell us it is made up). In that case, tell us how you would organize and name files, what kind of data they contain, and how you would store other information. You will do the same at the end of the term through your final project, and tell us how you improved or changed the organization to make working with your data easier to automate. If your project involved doing something totally new, you will tell us why you chose to organize things as you did.

Note: Everything will be done for this course as of December 10, just before Finals Week.

Policies, late assignments, and makeup-labs

[return to top]

You are subject to the UAF Student Code of Conduct. We will work with the Office of Disabilities Services (203 WHIT, 474-5655) to provide reasonable accommodation to student with disabilities.

Late assignment will be penalized by 25% off for each class period after the due date. Exceptions can be granted in advance for students who have University sponsored activities that will force them to miss class (for example, fieldwork or attending a conference for graduate students). Arrangements for this need to be made in advance.

Makeup versions of labs will be provided if we have a convincing reason to do so. All MATLAB lab assignments must be turned in before we begin the Unix shell and GMT parts of the course. Any makeup or late assignments must be completed prior to the final project presentations.

Detailed Schedule (DRAFT)

[return to top]

Each lecture title is a link to a web page for that lecture or lab.

Day

Date

Lecture Topic

Tue

Aug 29

1. Thinking Programs;
READING: Chapter 1, Skim Chapter 3.

Thu

Aug 31

1. Thinking Programs Lab;
READING: Read Chapter 3.

Tue

Sep 5

2. Variables;
READING: Chapter 2 through 2.6, Chapter 6.1, 6.2, 6.3.

Thu

Sep 7

2. Variables Lab;
READING: Chapter 2 through 2-6, Chapter 6.1, 6.2, 6.3.

Tue

Sep 12

3. Variables and Functions;
READING: Chapter 7.1, 7.2, Chapter 10.1, 10.2, 10.4, 10.5.
(3rd-4th eds: Chapter 10.1-10.3, Chapter 11.1, 11.2, 11.4, 11.5).

Thu

Sep 14

3. Variables and Functions Lab;
READING: Chapter 7.1, 7.2, Chapter 10.1, 10.2, 10.4, 10.5.
(3rd-4th eds: Chapter 10.1-10.3, Chapter 11.1, 11.2, 11.4, 11.5).

Tue

Sep 19

4. Control Structures;
READING: Chapter 2.7, 2.8, Chapter 5, Chapter 8.

Thu

Sep 21

4. Control Structures Lab;
READING: Chapter 2.7, 2.8, Chapter 5, Chapter 8.

Tue

Sep 26

5. MATLAB I/O 1;
READING: Chapter 2.10, 2.11, Chapter 4.

Thu

Sep 28

5. MATLAB I/O 1 Lab;
READING: Chapter 2.10, 2.11, Chapter 4.

Tue

Oct 3

6. MATLAB Plotting and Graphics;
READING: Chapter 9.
(3rd+4th eds: Chapter 7, Chapter 12).

Thu

Oct 5

6. MATLAB Plotting and Graphics Lab;
READING: Chapter 9.
(3rd+4th eds: Chapter 7, Chapter 12).

Tue

Oct 10

Debugging;
READING: Chapter 11, Chapter 7.6.
(3rd+4th eds:: Chapter 9, Chapter 10.7).

Thu

Oct 12

Live MATLAB;
READING: none.

Tue

Oct 17

7. Unix Tools 1;
READING: handout.

Thu

Oct 19

7. Unix Tools 1 Lab;
READING: none.

Thu

Oct 24

Live MATLAB; GUEST CODERS!;
READING: none.

Thu

Oct 26

Live MATLAB; GUEST CODERS!;
READING: none.

Tue

Oct 31

8. Unix Tools 2;
READING: handout.

Thu

Nov 2

8. Unix Tools 2 Lab;
READING: none.

Tue

Nov 7

9. GMT 1;
READING: handout.

Thu

Nov 9

9. GMT 1 Lab;
READING: none.

Tue

Nov 14

10. GMT 2;
READING: handout.

Thu

Nov 16

10. GMT 2 Lab;
READING: none.

Tue

Nov 21

11. Live Shell. No material to download;
READING: none.

Thu

Nov 23

NO CLASS: Thanksgiving;
Gobble gobble.

Tue

Nov 28

12. HTML;
READING: none.

Thu

Nov 30

13. HTML Lab;
READING: none.

Tue

Dec 5

WORK ON FINALIZING CLASS PROJECTS;
READING: none.

Thu

Dec 7

Student Presentations;
Student projects presented via website.

END OF CLASSES


Dr. Jeffrey T. Freymueller
Professor of Geophysics
Geophysical Institute
University of Alaska, Fairbanks
Fairbanks, AK 99775-7320

jfreymueller@alaska.edu
Phone 907-474-7286
Fax 907-474-7290
Office 413B Elvey