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

FORTRAN & UNIX

Instructor: Kate Thayer-Calder
Email: katetc (at) atmos.colostate.edu
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,
FTCRainrates.txt
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, NCEP.Precip.0100-1204.nc

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

IDL

Instructor: Joe Munchak
Email: jmunchak (at) atmos.colostate.edu
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.
PDF
Example Code
array_arith.pro, array_character.pro, arr_matrix_multip.pro, convert_variables.pro, create_lat_lon.pro,hello_world.pro,string_conversions.pro,test_case.pro,test_for.pro,variable_types.pro
Exercises #1 PDF

Week 2 (October 6)
IDL Data Structures and file I/O (ASCII, Binary, netCDF, HDF, and images)
PDF
Example Code
read_hdf.pro
Example Data
1B11.000130.12519.5.HDF,ned.flt,ned.hdr,sample1.txt,sample2.txt,sample.bin,sounding.txt,zg_ukmo.nc
Exercises #2 PDF

Week 3 (October 13)
All about plotting in IDL
PDF
Example Code
colorbar.pro,create_ct.pro, imgunder.pro(required for colorbar), legend.pro, maken.pro(required for colorbar), plot_sst.pro, scalearray.pro(required for colorbar)
Example Data
kwaj02.txt,tmi.fusion.2000.001.v01.gz
Exercises #3 PDF

Week 4 (October 20)
More plotting routines and statistical routines
PDF
Example Code
pcontour.pro, hdr_intf.pro, extract.pro, load_ctbl.pro, imgsize.pro, map_axis.pro, gen_labels.pro, cont_cbar.pro, color_tables.tar.gz, pimage.pro, expscl.pro, pimage.pro, expscl.pro, eof_example.pro
Example Data
sstdata.tar.gz (monthly SST data)

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

MATLAB

Instructor: Andy Newman
Email: anewman (at) atmos.colostate.edu
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
PDF | PPT

Week 2 (November 10)
MATLAB programming: Arrays, built-in functions, syntax, File I/O
PDF | PPT
Examples
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.nc | example.hdf
Exercises
Some general suggestions on things to do to become more comfortable with MATLAB and the material covered this week
DOC

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
PDF | PPT
Examples
sample_graphics.m

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.
PDF | PPT

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