Semester reading schedule -- important!
Student feedback from past years (I
post this both for my own reference and so students can see the range
of opinions held by other students!)
Project related materials:
Monte Carlo project
Complete instructions
Random number generator
Monte Carlo code fragments
Derivation of relationships for converting photon-relative coordinates to model-relative coordinates.
Sample output (tau = 2, ssa=0.9990, g = 0.85, theta0 = 60 )
Sample output (tau = 0.1, ssa= 0.9000, g=0.80, theta0 = 30.0)
Weighting function project
Instructions
Mass extinction coefficient of dry air and water vapor
Interpolation program
- Fortran version
- IDL version
- Matlab version (courtesy of Justin Sieglaff)
Saturation vapor pressure routine
Sample input sounding (with added 'bogus' levels at 10 and 1 mb)
Sample output from interpolation program
Sample file containing layer properties (you need to write program that duplicates these results)DelZ = layer thickness (m)Sample file containing computed weighting function and brightness temperature
Ztop = altitude of layer top (m)
Tbar = average temperature of layer (K)
Pbar = average pressure of layer (Pa)
RhoWV = water vapor density (g / m**3)
MassAir = layer air mass (kg/m**2)
MassWV = layer vapor mass (kg/m**2)The above file is for freq=53.0 GHz, surface temp = 300 K, surface emissivity = 0.5, mu = 0.5.Postscript plot of weighting function
First line contains computed brightness temperature at the top of the atmosphere.
First column is W(z), second colum is z (km).Greenbay sounding (8 April 2002)
Fairbanks sounding (29 January 2002)Streamer project
Instructions
Main web page for Streamer
Sample input files:
shortwave.inp Broadband fluxes and heating rates for shortwave.
longwave.inp Broadband fluxes and heating rates, longwave
combined.inp Broadband fluxes and heating rates, both shortwave and longwave
all_bands.inp Band-by-band fluxes and heating rates; each of 129 bands in sequence
single_band.inp Single band fluxes and heating rates.
read_streamer_output.f A Fortran program I wrote that can be used/adapted for efficiently "mining" streamer output files for selected variables and writing them out in a more convenient or compact format. This is especially useful for the output of "all_bands.inp". Modify this program as needed to write the values of just the variables you require for a particular purpose. You might also have to modify a line or two (e.g.,
if (idashcount .lt. 2) goto 1)
to get it to correctly advance to the right point in the output file for your particular case.
Notes on computer languages and plotting
You will have to choose which language you would like use for your projects. Here are some of the options:
Fortran
Pros:
- Still widely used in engineering and the sciences
- Not tied to one particular commercial vendor
- Available on many (not all) AOS machines
- Free version (g77) exists, but in older flavor
Cons:
- No built-in support for graphics
- Syntax of F77 may seem arcane and fussy (F95 is much better)
C/C++
Pros:
- Widely available, especially on Linux machines
Cons:
- No built-in support for scientific operations like raising to a power, matrix multiplication, complex numbers
- Syntax is fussy, somewhat unforgiving of beginner mistakes, can be tough to debug
- No built-in support for graphics
IDL
Pros:
- Widely used in this building
- Straightforward Fortran-like syntax only more powerful built-in functions
- Very versatile built-in plotting capability
Cons:
- Expensive commercial package; probably not available on most AOS machines - check whether the machines you have accounts on provide it
MatLab
Pros:
- Similar advantages to IDL, from what I understand, including built-in plotting
- built-in editor?
Cons:
- Expensive commercial package like IDL; may not be available on your machine
- Of all the languages listed, this is the only one I have no personal experience with, so I can't help with syntactical or functional questions.
Text Editors
Regardless of what language you use (in this class or in the future), you need to be able to create and edit the program before executing it. This requires a suitable text editor. I think MatLab might have a built-in text editor. For other languages, you'll need an external one. A text editor is NOT the same as a word processing program like Word, and I do NOT recommend trying to use Word for this purpose (even though it's theoretically possible, if you really know what you're doing and don't mind a lot of inconvenience). Rather, the most common options for editing programs include (among others) vi and emacs. Personally I think vi has few advantages and many disadvantages; others may disagree. Both vi and emacs are available on just about any Linux machine, and emacs can be installed on Windows and Mac machines as well. And they're free! But both also require you to learn some fairly unintuitive keystrokes, though the set you really, really need is pretty small.
A very handy feature of emacs is that it "knows" about the syntax of many common programming languages and will help format the code and even highlight syntactical elements and keywords so as to make parenthesis-matches, loop starts and ends, etc. much easier to follow and debug.
Here is a cheat-sheet for emacs with the most essential commands (this is all I need 99% of the time, even though I've been using emacs for 20 years).