Some programming experience will help, but is not required. If you have no programming experience, I strongly encourage you to go through the first handful of modules on the Codecademy Python course as soon as possible. During the semester, you may want to take more of the modules, and you should plan to spend extra time on this class.
There are lots of online resource that you can use to supplement things we learn in class. Some examples are:
The goal of this class is to provide information for all fields in geoscience. To that end, I will try to cover topics from geology, geography, atmospheric sciences, and oceanography. Specifically, I will focus on 1D timeseries, and 2D geospatial (i.e., on a map) analysis. If you have any topics you would like to cover, please let me know, and I will do our best to accommodate.
We will go through course materials during class time. You should bring a laptop to class so that you can follow along and participate in exercises. Also, course materials are interactive, so you can learn by running code snippets as we go and asking questions.
The course materials are available in the class repository, which are provided in your account on redfish
. They are in the form of Jupyter notebooks. More information on notebooks in the next section. You should start each class by clicking on the appropriate materials in the weekly schedule.
You'll do your work in your account on a local workstation. You can access this using a web browser pointed to:
https://redfish.geos.tamu.edu:8000
and you log in with your netid and a password that I have emailed to you.
IMPORTANT: To work on redfish
when off campus, you need to first set up a VPN connection. Set this up for your laptop by visiting https://connect.tamu.edu
and follow instructions there. You'll need to sign in with your netid, and click on the little blue link that says "AnyConnect VPN" if and when you find that "Web-based installation was unsuccessful" to install Cisco AnyConnect (you will no longer use the web-based installer after this). When you open the Cisco application on your computer, you will need to fill in "connect.tamu.edu" in the little box, then use your netid and university password to connect. Then you can run this application to use your computer as if you are on campus.
There is no textbook for the course. But if you'd like an outside resource, here are two recommendations:
This file format makes it easy to seamlessly combine text and code. The text can be plain or formatted with Markdown. The code can be written in over 40 languages including Python, R, and Scala. Most importantly, the code can be interacted with when the notebook is opened in a local (that is, on your computer) iPython server. Alternatively, it can simply be viewed through a github repository (like this very notebook) or through nbviewer.
You all have a username and password on a local machine that is running a server for us to use in class. By using this, we will be able to avoid a lot of installation issues that occur from using different operating systems, etc. You'll be able to run class materials (in the form of Jupyter notebooks) through this server via your web browser as well as create and work on homework assignments. If you prefer, you are welcome to run Python on your own computer, but you will need to do that mostly on your own. If you go that route, I recommend using Python 3 (which we will be using in class) and a distribution from Anaconda. We'll talk about it as a class later in the semester, too. I recommend you all use this system I have set up for you. It will integrate nicely for our homeworks, too.
To access the server, open your web browser and navigate to https://redfish.geos.tamu.edu:8000
and sign in with the username and password that I have emailed you. I've already set it up so that you can access materials and create notebooks within this system.
Start up your local notebook server in your new repo and create a new Jupyter notebook from the local server page.
Notebooks are built of cells. Cells can have multiple built-in formats including code and Markdown for text. You can select the desired format from a dropdown menu at the top.
If you want to type words, use "Markdown"; if you want to write code, choose "code".
To run a given cell, type [shift-enter]
which active in that cell. You can run all of the cells with Cell > Run all; other variations are available in that drop down menu.
We'll discuss homework soon and go through details. It will be in the form of Jupyter notebooks and will probably be submitted through JupyterHub.
If you want to connect to redfish from off-campus (including all Galveston students always), you'll need to use VPN. You can do so by following directions at https://connect.tamu.edu
.
The material below is bonus for any students that are interested in using a terminal window on their own computer for running Python. We won't go through it in class.
A command-line interface is a way to interact with your computer using text instead of a Graphical User Interface (GUI), a GUI being visually based with icons etc. We will use these in this class. On a Macintosh or Linux machine, this is a terminal window. On a PC this is often called a command prompt.
Here are some commonly-used commands:
cd [path]
: change directory from current location to [path]. cd ..
can be used to move up a single directory, and cd ../..
moves up two directories, etc.pwd
: print working directory, as in write out the current location in the terminal window.ls
: list files in current directory. ls -l
list files in long format to include more information, ls -a
to list all files even those that are usually not shown because the have a .
in front, ls -h
to show file sizes in human readable format. Flags can always be combined to use multiple options at once, as in ls -ah
to show all files in human readable format.mkdir [dirname]
: make directory called dirname.rm [filename]
: remove a file called filename. To remove a directory called dirname, use rm -r [dirname]
.