ATS Programming Short Course

Fall 2009

[General Information] [FORTRAN & UNIX] [IDL] [MATLAB]

About the Course

This fall we will be offering an informal introductory programming short course for interested ATS and CIRA students and staff. This class will not be a formal addition to our curriculum but rather an opportunity to introduce programming concepts and specific languages (Fortran, Matlab and IDL). These courses are intended to strengthen the programming backgrounds of first-year (and in some cases post-first-year) graduate students in the department. We also invite any other member of our department who would like to brush up on skills or pick up the basics of a new language to attend.

These tutorials will meet once a week on Tuesday afternoons from 3-4:30pm starting August 25 in ATS 101. Each topic will be taught independently by an ATS TA over 5 weeks. No registration is required for this class. The schedule is:
Fortran \ UNIX (5 weeks): Aug 25-Sep 22
IDL (5 weeks): Sep 29-Oct 27
Matlab (5 weeks): Nov 3-Dec 8

Fall 2009 Syllabus (PDF)
Spring 2009 Website


Instructor: Kate Thayer-Calder
Email: katetc (at)
Times: Tuesday, 3:00-4:30pm, August 25 to September 22
Place: ATS 101 (except first class in ATS West Classroom)
Preface: Welcome to the wonderful world of Unix and Fortran! The intended audience is first year students and (almost) no experience is assumed. This course does not cover fixed-format Fortran (FORTRAN 77) or advanced topics such as HPC.
Syllabus: And information on resources PDF

Week 1 (August 25)
Introduction to Unix and Creating a basic Fortran program.
Keynote | PDF | PowerPoint
Example Code
ILikePie.f90, ClimateModel.f90, TestingInts.f90, Statistics.f90
Homework #1 PDF

Week 2 (September 1)
File manipulation in Unix and program flow control in Fortran.
Keynote | PDF | PowerPoint
Example Code
HurricaneIf.f90, HurricaneCase.f90, HurricaneEnsemble.f90,
FTCTempsLong.txt, FTCTempAnalysis1.f90, FTCTempsAnalysis.f90, FTCTempAnalysis3.f90,
Homework #2 PDF

Week 3 (September 8)
Networking in Unix and all about files in Fortran.
Keynote | PDF | PowerPoint
Example Code
RelativeHumidity.f90, RH.f90, RelativeHumidity2.f90, RelativeHumidityUse.f90, atmosLib.f90, makefile
WriteExample.f90, ReadExample.f90, ReadUnformatted.f90, ComplexAtmos.f90
Factorial.f90, Fibbonacci.f90

Week 4 (September 15)
Searching in Unix and dealing with data in Fortran.
Keynote | PDF | PowerPoint
Example Code
Multiarrays.f90, Multiarrays2.f90, StdAtmos.f90, WriteExample2.f90, ReadBadData.f90,
makefile, read_netcdf.f90, PlayWithPrecip.f90,

Week 5 (September 22)
Shell scripts in Unix. Optimizing and debugging in Fortran.
Keynote | PDF | PowerPoint
Example Code
findRainRHplots, findthisnthat, trav.s, goProj1,
backupFortran, sortData


Instructor: Joe Munchak
Email: jmunchak (at)
Times: Tuesday, 3:00-4:30pm, September 29-October 20
Place: ATS 101 (final class place and time TBD)
Preface: IDL is a powerful and flexible language that can be used for almost any need, but the primary focus of this course is data analysis and visualization. The class is intended for first-year students who are new to IDL or programming in general. Some knowledge of the topics covered in the Unix/Fortran class is helpful, but not required.
Syllabus: And information on resources PDF

Week 1 (September 29)
Introduction to IDL, syntax, variable types, array commands, and running outside processes.
Example Code,,,,,,,,,
Exercises #1 PDF

Week 2 (October 6)
IDL Data Structures and file I/O (ASCII, Binary, netCDF, HDF, and images)
Example Code
Example Data
Exercises #2 PDF

Week 3 (October 13)
All about plotting in IDL
Example Code,, for colorbar),, for colorbar),, for colorbar)
Example Data
Exercises #3 PDF

Week 4 (October 20)
More plotting routines and statistical routines
Example Code,,,,,,,, color_tables.tar.gz,,,,,
Example Data
sstdata.tar.gz (monthly SST data)

Week 5 Makeup(October 23)
Review of EOFs and 3D plotting
Example Code


Instructor: Andy Newman
Email: anewman (at)
Times: Tuesday, 3:00-4:30pm, November 3 - December 8 (No class Nov. 24)
Place: ATS 101
Preface: MATLAB is a simple programming language with its own extensive library of mathematical and graphical routines. It integrates computation, visualization, and programming in an easy to use graphical user interface. This section is intended for anyone who would like to learn more about MATLAB. No previous experience with MATLAB is necessary, but some basic programming and UNIX/Linux environment experience is assumed.
Syllabus: PDF

Week 1 (November 3)
Introduction to MATLAB: layout of graphical user interface (GUI), interactive commands, operators and variables, MATLAB help

Week 2 (November 10)
MATLAB programming: Arrays, built-in functions, syntax, File I/O
first_m_file.m | sample_text_io.m | sample_binary_io.m | sample_netcdf_hdf_io.m
Example Data
sample_text_var.txt | sample_strings.txt | sample_header.txt | | example.hdf
Some general suggestions on things to do to become more comfortable with MATLAB and the material covered this week

Week 3 (November 17)
Graphics in MATLAB: Basic plotting ranging from simple line plots through bar graphs, contour plots, surface plots and many things in between

Week 4 (December 1)
More Graphics in MATLAB: More 3-D plotting and working with volume data. We'll also talk about functions and optimizing code.

Week 5 (December 8)
A look at more capabilities of MATLAB. Regression, differentiation, integration, TeX and LaTeX, and a few toolboxes will be discussed.
Example Data