Prior to the AMS Short Course on Using Python in Climate and Meteorology (January 22–23, 2011), in Seattle, WA, all students will need to do the following:
- Obtain a laptop you can bring to the course. (It needs at least 1 GB RAM and 8 GB of available disk.) Make sure its battery is fully charged, and that you also bring the power adapter. If you have an extra battery and charger, please bring those too. To save money on the registration costs, the classroom may not have most of its power outlets available for us to continuously plug in all the power adapters. Thus, we may be running off of batteries for the entire class, and recharging the batteries during breaks. Also, if you’re checking out a laptop from your school, lab, or organization, make sure you have administrator access to your machine, so you can install applications if needed.
- Make sure you have copies of two datasets, one that is text, and the other that is in netCDF format. These can be any datasets you’d like; we’d recommend you bring datasets you normally use. Try not to choose datasets that are too large, however, because they may slow you down. If you do not have datasets of your own, we will give you ones you can use for the class, but most people will find their own data more interesting.
- Download the VirtualBox virtualization application for your machine. For the course, we’ve created an Ubuntu Linux virtual machine (VM) that has all the software we’ll be using pre-installed. You will be using VirtualBox to run the VM.
- Install VirtualBox onto your laptop. The installation should be straightforward and take no more than 10–15 minutes; see the installation instructions for details.
- Download the AMSPythonUbuntu.ova VM file to your laptop. (After the course is over, this file will no longer be available to save my bandwidth.) This file is around 3 GB in size (depending on your connection speed, it may take a few to several hours to download), and when running, can take up to 8 GB of disk, so make sure it is located on a disk with enough space.
- Double-click the AMSPythonUbuntu.ova file. VirtualBox will start automatically and a wizard will step you through the process of importing in the VM. (Details are given in the importing instructions.) You should budget 10–15 minutes or so for this process. (Note that if double-clicking doesn’t get the importing process started, start VirtualBox manually, then select File → Import Appliance and choose the .ova file to install the VM.)
- At some point during the importing process, an “Appliance Import Settings” window will appear. Scroll down until you reach “Hard Disk Controller (SATA)”. Under this is the “Virtual Disk Image” setting, which gives you the path and filename of the VM’s virtual disk:
You can change this path if you double-click on it. The path given here will be the location where the AMSPythonUbuntu-disk1.vmdk file will be created. Most people will want a custom location for the .vmdk file, so now is the time to change it (don’t change the filename though). The path should be to a location with at least 8 GB of available disk space.
- You start your VM by selecting its entry in the Manager window and clicking “Start” (see instructions). This is the same as turning on the machine. As the VM boots up, a number of dialog boxes will appear informing you the program is engaging keyboard/mouse integration. Just read the notices and click “Ok” through all these. (In some cases, the VM won’t recognize your audio card, in which case you won’t have sound; just click through the warning. If you know how to configure your VM’s sound card, you can do so with the Settings button in the VirtualBox manager.)
- Login to the VM with the username and password combination AMS sent to you in the email dated January 14th. You use the machine just like any other Linux server. (You may need to tell it how to read your Ethernet or wireless card, but we probably won’t be doing anything online in class using the VM.) To open a Terminal window, goto the Applications menu at the top of the screen, then Accessories → Terminal. Firefox is started using the icon at the top of the screen. Shut down the server before closing VirtualBox (there are other ways to end a VirtualBox session, but this one always works).
- If you want to play with the VM, feel free to! Note that the full install of CDAT is in /opt/cdat, so run
/opt/cdat/bin/pythonto start the version of Python that can access all the CDAT-related libraries. (There is a partial install of CDAT in /usr/local, which we will ignore.) In addition to CDAT, we also installed the core of TeXLive, gfortran, and a few PDF readers. Bash aliases are set to prevent inadvertant clobbering of files.
For Those Who Want To Manually Install Software and Files on Their Own Machines
Some students may not want to use the virtual machine we will provide at the class, if they want to have the software operating in their laptop’s own environment; Windows users, for instance, may not want to use the virtual machine’s Unix interface. VirtualBox 4.0 is also unavailable for earlier versions of Mac OS X (10.4 and prior). If this is you, below are instructions as to what packages to install and files to download. Note that some of the installs take many many hours to do, even if everything goes smoothly; you are much better off if you use the virtual machine we provide:
- Install a copy of Python, along with the packages needed for scientific computing.
- The easiest way is to install the Enthought Python Distribution (EPD), which bundles Python with over 75 modules and packages in an easy to install package. The distribution is free to employees and students of academic institutions, as is the trial version which is fully functional for 30 days. EPD is available for Windows, Mac OS X, Solaris, RedHat, Ubuntu, and SUSE.
- Alternately, if you are using an apt-get based package manager in Linux or Mac OSX (e.g., fink), you may want to just install the needed packages individually. Since you won’t be downloading packages you aren’t interested in, it may install faster. We’ve written directions for Ubuntu and Mac OS X.
- Install a copy of the Climate Data Analysis Tools (CDAT). The installation guide provides comprehensive instructions and addresses some platform-specific issues. We’d recommend that you choose the full installation, where CDAT comes with its own copy of Python, separate from the copy of Python you installed earlier. This way, your installation of CDAT will have a better chance of avoiding any collisions. While you will want to first try installing the pre-compiled binaries, the source build is more reliable. Be forewarned, however, that the source build takes a very long time!
- Download the files.tar (73 Mb) collection of files. (This tarball contains datasets and code for the class, as well as preliminary copies of the slides for some of the lectures for the class.) Untar the collection by changing your current working directory to the one files.tar is in and then using the Unix command:
tar xvf files.tar
A directory files will be created in your current working directory, with the contents inside. If you cannot use the Unix tar command, visit the index page of files and download each file individually. (Note: These files are already bundled with the virtual machine.)